This commit is contained in:
parent
555571fb6b
commit
ed728f3a74
|
@ -2,8 +2,8 @@
|
|||
"name" : "惠农商户平台",
|
||||
"appid" : "__UNI__1EE148C",
|
||||
"description" : "",
|
||||
"versionName" : "1.3.2",
|
||||
"versionCode" : 132,
|
||||
"versionName" : "1.3.3",
|
||||
"versionCode" : 133,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
@ -293,6 +293,14 @@
|
|||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/redpacket/redpacket",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "补贴",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</view>
|
||||
|
||||
<view class="content-middle">
|
||||
<view class="content-middlea" v-for="(item,index) in list" :key='index' @click="handleToWithDraw">
|
||||
<view class="content-middlea" v-for="(item,index) in list" :key='index' @click="handleToWithDraw(item, index)">
|
||||
<view class="content-middlea-one">
|
||||
{{item.name}}
|
||||
</view>
|
||||
|
@ -513,6 +513,11 @@
|
|||
type: 3,
|
||||
image: require('@/static/images/index4.png')
|
||||
},
|
||||
{
|
||||
name: '扫码付款',
|
||||
type: 18,
|
||||
image: require('@/static/images/index25.png')
|
||||
},
|
||||
{
|
||||
name: '进货管理',
|
||||
type: 4,
|
||||
|
@ -554,10 +559,37 @@
|
|||
image: require('@/static/images/index24.png')
|
||||
},
|
||||
{
|
||||
name: '全部',
|
||||
type: 8,
|
||||
image: require('@/static/images/index3.png')
|
||||
}
|
||||
name: '转账订单',
|
||||
type: 19,
|
||||
image: require('@/static/images/index13.png')
|
||||
},
|
||||
{
|
||||
name: '提现管理',
|
||||
type: 5,
|
||||
image: require('@/static/images/index8.png')
|
||||
},
|
||||
{
|
||||
name: '商户设置',
|
||||
type: 12,
|
||||
image: require('@/static/images/index11.png')
|
||||
},
|
||||
{
|
||||
name: '押金缴纳',
|
||||
type: 14,
|
||||
image: require('@/static/images/index20.png')
|
||||
},
|
||||
{
|
||||
name: '补贴进度',
|
||||
type: 16,
|
||||
image: require('@/static/images/index23.png')
|
||||
},
|
||||
|
||||
|
||||
// {
|
||||
// name: '全部',
|
||||
// type: 8,
|
||||
// image: require('@/static/images/index3.png')
|
||||
// }
|
||||
],
|
||||
typelistSupplyChain: [{
|
||||
name: '商品管理',
|
||||
|
@ -574,6 +606,11 @@
|
|||
type: 2,
|
||||
image: require('@/static/images/index1.png')
|
||||
},
|
||||
{
|
||||
name: '扫码付款',
|
||||
type: 18,
|
||||
image: require('@/static/images/index25.png')
|
||||
},
|
||||
{
|
||||
name: '提现管理',
|
||||
type: 5,
|
||||
|
@ -600,10 +637,30 @@
|
|||
image: require('@/static/images/index24.png')
|
||||
},
|
||||
{
|
||||
name: '全部',
|
||||
type: 8,
|
||||
image: require('@/static/images/index3.png')
|
||||
}
|
||||
name: '供货采购',
|
||||
type: 3,
|
||||
image: require('@/static/images/index4.png')
|
||||
},
|
||||
{
|
||||
name: '进货管理',
|
||||
type: 4,
|
||||
image: require('@/static/images/index5.png')
|
||||
},
|
||||
{
|
||||
name: '商户设置',
|
||||
type: 12,
|
||||
image: require('@/static/images/index11.png')
|
||||
},
|
||||
{
|
||||
name: '补贴进度',
|
||||
type: 16,
|
||||
image: require('@/static/images/index23.png')
|
||||
},
|
||||
// {
|
||||
// name: '全部',
|
||||
// type: 8,
|
||||
// image: require('@/static/images/index3.png')
|
||||
// }
|
||||
],
|
||||
typePersonalStoreList: [{
|
||||
name: '商品管理',
|
||||
|
@ -641,10 +698,40 @@
|
|||
image: require('@/static/images/index23.png')
|
||||
},
|
||||
{
|
||||
name: '全部',
|
||||
type: 8,
|
||||
image: require('@/static/images/index3.png')
|
||||
}
|
||||
name: '扫码付款',
|
||||
type: 18,
|
||||
image: require('@/static/images/index25.png')
|
||||
},
|
||||
{
|
||||
name: '进货管理',
|
||||
type: 4,
|
||||
image: require('@/static/images/index5.png')
|
||||
},
|
||||
{
|
||||
name: '转账订单',
|
||||
type: 19,
|
||||
image: require('@/static/images/index13.png')
|
||||
},
|
||||
{
|
||||
name: '订单核销',
|
||||
type: 7,
|
||||
image: require('@/static/images/index2.png')
|
||||
},
|
||||
{
|
||||
name: '商户设置',
|
||||
type: 12,
|
||||
image: require('@/static/images/index11.png')
|
||||
},
|
||||
{
|
||||
name: '押金缴纳',
|
||||
type: 14,
|
||||
image: require('@/static/images/index20.png')
|
||||
},
|
||||
// {
|
||||
// name: '全部',
|
||||
// type: 8,
|
||||
// image: require('@/static/images/index3.png')
|
||||
// }
|
||||
],
|
||||
refundInfo: {},
|
||||
company: '',
|
||||
|
@ -743,9 +830,12 @@
|
|||
},
|
||||
methods: {
|
||||
// 提现页面
|
||||
handleToWithDraw() {
|
||||
handleToWithDraw(item, index) {
|
||||
let url;
|
||||
if(index<2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id;
|
||||
else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2`
|
||||
uni.navigateTo({
|
||||
url: "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id
|
||||
url: url
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1182,7 +1272,7 @@
|
|||
// 余额
|
||||
this.list[0].value = res.data.extract_money;
|
||||
// 暂存金额
|
||||
this.list[1].value = res.data.lock_money
|
||||
this.list[1].value = res.data.lock_money;
|
||||
})
|
||||
}
|
||||
merstreet({
|
||||
|
@ -1374,6 +1464,22 @@
|
|||
url: '/pages/payment/qrcode'
|
||||
})
|
||||
break;
|
||||
case 18:
|
||||
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
|
||||
else this.getScanPay();
|
||||
break;
|
||||
case 19:
|
||||
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
|
||||
else uni.navigateTo({
|
||||
url: '/pages/users/order_list/indexOther?status=-1&product_type=98&source=12'
|
||||
})
|
||||
break;
|
||||
case 20:
|
||||
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
|
||||
else uni.navigateTo({
|
||||
url: '/pages/users/order_list/indexOther?status=-1&product_type=98&source=12'
|
||||
})
|
||||
break;
|
||||
default:
|
||||
uni.navigateTo({
|
||||
url: '/pages/moreProject/moreProject'
|
||||
|
@ -1387,6 +1493,30 @@
|
|||
}
|
||||
},
|
||||
|
||||
// 扫码付款提货
|
||||
getScanPay(){
|
||||
uni.scanCode({
|
||||
scanType: ['qrCode'],
|
||||
success: (res) => {
|
||||
console.log(res);
|
||||
if (res.result && res.result.includes('pages/payment/get_payment')) {
|
||||
let url = res.result.replace(/.*lihaink.cn/g, '');
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
fail: () => {
|
||||
Toast('跳转页面失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
Toast('无效的二维码')
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
Toast('无效的二维码')
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
//获取订单列表
|
||||
getGoods: async function(isPage) {
|
||||
let that = this;
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
<template>
|
||||
<view class="container" v-if="merchantInfo">
|
||||
<view style="height: var(--status-bar-height);"></view>
|
||||
|
||||
<view class="container">
|
||||
<view class="v-navbar">
|
||||
<u-navbar title="提货付款" @rightClick="rightClick" :autoBack="true" :fixed="false" bgColor="transparent"
|
||||
<u-navbar title="提货付款" :safeAreaInsetTop="false" :fixed="false" @leftClick="leftClick" bgColor="transparent"
|
||||
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
|
||||
</u-navbar>
|
||||
</view>
|
||||
|
||||
<view v-if="merchantInfo && !isEmpty">
|
||||
<view class="v-desc">
|
||||
<view class="v-desc-main">付款给商家</view>
|
||||
<view>
|
||||
<view class="v-desc-main">确认提货付款</view>
|
||||
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 店铺图片 -->
|
||||
<view class="v-shop-img">
|
||||
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
|
||||
:radius="10" />
|
||||
</view>
|
||||
|
@ -22,11 +18,10 @@
|
|||
<!-- 付款金额 -->
|
||||
<view class="v-con">
|
||||
<view class="v-con-text">付款金额</view>
|
||||
<view class="v-con-input">
|
||||
<u--input type="number" maxlength="5" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
||||
border="none" placeholderStyle="color:#999;font-size:30rpx">
|
||||
<u--text size="23" color="#303133" text="¥" slot="prefix" margin="0 3px 0 0" type="tips"></u--text>
|
||||
</u-input>
|
||||
<view class="v-con-input" style="margin-right: 10px;">
|
||||
<text style="color: #303133;font-size:46rpx;">¥</text>
|
||||
<u--input type="digit" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
|
||||
border="none" placeholderStyle="color:#999;font-size:30rpx" @input="validateDecimal">
|
||||
</u--input>
|
||||
</view>
|
||||
|
||||
|
@ -40,8 +35,26 @@
|
|||
<view class="v-wrap-desc-sub">即买即用</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="v-btn-wrap">
|
||||
<view class="v-btn" @click="submitOrder">提交订单</view>
|
||||
</view>
|
||||
|
||||
<!-- 登陆 -->
|
||||
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun">
|
||||
</authorize>
|
||||
</view>
|
||||
|
||||
<!-- 无商户信息提示 -->
|
||||
<view v-else class="empty">
|
||||
<image src="/static/images/no_thing.png"></image>
|
||||
<text style="margin-top: 60rpx;">{{tips}}</text>
|
||||
<!-- 登陆 -->
|
||||
<authorize :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
|
||||
@onLoadFun="onLoadFun">
|
||||
</authorize>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -51,9 +64,22 @@
|
|||
addCart,
|
||||
orderCheck
|
||||
} from "@/api/payment.js";
|
||||
import Cache from '@/utils/cache';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import authorize from '@/components/Authorize';
|
||||
import { Toast } from "../../libs/uniApi";
|
||||
export default {
|
||||
components: {
|
||||
authorize
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isLogin']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEmpty: false,
|
||||
cartForm: {
|
||||
product_id: '',
|
||||
product_attr_unique: '',
|
||||
|
@ -73,14 +99,48 @@
|
|||
takes: [],
|
||||
use_coupon: {},
|
||||
use_integral: false
|
||||
}
|
||||
},
|
||||
isAuto: false, //没有授权的不会自动授权
|
||||
isShowAuth: false, //是否隐藏授权
|
||||
mer_id: '',
|
||||
tips: '暂未登陆~'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// mer_id
|
||||
this.getProductInfoByMerid();
|
||||
|
||||
onLoad(opt) {
|
||||
this.mer_id = opt.mer_id;
|
||||
},
|
||||
onShow() {
|
||||
if (!this.isLogin) {
|
||||
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
|
||||
this.isAuto = true;
|
||||
this.isShowAuth = true;
|
||||
} else {
|
||||
this.checkForm.cart_id = [];
|
||||
this.getProductInfoByMerid(this.mer_id);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateDecimal(event) {
|
||||
let val = (this.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
|
||||
this.$nextTick(() => {
|
||||
this.cartForm.total_amount = val;
|
||||
})
|
||||
},
|
||||
|
||||
leftClick(e) {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
// 授权关闭
|
||||
authColse: function(e) {
|
||||
this.isShowAuth = e;
|
||||
},
|
||||
onLoadFun() {
|
||||
this.getProductInfoByMerid(this.mer_id);
|
||||
this.isShowAuth = false;
|
||||
},
|
||||
|
||||
// 提交订单
|
||||
submitOrder() {
|
||||
|
@ -94,42 +154,55 @@
|
|||
this.cartForm.product_type = this.merchantInfo.product_type;
|
||||
this.cartForm.product_attr_unique = this.merchantInfo.sku[''].unique;
|
||||
|
||||
|
||||
let that = this;
|
||||
addCart(this.cartForm).then(res => {
|
||||
// 购物车ID
|
||||
this.checkForm.cart_id.push(res.data.cart_id);
|
||||
this.$util.Tips({
|
||||
title: "添加购物车成功!"
|
||||
}, () => {
|
||||
orderCheck(that.checkForm).then(res => {
|
||||
that.checkForm.cart_id.push(res.data.cart_id);
|
||||
orderCheck(that.checkForm).then(res1 => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/payment/settlement?cartId=" + this.checkForm
|
||||
.cart_id + "&money=" + this.cartForm.total_amount +
|
||||
"&merName=" + this.merchantInfo.merchant.mer_name
|
||||
"&merName=" + this.merchantInfo.merchant.mer_name,
|
||||
success: (res) => {
|
||||
res.eventChannel.emit('datas', res1.data.platformConsumption);
|
||||
}
|
||||
})
|
||||
}).catch(err=>{
|
||||
Toast(err.message || err)
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
}).catch((err) => {
|
||||
this.$util.Tips({
|
||||
title: "添加购物车失败!"
|
||||
title: err.message || err.msg || err
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
getProductInfoByMerid() {
|
||||
getProductInfoByMerid(merid) {
|
||||
let that = this;
|
||||
getProductInfo({
|
||||
mer_id: 31
|
||||
mer_id: merid
|
||||
}).then(res => {
|
||||
this.merchantInfo = res.data;
|
||||
}).catch((err) => {
|
||||
that.$util.Tips({
|
||||
title: err.message
|
||||
});
|
||||
this.tips = err.message || err.smg || err;
|
||||
this.$util.Tips({
|
||||
title: err.message || err.msg || err
|
||||
})
|
||||
// #ifdef APP
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 1500)
|
||||
// #endif
|
||||
|
||||
// #ifndef APP
|
||||
that.isEmpty = true;
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
|
||||
// 图片保存
|
||||
handleSavePic() {
|
||||
// 获取要保存的图片路径或URL
|
||||
let imageUrl = this.qrcodeUrl; // 这里使用了网络上的图片作为示例
|
||||
|
@ -175,26 +248,47 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #FCE9B2;
|
||||
background-color: #FCDFAD;
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 130rpx 0 150rpx;
|
||||
text-align: center;
|
||||
|
||||
image,
|
||||
uni-image {
|
||||
display: inline-block;
|
||||
width: 414rpx;
|
||||
height: 305rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
display: block;
|
||||
color: #666;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
|
||||
background-size: 100% auto;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: 88rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.v-navbar {
|
||||
margin-bottom: 54rpx;
|
||||
}
|
||||
padding-top: var(--status-bar-height);
|
||||
|
||||
.v-desc {
|
||||
margin-left: 30rpx;
|
||||
margin-bottom: 124rpx;
|
||||
position: absolute;
|
||||
top: 196rpx;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
background: transparent;
|
||||
|
||||
.v-desc-main {
|
||||
margin-bottom: 30rpx;
|
||||
|
@ -210,53 +304,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
.v-qrcode {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 158rpx;
|
||||
}
|
||||
|
||||
.v-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 3rpx 12rpx 1rpx rgba(255, 94, 12, 0.32);
|
||||
border-radius: 55rpx 55rpx 55rpx 55rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #FF5E0C;
|
||||
line-height: 16rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
margin-top: 2rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.v-shop-img {
|
||||
position: absolute;
|
||||
top: 196rpx;
|
||||
right: 40rpx;
|
||||
}
|
||||
|
||||
.v-con {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
top: 436rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 710rpx;
|
||||
height: 1166rpx;
|
||||
height: 680rpx;
|
||||
background: linear-gradient(180deg, #FEB992 0%, #FFFFFF 31%, #FFFFFF 100%);
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 -4rpx 0px 0px #fff;
|
||||
padding: 53rpx 30rpx 0 30rpx;
|
||||
|
@ -270,18 +326,18 @@
|
|||
line-height: 16rpx;
|
||||
}
|
||||
|
||||
/deep/.u-text__value--tips {
|
||||
color: #2E2E2E;
|
||||
}
|
||||
|
||||
.v-con-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 83rpx;
|
||||
padding: 0 0 40rpx 12rpx;
|
||||
border-bottom: 1rpx solid #D6D6D6;
|
||||
}
|
||||
|
||||
.v-wrap {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20rpx;
|
||||
width: 666rpx;
|
||||
height: 210rpx;
|
||||
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/2f9c2202402291652415355.webp");
|
||||
|
@ -289,26 +345,24 @@
|
|||
background-repeat: no-repeat;
|
||||
|
||||
.v-wrap-money {
|
||||
position: absolute;
|
||||
top: 70rpx;
|
||||
left: 36rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #FF5E0C;
|
||||
margin-right: 30rpx;
|
||||
|
||||
.icon {
|
||||
font-size: 28rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 46rpx;
|
||||
|
||||
display: inline-block;
|
||||
overflow: auto;
|
||||
width: 180rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.v-wrap-desc {
|
||||
position: absolute;
|
||||
top: 67rpx;
|
||||
left: 230rpx;
|
||||
|
||||
.v-wrap-desc-main {
|
||||
margin-bottom: 16rpx;
|
||||
font-weight: 600;
|
||||
|
@ -323,10 +377,21 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.v-btn-wrap {
|
||||
position: fixed;
|
||||
z-index: 11;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 240rpx;
|
||||
background-color: #FDD6A6;
|
||||
|
||||
.v-btn {
|
||||
position: absolute;
|
||||
bottom: 96rpx;
|
||||
width: 650rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
|
@ -337,6 +402,7 @@
|
|||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
|
||||
&:active {
|
||||
opacity: .8;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,313 @@
|
|||
<template>
|
||||
<view class="">
|
||||
<!-- <block v-for="(item, index) in info">
|
||||
<block v-if="item.type==1">
|
||||
<view class="type_name">无门槛实物通用补贴<text class="n_count">(2张)</text></view>
|
||||
<view class="r_list" v-for="(e, i) in item.list">
|
||||
<view class="r_item" @click="change(index, i)">
|
||||
<image class="r_bg" src="/static/active/red_packet.webp"></image>
|
||||
<view class="r_body">
|
||||
<view class="r_count">
|
||||
<view class="rc_count">
|
||||
<text class="rc_icon">¥</text>240
|
||||
</view>
|
||||
</view>
|
||||
<view class="r_content">
|
||||
<view class="r_name">现金抵扣补贴</view>
|
||||
<view>仅限平台指定商家商品可使用</view>
|
||||
<view>有效期至 2026.01.15 24:00:00</view>
|
||||
</view>
|
||||
<view class="r_icon">
|
||||
<u-icon v-if="changeRed.type == index && changeRed.id == i" name="checkmark-circle-fill" color="#FFF3CC" size="56rpx"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle" color="#FFF3CC" size="56rpx"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="item.type==2">
|
||||
<view class="type_name">不可使用补贴<text class="n_count">(2张)</text></view>
|
||||
<view class="none_list" v-for="(e, i) in item.list">
|
||||
<view class="r_body">
|
||||
<view class="r_count">
|
||||
<view class="rc_count">
|
||||
<text class="rc_icon">¥</text>200
|
||||
</view>
|
||||
</view>
|
||||
<view class="r_content">
|
||||
<view class="r_name">现金抵扣补贴</view>
|
||||
<view>仅限平台指定商家商品可使用</view>
|
||||
<view>有效期至 2026.01.15 24:00:00</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line dashed color="#999999"></u-line>
|
||||
<view class="n_tips">本单不可用原因:未在平台指定店铺使用</view>
|
||||
</view>
|
||||
</block>
|
||||
</block> -->
|
||||
|
||||
<view style="height: 30rpx;"></view>
|
||||
<view class="r_list" v-for="(item, i) in list" :key="i">
|
||||
<view class="r_item" @click="change(item)">
|
||||
<image class="r_bg" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/ad7c4202403081750326208.webp"></image>
|
||||
<view class="r_body">
|
||||
<view class="r_count">
|
||||
<view class="rc_count">
|
||||
<text class="rc_icon">¥</text>{{item.balance}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="r_content">
|
||||
<view class="r_name">{{item.coupon_title}}</view>
|
||||
<view>{{item.describe}}</view>
|
||||
<view>有效期至 {{item.end_time}}</view>
|
||||
</view>
|
||||
<view class="r_icon">
|
||||
<u-icon v-if="changeRed&&changeRed.coupon_user_id==item.coupon_user_id" name="checkmark-circle-fill" color="#FFF3CC" size="56rpx"></u-icon>
|
||||
<!-- <u-icon v-else name="checkmark-circle" color="#FFF3CC" size="56rpx"></u-icon> -->
|
||||
<view v-else style="height: 50rpx;width: 50rpx;border-radius: 50%;border: 5rpx solid #FFF3CC;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer">
|
||||
<view>
|
||||
<text>已选 {{ changeRed?1:0 }} 张</text>
|
||||
<view v-if="changeRed&&changeRed.coupon_title.includes('抵扣补贴')" style="font-size: 24rpx;margin-left: 10rpx;color: #ed4c3a;">(使用补贴后此订单将不参与任何补贴活动)</view>
|
||||
<view v-if="changeRed&&changeRed.coupon_title.includes('通用补贴')" style="font-size: 24rpx;margin-left: 10rpx;color: #ed4c3a;">(使用补贴后此订单将不参与用户消费补贴活动)</view>
|
||||
<!-- , 可减 <text class="red_i">¥</text> <text class="red_c">0</text> -->
|
||||
</view>
|
||||
<view class="btn" @click="comfirm">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: [
|
||||
{
|
||||
type: 1, // 是否可以使用
|
||||
name: '无门槛实物通用补贴',
|
||||
list: [1, 2]
|
||||
},
|
||||
{
|
||||
type: 1, // 是否可以使用
|
||||
name: '现金抵扣补贴',
|
||||
list: [1,2,3]
|
||||
},
|
||||
{
|
||||
type: 2, // 是否可以使用, 2不可以使用
|
||||
name: '不可使用补贴',
|
||||
list: [1]
|
||||
}
|
||||
],
|
||||
list: [],
|
||||
changeRed: null,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
|
||||
eventChannel.on('changeRedPacketInfo', (data) => {
|
||||
console.log(data);
|
||||
this.list = data;
|
||||
})
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
change(e, i) {
|
||||
console.log(e, i);
|
||||
if(this.changeRed&&this.changeRed.coupon_user_id==e.coupon_user_id)this.changeRed = null;
|
||||
else this.changeRed = e;
|
||||
},
|
||||
comfirm(){
|
||||
uni.$emit('changeRedPacket', this.changeRed?.coupon_user_id||'');
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #fff;
|
||||
}
|
||||
.type_name{
|
||||
padding: 20rpx;
|
||||
font-size: 28rpx;
|
||||
.n_count{
|
||||
color: #7A7A7A;
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.r_list {
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
|
||||
.r_item {
|
||||
height: 156rpx;
|
||||
width: 710rpx;
|
||||
position: relative;
|
||||
|
||||
.r_bg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.r_body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
|
||||
.r_count {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #A46F32;
|
||||
font-size: 44rpx;
|
||||
font-weight: bold;
|
||||
|
||||
.rc_count {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.rc_icon {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.r_content {
|
||||
flex: 4;
|
||||
color: #FFF3CC;
|
||||
font-size: 24rpx;
|
||||
padding: 18rpx 10rpx 18rpx 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.r_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
view{
|
||||
width: 100%;
|
||||
overflow: hidden; /* 隐藏超出宽度的文本 */
|
||||
white-space: nowrap; /* 不换行 */
|
||||
text-overflow: ellipsis; /* 文本末尾显示省略号 */
|
||||
}
|
||||
}
|
||||
|
||||
.r_icon {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.none_list{
|
||||
margin: 0 20rpx 20rpx 20rpx;
|
||||
background-color: #E2E2E2;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.r_body {
|
||||
height: 156rpx;
|
||||
width: 710rpx;
|
||||
display: flex;
|
||||
|
||||
.r_count {
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
font-size: 44rpx;
|
||||
font-weight: bold;
|
||||
|
||||
.rc_count {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.rc_icon {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.r_content {
|
||||
flex: 5;
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
padding: 18rpx 10rpx 18rpx 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.r_name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
view{
|
||||
width: 100%;
|
||||
overflow: hidden; /* 隐藏超出宽度的文本 */
|
||||
white-space: nowrap; /* 不换行 */
|
||||
text-overflow: ellipsis; /* 文本末尾显示省略号 */
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.n_tips{
|
||||
padding: 10rpx 30rpx 20rpx 30rpx;
|
||||
color: #333;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
height: 130rpx;
|
||||
padding: 30rpx;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #F6F6F6;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
.red_i{
|
||||
color: #FF421D;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.red_c{
|
||||
color: #FF421D;
|
||||
font-size: 44rpx;
|
||||
}
|
||||
.btn{
|
||||
width: 128rpx;
|
||||
height: 68rpx;
|
||||
background-color: #EC693F;
|
||||
border-radius: 34rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Loading…
Reference in New Issue