浏览代码

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/wechat into dev

许成详 6 年前
父节点
当前提交
bb61dcae06
共有 4 个文件被更改,包括 21 次插入11 次删除
  1. 10
    3
      src/pages/user/App.vue
  2. 9
    7
      src/pages/user/mainPage/userCenter/index.vue
  3. 1
    0
      src/pages/user/orderList/index.vue
  4. 1
    1
      vue.config.js

+ 10
- 3
src/pages/user/App.vue 查看文件

1
 <template>
1
 <template>
2
-  <div id="app">
3
-    <router-view></router-view>
2
+  <div id="app" v-if="showPage">
3
+    <router-view ></router-view>
4
   </div>
4
   </div>
5
 </template>
5
 </template>
6
 
6
 
10
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
10
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
11
 export default {
11
 export default {
12
   name: 'app',
12
   name: 'app',
13
+  data () {
14
+    return {
15
+      showPage: false
16
+    }
17
+  },
13
   components: {},
18
   components: {},
14
   computed: {
19
   computed: {
15
     ...mapState({
20
     ...mapState({
23
     } else {
28
     } else {
24
       this.code = null
29
       this.code = null
25
     }
30
     }
26
-    this.getUserInfo({ org: this.org, code: this.code })
31
+    this.getUserInfo({ org: this.org, code: this.code }).then(() => {
32
+      this.showPage = true
33
+    })
27
   },
34
   },
28
   methods: {
35
   methods: {
29
     ...actions(['getUserInfo'])
36
     ...actions(['getUserInfo'])

+ 9
- 7
src/pages/user/mainPage/userCenter/index.vue 查看文件

79
   components: {
79
   components: {
80
 
80
 
81
   },
81
   },
82
-  created () {
83
-    if (this.userInfo != 406) {
84
-      this.user = this.userInfo.customer
85
-      this.AccountInfo = JSON.parse(this.user.AccountInfo)
86
-      this.headimgurl = this.AccountInfo.headimgurl
87
-      this.isLoading = false
88
-    }
82
+  mounted () {
83
+    this.$nextTick(() => {
84
+      if (this.userInfo != 406) {
85
+        this.user = this.userInfo.customer
86
+        this.AccountInfo = JSON.parse(this.user.AccountInfo)
87
+        this.headimgurl = this.AccountInfo.headimgurl
88
+        this.isLoading = false
89
+      }
90
+    })
89
   },
91
   },
90
   methods: {
92
   methods: {
91
     ...actions(['getUserInfo']),
93
     ...actions(['getUserInfo']),

+ 1
- 0
src/pages/user/orderList/index.vue 查看文件

87
       Math.ceil(this.orders.pagenum / this.orders.pagesize) > this.page ? this.hasMore = true : this.hasMore = false
87
       Math.ceil(this.orders.pagenum / this.orders.pagesize) > this.page ? this.hasMore = true : this.hasMore = false
88
       // this.list.length <= 8 ? this.hasMore = true : this.hasMore = false
88
       // this.list.length <= 8 ? this.hasMore = true : this.hasMore = false
89
       if (this.hasMore) {
89
       if (this.hasMore) {
90
+        this.page = this.page+1
90
         setTimeout(() => {
91
         setTimeout(() => {
91
           _that.getCustomerGoodsOrder({
92
           _that.getCustomerGoodsOrder({
92
             page: _that.page,
93
             page: _that.page,

+ 1
- 1
vue.config.js 查看文件

26
       '/api': {
26
       '/api': {
27
         // target: 'https://dp.huiju360.com.cn/hj_operations',
27
         // target: 'https://dp.huiju360.com.cn/hj_operations',
28
         // target: 'http://192.168.0.62:8080', //wf
28
         // target: 'http://192.168.0.62:8080', //wf
29
-        target: 'http://192.168.0.11:8080', //ys
29
+        target: 'http://192.168.0.11', //ys
30
         // target: 'http://dev.ycjcjy.com', //frp
30
         // target: 'http://dev.ycjcjy.com', //frp
31
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
31
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
32
         // pathRewrite: {
32
         // pathRewrite: {