Commit f9763f68 by liuquan

3.1.4

U:修改认证提示
U:修改支付按钮置灰问题
parent 54956fa4
......@@ -332,7 +332,7 @@ Page({
if (that.data.idType == 1) {
that.servicePay();
} else {
Util.verifyIdCardAnName(that.data.name, that.data.idCard, res => {
Util.verifyIdCardAnName(that.data.name, that.data.idCard, (res) => {
switch (res) {
case 0:
if (that.data.phoneYes) {
......@@ -375,16 +375,10 @@ Page({
})
return;
case 6004:
wx.showModal({
title: '提示',
content: '每人当天最多认证三次',
showCancel: false,
})
return;
case 6005:
wx.showModal({
title: '提示',
content: '身份证和姓名不一致',
content: '每人当天最多认证三次',
showCancel: false,
})
return;
......
......@@ -27,7 +27,8 @@ Page({
value: '1'
},
],
isInvoice:0
isInvoice:0,//是否开具发票
isBtnAsh:true,//支付按钮置灰
},
/**
* 生命周期函数--监听页面加载
......@@ -318,7 +319,7 @@ Page({
applyPay: Util.debouce(function () {
let that = this;
that.setData({
agree: false
isBtnAsh: false
})
if (that.data.receiveAddress.id == undefined) {
wx.showToast({
......@@ -326,7 +327,7 @@ Page({
icon: 'none'
})
that.setData({
agree: true
isBtnAsh: true
})
return
}
......@@ -337,7 +338,7 @@ Page({
icon: 'none'
})
that.setData({
agree: true
isBtnAsh: true
})
return
}
......@@ -349,7 +350,7 @@ Page({
success(res) {
if (res.confirm) {
that.setData({
agree: true
isBtnAsh: true
})
wx.navigateTo({
url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1",
......@@ -358,7 +359,7 @@ Page({
}
})
that.setData({
agree: true
isBtnAsh: true
})
return;
}
......@@ -412,7 +413,7 @@ Page({
signType: 'MD5',
paySign: res.data.parameter.paySign,
success(res) {
console.log('res')
console.log("success",res);
if (res.errMsg && res.errMsg == "requestPayment:ok") {
console.log("requestPayment:ok")
wx.reLaunch({
......@@ -429,12 +430,13 @@ Page({
}
},
fail(res) {
console.log("fail",res);
wx.showToast({
title: '支付失败',
icon: 'none'
})
that.setData({
agree: true
isBtnAsh: true
})
that.data.main = true;
that.onShow();
......@@ -464,7 +466,7 @@ Page({
content: res.msg,
})
that.setData({
agree: true
isBtnAsh: true
})
return;
case 5:
......@@ -476,7 +478,7 @@ Page({
errList: res.data
})
that.setData({
agree: true
isBtnAsh: true
})
return;
}
......
......@@ -143,8 +143,8 @@
<text class="text">¥ </text>
<text>{{list.money}}</text>
</view>
<view wx:if='{{!agree}}' class="qzf1">立即支付</view>
<view wx:if='{{agree}}' class="qzf" bindtap="applyPay">立即支付</view>
<view wx:if='{{!agree||!isBtnAsh}}' class="qzf1">立即支付</view>
<view wx:if='{{agree&&isBtnAsh}}' class="qzf" bindtap="applyPay">立即支付</view>
</view>
</view>
<!-- <view class="btn" bindtap="applyPay">微信支付</view> -->
......
......@@ -73,8 +73,8 @@ Page({
name: item.name,
phone: item.phone,
idCard: item.card,
idType:item.idtype,
lock:!Util.isEmpty(item.card)&&item.card.length > 0&&item.idtype==0 ? true : false,
idType: item.idtype,
lock: !Util.isEmpty(item.card) && item.card.length > 0 && item.idtype == 0 ? true : false,
SEXstate: item.sex == '男' ? 0 : 1,
age: item.age,
date: item.birthday,
......@@ -190,7 +190,7 @@ Page({
that.setData({
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 age = Util.getAge(date)
var SEXstate = Util.getSexFromIdCard(e.detail.value.trim())
......@@ -326,7 +326,7 @@ Page({
sava: true
})
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({
title: '提示',
content: '请填写正确的身份证号',
......@@ -358,210 +358,192 @@ Page({
})
return;
} else if (that.data.idCard != '') {
if(that.data.idType==0){
Util.verifyIdCardAnName(that.data.name, that.data.idCard, res => {
switch (res) {
case 0:
var allData = wx.getStorageSync("data");
var data
if (that.data.id == '') {
data = {
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType:that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.addUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: ''
})
wx.navigateBack({
delta: 1
})
if (that.data.idType == 0) {
Util.verifyIdCardAnName(that.data.name, that.data.idCard, res => {
switch (res) {
case 0:
var allData = wx.getStorageSync("data");
var data
if (that.data.id == '') {
data = {
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.addUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: ''
})
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
data = {
id: that.data.id,
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
console.log('pages', pages);
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: data
})
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
})
}
break;
case 6000:
case 6001:
case 6002:
case 6003:
case 6004:
case 6005:
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
that.setData({
sava: true
})
return;
}
})
} else {
var allData = wx.getStorageSync("data");
var data
if (that.data.id == '') {
data = {
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.addUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: ''
})
wx.navigateBack({
delta: 1
})
} else {
data = {
id: that.data.id,
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType:that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
console.log('pages',pages);
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: data
})
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
break;
case 6000:
case 6001:
case 6002:
case 6003:
wx.showModal({
title: '提示',
content: '服务器异常',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6004:
wx.showModal({
title: '提示',
content: '每人当天最多认证三次',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6005:
wx.showModal({
title: '提示',
content: '身份证和姓名不一致',
showCancel: false,
})
that.setData({
sava: true
})
return;
}
})
}else{
var allData = wx.getStorageSync("data");
var data
if (that.data.id == '') {
data = {
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType:that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.addUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: ''
})
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
})
} else {
data = {
id: that.data.id,
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType:that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
console.log('pages',pages);
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: data
})
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
data = {
id: that.data.id,
unionid: allData.unionid,
name: that.data.name,
phone: that.data.phone,
age: that.data.age,
card: that.data.idCard,
idType: that.data.idType,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
weight: that.data.weight,
allergy: that.data.GMSstate,
allergy_desc: that.data.GMStext,
past: that.data.GWBSstate,
past_desc: that.data.GWBStext,
liver: that.data.GGNstate,
kidney: that.data.SGNstate,
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
console.log('pages', pages);
var currPage = pages[pages.length - 1]; //当前页面
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: data
})
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
})
}
})
}
}
} else {
var allData = wx.getStorageSync("data");
if (that.data.id == '') {
......@@ -569,7 +551,7 @@ Page({
unionid: allData.unionid,
name: that.data.name,
card: that.data.idCard,
idType:that.data.idType,
idType: that.data.idType,
age: that.data.age,
sex: that.data.SEXstate == 0 ? '男' : '女',
birthday: that.data.date,
......@@ -584,7 +566,7 @@ Page({
beiyun: that.data.SEXstate == 1 ? that.data.BYQKstate : '0'
}
Service.addUserBuyInfo(data).then((res) => {
if (res.code == 1) {
if (res.code == 1) {
var pages = getCurrentPages();
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
......@@ -593,13 +575,13 @@ Page({
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
}).catch(err => {
console.log("addUserBuyInfo", err)
})
......@@ -609,7 +591,7 @@ Page({
unionid: allData.unionid,
name: that.data.name,
card: that.data.idCard,
idType:that.data.idType,
idType: that.data.idType,
age: that.data.age,
phone: that.data.phone,
sex: that.data.SEXstate == 0 ? '男' : '女',
......@@ -626,7 +608,7 @@ Page({
Service.editUserBuyInfo(data).then((res) => {
if (res.code == 1) {
var pages = getCurrentPages();
console.log('pages',pages);
console.log('pages', pages);
var prevPage = pages[pages.length - 2]; //上一个页面
prevPage.setData({ // 这里是需要传递的参数值
item: data
......@@ -634,13 +616,13 @@ Page({
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
} else {
wx.showModal({
title: '提示',
content: res.msg,
showCancel: false,
})
}
}).catch(err => {
console.log("editUserBuyInfo", err)
})
......
......@@ -271,7 +271,7 @@ Page({
this.data.weight = e.detail.value;
},
//保存
sava: Util.debouce(function() {
sava: Util.debouce(function () {
var that = this;
if (that.data.name == "") {
wx.showModal({
......@@ -481,29 +481,11 @@ Page({
case 6001:
case 6002:
case 6003:
wx.showModal({
title: '提示',
content: '服务器异常',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6004:
wx.showModal({
title: '提示',
content: '每人当天最多认证三次',
showCancel: false,
})
that.setData({
sava: true
})
return;
case 6005:
wx.showModal({
title: '提示',
content: '身份证和姓名不一致',
content: res.msg,
showCancel: false,
})
that.setData({
......
......@@ -7,7 +7,7 @@ Page({
reportRedD: false, //报告红点展示
reportRedNum: 0, //未作报告数量
disabled:true,//防止重复点击
version:'3.1.2',
version:'3.1.4',
isShow:false,
showClose:true,
},
......
......@@ -18,16 +18,15 @@ Page({
ishow: true,
paySuccess: false,
errshow: false,
items: [
{
name: '不需要',
value: '0'
},{
name: '需要',
value: '1'
},
],
isInvoice:0
items: [{
name: '不需要',
value: '0'
}, {
name: '需要',
value: '1'
}, ],
isInvoice: 0, //是否开具发票
isBtnAsh: true, //支付按钮置灰
},
/**
* 生命周期函数--监听页面加载
......@@ -229,10 +228,10 @@ Page({
* 是否需要开具纸质发票
* @param {*} e
*/
radioChange: function (e) {
this.setData({
isInvoice: e.detail.value,
})
radioChange: function (e) {
this.setData({
isInvoice: e.detail.value,
})
},
/**
* 拨打电话
......@@ -286,7 +285,7 @@ Page({
applyPay: Util.debouce(function () {
let that = this;
that.setData({
agree: false
isBtnAsh: false
})
if (that.data.receiveAddress.id == undefined) {
wx.showToast({
......@@ -294,7 +293,7 @@ Page({
icon: 'none'
})
that.setData({
agree: true
isBtnAsh: true
})
return
}
......@@ -305,7 +304,7 @@ Page({
icon: 'none'
})
that.setData({
agree: true
isBtnAsh: true
})
return
}
......@@ -317,7 +316,7 @@ Page({
success(res) {
if (res.confirm) {
that.setData({
agree: true
isBtnAsh: true
})
wx.navigateTo({
url: "/packageA/editPatientInfo/editPatientInfo?item=" + JSON.stringify(that.data.item) + "&btid=1",
......@@ -326,7 +325,7 @@ Page({
}
})
that.setData({
agree: true
isBtnAsh: true
})
return;
}
......@@ -402,7 +401,7 @@ Page({
icon: 'none'
})
that.setData({
agree: true
isBtnAsh: true
})
that.data.main = true;
that.onShow();
......@@ -432,7 +431,7 @@ Page({
content: res.msg,
})
that.setData({
agree: true
isBtnAsh: true
})
return;
case 5:
......@@ -444,7 +443,7 @@ Page({
errList: res.data
})
that.setData({
agree: true
isBtnAsh: true
})
return;
}
......
......@@ -139,8 +139,8 @@
<text class="text">¥ </text>
<text>{{list.money}}</text>
</view>
<view wx:if='{{!agree}}' class="qzf1">立即支付</view>
<view wx:if='{{agree}}' class="qzf" bindtap="applyPay">立即支付</view>
<view wx:if='{{!agree||!isBtnAsh}}' class="qzf1">立即支付</view>
<view wx:if='{{agree&&isBtnAsh}}' class="qzf" bindtap="applyPay">立即支付</view>
</view>
</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