authentication2.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <service-widget @btnClick="btn_click"></service-widget>
  6. <view class="headers " :style="headerStyle">
  7. <view class="dis a-c j-start ">
  8. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  9. <text style="margin: auto;">已认证</text>
  10. </view>
  11. <view class="search dis j-s a-c mt-5">
  12. <u-search v-model="pageRequest.criteria"
  13. style="box-shadow: 0px 4px 10px 0px #DAE3F4;border-radius: 6px;" @custom="custom" @search="search"
  14. :shape="shape" :height='68' bg-color="#fff" color="#000" :input-style="{background:'transparent'}"
  15. placeholder-color="rgba(51,51,51,0.6)" :clearabled="clearabled" :show-action="showAction"
  16. :input-align="inputAlign" @clear="clear" :action-style="{background:'#fff'}"
  17. placeholder="请输入工号、姓名、手机号查询"></u-search>
  18. <!-- <image src="/static/image/car-insure/dropdown.png" mode="" @tap="searchPopup"></image> -->
  19. </view>
  20. </view>
  21. <view style="padding: 160px 16px 50px 16px;">
  22. <view class="Paging dis f-c " v-for="(item,index) in list" :key="index">
  23. <view class="pa-title dis a-c j-s">
  24. <view class="dis a-c ">
  25. <image src="../../../static/image/addStaff/active1.png" mode=""></image>
  26. <text>已认证</text>
  27. </view>
  28. <u-button size="mini" type="primary" :custom-style="{fontSize:'14px'}" :plain="true"
  29. @click="detail(item.id)">查看详情</u-button>
  30. </view>
  31. <view class="pa-cent dis f-c mt-2">
  32. <text style="color: #333;">姓名:{{item.name}}</text>
  33. <text>工号:{{item.id}}</text>
  34. <view class="dis j-s a-c">
  35. <text>手机号:{{item.mobile}}</text>
  36. <image src="../../../static/image/addStaff/phone.png" mode="" @click="callPhone(item.mobile)">
  37. </image>
  38. </view>
  39. </view>
  40. </view>
  41. <u-loadmore v-if="list.length!=0" :status="status" />
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import {
  47. mapState
  48. } from "vuex"
  49. export default {
  50. data() {
  51. return {
  52. headerStyle: {
  53. backgroundColor: '',
  54. backgroundImage: '',
  55. backgroundSize: '',
  56. backgroundPosition: '',
  57. boxShadow: ''
  58. // 其他样式属性...
  59. },
  60. shape: 'square',
  61. clearabled: true,
  62. showAction: false,
  63. inputAlign: 'left',
  64. pageRequest: { //查询的默认条件
  65. pageNum: 1,
  66. pageSize: 20,
  67. authenticationStatus: '1',
  68. criteria: "",
  69. },
  70. list: [],
  71. status: 'loadmore',
  72. totalPages: 0, //订单总页数
  73. }
  74. },
  75. onReachBottom() {
  76. if (this.pageRequest.pageNum >= this.totalPages) return;
  77. this.status = 'loading';
  78. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  79. setTimeout(async () => {
  80. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  81. if (res.code == '200') {
  82. this.list = [...this.list, ...res.data.content];
  83. }
  84. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  85. else this.status = 'loading';
  86. }, 1000)
  87. },
  88. onLoad() {
  89. this.querylist();
  90. },
  91. computed: {
  92. ...mapState(['userInfo', 'sources']),
  93. },
  94. methods: {
  95. btn_click() {
  96. uni.navigateTo({
  97. url: '/pages/chat/chat'
  98. })
  99. },
  100. async querylist() {
  101. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  102. if (res.code == '200') {
  103. this.list = res.data.content;
  104. this.totalPages = res.data.totalPages;
  105. }
  106. },
  107. detail(id) {
  108. this.navigate({
  109. url: '/pages/tools/addStaff/authenticationdetails?id=' + id
  110. }, "navigateTo", true);
  111. },
  112. callPhone(tel) {
  113. uni.makePhoneCall({
  114. phoneNumber: tel,
  115. success: () => {
  116. console.log("成功拨打电话")
  117. }
  118. })
  119. },
  120. //页面返回按钮
  121. back() {
  122. uni.navigateBack({
  123. delta: 1, // 返回的页面数,如果是1表示返回上一页
  124. success: function() {}
  125. });
  126. },
  127. change(index) {
  128. this.current = index;
  129. },
  130. change1(index) {
  131. this.current1 = index;
  132. },
  133. getStaffList(staffType) {
  134. // 0未认证 1已认证 2全部
  135. this.navigate({
  136. url: '/pages/tool-staff-list/tool-staff-list?staffType=' + staffType
  137. }, "navigateTo", true);
  138. },
  139. //回车搜索事件
  140. search(val) {
  141. this.querylist();
  142. },
  143. //搜索按钮事件
  144. clear(val) {
  145. this.pageRequest.criteria = "";
  146. this.querylist();
  147. },
  148. }
  149. }
  150. </script>
  151. <style lang="scss" scoped>
  152. page {
  153. background-color: #F8FAFE;
  154. }
  155. .search {
  156. image {
  157. width: 22px;
  158. height: 22px;
  159. margin-left: 20px;
  160. }
  161. }
  162. .headers {
  163. position: fixed;
  164. top: 0;
  165. left: 0;
  166. height: auto;
  167. width: 100%;
  168. z-index: 999999;
  169. padding: 16px;
  170. padding-top: 50px;
  171. height: auto;
  172. background: #F8FAFE;
  173. background-image: url("/static/image/addStaff/bfg.png");
  174. background-size: 100% 100%;
  175. text {
  176. font-size: 18px;
  177. font-weight: bold;
  178. color: #000;
  179. }
  180. }
  181. .Paging {
  182. width: 100%;
  183. height: auto;
  184. background: #FFFFFF;
  185. box-shadow: 0px 4px 10px 0px #DAE3F4;
  186. border-radius: 6px;
  187. padding: 10px;
  188. box-sizing: border-box;
  189. margin-bottom: 10px;
  190. .pa-title {
  191. padding-bottom: 6px;
  192. border-bottom: 1px solid #f2f2f2;
  193. text {
  194. font-size: 14px;
  195. color: #31BE0E;
  196. font-weight: 700;
  197. margin-left: 6px;
  198. }
  199. image {
  200. width: 18px;
  201. height: 18px;
  202. }
  203. }
  204. .pa-cent {
  205. text {
  206. font-size: 13px;
  207. color: rgba(51, 51, 51, 0.8);
  208. font-weight: 400;
  209. }
  210. image {
  211. width: 20px;
  212. height: 20px;
  213. }
  214. }
  215. }
  216. </style>