Commit f0f4a9ec by 前端

详细

1 parent 1104b2f7
...@@ -2,17 +2,23 @@ ...@@ -2,17 +2,23 @@
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: huyue * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-08 17:20:55 * @LastEditTime: 2024-04-08 17:37:07
--> -->
<template> <template>
<view> <view>
详情页 详情页
<button @click="open">打开弹窗</button> <button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="bottom" :mask-click="false" border-radius="16px 16px 0 0"> <uni-popup
ref="popup"
type="bottom"
:mask-click="false"
border-radius="16px 16px 0 0"
>
<view class="popup-wrapper"> <view class="popup-wrapper">
<view class="popup-box"> <view class="popup-box">
<view class="payment-title">付款二维码 <view class="payment-title"
>付款二维码
<view class="icon-close" @click="close">×</view> <view class="icon-close" @click="close">×</view>
</view> </view>
<view class="popup-content"> <view class="popup-content">
...@@ -27,7 +33,11 @@ ...@@ -27,7 +33,11 @@
</view> </view>
<view class="payment-content"> <view class="payment-content">
<view v-show="payActive === 1" class="qr-code-content"> <view v-show="payActive === 1" class="qr-code-content">
<image class="qr-code-img" :src="payInfo.storePaymentQrcodeUrl" mode="scaleToFill" /> <image
class="qr-code-img"
:src="payInfo.storePaymentQrcodeUrl"
mode="scaleToFill"
/>
<!-- <image <!-- <image
class="qr-code-img" class="qr-code-img"
src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png" src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
...@@ -42,9 +52,15 @@ ...@@ -42,9 +52,15 @@
mode="scaleToFill" mode="scaleToFill"
/> />
<view class="bank-info"> <view class="bank-info">
<view class="bank-item" v-for="item in accountList" :key="item.field"> <view
<text class="bank-label">{{item.label}}:</text> class="bank-item"
<view class="bank-value">{{ accountInfo[item.field] }}</view> v-for="item in accountList"
:key="item.field"
>
<text class="bank-label">{{ item.label }}:</text>
<view class="bank-value">{{
accountInfo[item.field]
}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -69,34 +85,36 @@ const PAYMENT_TYPE = [ ...@@ -69,34 +85,36 @@ const PAYMENT_TYPE = [
]; ];
const ACCOUT_LIST = [ const ACCOUT_LIST = [
{ {
label: '公司名称', label: "公司名称",
field: 'companyName' field: "companyName",
}, },
{ {
label: '基本账户', label: "基本账户",
field: 'basicAccount' field: "basicAccount",
}, },
{ {
label: '支行账号', label: "支行账号",
field: 'paymentType' field: "paymentType",
}, },
{ {
label: '一般账户', label: "一般账户",
field: 'generalAccount' field: "generalAccount",
}, },
{ {
label: '支付账户', label: "支付账户",
field: 'paymentAccount' field: "paymentAccount",
} },
] ];
import myClick from "@/mixin/click";
export default { export default {
mixins: [myClick],
data() { data() {
return { return {
payInfo: {}, payInfo: {},
accountInfo: {}, accountInfo: {},
payActive: 2, payActive: 2,
paymentType: PAYMENT_TYPE, paymentType: PAYMENT_TYPE,
accountList: ACCOUT_LIST accountList: ACCOUT_LIST,
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -114,20 +132,21 @@ export default { ...@@ -114,20 +132,21 @@ export default {
// 查询门店支付配置 // 查询门店支付配置
async findPayInfo() { async findPayInfo() {
const data = await uni.$api.commonApi.findPayInfo({ const data = await uni.$api.commonApi.findPayInfo({
merchantId: 44209880, merchantId: 44209880,
}) });
this.payInfo = data.find((item) => item.paymentType == 1); this.payInfo = data.find((item) => item.paymentType == 1);
this.accountInfo = data.find((item) => item.paymentType == 2); this.accountInfo = data.find((item) => item.paymentType == 2);
}, },
open() { open() {
this.stopAudio();
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] // 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
this.$refs.popup.open("bottom"); // this.$refs.popup.open("bottom");
this.findPayInfo(); this.findPayInfo();
}, },
close() { close() {
this.$refs.popup.close(); this.$refs.popup.close();
} },
}, },
}; };
</script> </script>
...@@ -223,12 +242,12 @@ export default { ...@@ -223,12 +242,12 @@ export default {
margin-bottom: 0; margin-bottom: 0;
} }
.bank-label { .bank-label {
color: #6C6C70; color: #6c6c70;
line-height: 94rpx; line-height: 94rpx;
} }
.bank-value { .bank-value {
box-sizing: border-box; box-sizing: border-box;
background-color: #F8F9F9; background-color: #f8f9f9;
border-radius: 8rpx; border-radius: 8rpx;
width: 740rpx; width: 740rpx;
height: 80rpx; height: 80rpx;
...@@ -236,7 +255,7 @@ export default { ...@@ -236,7 +255,7 @@ export default {
padding-left: 24rpx; padding-left: 24rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #1A1A1A; color: #1a1a1a;
letter-spacing: 0; letter-spacing: 0;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!