Browse Source

用户详情

xiuli.gao 2 years ago
parent
commit
88c46ee549

File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/css/userPortrait.dc257249.css


File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/index.html


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/app.7a7efb75.js


File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/js/app.deed75e8.js


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/userPortrait.0aea0c57.js


File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/js/userPortrait.88b047f9.js


+ 2 - 2
qwh5/src/main.ts

@@ -5,7 +5,7 @@ import store from './store'
5 5
 import ElementPlus from 'element-plus'
6 6
 import 'element-plus/dist/index.css'
7 7
 // import * as ElementPlusIconsVue from '@element-plus/icons-vue'
8
-import { Icon } from 'vant';
8
+import { Icon, Loading } from 'vant';
9 9
 import 'vant/lib/index.css';
10 10
 import './styles/index.scss'
11 11
 import axios from './utils/axios';
@@ -16,7 +16,7 @@ const app = createApp(App)
16 16
 //   app.component(key, component)
17 17
 // }
18 18
 
19
-app.use(Icon).use(ElementPlus).use(store).use(router).mount('#app')
19
+app.use(Loading).use(Icon).use(ElementPlus).use(store).use(router).mount('#app')
20 20
 
21 21
 app.config.globalProperties.$axios = axios;//全局挂载方法
22 22
 app.config.globalProperties.$getWxConfig = getWxConfig;//全局挂载方法

+ 19 - 15
qwh5/src/views/userPortrait.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="container">
3
-    <div class="user_portrait_container">
3
+    <div class="user_portrait_container" v-if="pageLoading">
4 4
       <div class="sidePadding">
5 5
         <div class="userImgBox">
6 6
           <img :src="userInfo.avatar" class="userImg" alt="">
@@ -107,6 +107,7 @@
107 107
         </div>
108 108
       </div>
109 109
     </div>
110
+    <van-loading v-else type="spinner" color="#00b38a" class="pageStyleLoading"/>
110 111
     <!-- 标签 -->
111 112
     <van-dialog v-model:show="tag_visible" title="选择标签" show-cancel-button :before-close="onBeforeClose" @confirm="confirm_tag" confirmButtonColor="#00b38a">
112 113
       <!-- 标签内容 -->
@@ -140,6 +141,7 @@ export default {
140 141
     const h5CustomerOrderList = ref([])
141 142
     const configInfo = ref(null)
142 143
     const self_url = ref()
144
+    const pageLoading = ref(false)    
143 145
     // const configInfo = {
144 146
     //   corpid:'wwc8d3e33f8e096671',
145 147
     //   external_userid:'wmezvKNwAAF17OWc13Hg6X0ob31ijZmg',
@@ -147,6 +149,7 @@ export default {
147 149
     // }
148 150
     onBeforeMount(() => {//组件挂载之前
149 151
       if(getQueryString('againJump')){
152
+        pageLoading.value = true;
150 153
         getWxConfig(()=>{
151 154
           self_url.value = window.location.href
152 155
           getCurExternalContact()//获取企业外部联系人ID
@@ -168,9 +171,7 @@ export default {
168 171
     // (proxy as any).$getAuthInfo(()=>{
169 172
     //   console.log('hhhh')
170 173
     // })
171
-      get_user_info()//客户详情
172
-      get_h5CustomerDynamicList()//动态
173
-      get_h5CustomerOrderList()//订单
174
+      
174 175
       // getCurExternalContact()
175 176
     });
176 177
     function _closeTag (arr) {//回调
@@ -256,6 +257,9 @@ export default {
256 257
         }, function(res){
257 258
         if(res.err_msg == "getCurExternalContact:ok"){
258 259
             configInfo.value.external_userid = res.userId;
260
+            get_user_info()//客户详情
261
+            get_h5CustomerDynamicList()//动态
262
+            get_h5CustomerOrderList()//订单
259 263
         }else {
260 264
             //错误处理
261 265
         }
@@ -269,6 +273,7 @@ export default {
269 273
       user_tab,
270 274
       tag_visible,
271 275
       configInfo,
276
+      pageLoading,
272 277
       userInfo,
273 278
       h5CustomerDynamicList,
274 279
       h5CustomerOrderList,
@@ -533,16 +538,15 @@ export default {
533 538
     }
534 539
   }
535 540
 }
536
-</style>
537
-<style lang="scss">
538
-.self_dialog{
539
-  width:80%;
540
-  .el-dialog__header{
541
-    padding: 10px !important;
542
-    margin-right: 0;
543
-  }
544
-  .el-dialog__body{
545
-    padding:10px !important;
546
-  }
541
+.pageStyleLoading{
542
+    width: 100px;
543
+    height: 100px;
544
+    text-align: center;
545
+    position: absolute;
546
+    top: 0;
547
+    bottom: 0;
548
+    left: 0;
549
+    right: 0;
550
+    margin: auto;
547 551
 }
548 552
 </style>