From 384b37475399e17f83e6600f878abef177f30890 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Thu, 29 Apr 2021 10:21:26 +0800
Subject: [PATCH] no message
---
pages/agent/appointment/index.js | 7 ++++++
pages/agent/appointment/index.wxml | 1 +
pages/home/index/index.js | 1 +
pages/login/index.js | 2 +-
pages/message/index/index.js | 2 +-
pages/process/order-price/index.js | 15 ++++++++++---
pages/setting/authory/index.js | 16 +++++++++++++-
pages/setting/authory/index.wxml | 34 ++++++++++++++++++++---------
pages/storage/pound-info/index.js | 22 ++++++++++++++++---
pages/storage/pound-info/index.wxml | 9 +++++---
10 files changed, 87 insertions(+), 22 deletions(-)
diff --git a/pages/agent/appointment/index.js b/pages/agent/appointment/index.js
index 1d620a9..ec91657 100644
--- a/pages/agent/appointment/index.js
+++ b/pages/agent/appointment/index.js
@@ -1,5 +1,6 @@
// pages/process/order-check/index.js
import Scene from '../../index/scene'
+import Dialog from '../../../components/dialog/dialog'
import { getVehicleList, getFactoryPriceDetail, getRelation, postRelation, getProxyOrderInfo, createProxyOrder } from "../../../api/ztb"
const util = require('../../../utils/util')
const math = require('../../../utils/math')
@@ -212,6 +213,12 @@ Scene({
this.setData({ vehicleList: this.data.vehicleList })
},
submitForm: function (e) {
+ if(!app.userInfo.isAuth) {
+ Dialog.alert({ title: '温馨提示', message: '您暂未实名认证,请实名认证后提交订单。' }).then(() => {
+ wx.navigateTo({ url: '/pages/setting/authory/index' })
+ })
+ return
+ }
if (util.isEmpty(this.data.form.totalEstimatedWeight)) {
util.showToast('请输入预估重量')
return
diff --git a/pages/agent/appointment/index.wxml b/pages/agent/appointment/index.wxml
index d7ae666..0fe4eca 100644
--- a/pages/agent/appointment/index.wxml
+++ b/pages/agent/appointment/index.wxml
@@ -102,4 +102,5 @@
+
\ No newline at end of file
diff --git a/pages/home/index/index.js b/pages/home/index/index.js
index ddc866e..6d8e307 100644
--- a/pages/home/index/index.js
+++ b/pages/home/index/index.js
@@ -40,6 +40,7 @@ Component({
onEvent: function (message) {
if (message.what == 82) {
// 认证成功
+ this.setUserInfo()
}
},
setUserInfo: function(){
diff --git a/pages/login/index.js b/pages/login/index.js
index 2c99018..42b40cc 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -129,7 +129,7 @@ Page({
return
}
headerFactoryId(app.userInfo.factoryId)
- // wx.redirectTo({ url: '/pages/agent/select-list/index' })
+ // wx.redirectTo({ url: '/pages/setting/authory/index' })
wx.redirectTo({ url: '/pages/index/index' })
} else {
wx.redirectTo({ url: '/pages/client/index/index' })
diff --git a/pages/message/index/index.js b/pages/message/index/index.js
index b3ebc8d..f6f4b9a 100644
--- a/pages/message/index/index.js
+++ b/pages/message/index/index.js
@@ -41,7 +41,7 @@ Component({
},
onEvent: function (message) {
if (message.what == 888) {
- this.setData({ userInfo: app.accountInfo })
+ this.setData({ userInfo: app.userInfo })
}
},
onRefreshList: function () {
diff --git a/pages/process/order-price/index.js b/pages/process/order-price/index.js
index e8c3102..27747d8 100644
--- a/pages/process/order-price/index.js
+++ b/pages/process/order-price/index.js
@@ -35,13 +35,17 @@ Scene({
}
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns })
}).catch(err => {
- wx.hideLoading()
this.setData({ safeBottom: app.globalData.safeBottom })
util.showToast(err)
})
getFactoryOrderInfo(options.id).then(result => {
wx.hideLoading()
result.data.sign = 1
+ for (let index = 0; index < 2; index++) {
+ if(util.isEmpty(result.data.totalWeighingPicture[index])){
+ result.data.totalWeighingPicture[index] = { url: 'error' }
+ }
+ }
this.setData({ form: result.data })
}).catch(err => {
wx.hideLoading()
@@ -163,8 +167,13 @@ Scene({
viewImage: function (e) {
var imgList = []
for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) {
- imgList.push(this.data.form.totalWeighingPicture[index].url)
+ var url = this.data.form.totalWeighingPicture[index].url
+ if(!util.isEmpty(url) && 'error' != url){
+ imgList.push(url)
+ }
+ }
+ if(imgList.length){
+ wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
}
- wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
}
})
\ No newline at end of file
diff --git a/pages/setting/authory/index.js b/pages/setting/authory/index.js
index 18e840e..9ddbce3 100644
--- a/pages/setting/authory/index.js
+++ b/pages/setting/authory/index.js
@@ -45,10 +45,18 @@ Scene({
})
},
submitForm: function(){
+ if(util.isEmpty(this.data.form.realName)){
+ util.showToast('请输入真实姓名')
+ return
+ }
+ if(util.isEmpty(this.data.form.certificateNo)){
+ util.showToast('请输入身份证号码')
+ return
+ }
wx.showLoading({ title: '处理中', mask: true })
certificateIdentity(this.data.form).then(result => {
wx.hideLoading()
- app.accountInfo.isAuth = 1
+ app.userInfo.isAuth = 1
event.emit('EventMessage', { what: 82, desc: 'Auth Success' })
Dialog.alert({ title: '温馨提示', message: '个人信息认证成功' }).then(() => {
wx.navigateBack()
@@ -58,6 +66,12 @@ Scene({
util.showToast(error)
})
},
+ nextStep: function(){
+ this.setData({ step: 1 })
+ },
+ bindInput: function (e) {
+ this.data.form[e.currentTarget.id] = e.detail.value
+ },
/*******************************************************图片上传************************************************************/
chooseImage: function(e) {
if (this.data.flag) {
diff --git a/pages/setting/authory/index.wxml b/pages/setting/authory/index.wxml
index f7de2f7..35c9cc0 100644
--- a/pages/setting/authory/index.wxml
+++ b/pages/setting/authory/index.wxml
@@ -4,7 +4,10 @@
- *请拍摄/上传本人身份证(头像面)
+
+
+ 请拍摄/上传本人身份证(头像面)
+
@@ -20,7 +23,10 @@
- *请拍摄/上传本人身份证(国徽面)
+
+
+ 请拍摄/上传本人身份证(国徽面)
+
@@ -37,18 +43,26 @@
-
-
- 姓名:
-
+
+
+
+ *
+ 姓名:
+
+
-
- 身份证号码:
-
+
+
+ *
+ 身份证号码:
+
+
-
+
+ 手动输入
+
提交
diff --git a/pages/storage/pound-info/index.js b/pages/storage/pound-info/index.js
index 6246ac4..695add4 100644
--- a/pages/storage/pound-info/index.js
+++ b/pages/storage/pound-info/index.js
@@ -25,16 +25,24 @@ Scene({
result.data.emptyWeighingPicture = []
if(result.data.firstWeightImageUrl1){
result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrl1)
+ } else {
+ result.data.emptyWeighingPicture.push('error')
}
if(result.data.firstWeightImageUrl2){
result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrl2)
+ } else {
+ result.data.emptyWeighingPicture.push('error')
}
result.data.totalWeighingPicture = []
if(result.data.secondWeightImageUrl1){
result.data.totalWeighingPicture.push(result.data.secondWeightImageUrl1)
+ } else if(Number(result.data.secondWeight) > 0){
+ result.data.totalWeighingPicture.push('error')
}
if(result.data.secondWeightImageUrl2){
result.data.totalWeighingPicture.push(result.data.secondWeightImageUrl2)
+ } else if(Number(result.data.secondWeight) > 0){
+ result.data.totalWeighingPicture.push('error')
}
this.setData({ safeBottom: app.globalData.safeBottom, form: result.data })
}).catch(err => {
@@ -76,13 +84,21 @@ Scene({
var imgList = []
if(e.currentTarget.dataset.type == 1){
for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) {
- imgList.push(this.data.form.totalWeighingPicture[index])
+ var url = this.data.form.totalWeighingPicture[index]
+ if(!util.isEmpty(url) && 'error' != url){
+ imgList.push(url)
+ }
}
} else {
for (let index = 0; index < this.data.form.emptyWeighingPicture.length; index++) {
- imgList.push(this.data.form.emptyWeighingPicture[index])
+ var url = this.data.form.emptyWeighingPicture[index]
+ if(!util.isEmpty(url) && 'error' != url){
+ imgList.push(url)
+ }
}
}
- wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
+ if(imgList.length){
+ wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
+ }
}
})
\ No newline at end of file
diff --git a/pages/storage/pound-info/index.wxml b/pages/storage/pound-info/index.wxml
index d4b3224..680c590 100644
--- a/pages/storage/pound-info/index.wxml
+++ b/pages/storage/pound-info/index.wxml
@@ -21,7 +21,10 @@
第二次过磅(毛重)
- 重量(公斤):{{formate.maxWeight(form.firstWeight, form.secondWeight)}}
+
+ 重量(公斤):{{formate.maxWeight(form.firstWeight, form.secondWeight)}}
+ 重新过磅
+
@@ -32,9 +35,9 @@
-
+