This commit is contained in:
Vinjor 2025-04-09 16:55:06 +08:00
parent 0d6e10033e
commit b8ccf9e048
12 changed files with 680 additions and 4 deletions

View File

@ -27,6 +27,12 @@ module.exports = {
}, {
title: "认证指南",
code: "user_auth_text"
}, {
title: "了解通告券",
code: "coupon_text"
}, {
title: "通告券购买协议",
code: "coupon_agreement"
}
]
}

View File

@ -161,6 +161,18 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "coupon/coupon-list",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "coupon/my-coupon",
"style": {
"navigationBarTitleText": ""
}
}
]
}],

View File

@ -9,7 +9,7 @@
<view style="padding-bottom: 20rpx;">我是</view>
<view class="bg-img">{{identityTypeText}}</view>
</view>
<view class="title-right" @click="viewAuthText()">认证指南<uni-icons type="right" color="#623109"
<view class="title-right" @click="viewRichText()">认证指南<uni-icons type="right" color="#623109"
size="12"></uni-icons></view>
</view>
<view class="form-warn">
@ -252,7 +252,7 @@
this.identityTypeText = getTextByIdentityType(option.key)
},
methods: {
viewAuthText() {
viewRichText() {
this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[4].title}&code=${this.globalConfig.appInfo.agreements[4].code}`
)

View File

@ -0,0 +1,215 @@
<template>
<view class="container-box">
<navigation-bar-vue title="通告券" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="content">
<view class="content-body">
<image class="huojian" src="@/static/mine/coupon/huojian.png" mode="aspectFit"></image>
<view class="coupon-box">
<view class="left-top">
<view class="left-space"></view>
<image src="@/static/mine/auth/dian.png" mode="aspectFit"></image>
<view style="padding-bottom: 20rpx;">获取更多</view>
<view class="bg-img">加速特权</view>
</view>
<view class="content-img">
</view>
<view class="bottom-content">
<view class="top-text">剩余<text>0</text></view>
<view class="button-dom" @click="goMyCoupon(0)">去获取</view>
</view>
</view>
</view>
<view class="item-field" style="align-items: center;">
<view class="my-suggest-dom" @click="viewRichText()">
<text>了解通告券</text>
<uni-icons type="right" color="#363636" size="14"></uni-icons>
</view>
<view class="my-suggest-dom" @click="goMyCoupon(1)">
<text>购买记录</text>
<uni-icons type="right" color="#363636" size="14"></uni-icons>
</view>
</view>
</view>
</view>
</template>
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
export default {
components: {
navigationBarVue
},
data() {
return {
globalConfig: getApp().globalData.config,
}
},
methods: {
viewRichText() {
this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[5].title}&code=${this.globalConfig.appInfo.agreements[5].code}`
)
},
goMyCoupon(index) {
this.$tab.navigateTo(
`/pages/mine/coupon/my-coupon?index=${index}`
)
}
}
}
</script>
<style lang="scss">
.container-box {
padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4;
background-color: white;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.content {
border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
width: 100%;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.content-body {
width: 100%;
padding: 60rpx 30rpx 20rpx 30rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.huojian {
width: 100rpx;
height: 180rpx;
z-index: 99;
position: absolute;
top: -10rpx;
left: 40rpx;
}
.coupon-box {
width: 100%;
background-image: url("/static/mine/coupon/bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
border-radius: 20rpx;
padding-bottom: 30rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.left-top {
width: 100%;
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: start;
font-weight: bold;
font-size: 34rpx;
.bg-img {
padding-bottom: 20rpx;
background-image: url('/static/mine/auth/xiantiao.png');
background-repeat: no-repeat;
background-position: bottom right;
background-size: 100% 50%;
}
.left-space {
width: 200rpx;
}
image {
width: 30rpx;
height: 30rpx;
margin-bottom: 20rpx;
margin-right: 10rpx;
}
}
.content-img {
width: 100%;
height: 200rpx;
margin-bottom: 20rpx;
}
.bottom-content {
width: 90%;
margin: 0 auto;
border-top: 1rpx solid #FB2B43;
border-top-style: dashed;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
.top-text {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 0;
text {
color: #FB2B43;
padding: 0 10rpx;
}
}
.button-dom {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
background-image: linear-gradient(to right, #F9605A, #FB2B43);
color: white;
border-radius: 40rpx;
font-size: 33rpx;
}
}
}
}
.item-field {
width: 100%;
display: flex;
align-items: self-start;
justify-content: center;
.my-suggest-dom {
margin: 0 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,440 @@
<template>
<view class="container-box">
<navigation-bar-vue title="通告券" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="content">
<!-- 操作按钮 -->
<view class="dl-opt-box">
<view class="dl-menu-box" v-for="(item,index) in menus">
<view @click="itemClick(index,item)" class="dl-menu"
:class="index==menuIndex?'dl-menu click':'dl-menu'">{{item}}</view>
</view>
</view>
<view style="width: 100%;" v-if="0==menuIndex">
<view class="coupon-list-box">
<view class="top-text">剩余<text>0</text></view>
<view :class="['coupon-item-box',index==couponIndex?'click':'']" v-for="(item,index) in dataList"
@click="chooseCoupon(index)">
<view class="left-dom">
<image src="@/static/mine/coupon/coupon.png" mode="aspectFit"></image>
<uni-icons type="closeempty" color="#FC1F3E" size="14"></uni-icons>
<view style="margin-left: 15rpx;">{{item.num}}</view>
</view>
<view class="right-dom">
<text>¥</text>{{item.price}}
</view>
</view>
<view class="button-dom" @click="buyFun()">购买</view>
</view>
<view class="item-field" style="align-items: center;">
<view class="my-suggest-dom" @click="viewRichText()">
<text>查看通告券购买协议</text>
</view>
</view>
</view>
<view style="width: 100%;" v-if="1==menuIndex">
<view class="buy-list-box">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view class="item-box" v-for="(item,index) in byList">
<view class="top-title-box">
<view class="order-no">订单编号{{item.orderNo}}</view>
<view :class="['order-status',item.ifPay?'payed':'no-pay']">{{item.ifPay?'已支付':'未支付'}}
</view>
</view>
<view class="detail-item">
<view class="left-dom">通告券</view>
<view class="right-dom">*{{item.num}} </view>
</view>
<view class="detail-item" style="border-bottom:1rpx solid #F4F4F4;padding-bottom: 25rpx;">
<view class="left-dom">金额</view>
<view class="right-dom">{{item.price}} </view>
</view>
<view class="bottom-item">
下单时间{{item.createTime}}
</view>
</view>
<view style="text-align: center" v-if="byList.length==0">
<image class="" src="@/static/images/nothing.png"></image>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</template>
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {
toast,
hasRights
} from '@/utils/common.js'
export default {
components: {
navigationBarVue
},
data() {
return {
globalConfig: getApp().globalData.config,
menus: ['通告券', '购买记录'],
menuIndex: 0,
//
couponIndex: 0,
queryParams: {
pageNum: 1,
pageSize: 10
},
total: 0,
//
isTriggered: false,
dataList: [{
id: "3",
num: 5,
price: 20
}, {
id: "2",
num: 10,
price: 40
}, {
id: "1",
num: 20,
price: 80
}],
//
byList: [{
id: "1",
orderNo: "111",
num: 20,
price: 80,
ifPay: true,
createTime: "2024-02-03 12:23:00"
}, {
id: "2",
orderNo: "111",
num: 10,
price: 40,
ifPay: false,
createTime: "2024-02-03 12:23:00"
}]
}
},
onLoad(option) {
this.menuIndex = option.index
},
methods: {
/**
* 菜单点击
* @param {Object} index
* @param {Object} item
*/
itemClick(index, item) {
this.menuIndex = index
},
/**
* 选中的优惠券
* @param {Object} index
*/
chooseCoupon(index) {
this.couponIndex = index
},
buyFun() {
},
viewRichText() {
this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[6].title}&code=${this.globalConfig.appInfo.agreements[6].code}`
)
},
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
toast("没有更多数据了")
return
}
//+1,
this.queryParams.pageNum++
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
},
}
}
</script>
<style lang="scss">
.container-box {
padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4;
background-color: white;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.content {
border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
width: 100%;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.dl-opt-box {
background-color: white;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.dl-menu-box {
color: #929292;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
width: 100%;
padding-top: 20rpx;
.dl-menu {
width: 120rpx;
font-size: 30rpx;
margin: 0 20rpx;
padding-bottom: 15rpx;
text-align: center;
}
.click {
color: #FF434E;
font-weight: bold;
border-bottom: 2px solid #FF434E;
}
}
.seting {
font-size: 30rpx;
width: 180rpx;
display: flex;
align-items: center;
justify-content: center;
image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
}
}
.buy-list-box {
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 174rpx);
width: 100%;
padding: 20rpx 30rpx 0 30rpx;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.item-box {
margin-bottom: 20rpx;
background-color: white;
border-radius: 15rpx;
padding: 25rpx;
width: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
.top-title-box {
padding-top: 10rpx;
padding-bottom: 20rpx;
margin-bottom: 15rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: start;
border-bottom: 1rpx solid #F4F4F4;
.order-no {
flex: 1;
font-weight: bold;
display: flex;
align-items: center;
justify-content: start;
}
.order-status {
font-size: 27rpx;
padding: 5rpx 15rpx;
border-radius: 25rpx;
color: white;
}
.no-pay {
background-color: #929292;
}
.payed {
background-color: #FC1F3E;
}
}
.detail-item {
width: 100%;
padding: 10rpx 0;
display: flex;
align-items: center;
justify-content: start;
.left-dom {
display: flex;
align-items: center;
justify-content: start;
width: 200rpx;
}
.right-dom {
display: flex;
align-items: center;
justify-content: flex-end;
flex: 1;
}
}
.bottom-item {
padding-top: 15rpx;
font-size: 26rpx;
color: #929292;
}
}
}
.coupon-list-box {
margin-top: 20rpx;
background-color: white;
border-radius: 20rpx;
padding: 30rpx 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
width: calc(100% - 60rpx);
flex-direction: column;
display: flex;
align-items: self-start;
justify-content: center;
.top-text {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding-bottom: 30rpx;
text {
color: #FB2B43;
padding: 0 10rpx;
}
}
.coupon-item-box {
width: 100%;
padding: 30rpx 40rpx 30rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
background-color: #FFE9EC;
border: 2rpx solid #FFE9EC;
border-radius: 15rpx;
color: #FC1F3E;
.left-dom {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-start;
image {
width: 60rpx;
height: 60rpx;
margin-right: 15rpx;
}
}
.right-dom {
width: 200rpx;
display: flex;
align-items: baseline;
justify-content: flex-end;
font-weight: bold;
font-size: 36rpx;
text {
font-weight: normal;
margin-right: 8rpx;
font-size: 18rpx;
}
}
}
.click {
border: 2rpx solid #FC1F3E !important;
}
.button-dom {
margin-top: 30rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
background-image: linear-gradient(to right, #F9605A, #FB2B43);
color: white;
border-radius: 40rpx;
font-size: 33rpx;
}
}
.item-field {
color: #929292;
width: 100%;
display: flex;
align-items: self-start;
justify-content: center;
.my-suggest-dom {
margin: 0 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -98,7 +98,7 @@
<view class="text-dom">通告主认证</view>
<uni-icons type="right" color="#623109" size="12"></uni-icons>
</view>
<view class="menu-item" v-if="'01'==localUserType">
<view class="menu-item" v-if="'01'==localUserType" @click="goCoupon()">
<!-- <image src="@/static/mine/zuji.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/tonggaoquan.png" mode="aspectFit"></image>
<view class="text-dom">通告券</view>
@ -280,8 +280,11 @@
goAuth() {
this.$tab.navigateTo('/pages/mine/auth/auth-choose')
},
goCoupon() {
this.$tab.navigateTo('/pages/mine/coupon/coupon-list')
},
goMemberCard() {
this.$tab.navigateTo('/pages/mine/member/member-card?userType='+this.localUserType)
this.$tab.navigateTo('/pages/mine/member/member-card?userType=' + this.localUserType)
},
/**
* 跳转编辑页

BIN
static/mine/coupon/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B