From 2a93afc95dda6afd1479af042e178b3e84a0c8c4 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期四, 13 六月 2024 14:03:36 +0800
Subject: [PATCH] feat(支付): 修改接口统一前缀
---
pages/pay/discountpay.vue | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/pages/pay/discountpay.vue b/pages/pay/discountpay.vue
index 32604c9..59773f7 100644
--- a/pages/pay/discountpay.vue
+++ b/pages/pay/discountpay.vue
@@ -10,15 +10,15 @@
</view>
</view>
- <view v-if="discountInfo.shopDiscount!=1&&money*(1-discountInfo.shopDiscount)>=0.01"
+ <!-- <view v-if="discountInfo.shopDiscount!=1&&money*(1-discountInfo.shopDiscount)>=0.01"
class="bg-fff u-m-h-32 u-m-t-20 u-p-h-32 u-br-10">
<view class="u-p-v-32 u-flex u-row-between u-border-bottom u-font-30 color-333">
<view>{{discountInfo.memberGradeName}}涓撳睘鎶樻墸</view>
<view>-{{ money*(1-discountInfo.shopDiscount).toFixed(2) }}</view>
</view>
- </view>
+ </view>-->
<view v-if="canUseIntegral||canUseCoupon" class="u-p-h-32 bg-fff u-m-h-32 u-br-10">
- <view class="u-font-28 u-m-t-32">閫夋嫨浼樻儬鏂瑰紡</view>
+<!-- <view class="u-font-28 u-m-t-32">閫夋嫨浼樻儬鏂瑰紡</view>
<view v-if="canUseIntegral" class="u-p-v-24 u-border-bottom u-flex u-m-t-10">
<image class="item-icon" style="align-self: flex-start;position: relative;top: -3rpx;"
src="/static/integral.png" mode=""></image>
@@ -29,7 +29,7 @@
</view>
<input-number @handleCount="changeInt" :value="canUseInt" :min="0" :max="maxIntegral">
</input-number>
- </view>
+ </view>-->
<view v-if="canUseCoupon" class="u-flex u-p-v-32">
<image class="item-icon" src="/static/coupon-icon.png" mode=""></image>
<view class="u-font-30 u-flex-1 u-m-h-16">浼樻儬鍒�</view>
@@ -94,7 +94,7 @@
<key-bord @changeMoney="changeMoney" :num.sync="money" @close="bordShow = false" @pay="pay"></key-bord>
</u-popup>
<!-- 鏀粯楠岃瘉鐮� -->
- <u-popup :show="codeShow" closeable mode="center" @close="codeShow = false">
+<!-- <u-popup :show="codeShow" closeable mode="center" @close="codeShow = false">
<view class="u-p-h-40 u-p-b-40">
<view class="u-text-center u-p-t-20 u-m-b-30 u-font-34">璇疯緭鍏ユ墜鏈洪獙璇佺爜</view>
<view class="u-text-center u-m-b-20 color-666">{{ shopInfo.shop_name }}</view>
@@ -104,7 +104,7 @@
<u-code-input @finish="bankPay" v-model="smscode" mode="box" :focus="true"></u-code-input>
</view>
- </u-popup>
+ </u-popup>-->
</view>
</template>
@@ -120,6 +120,7 @@
queryUseSweepPayCoupon,
getWechatConfigInfo,
saveWxOrder,
+ saveOrder,
tlPay
} from '@/common/api/index'
import wx from 'weixin-js-sdk'; // 浣跨敤js-sdk
@@ -244,7 +245,10 @@
onLoad(opt) {
this.isNew = uni.getStorageSync('IS_NEW')
this.cid = uni.getStorageSync('CID')
- this.discountInfo = uni.getStorageSync('DISCOUNT_INFO')
+ if(uni.getStorageSync('DISCOUNT_INFO')){
+ this.discountInfo = uni.getStorageSync('DISCOUNT_INFO')
+ }
+
const token = uni.getStorageSync(ACCESSTOKEN) || null
if (opt.shopInfo) {
this.shopInfo = JSON.parse(decodeURIComponent(opt.shopInfo))
@@ -258,6 +262,7 @@
if (opt.money) {
this.money = parseFloat(opt.money).toFixed(2)
let dis = this.money * 100 * (1 - this.discountInfo.shopDiscount)
+ console.log('dis',dis)
let money = parseInt((this.money * 100 * this.discountInfo.shopDiscount))
if (dis < 1) {
money = parseInt((this.money * 100))
@@ -332,7 +337,7 @@
if (this.payWay == 3) {
params.bankCardId = this.bankCardId
}
- saveWxOrder(params).then(res => {
+ saveOrder(params).then(res => {
uni.hideLoading()
try {
this.orderId = res.orderId
--
Gitblit v1.9.1