From 35a984968cced5eb906ad7e30ea2c06896116510 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Sat, 31 Jul 2021 17:32:15 +0800 Subject: [PATCH] no message --- pages/home/customer-code/index.js | 10 ++++++---- pages/home/customer-code/index.json | 10 ---------- pages/home/customer-code/index.wxml | 4 ++-- pages/home/customer-code/index.wxss | 9 +-------- pages/home/customer-info/index.js | 2 +- pages/home/customer-info/index.wxss | 9 +-------- pages/home/customer-list/index.js | 6 +----- 7 files changed, 12 insertions(+), 38 deletions(-) diff --git a/pages/home/customer-code/index.js b/pages/home/customer-code/index.js index 6f28c69..3c29933 100644 --- a/pages/home/customer-code/index.js +++ b/pages/home/customer-code/index.js @@ -1,6 +1,7 @@ // pages/home/customer-info/index.js import Scene from '../../index/scene' -const qrCode = require('../../../utils/weapp-qrcode.js'); +const util = require('../../../utils/util') +const qrCode = require('../../../utils/weapp-qrcode.js') const app = getApp() Scene({ @@ -8,13 +9,15 @@ Scene({ * 页面的初始数据 */ data: { - + name: '裕隆纸业有限公司', }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.showQrCode('?mark=ztb_saas&QrCodeRecordId=597399780326510592' + Math.ceil(Math.random() * 100) ) + if(!util.isEmpty(options.id)){ + this.showQrCode('?mark=ztb_saas&QrCodeRecordId=597399780326510592' + Math.ceil(Math.random() * 100) ) + } }, rpx2px: function(rpx) { return rpx / 750 * app.globalData.windowWidth @@ -28,7 +31,6 @@ Scene({ colorLight: "#FFFFFF", correctLevel: qrCode.CorrectLevel.H }) - this.setData({ show: true }) }, previewImage: function(){ wx.canvasToTempFilePath({ diff --git a/pages/home/customer-code/index.json b/pages/home/customer-code/index.json index 449ab55..8973115 100644 --- a/pages/home/customer-code/index.json +++ b/pages/home/customer-code/index.json @@ -1,16 +1,6 @@ { "usingComponents": { "van-button": "/components/button/index", - "van-cell": "/components/cell/index", - "van-field": "/components/field/index", - "van-loading": "/components/loading/index", - "van-image": "/components/image/index", - "van-icon": "/components/icon/index", - "van-action-sheet": "/components/action-sheet/index", - "van-notice-bar": "/components/notice-bar/index", - "van-picker": "/components/picker/index", - "van-popup": "/components/popup/index", - "van-dialog": "/components/dialog/index", "notification": "/pages/message/notification/index" } } \ No newline at end of file diff --git a/pages/home/customer-code/index.wxml b/pages/home/customer-code/index.wxml index 824f549..dfe5d91 100644 --- a/pages/home/customer-code/index.wxml +++ b/pages/home/customer-code/index.wxml @@ -3,10 +3,10 @@ - + - 裕隆纸业有限公司 + {{name}} \ No newline at end of file diff --git a/pages/home/customer-code/index.wxss b/pages/home/customer-code/index.wxss index fd5a5bd..db91716 100644 --- a/pages/home/customer-code/index.wxss +++ b/pages/home/customer-code/index.wxss @@ -1,8 +1 @@ -/* pages/home/customer-info/index.wxss */ -.wrapper { - display: flex; - align-items: center; - justify-content: center; - height: 100%; - padding: 0px 15%; -} \ No newline at end of file +/* pages/home/customer-info/index.wxss */ \ No newline at end of file diff --git a/pages/home/customer-info/index.js b/pages/home/customer-info/index.js index 53862fc..e38f01d 100644 --- a/pages/home/customer-info/index.js +++ b/pages/home/customer-info/index.js @@ -40,7 +40,7 @@ Scene({ wx.showLoading({ title: '正在获取', mask: true }) getCustomerInfo(options.id).then(result => { wx.hideLoading() - if(!util.isEmpty(options.userId)){ + if(!util.isEmpty(options.userId) && options.userId != 'null'){ result.data.userId = options.userId } if(util.isEmpty(result.data.customerSettleType) || Number(result.data.customerSettleType) < 1){ diff --git a/pages/home/customer-info/index.wxss b/pages/home/customer-info/index.wxss index fd5a5bd..db91716 100644 --- a/pages/home/customer-info/index.wxss +++ b/pages/home/customer-info/index.wxss @@ -1,8 +1 @@ -/* pages/home/customer-info/index.wxss */ -.wrapper { - display: flex; - align-items: center; - justify-content: center; - height: 100%; - padding: 0px 15%; -} \ No newline at end of file +/* pages/home/customer-info/index.wxss */ \ No newline at end of file diff --git a/pages/home/customer-list/index.js b/pages/home/customer-list/index.js index 4c1040d..13ac61c 100644 --- a/pages/home/customer-list/index.js +++ b/pages/home/customer-list/index.js @@ -192,11 +192,7 @@ Scene({ channel.emit('onCallback', { what: 130, detail: item }) wx.navigateBack() } else { - if(util.isEmpty(item.userId)){ - wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}` }) - } else { - wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}&userId=${item.userId}` }) - } + wx.navigateTo({ url: `/pages/home/customer-info/index?id=${item.id}&userId=${item.userId}` }) } }, bindCustomer: function(e){