From 6d7c1384ce19c2ead0726e8714d8199b8f6c1da0 Mon Sep 17 00:00:00 2001
From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com>
Date: Thu, 29 Feb 2024 21:44:22 +0800
Subject: [PATCH] 1
---
pages/payment/get_payment.vue | 6 +-
pages/payment/settlement.vue | 250 ++-----------------
pages/users/order_confirm/index.vue | 373 +++++++++++++++-------------
3 files changed, 216 insertions(+), 413 deletions(-)
diff --git a/pages/payment/get_payment.vue b/pages/payment/get_payment.vue
index 35d0457..e3b9421 100644
--- a/pages/payment/get_payment.vue
+++ b/pages/payment/get_payment.vue
@@ -3,8 +3,8 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/pages/payment/settlement.vue b/pages/payment/settlement.vue
index 1c04d95..ca0df83 100644
--- a/pages/payment/settlement.vue
+++ b/pages/payment/settlement.vue
@@ -1,7 +1,7 @@
+
-
@@ -172,7 +172,9 @@
import {
orderPay
} from "@/api/payment.js";
-import { Toast } from '../../libs/uniApi';
+ import {
+ Toast
+ } from '../../libs/uniApi';
export default {
components: {
@@ -407,29 +409,6 @@ import { Toast } from '../../libs/uniApi';
},
methods: {
- /*预售协议*/
- getPresellAgree: function() {
- this.showProtocol = true
- this.agrementTtile = '预售协议'
- presellAgreement().then(res => {
- this.protocol = res.data.sys_product_presell_agree;
- })
- },
- changeIsAgree: function(e) {
- this.isAgree = !this.isAgree;
- },
- changeIntegral: function(e) {
- this.use_integral = !this.use_integral;
- this.getConfirm(this.addressId);
- },
- showPresellAgree() {
- this.getPresellAgree()
- },
-
- showCoupon() {
- this.getCouponAgreement();
- },
-
// 图片预览
// 获得相册 idx
getPhotoClickIdx(e) {
@@ -468,125 +447,6 @@ import { Toast } from '../../libs/uniApi';
// this.$scope.selectComponent('#address-window').getAddressList();
},
-
- // 授权关闭
- authColse: function(e) {
- this.isShowAuth = e;
- },
-
-
-
-
-
- ChangCouponsClone: function() {
- this.$set(this.coupon, 'status', false);
- },
- changeTextareaStatus: function() {
- for (let i = 0, len = this.coupon.list.length; i < len; i++) {
- this.coupon.list[i].use_title = '';
- this.coupon.list[i].is_use = 0;
- }
- this.textareaStatus = true;
- this.status = 0;
- this.$set(this.coupon, 'list', this.coupon.list);
- },
-
-
-
- /**
- * 获取当前订单详细信息
- *
- */
- getConfirm: function(address_id) {
- let that = this;
- uni.showLoading({
- title: '',
- mask: true
- });
- getOrderConfirm({
- cart_id: that.cartId.split(","),
- address_id: address_id,
- takes: that.take,
- consumption_id: this.consumption_id,
- use_coupon: that.subCoupon,
- use_integral: that.use_integral,
- product_type: that.product_type,
- source: that.source
- }).then(res => {
- // 默认选中
- that.product_type = res.data.order_type
- that.is_take = false;
- that.platformConsumption = res.data.platformConsumption;
- res.data.order.forEach(el => {
- if (el.order.isTake == 1) that.is_take = true
- el.isTake = 0
- that.subCoupon[el.mer_id] = []
- el.coupon.forEach(coupon => {
- if (coupon.checked) {
- that.subCoupon[el.mer_id].push(coupon.coupon_user_id)
- }
- })
- })
- that.subCoupon['0'] = []
- if (res.data.platformCoupon?.length > 0) {
- res.data.platformCoupon.forEach(el => {
- if (el.checked) {
- that.subCoupon[el.mer_id] = []
- that.subCoupon[el.mer_id].push(el.coupon_user_id)
- }
- })
- } else res.data.platformCoupon = [];
- that.consumption_money = res.data.consumption_money;
- that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data
- .order[that.couponIndex].coupon);
- that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds
- .length);
- that.$set(that, "coupon_amount", parseFloat(res.data.order[that.couponIndex].order
- .coupon_price) + parseFloat(res.data.total_platform_coupon_price));
- that.$set(that, "store_coupon_amount", parseFloat(res.data.order[that.couponIndex].order
- .coupon_price));
- that.$set(that, "plant_coupon_amount", parseFloat(res.data.total_platform_coupon_price));
- that.$set(that, 'couponData', res.data);
- that.$set(that, 'cartInfo', res.data.order);
- that.$set(that, 'total_platform_coupon_price', res.data.total_platform_coupon_price);
- that.$set(that, 'enabledPlatformCoupon', res.data.enabledPlatformCoupon);
- that.$set(that, 'platformCoupon', res.data.platformCoupon);
- that.$set(that, 'order_type', res.data.order_type);
- that.$set(that, 'coupon_price', res.data.order_coupon_price);
- that.$set(that, 'integral_count', res.data.order_total_integral);
- that.$set(that, 'integral_price', res.data.order_total_integral_price);
- that.$set(that, 'open_integral', res.data.openIntegral);
- that.$set(that, 'use_integral', res.data.useIntegral);
- that.$set(that, 'order_extend', (that.order_extend && that.order_extend.length > 0) ? that
- .order_extend : res.data.order_extend);
- that.totalPrice = res.data.order_price
- that.orderStatus = res.data.status
- that.proPrice = res.data.total_price
- that.order_type = res.data.order_type
- that.order_model = res.data.order_model
- that.order_key = res.data.key
-
-
- uni.getStorage({
- key: "invoice_Data",
- success: function(res) {
- that.addInvoice = res.data;
- if (res.data) {
- that.getInvoiceDatas(res.data)
- }
- }
- })
- uni.hideLoading();
- }).catch(err => {
- return this.$util.Tips({
- title: err
- }, {
- tab: 3,
- url: 1
- });
- });
- },
-
payItem: function(e) {
let that = this;
let active = e;
@@ -633,37 +493,19 @@ import { Toast } from '../../libs/uniApi';
that.animated = false;
},
- onAddress: function() {
- let that = this;
- if (that.addressInfo.real_name) {
- that.textareaStatus = false;
- that.address.address = true;
- // that.pagesUrl = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
- // .pinkId + '&couponId=' + this.couponId;
- that.pagesUrl = '/pages/users/user_address_list/index'
- } else {
- // uni.navigateTo({
- // url: `/pages/users/user_address/index?cartId=${this.cartId}`,
- // });
- uni.navigateTo({
- url: `pages/users/user_address_list/index`,
- });
- }
- },
-
payment: function(data) {
let that = this;
createOrder(data).then(res => {
let status = res.data.status,
orderId = res.data.result.order_id,
- callback_key = res.data.result.pay_key,
+ // callback_key = res.data.result.pay_key,
jsConfig = res.data.result.config,
// 暂不跳转
goPages = '/pages/order_pay_status/index?order_id=' + orderId + '&msg=' + res.message +
- '&product_type=' + that.product_type + '&source=' + that.source,
+ '&product_type=' + that.payForm.product_type + '&source=' + that.payForm.source,
goPagesOrder = '/pages/order_details/stay?order_id=' + orderId +
- '&credit_buy=1&product_type=' + that.product_type;
+ '&credit_buy=1&product_type=' + that.payForm.product_type;
that.orderPay = true;
uni.hideLoading();
@@ -690,10 +532,6 @@ import { Toast } from '../../libs/uniApi';
break;
case 'alipay':
case "alipayQr":
- // uni.navigateTo({
- // url: '/pages/order_pay_back/index?keyCode=' + callback_key + '&url=' +
- // jsConfig
- // })
return;
break;
// #ifndef MP
@@ -889,51 +727,13 @@ import { Toast } from '../../libs/uniApi';
});
}
}).catch(err => {
- uni.hideLoading();
return that.$util.Tips({
title: err
});
+ uni.hideLoading();
});
},
- isEmojiCharacter: function(substring) {
- if (substring) {
- for (var i = 0; i < substring.length; i++) {
- var hs = substring.charCodeAt(i);
- if (0xd800 <= hs && hs <= 0xdbff) {
- if (substring.length > 1) {
- var ls = substring.charCodeAt(i + 1);
- var uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
- if (0x1d000 <= uc && uc <= 0x1f77f) {
- return true;
- }
- }
- } else if (substring.length > 1) {
- var ls = substring.charCodeAt(i + 1);
- if (ls == 0x20e3) {
- return true;
- }
- } else {
- if (0x2100 <= hs && hs <= 0x27ff) {
- return true;
- } else if (0x2B05 <= hs && hs <= 0x2b07) {
- return true;
- } else if (0x2934 <= hs && hs <= 0x2935) {
- return true;
- } else if (0x3297 <= hs && hs <= 0x3299) {
- return true;
- } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 ||
- hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b ||
- hs == 0x2b50) {
- return true;
- }
- }
- }
- }
- },
- bindDateChange(e) {
- let that = this
- that.$set(that.order_extend[that.virtualIndex], 'value', e.detail.value);
- },
+
getTime(index) {
this.virtualIndex = index;
},
@@ -955,32 +755,18 @@ import { Toast } from '../../libs/uniApi';
Toast(res.message)
}).catch((e) => {
uni.hideLoading();
- Toast(e.message)
+ Toast(e.message)
})
+ // #ifdef MP
+ openPaySubscribe().then(() => {
+ that.payment(this.payForm);
+ });
+ // #endif
-
-
-
- // this.cartInfo.map(el => {
- // if (el.isTake == 1 || el.order.isTake) {
- // data.takes.push(el.mer_id)
- // }
- // })
- // if (data.payType == 'balance' && parseFloat(that.userInfo.now_money) < parseFloat(that.totalPrice))
- // return that.$util
- // .Tips({
- // title: '余额不足!'
- // });
- // data.consumption_id = this.consumption_id;
- // // #ifdef MP
- // openPaySubscribe().then(() => {
- // that.payment(data);
- // });
- // // #endif
- // // #ifndef MP
- // that.payment(data);
- // // #endif
+ // #ifndef MP
+ that.payment(this.payForm);
+ // #endif
},
// 继续支付
diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue
index 3df05e2..d977c84 100644
--- a/pages/users/order_confirm/index.vue
+++ b/pages/users/order_confirm/index.vue
@@ -8,10 +8,11 @@
{{addressInfo.phone}}
-
+
[默认]{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
- {{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}
+ {{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}
-
+
+
-
- {{goods.productPresell.store_name}}
+
+ {{goods.productPresell.store_name}}
{{goods.productAttr.sku}}
@@ -122,7 +125,7 @@
配送方式
-
+
@@ -172,7 +175,7 @@
-
+
@@ -378,26 +381,26 @@
暂无优惠券
-->
-
- 补贴抵扣
-
-
- -¥{{consumption_money||'0.00'}}
- 有补贴补贴未选
-
-
-
-
- 暂无可用补贴
-
-
+
+ 补贴抵扣
+
+
+ -¥{{consumption_money||'0.00'}}
+ 有补贴补贴未选
+
+
+
+
+ 暂无可用补贴
+
+
运费:
+¥{{priceGroup.storePostage}}
-
+
@@ -2663,69 +2670,79 @@
height: 756rpx;
overflow-y: scroll;
}
- .red_packet{
- color: #ff5c2d !important;
- background-color: rgba(#ff5c2d, 0.3);
- border-radius: 60rpx;
- padding: 5rpx 10rpx;
- padding-left: 20rpx;
- font-size: 25rpx;
- }
- .tips_popup{
- width: 600rpx;
- height: 450rpx;
- position: relative;
- .r_c_gb{
- width: 100%;
- height: 420rpx;
- margin-top: 30rpx;
- }
- .ref_content{
- position: absolute;
- left: 0;
- top: 0;
- height: 100%;
- width: 100%;
- box-sizing: border-box;
- padding: 120rpx 30rpx 30rpx 30rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- color: #2E2E2E;
- font-size: 28rpx;
- .r_c_title{
- font-weight: blod;
- }
- .r_c_text{
- font-size: 26rpx;
- }
- .r_c_btn{
- display: flex;
- justify-content: space-around;
- .r_c_btn1{
- background-color: transparent;
- border: 5rpx solid #FF874C;
- color: #FF874C;
- font-size: 28rpx;
- padding: 5rpx 28rpx;
- border-radius: 60rpx;
- }
- .r_c_btn2{
- background-color: #FF874C;
- border: 5rpx solid #FF874C;
- color: #fff;
- font-size: 28rpx;
- padding: 5rpx 28rpx;
- border-radius: 60rpx;
- }
- }
- }
- .r_c_close{
- position: absolute;
- top: 0;
- right: 0;
- height: 60rpx;
- width: 60rpx;
- }
- }
+
+ .red_packet {
+ color: #ff5c2d !important;
+ background-color: rgba(#ff5c2d, 0.3);
+ border-radius: 60rpx;
+ padding: 5rpx 10rpx;
+ padding-left: 20rpx;
+ font-size: 25rpx;
+ }
+
+ .tips_popup {
+ width: 600rpx;
+ height: 450rpx;
+ position: relative;
+
+ .r_c_gb {
+ width: 100%;
+ height: 420rpx;
+ margin-top: 30rpx;
+ }
+
+ .ref_content {
+ position: absolute;
+ left: 0;
+ top: 0;
+ height: 100%;
+ width: 100%;
+ box-sizing: border-box;
+ padding: 120rpx 30rpx 30rpx 30rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ color: #2E2E2E;
+ font-size: 28rpx;
+
+ .r_c_title {
+ font-weight: blod;
+ }
+
+ .r_c_text {
+ font-size: 26rpx;
+ }
+
+ .r_c_btn {
+ display: flex;
+ justify-content: space-around;
+
+ .r_c_btn1 {
+ background-color: transparent;
+ border: 5rpx solid #FF874C;
+ color: #FF874C;
+ font-size: 28rpx;
+ padding: 5rpx 28rpx;
+ border-radius: 60rpx;
+ }
+
+ .r_c_btn2 {
+ background-color: #FF874C;
+ border: 5rpx solid #FF874C;
+ color: #fff;
+ font-size: 28rpx;
+ padding: 5rpx 28rpx;
+ border-radius: 60rpx;
+ }
+ }
+ }
+
+ .r_c_close {
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 60rpx;
+ width: 60rpx;
+ }
+ }
\ No newline at end of file