Commit 1e65f58b by 胡悦

添加:首页接口和付款弹窗

1 parent ef82a71b
...@@ -8,10 +8,21 @@ module.exports = { ...@@ -8,10 +8,21 @@ module.exports = {
...data, ...data,
}); });
}, },
findSoureList(data) { // 查询接待素材
findSoureList() {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.recepiton.soure.findSoureList', method: 'dj.api.smartcarlife.recepiton.soure.findSoureList',
...data, sessionId: "b5e0a471-a2cd-4020-a522-72bcd68d6da7",
projectName: "boutique",
})
},
// 查询门店支付配置
findPayInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId',
sessionId: "b5e0a471-a2cd-4020-a522-72bcd68d6da7",
projectName: "boutique",
...data
}) })
}, },
getToken(data) { getToken(data) {
......
const target = ["ip", "dev", "uat", "prod", "preRelease"]; const target = ["ip", "dev", "uat", "prod", "preRelease"];
const index = 2; const index = 1;
/** /**
* *
0本地 0本地
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
{ {
"path": "pages/home/home", "path": "pages/home/home",
"style": { "style": {
"navigationBarTitleText": "", "navigationStyle": "custom"
"enablePullDownRefresh": false
} }
}, },
{ {
......
...@@ -3,41 +3,179 @@ ...@@ -3,41 +3,179 @@
* @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 13:44:50 * @LastEditTime: 2024-04-08 16:23:30
--> -->
<template> <template>
<view> <view>
详情页 详情页
<button @click="open">打开弹窗</button> <button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="bottom" background-color="#fff" border-radius="10px 10px 0 0" <uni-popup ref="popup" type="bottom" border-radius="16px 16px 0 0">
<view class="popup-wrapper">
<view class="popup-box">
<view class="payment-title">付款二维码</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="tab-item qr-code active">扫码支付</view>
<view class="">付款二维码</view> <view class="tab-item corporate">对公账户</view> -->
</view>
<view class="payment-content">
<view v-show="payActive === 1" class="qr-code-content">
<!-- <image :src="payInfo.storePaymentQrcodeUrl" mode="aspectFit" /> -->
<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">
DDDD
</view>
</view>
</view>
<view class="payment-done">已完成支付,去付款凭证</view>
</view> </view>
</uni-popup </view>
> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
const PAYMENT_TYPE = [
{
name: "扫码支付",
type: 1,
},
{
name: "对公账户",
type: 2,
},
];
export default { export default {
data() { data() {
return {}; return {
payInfo: {},
payActive: 1,
paymentType: PAYMENT_TYPE,
};
}, },
onLoad(options) { onLoad(options) {
console.log(options, "=="); console.log(uni.getDeviceInfo(), "==");
// const text = options.text // const text = options.text
// uni.setNavigationBarTitle({ // uni.setNavigationBarTitle({
// title: text // title: text
// }); // });
}, },
methods: { methods: {
// 切换tab
handleSwitchTab(item) {
this.payActive = item.type;
},
// 查询门店支付配置
async findPayInfo() {
this.payInfo = (
await uni.$api.commonApi.findPayInfo({
merchantId: 44209880,
})
).find((item) => item.paymentType == 1);
},
open() { open() {
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center'] // 通过组件定义的ref调用uni-popup方法 ,如果传入参数 ,type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
this.$refs.popup.open("top"); this.$refs.popup.open("top");
this.findPayInfo();
}, },
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// .popup-wrapper {
// position: relative;
// height: 100vh;
// }
.popup-box {
// position: absolute;
// bottom: 0;
// width: 100%;
// display: flex;
// flex-direction: column;
margin-top: 286rpx;
background-color: #f8f9f9;
min-height: 1154rpx;
padding-bottom: 30rpx;
.payment-title {
width: 100%;
height: 96rpx;
padding: 24rpx 0 26rpx;
text-align: center;
border-bottom: 1px solid #e8e8e8;
}
}
.popup-content {
.tab-list {
display: flex;
justify-content: center;
margin-top: 40rpx;
.tab-item {
width: 320rpx;
padding: 24rpx 0 28rpx;
text-align: center;
background-color: #fff;
color: #666;
&.active {
background-color: #2c66f7;
color: #fff;
}
&:first-child {
border-radius: 200rpx 0 0 200rpx;
}
&:last-child {
border-radius: 0 48rpx 48rpx 0;
}
}
}
.payment-content {
width: 100%;
display: flex;
justify-content: center;
margin-top: 40rpx;
.qr-code-content {
width: 538rpx;
background-color: #fff;
border-radius: 24rpx;
text-align: center;
padding: 59rpx 0 67rpx;
.qr-code-img {
width: 420rpx;
height: 420rpx;
}
.qr-code-info {
margin-top: 40rpx;
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
}
}
}
}
.payment-done {
width: calc(100% - 240rpx);
height: 80rpx;
font-weight: 500;
font-size: 32rpx;
color: #ffffff;
text-align: center;
line-height: 80rpx;
// padding: 18rpx 0;
margin: 112rpx 120rpx 30rpx;
// margin-top: auto;
background-color: #2c66f7;
border-radius: 40rpx;
}
</style> </style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:39:40 * @Date: 2024-04-07 14:39:40
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-08 11:44:51 * @LastEditTime: 2024-04-08 14:51:14
--> -->
<template> <template>
<view class="container"> <view class="container">
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
<view class="module-item" v-for="item in moduleList" :key="item.id" @click="toDetail(item)"> <view class="module-item" v-for="item in moduleList" :key="item.id" @click="toDetail(item)">
<image <image
class="module-img" class="module-img"
:src="item.picUrl" :src="item.thumbnail"
mode="scaleToFill" mode="scaleToFill"
/> />
<view class="module-name">{{item.name}}</view> <view class="module-name">{{item.title}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -58,38 +58,7 @@ ...@@ -58,38 +58,7 @@
export default { export default {
data() { data() {
return { return {
moduleList: [ moduleList: []
{
id: 1,
name: '问界交车告知书',
picUrl: '../../static/logo.png'
},
{
id: 2,
name: '商城延保价格明细',
picUrl: '../../static/logo.png'
},
{
id: 3,
name: '保修升级告知书',
picUrl: '../../static/logo.png'
},
{
id: 4,
name: '问界三包政策',
picUrl: '../../static/logo.png'
},
{
id: 5,
name: '整车质保升级政策',
picUrl: '../../static/logo.png'
},
{
id: 6,
name: '历史成交客户',
picUrl: '../../static/logo.png'
}
]
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -97,8 +66,12 @@ export default { ...@@ -97,8 +66,12 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: text, title: text,
}); });
this.getSoure()
}, },
methods: { methods: {
async getSoure() {
this.moduleList = await uni.$api.commonApi.findSoureList()
},
toDetail(item) { toDetail(item) {
// this.$Router.push({name:'detail'}) // this.$Router.push({name:'detail'})
uni.navigateTo({ uni.navigateTo({
......
import { setToken, getToken, removeToken } from '@/utils/token';; /*
* @Description:
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: huyue
* @LastEditTime: 2024-04-08 14:11:38
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
export default { export default {
namespaced: true, namespaced: true,
state() { state() {
return { return {
userData: {}, userData: {},
token: getToken(), // token: getToken(),
}; };
}, },
mutations: { mutations: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!