yuantianjiao 6 years ago
parent
commit
91b35be49a
3 changed files with 37 additions and 26 deletions
  1. 9
    9
      src/pages/user/App.vue
  2. 27
    16
      src/pages/user/mainPage/userCenter/index.vue
  3. 1
    1
      vue.config.js

+ 9
- 9
src/pages/user/App.vue View File

@@ -12,7 +12,7 @@ export default {
12 12
   name: 'app',
13 13
   data () {
14 14
     return {
15
-      showPage: false 
15
+      showPage: true 
16 16
     }
17 17
   },
18 18
   components: {},
@@ -23,14 +23,14 @@ export default {
23 23
     })
24 24
   },
25 25
   created () {
26
-    if (location.search && this.toolClass.UrlSearch(location.search).code) {
27
-      this.code = this.toolClass.UrlSearch(location.search).code
28
-    } else {
29
-      this.code = null
30
-    }
31
-    this.getUserInfo({ org: this.org, code: this.code }).then(() => {
32
-      this.showPage = true
33
-    })
26
+    // if (location.search && this.toolClass.UrlSearch(location.search).code) {
27
+    //   this.code = this.toolClass.UrlSearch(location.search).code
28
+    // } else {
29
+    //   this.code = null
30
+    // }
31
+    // this.getUserInfo({ org: this.org, code: this.code }).then(() => {
32
+    //   this.showPage = true
33
+    // })
34 34
   },
35 35
   methods: {
36 36
     ...actions(['getUserInfo'])

+ 27
- 16
src/pages/user/mainPage/userCenter/index.vue View File

@@ -8,8 +8,8 @@
8 8
           <div>
9 9
             <img :src="headimgurl" alt width="100%" height="100%">
10 10
             <div>
11
-              <div class="user-name">{{user.Name}}2333</div>
12
-              <div v-if="user.Phone">{{user.Phone}}3333</div>
11
+              <div class="user-name">{{user.Name}}</div>
12
+              <div v-if="user.Phone">{{user.Phone}}</div>
13 13
               <div v-else>未绑定</div>
14 14
             </div>
15 15
             <div></div>
@@ -20,7 +20,7 @@
20 20
           </div>
21 21
           <div v-else class="bind">
22 22
             <span>请绑定手机号后查看会员条形码</span>
23
-            <span>立即绑定</span>
23
+            <span @click="bindMobile">立即绑定</span>
24 24
           </div>
25 25
         </div>
26 26
         <!-- <div class="userAvatar_Border">
@@ -32,7 +32,7 @@
32 32
           <div class="user-name">{{user.Name}}</div>
33 33
           <div class="mobile" v-if="user.Phone">{{user.Phone}}</div>
34 34
           <div class="mobile" v-else @click="bindMobile">绑定手机号</div>
35
-        </div> -->
35
+        </div>-->
36 36
       </div>
37 37
       <div class="vip-privilege flex-h">
38 38
         <div class="flex-item privilege-item" @click="toCoupons">
@@ -83,6 +83,10 @@
83 83
           <span>活动记录</span>
84 84
           <i class="iconfont icon-jiantou-right"></i>
85 85
         </div>
86
+        <div class="menu-item flex-h" @click="toMyBook">
87
+          <span>我的借阅</span>
88
+          <i class="iconfont icon-jiantou-right"></i>
89
+        </div>
86 90
       </div>
87 91
     </div>
88 92
   </div>
@@ -110,19 +114,23 @@ export default {
110 114
 
111 115
   },
112 116
   mounted () {
113
-    // this.getUserInfo({ org: this.org }).then(() => {
114
-    //   this.user = this.userInfo.customer
115
-    //   if (this.user.AccountInfo) {
116
-    //     this.AccountInfo = JSON.parse(this.user.AccountInfo)
117
-    //   }
118
-    //   this.headimgurl = this.user.Headimgurl
119
-    // })
120
-    // this.getNum()
121
-    JsBarcode("#barcode", "2334546456456", {
122
-      lineColor: '#000000',
123
-      height: 60,
124
-      displayValue: false
117
+    this.getUserInfo({ org: this.org }).then(() => {
118
+      this.user = this.userInfo.customer
119
+      if (this.user.AccountInfo) {
120
+        this.AccountInfo = JSON.parse(this.user.AccountInfo)
121
+        this.$nextTick(() => {
122
+          if (this.user.Phone) {
123
+            JsBarcode("#barcode", "2334546456456", {
124
+              lineColor: '#000000',
125
+              height: 60,
126
+              displayValue: false
127
+            })
128
+          }
129
+        })
130
+      }
131
+      this.headimgurl = this.user.Headimgurl
125 132
     })
133
+    this.getNum()
126 134
   },
127 135
   methods: {
128 136
     ...actions(['getUserInfo', 'getNum']),
@@ -151,6 +159,9 @@ export default {
151 159
       var url = window.location.pathname
152 160
       window.location.href = url.replace('user.html', 'bodyCheck.html') + '#/'
153 161
     },
162
+    toMyBook () {
163
+      this.$router.push({ name: 'borrowedRecord' })
164
+    },
154 165
     toLuckdraw () {
155 166
       // ^参数约定为97
156 167
       let userid = this.userInfo.customer.CustomerId

+ 1
- 1
vue.config.js View File

@@ -23,7 +23,7 @@ module.exports = {
23 23
     proxy: {
24 24
       '/api': {
25 25
         // target: 'https://dp.huiju360.com.cn/hj_operations',
26
-        target: 'http://localhost:8080', // wf
26
+        target: 'http://192.168.0.62:8080', // wf
27 27
         // target: 'http://192.168.0.102:8080', // hyq
28 28
         // target: 'http://192.168.0.11', // ys
29 29
         // target: 'http://dev.ycjcjy.com', // frp