| xqd
@@ -228,7 +228,8 @@
|
|
|
pageservice: 1,
|
|
|
serviceList: [],
|
|
|
paytype: 2,
|
|
|
- serviceid: ""
|
|
|
+ serviceid: "",
|
|
|
+ order_id: ""
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
| xqd
@@ -383,10 +384,12 @@
|
|
|
uni.requestSubscribeMessage({
|
|
|
tmplIds: ['M9b6PPKtD7PEqLsSnQ453iTIHtIZZpixOBjUjax8YXU'],
|
|
|
success: (res) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
}
|
| xqd
@@ -397,10 +400,12 @@
|
|
|
'ZrL4Ag28cW2F1I1gWcnIk-fxNmZNhb-vNsx32j1ulG0'
|
|
|
],
|
|
|
success: (res) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
}
|
| xqd
@@ -411,10 +416,12 @@
|
|
|
'phcsQ7ZbsJapfmx3NMCha0MrHCqFrgN7BWVneE5OffI'
|
|
|
],
|
|
|
success: (res) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
}
|
| xqd
@@ -425,10 +432,12 @@
|
|
|
'phcsQ7ZbsJapfmx3NMChaxepR9tJFiqbO25P9tujErI'
|
|
|
],
|
|
|
success: (res) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
}
|
| xqd
@@ -437,15 +446,18 @@
|
|
|
uni.requestSubscribeMessage({
|
|
|
tmplIds: ['obCFv2gAnl_RaW-OlnZkjCfi6teT3LUaHxxInUkwLbw'],
|
|
|
success: (res) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
+ this.payment()
|
|
|
this.popupShow = true
|
|
|
this.show = true
|
|
|
}
|
| xqd
@@ -472,66 +484,22 @@
|
|
|
order_pack_id: this.serviceid
|
|
|
})
|
|
|
if (res.status == 0) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- uni.showToast({
|
|
|
- title: "支付成功!",
|
|
|
- duration: 1500
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: "order?type=" + this.infodata.product_type
|
|
|
- })
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- if (res.message == '密码错误') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "重试",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else if (res.message == '未设置支付密码') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "设置",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- uni.navigateTo({
|
|
|
- url: "../index/paypassword"
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "确定",
|
|
|
- showCancel: false,
|
|
|
- success: (rr) => {
|
|
|
- if (rr.confirm) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
+ this.order_id = res.data.order_id
|
|
|
+ console.log(res)
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: false,
|
|
|
+ success: (rr) => {
|
|
|
+ if (rr.confirm) {
|
|
|
+ this.popupShow = false
|
|
|
+ this.show = false
|
|
|
+ this.password = ""
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
paypacks: async function() {
|
| xqd
@@ -555,66 +523,21 @@
|
|
|
})
|
|
|
console.log(res)
|
|
|
if (res.status == 0) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- uni.showToast({
|
|
|
- title: "支付成功!",
|
|
|
- duration: 1500
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: "order?type=" + this.infodata.product_type
|
|
|
- })
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- if (res.message == '密码错误') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "重试",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else if (res.message == '未设置支付密码') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "设置",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- uni.navigateTo({
|
|
|
- url: "../index/paypassword"
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "确定",
|
|
|
- showCancel: false,
|
|
|
- success: (rr) => {
|
|
|
- if (rr.confirm) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
+ this.order_id = res.data.order_id
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: false,
|
|
|
+ success: (rr) => {
|
|
|
+ if (rr.confirm) {
|
|
|
+ this.popupShow = false
|
|
|
+ this.show = false
|
|
|
+ this.password = ""
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
payphone: async function() {
|
| xqd
@@ -631,66 +554,22 @@
|
|
|
order_pack_id: this.serviceid
|
|
|
})
|
|
|
if (res.status == 0) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- uni.showToast({
|
|
|
- title: "支付成功!",
|
|
|
- duration: 1500
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: "order?type=" + this.infodata.product_type
|
|
|
- })
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- if (res.message == '密码错误') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "重试",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else if (res.message == '未设置支付密码') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "设置",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- uni.navigateTo({
|
|
|
- url: "../index/paypassword"
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "确定",
|
|
|
- showCancel: false,
|
|
|
- success: (rr) => {
|
|
|
- if (rr.confirm) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
+ this.order_id = res.data.order_id
|
|
|
+ console.log(res)
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: false,
|
|
|
+ success: (rr) => {
|
|
|
+ if (rr.confirm) {
|
|
|
+ this.popupShow = false
|
|
|
+ this.show = false
|
|
|
+ this.password = ""
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
paychat: async function() {
|
| xqd
@@ -707,66 +586,21 @@
|
|
|
order_pack_id: this.serviceid
|
|
|
})
|
|
|
if (res.status == 0) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- uni.showToast({
|
|
|
- title: "支付成功!",
|
|
|
- duration: 1500
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: "order?type=" + this.infodata.product_type
|
|
|
- })
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- if (res.message == '密码错误') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "重试",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else if (res.message == '未设置支付密码') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "设置",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- uni.navigateTo({
|
|
|
- url: "../index/paypassword"
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "确定",
|
|
|
- showCancel: false,
|
|
|
- success: (rr) => {
|
|
|
- if (rr.confirm) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
+ this.order_id = res.data.order_id
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: false,
|
|
|
+ success: (rr) => {
|
|
|
+ if (rr.confirm) {
|
|
|
+ this.popupShow = false
|
|
|
+ this.show = false
|
|
|
+ this.password = ""
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
payvaccines: async function() {
|
| xqd
@@ -784,66 +618,21 @@
|
|
|
order_pack_id: this.serviceid
|
|
|
})
|
|
|
if (res.status == 0) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- uni.showToast({
|
|
|
- title: "支付成功!",
|
|
|
- duration: 1500
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: "order?type=" + this.infodata.product_type
|
|
|
- })
|
|
|
- }, 1500)
|
|
|
- } else {
|
|
|
- if (res.message == '密码错误') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "重试",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else if (res.message == '未设置支付密码') {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "设置",
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.password = ""
|
|
|
- uni.navigateTo({
|
|
|
- url: "../index/paypassword"
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: res.message,
|
|
|
- confirmText: "确定",
|
|
|
- showCancel: false,
|
|
|
- success: (rr) => {
|
|
|
- if (rr.confirm) {
|
|
|
- this.popupShow = false
|
|
|
- this.show = false
|
|
|
- this.password = ""
|
|
|
- }
|
|
|
+ this.order_id = res.data.order_id
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: false,
|
|
|
+ success: (rr) => {
|
|
|
+ if (rr.confirm) {
|
|
|
+ this.popupShow = false
|
|
|
+ this.show = false
|
|
|
+ this.password = ""
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
paychildcare: async function() {
|
| xqd
@@ -862,6 +651,45 @@
|
|
|
order_pack_id: this.serviceid
|
|
|
})
|
|
|
console.log(res)
|
|
|
+ if (res.status == 0) {
|
|
|
+ this.order_id = res.data.order_id
|
|
|
+ }else{
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ confirmText: "确定",
|
|
|
+ showCancel: false,
|
|
|
+ success: (rr) => {
|
|
|
+ if (rr.confirm) {
|
|
|
+ this.popupShow = false
|
|
|
+ this.show = false
|
|
|
+ this.password = ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //点击确认支付
|
|
|
+ payment(e) {
|
|
|
+ if (this.infodata.product_type == 1) {
|
|
|
+ this.payphone()
|
|
|
+ } else if (this.infodata.product_type == 2) {
|
|
|
+ this.paychat()
|
|
|
+ } else if (this.infodata.product_type == 6) {
|
|
|
+ this.paypacks()
|
|
|
+ } else if (this.infodata.product_type == 3) {
|
|
|
+ this.payyuyue()
|
|
|
+ } else if (this.infodata.product_type == 4) {
|
|
|
+ this.payvaccines()
|
|
|
+ } else if (this.infodata.product_type == 5) {
|
|
|
+ this.paychildcare()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ orderPay: async function() {
|
|
|
+ let res = await this.$request.post("/api/v1/order/orderPay", {
|
|
|
+ order_id: this.order_id,
|
|
|
+ pay_password: this.password
|
|
|
+ })
|
|
|
if (res.status == 0) {
|
|
|
this.popupShow = false
|
|
|
this.show = false
|
| xqd
@@ -925,29 +753,13 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- //点击确认支付
|
|
|
- payment(e) {
|
|
|
- if (this.infodata.product_type == 1) {
|
|
|
- this.payphone()
|
|
|
- } else if (this.infodata.product_type == 2) {
|
|
|
- this.paychat()
|
|
|
- } else if (this.infodata.product_type == 6) {
|
|
|
- this.paypacks()
|
|
|
- } else if (this.infodata.product_type == 3) {
|
|
|
- this.payyuyue()
|
|
|
- } else if (this.infodata.product_type == 4) {
|
|
|
- this.payvaccines()
|
|
|
- } else if (this.infodata.product_type == 5) {
|
|
|
- this.paychildcare()
|
|
|
- }
|
|
|
- },
|
|
|
// 按键被点击(点击退格键不会触发此事件)
|
|
|
valChange(val) {
|
|
|
// 将每次按键的值拼接到value变量中,注意+=写法
|
|
|
this.password += val;
|
|
|
if (this.password.charAt(0) != '0') {
|
|
|
if (this.password.length == 6) {
|
|
|
- this.payment()
|
|
|
+ this.orderPay()
|
|
|
}
|
|
|
} else {
|
|
|
this.password = ''
|