vip换购列表更改及部分拼团功能融合
This commit is contained in:
@@ -6,17 +6,20 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import payKeyboard from '@/components/mi-payKeyboard/mi-payKeyboard.vue'
|
||||
import eventBus from '../../utils/eventBus.js';
|
||||
import {
|
||||
wxPAY,
|
||||
alPAY,
|
||||
dtPAY,
|
||||
collagePAY,
|
||||
payIndex
|
||||
} from '@/apis/interfaces/pay'
|
||||
export default {
|
||||
components: { payKeyboard },
|
||||
export default {
|
||||
components: {
|
||||
payKeyboard
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
payNo: "",
|
||||
@@ -26,8 +29,9 @@
|
||||
oepnType: '',
|
||||
canpay: true,
|
||||
has_transfer_password: true,
|
||||
password: '',
|
||||
password: '',
|
||||
showKeyBoard: false,
|
||||
type: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -36,7 +40,9 @@
|
||||
if (this.$Route.query.oepnType === 'order') {
|
||||
this.oepnType = this.$Route.query.oepnType
|
||||
}
|
||||
|
||||
if (this.$Route.query.type) {
|
||||
this.type = this.$Route.query.type
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.payIndex();
|
||||
@@ -109,23 +115,27 @@
|
||||
}
|
||||
},
|
||||
|
||||
// 输入正确的回调
|
||||
enterSuccess(password) {
|
||||
this.password = password
|
||||
this.showKeyBoard = false
|
||||
this.getDTPAY();
|
||||
},
|
||||
// 点击[取消] 关闭输入框 的回调
|
||||
close(){
|
||||
this.showKeyBoard = false;
|
||||
this.canpay = true;
|
||||
// 输入正确的回调
|
||||
enterSuccess(password) {
|
||||
this.password = password
|
||||
this.showKeyBoard = false
|
||||
this.getDTPAY();
|
||||
},
|
||||
// 点击[取消] 关闭输入框 的回调
|
||||
close() {
|
||||
this.showKeyBoard = false;
|
||||
this.canpay = true;
|
||||
},
|
||||
|
||||
// 调用 dt 支付
|
||||
getDTPAY() {
|
||||
if (this.canpay) {
|
||||
this.canpay = false
|
||||
dtPAY(this.payNo, this.password).then(res => {
|
||||
this.canpay = false
|
||||
let requestUrl = dtPAY
|
||||
if (this.type === 'pin') {
|
||||
requestUrl = collagePAY
|
||||
}
|
||||
requestUrl(this.payNo, this.password).then(res => {
|
||||
if (res.state === 'warning') {
|
||||
uni.showModal({
|
||||
title: '当前DT积分不足',
|
||||
@@ -162,27 +172,64 @@
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '支付成功',
|
||||
content: '该订单已支付成功',
|
||||
confirmText: '我的订单',
|
||||
confirmColor: "#34CE98",
|
||||
cancelText: '再逛逛',
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$Router.push({
|
||||
name: "Order",
|
||||
params: {
|
||||
index: 0
|
||||
},
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
this.canpay = true
|
||||
if (this.type === 'pin') {
|
||||
console.log('pin........', res)
|
||||
this.canpay = true
|
||||
if (res.detailId) {
|
||||
uni.showLoading({
|
||||
title:'跳转中',
|
||||
mask:true,
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
uni.navigateTo({
|
||||
url: '/pages/group-book/success/success?id=' + res.detailId
|
||||
})
|
||||
}, 2000)
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '该订单拼团成功',
|
||||
confirmText: '查看订单',
|
||||
confirmColor: "#34CE98",
|
||||
cancelText: '再逛逛',
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
console.log('挑战到我的拼单列表')
|
||||
} if(res.cancel){
|
||||
uni.navigateTo({
|
||||
url:'/pages/store/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '支付成功',
|
||||
content: '该订单已支付成功',
|
||||
confirmText: '我的订单',
|
||||
confirmColor: "#34CE98",
|
||||
cancelText: '再逛逛',
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.$Router.push({
|
||||
name: "Order",
|
||||
params: {
|
||||
index: 0
|
||||
},
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
this.canpay = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user