Commit e071906b by 胡悦

修改详情

1 parent 2cb8c632
...@@ -3,162 +3,30 @@ ...@@ -3,162 +3,30 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-08 19:26:10 * @LastEditTime: 2024-04-08 20:43:15
--> -->
<template> <template>
<view> <view>
<tool-box /> <tool-box />
详情页 详情页
<button @click="open">完成接待</button> <button @click="open">完成接待</button>
<uni-popup <pay-pop ref="pay"></pay-pop>
ref="popup"
type="bottom"
:mask-click="false"
border-radius="16px 16px 0 0"
>
<view class="popup-wrapper">
<view class="popup-box">
<view class="payment-title"
>付款二维码
<view class="icon-close" @click="close">×</view>
</view>
<view class="popup-content">
<view class="tab-list">
<view
:class="['tab-item', { active: payActive === item.type }]"
v-for="item in paymentType"
:key="item.type"
@click="handleSwitchTab(item)"
>{{ item.name }}</view
>
</view>
<view class="payment-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="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
mode="scaleToFill"
/> -->
<view class="qr-code-info">扫码付款,支持多渠道付款</view>
</view>
<view v-show="payActive === 2" class="corporate-content">
<image
class="bank-logo"
src="https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png"
mode="scaleToFill"
/>
<view class="bank-info">
<view
class="bank-item"
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 class="payment-done" @click="done()"
>已支付,去上传付款凭证</view
>
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
<script> <script>
import payPop from './components/payPop.vue';
import ToolBox from './components/ToolBox.vue' import ToolBox from './components/ToolBox.vue'
const PAYMENT_TYPE = [
{
name: "扫码支付",
type: 1,
},
{
name: "对公账户",
type: 2,
},
];
const ACCOUT_LIST = [
{
label: "公司名称",
field: "companyName",
},
{
label: "基本账户",
field: "basicAccount",
},
{
label: "支行账号",
field: "subBranchAccount",
},
{
label: "一般账户",
field: "generalAccount",
},
{
label: "支付账户",
field: "paymentAccount",
},
];
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
export default { export default {
components: { ToolBox }, components: { ToolBox, payPop },
mixins: [myClick], mixins: [myClick],
component:{
ToolBox
},
data() { data() {
return { return {
payInfo: {},
accountInfo: {},
payActive: 1,
paymentType: PAYMENT_TYPE,
accountList: ACCOUT_LIST,
}; };
}, },
onLoad(options) {
console.log(uni.getDeviceInfo(), "==");
// const text = options.text
// uni.setNavigationBarTitle({
// title: text
// });
},
methods: { methods: {
// 切换tab
handleSwitchTab(item) {
this.payActive = item.type;
},
// 查询门店支付配置
async findPayInfo() {
const data = await uni.$api.commonApi.findPayInfo({
merchantId: 44209880,
});
this.payInfo = data.find((item) => item.paymentType == 1);
this.accountInfo = data.find((item) => item.paymentType == 2);
},
open() { open() {
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] this.$refs.pay.show()
this.$refs.popup.open("bottom");
this.findPayInfo();
},
close() {
this.$refs.popup.close();
},
done() {
uni.navigateBack({
delta: 1,
});
this.stopAudio();
}, },
}, },
}; };
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!