Commit f9763f68 by liuquan

3.1.4

U:修改认证提示
U:修改支付按钮置灰问题
parent 54956fa4
...@@ -332,7 +332,7 @@ Page({ ...@@ -332,7 +332,7 @@ Page({
if (that.data.idType == 1) { if (that.data.idType == 1) {
that.servicePay(); that.servicePay();
} else { } else {
Util.verifyIdCardAnName(that.data.name, that.data.idCard, res => { Util.verifyIdCardAnName(that.data.name, that.data.idCard, (res) => {
switch (res) { switch (res) {
case 0: case 0:
if (that.data.phoneYes) { if (that.data.phoneYes) {
...@@ -375,16 +375,10 @@ Page({ ...@@ -375,16 +375,10 @@ Page({
}) })
return; return;
case 6004: case 6004:
wx.showModal({
title: '提示',
content: '每人当天最多认证三次',
showCancel: false,
})
return;
case 6005: case 6005:
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '身份证和姓名不一致', content: '每人当天最多认证三次',
showCancel: false, showCancel: false,
}) })
return; return;
......
...@@ -27,7 +27,8 @@ Page({ ...@@ -27,7 +27,8 @@ Page({
value: '1' value: '1'
}, },
], ],
isInvoice:0 isInvoice:0,//是否开具发票
isBtnAsh:true,//支付按钮置灰
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -318,7 +319,7 @@ Page({ ...@@ -318,7 +319,7 @@ Page({
applyPay: Util.debouce(function () { applyPay: Util.debouce(function () {
let that = this; let that = this;
that.setData({ that.setData({
agree: false isBtnAsh: false
}) })
if (that.data.receiveAddress.id == undefined) { if (that.data.receiveAddress.id == undefined) {
wx.showToast({ wx.showToast({
...@@ -326,7 +327,7 @@ Page({ ...@@ -326,7 +327,7 @@ Page({
icon: 'none' icon: 'none'
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return return
} }
...@@ -337,7 +338,7 @@ Page({ ...@@ -337,7 +338,7 @@ Page({
icon: 'none' icon: 'none'
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return return
} }
...@@ -349,7 +350,7 @@ Page({ ...@@ -349,7 +350,7 @@ Page({
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
wx.navigateTo({ wx.navigateTo({
url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1", url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1",
...@@ -358,7 +359,7 @@ Page({ ...@@ -358,7 +359,7 @@ Page({
} }
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return; return;
} }
...@@ -412,7 +413,7 @@ Page({ ...@@ -412,7 +413,7 @@ Page({
signType: 'MD5', signType: 'MD5',
paySign: res.data.parameter.paySign, paySign: res.data.parameter.paySign,
success(res) { success(res) {
console.log('res') console.log("success",res);
if (res.errMsg && res.errMsg == "requestPayment:ok") { if (res.errMsg && res.errMsg == "requestPayment:ok") {
console.log("requestPayment:ok") console.log("requestPayment:ok")
wx.reLaunch({ wx.reLaunch({
...@@ -429,12 +430,13 @@ Page({ ...@@ -429,12 +430,13 @@ Page({
} }
}, },
fail(res) { fail(res) {
console.log("fail",res);
wx.showToast({ wx.showToast({
title: '支付失败', title: '支付失败',
icon: 'none' icon: 'none'
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
that.data.main = true; that.data.main = true;
that.onShow(); that.onShow();
...@@ -464,7 +466,7 @@ Page({ ...@@ -464,7 +466,7 @@ Page({
content: res.msg, content: res.msg,
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return; return;
case 5: case 5:
...@@ -476,7 +478,7 @@ Page({ ...@@ -476,7 +478,7 @@ Page({
errList: res.data errList: res.data
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return; return;
} }
......
...@@ -143,8 +143,8 @@ ...@@ -143,8 +143,8 @@
<text class="text">¥ </text> <text class="text">¥ </text>
<text>{{list.money}}</text> <text>{{list.money}}</text>
</view> </view>
<view wx:if='{{!agree}}' class="qzf1">立即支付</view> <view wx:if='{{!agree||!isBtnAsh}}' class="qzf1">立即支付</view>
<view wx:if='{{agree}}' class="qzf" bindtap="applyPay">立即支付</view> <view wx:if='{{agree&&isBtnAsh}}' class="qzf" bindtap="applyPay">立即支付</view>
</view> </view>
</view> </view>
<!-- <view class="btn" bindtap="applyPay">微信支付</view> --> <!-- <view class="btn" bindtap="applyPay">微信支付</view> -->
......
...@@ -73,8 +73,8 @@ Page({ ...@@ -73,8 +73,8 @@ Page({
name: item.name, name: item.name,
phone: item.phone, phone: item.phone,
idCard: item.card, idCard: item.card,
idType:item.idtype, idType: item.idtype,
lock:!Util.isEmpty(item.card)&&item.card.length > 0&&item.idtype==0 ? true : false, lock: !Util.isEmpty(item.card) && item.card.length > 0 && item.idtype == 0 ? true : false,
SEXstate: item.sex == '男' ? 0 : 1, SEXstate: item.sex == '男' ? 0 : 1,
age: item.age, age: item.age,
date: item.birthday, date: item.birthday,
...@@ -190,7 +190,7 @@ Page({ ...@@ -190,7 +190,7 @@ Page({
that.setData({ that.setData({
idCard: e.detail.value.trim(), idCard: e.detail.value.trim(),
}) })
if (Util.validateIdCard(e.detail.value.trim())&&that.data.idType==0) { if (Util.validateIdCard(e.detail.value.trim()) && that.data.idType == 0) {
var date = Util.getBirthdayFromIdCard(e.detail.value.trim()); var date = Util.getBirthdayFromIdCard(e.detail.value.trim());
var age = Util.getAge(date) var age = Util.getAge(date)
var SEXstate = Util.getSexFromIdCard(e.detail.value.trim()) var SEXstate = Util.getSexFromIdCard(e.detail.value.trim())
...@@ -326,7 +326,7 @@ Page({ ...@@ -326,7 +326,7 @@ Page({
sava: true sava: true
}) })
return; return;
}else if (!Util.validateIdCard(that.data.idCard) && that.data.idCard != ''&&that.data.idType==0) { } else if (!Util.validateIdCard(that.data.idCard) && that.data.idCard != '' && that.data.idType == 0) {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '请填写正确的身份证号', content: '请填写正确的身份证号',
...@@ -358,7 +358,7 @@ Page({ ...@@ -358,7 +358,7 @@ Page({
}) })
return; return;
} else if (that.data.idCard != '') { } else if (that.data.idCard != '') {
if(that.data.idType==0){ if (that.data.idType == 0) {
Util.verifyIdCardAnName(that.data.name, that.data.idCard, res => { Util.verifyIdCardAnName(that.data.name, that.data.idCard, res => {
switch (res) { switch (res) {
case 0: case 0:
...@@ -371,7 +371,7 @@ Page({ ...@@ -371,7 +371,7 @@ Page({
phone: that.data.phone, phone: that.data.phone,
age: that.data.age, age: that.data.age,
card: that.data.idCard, card: that.data.idCard,
idType:that.data.idType, idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女', sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date, birthday: that.data.date,
weight: that.data.weight, weight: that.data.weight,
...@@ -410,7 +410,7 @@ Page({ ...@@ -410,7 +410,7 @@ Page({
phone: that.data.phone, phone: that.data.phone,
age: that.data.age, age: that.data.age,
card: that.data.idCard, card: that.data.idCard,
idType:that.data.idType, idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女', sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date, birthday: that.data.date,
weight: that.data.weight, weight: that.data.weight,
...@@ -425,7 +425,7 @@ Page({ ...@@ -425,7 +425,7 @@ Page({
Service.editUserBuyInfo(data).then((res) => { Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
var pages = getCurrentPages(); var pages = getCurrentPages();
console.log('pages',pages); console.log('pages', pages);
var currPage = pages[pages.length - 1]; //当前页面 var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面 var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值 prevPage.setData({ // 这里是需要传递的参数值
...@@ -448,29 +448,11 @@ Page({ ...@@ -448,29 +448,11 @@ Page({
case 6001: case 6001:
case 6002: case 6002:
case 6003: case 6003:
wx.showModal({
title: '提示',
content: '服务器异常',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6004: case 6004:
wx.showModal({
title: '提示',
content: '每人当天最多认证三次',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6005: case 6005:
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '身份证和姓名不一致', content: res.msg,
showCancel: false, showCancel: false,
}) })
that.setData({ that.setData({
...@@ -479,7 +461,7 @@ Page({ ...@@ -479,7 +461,7 @@ Page({
return; return;
} }
}) })
}else{ } else {
var allData = wx.getStorageSync("data"); var allData = wx.getStorageSync("data");
var data var data
if (that.data.id == '') { if (that.data.id == '') {
...@@ -489,7 +471,7 @@ Page({ ...@@ -489,7 +471,7 @@ Page({
phone: that.data.phone, phone: that.data.phone,
age: that.data.age, age: that.data.age,
card: that.data.idCard, card: that.data.idCard,
idType:that.data.idType, idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女', sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date, birthday: that.data.date,
weight: that.data.weight, weight: that.data.weight,
...@@ -528,7 +510,7 @@ Page({ ...@@ -528,7 +510,7 @@ Page({
phone: that.data.phone, phone: that.data.phone,
age: that.data.age, age: that.data.age,
card: that.data.idCard, card: that.data.idCard,
idType:that.data.idType, idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女', sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date, birthday: that.data.date,
weight: that.data.weight, weight: that.data.weight,
...@@ -543,7 +525,7 @@ Page({ ...@@ -543,7 +525,7 @@ Page({
Service.editUserBuyInfo(data).then((res) => { Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
var pages = getCurrentPages(); var pages = getCurrentPages();
console.log('pages',pages); console.log('pages', pages);
var currPage = pages[pages.length - 1]; //当前页面 var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面 var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值 prevPage.setData({ // 这里是需要传递的参数值
...@@ -569,7 +551,7 @@ Page({ ...@@ -569,7 +551,7 @@ Page({
unionid: allData.unionid, unionid: allData.unionid,
name: that.data.name, name: that.data.name,
card: that.data.idCard, card: that.data.idCard,
idType:that.data.idType, idType: that.data.idType,
age: that.data.age, age: that.data.age,
sex: that.data.SEXstate == 0 ? '男' : '女', sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date, birthday: that.data.date,
...@@ -609,7 +591,7 @@ Page({ ...@@ -609,7 +591,7 @@ Page({
unionid: allData.unionid, unionid: allData.unionid,
name: that.data.name, name: that.data.name,
card: that.data.idCard, card: that.data.idCard,
idType:that.data.idType, idType: that.data.idType,
age: that.data.age, age: that.data.age,
phone: that.data.phone, phone: that.data.phone,
sex: that.data.SEXstate == 0 ? '男' : '女', sex: that.data.SEXstate == 0 ? '男' : '女',
...@@ -626,7 +608,7 @@ Page({ ...@@ -626,7 +608,7 @@ Page({
Service.editUserBuyInfo(data).then((res) => { Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
var pages = getCurrentPages(); var pages = getCurrentPages();
console.log('pages',pages); console.log('pages', pages);
var prevPage = pages[pages.length - 2]; //上一个页面 var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值 prevPage.setData({ // 这里是需要传递的参数值
item: data item: data
......
...@@ -271,7 +271,7 @@ Page({ ...@@ -271,7 +271,7 @@ Page({
this.data.weight = e.detail.value; this.data.weight = e.detail.value;
}, },
//保存 //保存
sava: Util.debouce(function() { sava: Util.debouce(function () {
var that = this; var that = this;
if (that.data.name == "") { if (that.data.name == "") {
wx.showModal({ wx.showModal({
...@@ -481,29 +481,11 @@ Page({ ...@@ -481,29 +481,11 @@ Page({
case 6001: case 6001:
case 6002: case 6002:
case 6003: case 6003:
wx.showModal({
title: '提示',
content: '服务器异常',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6004: case 6004:
wx.showModal({
title: '提示',
content: '每人当天最多认证三次',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6005: case 6005:
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '身份证和姓名不一致', content: res.msg,
showCancel: false, showCancel: false,
}) })
that.setData({ that.setData({
......
...@@ -7,7 +7,7 @@ Page({ ...@@ -7,7 +7,7 @@ Page({
reportRedD: false, //报告红点展示 reportRedD: false, //报告红点展示
reportRedNum: 0, //未作报告数量 reportRedNum: 0, //未作报告数量
disabled:true,//防止重复点击 disabled:true,//防止重复点击
version:'3.1.2', version:'3.1.4',
isShow:false, isShow:false,
showClose:true, showClose:true,
}, },
......
...@@ -18,16 +18,15 @@ Page({ ...@@ -18,16 +18,15 @@ Page({
ishow: true, ishow: true,
paySuccess: false, paySuccess: false,
errshow: false, errshow: false,
items: [ items: [{
{
name: '不需要', name: '不需要',
value: '0' value: '0'
},{ }, {
name: '需要', name: '需要',
value: '1' value: '1'
}, }, ],
], isInvoice: 0, //是否开具发票
isInvoice:0 isBtnAsh: true, //支付按钮置灰
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -286,7 +285,7 @@ Page({ ...@@ -286,7 +285,7 @@ Page({
applyPay: Util.debouce(function () { applyPay: Util.debouce(function () {
let that = this; let that = this;
that.setData({ that.setData({
agree: false isBtnAsh: false
}) })
if (that.data.receiveAddress.id == undefined) { if (that.data.receiveAddress.id == undefined) {
wx.showToast({ wx.showToast({
...@@ -294,7 +293,7 @@ Page({ ...@@ -294,7 +293,7 @@ Page({
icon: 'none' icon: 'none'
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return return
} }
...@@ -305,7 +304,7 @@ Page({ ...@@ -305,7 +304,7 @@ Page({
icon: 'none' icon: 'none'
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return return
} }
...@@ -317,7 +316,7 @@ Page({ ...@@ -317,7 +316,7 @@ Page({
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
wx.navigateTo({ wx.navigateTo({
url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1", url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1",
...@@ -326,7 +325,7 @@ Page({ ...@@ -326,7 +325,7 @@ Page({
} }
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return; return;
} }
...@@ -402,7 +401,7 @@ Page({ ...@@ -402,7 +401,7 @@ Page({
icon: 'none' icon: 'none'
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
that.data.main = true; that.data.main = true;
that.onShow(); that.onShow();
...@@ -432,7 +431,7 @@ Page({ ...@@ -432,7 +431,7 @@ Page({
content: res.msg, content: res.msg,
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return; return;
case 5: case 5:
...@@ -444,7 +443,7 @@ Page({ ...@@ -444,7 +443,7 @@ Page({
errList: res.data errList: res.data
}) })
that.setData({ that.setData({
agree: true isBtnAsh: true
}) })
return; return;
} }
......
...@@ -139,8 +139,8 @@ ...@@ -139,8 +139,8 @@
<text class="text">¥ </text> <text class="text">¥ </text>
<text>{{list.money}}</text> <text>{{list.money}}</text>
</view> </view>
<view wx:if='{{!agree}}' class="qzf1">立即支付</view> <view wx:if='{{!agree||!isBtnAsh}}' class="qzf1">立即支付</view>
<view wx:if='{{agree}}' class="qzf" bindtap="applyPay">立即支付</view> <view wx:if='{{agree&&isBtnAsh}}' class="qzf" bindtap="applyPay">立即支付</view>
</view> </view>
</view> </view>
<!-- <view class="btn" bindtap="applyPay">微信支付</view> --> <!-- <view class="btn" bindtap="applyPay">微信支付</view> -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment