diff --git a/api/order.js b/api/order.js index f9df010..141e935 100644 --- a/api/order.js +++ b/api/order.js @@ -9,6 +9,14 @@ // +---------------------------------------------------------------------- import request from "@/utils/request.js"; +/** + * 校验支付密码是否正确 + * @param numType + */ +export function verifyPwd(data) { + return request.post("order/verifyPwd", data); +} + /** * 获取购物车列表 * @param numType boolean true 购物车数量,false=购物车产品数量 diff --git a/api/payment.js b/api/payment.js index 4d7f58d..0b8bb14 100644 --- a/api/payment.js +++ b/api/payment.js @@ -16,6 +16,13 @@ export function addCart(data) { return request.post(`user/cart/create`, data); } +/** + * 根据店铺 获取商品 + */ +export function getProductInfo1(data) { + return request.get(`order_mix`, data); +} + /** * 根据店铺id 获取店铺信息 */ diff --git a/components/payPwd/index.vue b/components/payPwd/index.vue new file mode 100644 index 0000000..fdf46c7 --- /dev/null +++ b/components/payPwd/index.vue @@ -0,0 +1,92 @@ + + + + + + \ No newline at end of file diff --git a/components/popups/index.vue b/components/popups/index.vue new file mode 100644 index 0000000..4b9b696 --- /dev/null +++ b/components/popups/index.vue @@ -0,0 +1,248 @@ + + + + + \ No newline at end of file diff --git a/components/popups/index_backup.vue b/components/popups/index_backup.vue new file mode 100644 index 0000000..166054a --- /dev/null +++ b/components/popups/index_backup.vue @@ -0,0 +1,167 @@ + + + + + \ No newline at end of file diff --git a/pages/payment/get_payment.vue b/pages/payment/get_payment.vue index 1cae073..07d2cbf 100644 --- a/pages/payment/get_payment.vue +++ b/pages/payment/get_payment.vue @@ -1,66 +1,73 @@ - \ No newline at end of file diff --git a/pages/users/embody/embody.vue b/pages/users/embody/embody.vue index 4db0222..82f5782 100644 --- a/pages/users/embody/embody.vue +++ b/pages/users/embody/embody.vue @@ -186,8 +186,15 @@ :order_id="currentTab"> - + + + + + + @@ -198,7 +205,6 @@ getLisApplyAPI, getAccountApplyAPI, postAccountApplyAPI, - } from '@/api/user.js' import { extractCash, @@ -217,10 +223,18 @@ import { Toast } from '../../../libs/uniApi'; + import { + verifyPwd + } from '@/api/order.js'; + import payPwd from "@/components/payPwd/index.vue"; + import popups from "@/components/popups/index.vue"; + export default { components: { cash, - authorize + authorize, + payPwd, + popups }, data() { return { @@ -278,7 +292,8 @@ pay_close: false, pay_type: [], source: '', - merId: '' + merId: '', + modes: {} }; }, computed: { @@ -487,18 +502,20 @@ financial_bank_branch: this.mode.bank_address, financial_type: 1 } - console.log(mode); - postCreateApplyAPI(this.merId, mode).then(res => { + this.modes = mode; + + this.$refs.popups.handleOpen(); + }, + + trueWithdraw() { + postCreateApplyAPI(this.merId, this.modes).then(res => { // 提现申请 - // that.postCreate(e.detail.value.extract_price) Toast(res.message) setTimeout(() => { uni.navigateBack({ delta: 1 }) }, 1000) - - console.log(res); }).catch(err => { Toast(err) setTimeout(() => { @@ -509,6 +526,53 @@ }) }, + + // 输入密码回调 + handleConfirm(e) { + // 验证密码是否正确 + verifyPwd({ + withdrawal_pwd: e + }).then(res => { + // 密码是否有效 状态码判断 + const code = res.data.code; + this.$set(this.modes, 'withdrawal_pwd', e); + + if (code == 100) { //密码正确 + uni.showLoading({ + title: '订单支付中', + mask: true + }); + this.trueWithdraw(); + } else { + this.$refs.payPwd.handleOpen(code); + } + }).catch(err => { + console.log(err) + }) + }, + + // 弹框左边按钮 101 未设置密码 102 忘记密码 都去设置密码 + handleLeft(code) { + uni.navigateTo({ + url: "/pages/users/user_modify_pwd/index?type=payPwd" + }); + this.$refs.payPwd.handleClose(); + }, + + // 弹框右边按钮 取消 重试 + handleRight(code) { + if (code == 101) { //取消 + this.$refs.payPwd.handleClose(code); + } else { + this.$refs.payPwd.handleClose(); + this.$refs.popups.handleOpen(); + } + }, + + handleClear() {}, + handleChange() {}, + + async postCreate(price) { const data = { extract_money: price, diff --git a/static/del.webp b/static/del.webp new file mode 100644 index 0000000..7348c6e Binary files /dev/null and b/static/del.webp differ diff --git a/static/shop_logo.webp b/static/shop_logo.webp new file mode 100644 index 0000000..0f535ee Binary files /dev/null and b/static/shop_logo.webp differ