roose 4 tahun lalu
induk
melakukan
25d156dad6
4 mengubah file dengan 38 tambahan dan 50 penghapusan
  1. 1 1
      pages/index/index.js
  2. 34 48
      pages/love/love.js
  3. 2 0
      pages/paiming/paiming.js
  4. 1 1
      utils/number.wxs

+ 1 - 1
pages/index/index.js

@@ -69,7 +69,7 @@ Page({
       fail: (res) => {
         console.log(res, "假的");
         wx.showToast({
-          title: '当前不是二维码,请二维码',
+          title: '扫码失败',
           icon: 'none',
           duration: 2000,
         })

+ 34 - 48
pages/love/love.js

@@ -47,22 +47,6 @@ Page({
       time: Y + '-' + M + '-' + D
     })
   },
-  submitInfo(params) {
-    wx.request({
-      url: app.globalData.publicUrl + '/applet/suppleUserInfo',
-      method: "POST",
-      data: params,
-      header: {
-        appletsId: wx.getStorageSync('openId')
-      },
-      success: (res) => {
-        if (res.data.code == 0) {
-          console.log(res, "0000");
-
-        }
-      }
-    })
-  },
   zhaopian() {
     var that = this;
     wx.chooseImage({
@@ -151,6 +135,8 @@ Page({
         lng: this.data.lng,
         visitLocation: this.data.visitLocation
       }
+      console.log(obj,"78787878");
+      
 
       // wx.request({
       //   url: app.globalData.publicUrl + '/visit/doFace3',
@@ -167,39 +153,39 @@ Page({
       //   }
       // })
 
-      // 提交的接口 
+      //提交的接口 
 
-      // wx.request({
-      //   url: app.globalData.publicUrl + '/visit/add',
-      //   method: "POST",
-      //   header: {
-      //     appletsId: wx.getStorageSync('openId')
-      //   },
-      //   data: obj,
-      //   success: (res) => {
-      //     if (res.data.code == 0) {
-      //       wx.showModal({
-      //         showCancel: false,
-      //         content: '提交成功',
-      //         success() {
-      //           wx.switchTab({
-      //             url: '/pages/index/index',
-      //           })
-      //         }
-      //       })
-      //     } else if (res.data.code == 1) {
-      //       wx.showModal({
-      //         showCancel: false,
-      //         content: res.data.message,
-      //         success() {
-      //           wx.switchTab({
-      //             url: '/pages/index/index',
-      //           })
-      //         }
-      //       })
-      //     }
-      //   }
-      // })
+      wx.request({
+        url: app.globalData.publicUrl + '/visit/add',
+        method: "POST",
+        header: {
+          appletsId: wx.getStorageSync('openId')
+        },
+        data: obj,
+        success: (res) => {
+          if (res.data.code == 0) {
+            wx.showModal({
+              showCancel: false,
+              content: '提交成功',
+              success() {
+                wx.switchTab({
+                  url: '/pages/index/index',
+                })
+              }
+            })
+          } else if (res.data.code == 1) {
+            wx.showModal({
+              showCancel: false,
+              content: res.data.message,
+              success() {
+                wx.switchTab({
+                  url: '/pages/index/index',
+                })
+              }
+            })
+          }
+        }
+      })
     } else {
       wx.showToast({
         title: '请上传现场照片',

+ 2 - 0
pages/paiming/paiming.js

@@ -36,6 +36,8 @@ Page({
           list: res.data.data,
           number: res.data.data.userTotalValue.toString(),
         })
+        console.log(this.data.number,"knakna");
+        
       }
     })
   },

+ 1 - 1
utils/number.wxs

@@ -1,5 +1,5 @@
 var number = function (val,index) {
-  return val.substring(index-1,1)
+  return val.slice(index,index+1)
 }
 
 module.exports = {