Browse Source

viewCount 字段更换

gemercheung 3 years ago
parent
commit
faf21396bc
3 changed files with 4 additions and 5 deletions
  1. 3 3
      component/storeItem/storeItem.js
  2. 1 1
      component/storeItem/storeItem.wxml
  3. 0 1
      services/user.js

+ 3 - 3
component/storeItem/storeItem.js

@@ -15,13 +15,13 @@ Component({
     storeItem: null
   },
   attached() {
-
+    
     this.setData({
       storeItem: this.data.store
     })
-    if (this.data.storeItem.pvTotalNum >= 10000) {
+    if (this.data.storeItem.viewCount >= 10000) {
       this.setData({
-        'storeItem.pvTotalNum': (this.data.storeItem.pvTotalNum / 10000).toFixed(1) + 'w'
+        'storeItem.viewCount': (this.data.storeItem.viewCount / 10000).toFixed(1) + 'w'
       })
     }
   },

+ 1 - 1
component/storeItem/storeItem.wxml

@@ -10,6 +10,6 @@
   </view>
 
   <view class="storeView">
-    {{storeItem.pvTotalNum}} 人浏览过
+    {{storeItem.viewCount}} 人浏览过
   </view>
 </view>

+ 0 - 1
services/user.js

@@ -10,7 +10,6 @@ const api = require('../config/api.js');
  * 调用微信登录
  */
 function loginByWeixin(userInfo) {
-  debugger;
   let code = null;
   return new Promise(function (resolve, reject) {
     return util.login().then((res) => {