This commit is contained in:
gyq
2025-09-26 10:56:48 +08:00
34 changed files with 2787 additions and 399 deletions

View File

@@ -1,7 +1,8 @@
<template>
<!-- 账单明细 -->
<view style="padding-bottom: 40rpx;">
<view class="bild">
<up-navbar bgColor="transparent" title="明细" @leftClick="back"></up-navbar>
<view class="bild" style="background-image: url(/static/czzx_header_bg.png);">
<view class="bildLeft">
<text>我的余额</text>
<view>{{formData.info.amount||0}}</view>
@@ -11,80 +12,78 @@
<view>{{formData.info.accountPoints||0}}</view>
</view>
</view>
<view class="navTop">
<view @click="clickEvent(1)" :class="[formData.active==1?'fonts':'']">
余额明细
<view :class="[formData.active==1?'xian':'']" style="left: 36rpx;"> </view>
</view>
<view @click="clickEvent(2)" :class="[formData.active==2?'fonts':'']">
积分明细
<view :class="[formData.active==2?'xian':'']" style="left: 36rpx;"> </view>
</view>
</view>
<view class="listStyle " v-for="(item,i) in formData.list" :key="i">
<!-- <image class="head_img" :src="item.head_img?item.head_img:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/head_default.png'" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
<view class="flex-start">
<view class="listStyle_left">
<view class="listrigth">
<view v-if="formData.active == 1">
<text v-if="item.bizCode == 'cashIn'">
现金充值
</text>
<text v-if="item.bizCode == 'wechatIn'">
微信小程序充值
</text>
<text v-if="item.bizCode == 'alipayIn'">
支付宝小程序充值
</text>
<text v-if="item.bizCode == 'awardIn'">
充值奖励
</text>
<text v-if="item.bizCode == 'rechargeRefund'">
充值退款
</text>
<text v-if="item.bizCode == 'orderPay'">
订单消费
</text>
<text v-if="item.bizCode == 'orderRefund'">
订单退款
</text>
<text v-if="item.bizCode == 'adminIn'">
管理员充值
</text>
<text v-if="item.bizCode == 'adminOut'">
管理员消费
</text>
</view>
<view v-else>
{{item.content}}
</view>
<!-- <view
:class="{colorStyle: (formData.active==1&&item.type == '+') || (formData.active==2&&item.floatType=='add')}">
{{ formData.active == 1 ? item.type : (item.floatType == 'add'?'+':'')}}
{{formData.active == 1 ? item.amount : item.floatPoints}}
</view> -->
<view v-if="formData.active == 1" :class="{colorStyle: (item.bizCode == 'cashIn' || item.bizCode == 'wechatIn' ||
item.bizCode == 'alipayIn'|| item.bizCode == 'awardIn'|| item.bizCode == 'rechargeRefund')}">
{{ item.amount }}
</view>
<view v-else :class="{colorStyle: (item.floatPoint>0)}">
{{item.floatPoints}}
</view>
</view>
<view class="bottom">
<view class="navTop">
<view @click="clickEvent(1)" :class="[formData.active==1?'fonts':'']">
余额明细
<view :class="[formData.active==1?'xian':'']" style="left: 36rpx;"> </view>
</view>
<view class=" listrigth2">
<view>{{item.createTime}}
<view @click="clickEvent(2)" :class="[formData.active==2?'fonts':'']">
积分明细
<view :class="[formData.active==2?'xian':'']" style="left: 36rpx;"> </view>
</view>
</view>
<view class="listStyle " v-for="(item,i) in formData.list" :key="i">
<view class="flex-start">
<view class="listStyle_left">
<view class="listrigth">
<view v-if="formData.active == 1">
<text v-if="item.bizCode == 'cashIn'">
现金充值
</text>
<text v-if="item.bizCode == 'wechatIn'">
微信小程序充值
</text>
<text v-if="item.bizCode == 'alipayIn'">
支付宝小程序充值
</text>
<text v-if="item.bizCode == 'awardIn'">
充值奖励
</text>
<text v-if="item.bizCode == 'rechargeRefund'">
充值退款
</text>
<text v-if="item.bizCode == 'orderPay'">
订单消费
</text>
<text v-if="item.bizCode == 'orderRefund'">
订单退款
</text>
<text v-if="item.bizCode == 'adminIn'">
管理员充值
</text>
<text v-if="item.bizCode == 'adminOut'">
管理员消费
</text>
</view>
<view v-else>
{{item.content}}
</view>
<view v-if="formData.active == 1" :class="{colorStyle: (item.bizCode == 'cashIn' || item.bizCode == 'wechatIn' ||
item.bizCode == 'alipayIn'|| item.bizCode == 'awardIn'|| item.bizCode == 'rechargeRefund')}">
{{ item.amount }}
</view>
<view v-else :class="{colorStyle: (item.floatPoint>0)}">
{{item.floatPoints}}
</view>
<view v-if="formData.active == 1">余额:{{item.balance}}</view>
</view>
</view>
<view class=" listrigth2">
<view>{{item.createTime}}
</view>
<view v-if="formData.active == 1">余额:{{item.balance}}</view>
</view>
</view>
<view v-if="formData.list.length <= 0" style="text-align: center;">
<image style="width: 402rpx;height: 442rpx;margin:240rpx auto 32rpx;"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png" mode="aspectFill"></image>
</view>
<up-loadmore :status="formData.form.status" fontSize="14" color="#999" iconSize="14" />
</view>
<view v-if="formData.list.length <= 0" style="text-align: center;">
<image style="width: 402rpx;height: 442rpx;margin:240rpx auto 32rpx;"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png" mode="aspectFill"></image>
</view>
<up-loadmore :status="formData.form.status" fontSize="14" color="#999" iconSize="14" />
</view>
</view>
</template>
<script setup>
@@ -102,7 +101,11 @@
APIshopUsermoneyRecord,
APIshopUserpointsRecord
} from '@/common/api/member.js'
function back(){
uni.navigateBack()
}
const formData = reactive({
active: 1,
list: [],
@@ -196,9 +199,8 @@
<style scoped lang="less">
.bild {
height: 320rpx;
background-image: url('https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/billingDetails.png');
background-size: 750rpx 320rpx;
height: 500rpx;
background-size: cover;
display: flex;
justify-content: space-around;
align-items: center;
@@ -220,18 +222,21 @@
}
}
}
.bottom{
background-color: rgba(255, 255, 255, .3);
padding: 40rpx 28rpx 0 28rpx;
transform: translateY(-140rpx);
border-radius: 74rpx 74rpx 0 0;
}
.navTop {
display: flex;
justify-content: space-around;
align-items: center;
color: #333;
margin-top: -60rpx;
// padding: 0 120rpx;
font-size: 28rpx;
.fonts {
font-weight: bold;
font-size: 32rpx;
}
@@ -241,7 +246,7 @@
.xian {
width: 58rpx;
height: 6rpx;
background: #333;
background: #FFAA62;
border-radius: 2rpx 2rpx 2rpx 2rpx;
position: absolute;
bottom: -16rpx;

View File

@@ -0,0 +1,168 @@
<!-- 充值中心 -->
<template>
<view class="container">
<up-navbar bgColor="transparent" title="明细" @leftClick="back"></up-navbar>
<view class="header-wrap">
<image class="bg" src="/static/czzx_header_bg.png" mode="aspectFill"></image>
<view class="u-flex info text-center">
<view class="u-flex-1">
<view class="color-333 font-14">我的余额</view>
<view class="u-m-t-30 font-700 color-333" style="font-size: 40rpx;">200.00</view>
</view>
<view class="u-flex-1">
<view class="color-333 font-14">我的积分</view>
<view class="u-m-t-30 font-700 color-333" style="font-size: 40rpx;">200.00</view>
</view>
</view>
</view>
<view class="bottom">
<view class="u-flex tabs">
<view class="color-333 font-16 tabs-item" v-for="(item,index) in tabs.list" :key="index"
@click="tabs.sel=index" :class="{active:tabs.sel==index}">
<view>
{{item.name}}
</view>
<view class="u-flex u-flex-center u-m-t-10">
<view class="block">
</view>
</view>
</view>
</view>
<view class="u-m-t-32">
<view class="color-333 font-16 font-700">订单消费</view>
<view v-for="(item,index) in lists" :key="index">
<view>森食界创意轻食(未央店)</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import * as vipApi from '@/common/api/market/recharge.js'
import {
joinMember
} from '@/common/api/order/index.js'
import {
ref,
onMounted,
computed,
reactive
} from 'vue'
import {
onLoad,onReachBottom
} from '@dcloudio/uni-app'
async function buy() {
const res = await joinMember()
}
function back() {
uni.navigateBack();
}
const list = ref([])
async function init() {
const res = await vipApi.config()
if (res) {
list.value = res
}
}
onMounted(init)
const tabs = reactive({
list: [{
name: '余额明细'
},
{
name: '积分明细'
},
],
sel: 0
})
onLoad(() => {
})
onReachBottom(()=>{
console.log('onReachBottom');
})
</script>
<style scoped lang="scss">
.tabs {
justify-content: center;
gap: 138rpx;
.tabs-item {
.block {
width: 58rpx;
height: 6rpx;
background-color: transparent;
border-radius: 6rpx;
transition: all .3s ease-in-out;
}
&.active {
.block {
background-color: #FFAA62;
}
}
}
}
.color1 {
color: #5F2E0F;
}
.color2 {
color: #FF6300;
}
.header-wrap {
width: 100%;
height: 530rpx;
box-sizing: border-box;
padding: calc(var(--status-bar-height) + 180upx) 28upx 28upx;
position: relative;
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.info {
position: relative;
}
}
.bottom {
background-color: rgba(255, 255, 255, .3);
padding: 40rpx 28rpx 0 28rpx;
transform: translateY(-140rpx);
border-radius: 74rpx 74rpx 0 0;
}
</style>

View File

@@ -23,76 +23,265 @@
</view>
<view class="btm-wrap">
<view class="">
</view>
</view>
</view>
<view class="bottom">
<view class="u-flex u-flex-between">
<view class="u-flex ">
<image src="/static/vip/money.png" style="width: 44rpx;height: 44rpx;" mode=""></image>
<text class="u-m-l-24 color-333 font-16 font-700">立即充值</text>
</view>
<view class="font-12 color-999">
<text>充值代表接受</text>
<text style="color: #ECB592;">用户隐私协议</text>
</view>
</view>
<view class="list u-m-t-40">
<view class="item color1" @click="sel=index" v-for="(item,index) in list" :key="index"
:class="{active:sel==index}">
<view class="">
<text></text>
<text class="font-700" style="font-size: 48rpx;"
:class="{color2:sel==index}">{{item.amount}}</text>
</view>
<view class="font-12" v-if="item.rewardAmount" :class="{color2:sel==index}">
<text></text>
<text></text>
<text class="font-14">{{item.rewardAmount}}</text>
</view>
<view class="font-12" v-if="item.rewardPoints">
<text></text>
<text></text>
<text class="font-14">{{item.rewardPoints}}</text>
</view>
<view class="font-12 color-666" v-if="item.couponInfoList.length">
<text></text>
<text>{{item.couponInfoList.length}}</text>
<text>张券</text>
<text class="color2 u-m-l-8" v-if="sel==index">查看</text>
</view>
<view class="sel u-flex" v-if="sel==index">
<image class="image" src="/static/vip/sel.png" mode=""></image>
</view>
</view>
</view>
<view class="u-flex other flex-center">
<text class="font-14 color-333 font-700 u-m-r-28">其他金额</text>
<up-input v-model="money" type="number" placeholder="请输入充值金额" border="none"
placeholder-style="font-size:14px;"></up-input>
</view>
<view class="color-999 font-12 u-m-t-4">自定义金额充值时不享受任何优惠赠送</view>
<button class="buy-btn" @click="buy">
<text class="font-16 ">{{charge_money}}</text>
<text class="font-14 u-m-l-24">立即充值</text>
</button>
<view class="u-m-t-36 color-999 font-12">
<view>充值说明</view>
<view class="u-m-t-16">
<text>适用门店</text>
<text class="color2 u-m-l-28">全国门店通用 > </text>
</view>
<view class="u-m-t-16">
<text>有效期限</text>
<text class=" u-m-l-28">永久有效 </text>
</view>
<view class="u-m-t-16 u-flex u-flex-y-center">
<text class="no-wrap">注意事项</text>
<view class="u-m-l-28">
<view>1.储值完成后不支持自助退款可联系商家处理</view>
<view> 2.余额不支持转赠不可提现长期有效</view>
</view>
</view>
<view class="u-m-t-16 u-flex u-flex-y-center">
<text class="no-wrap">充值说明</text>
<view class="u-m-l-28">
此处显示内容:管理端配置读取智慧充值中充值说明字段内容
</view>
</view>
</view>
</view>
</view>
</template>
<script setup>
function back() {
uni.navigateBack();
}
import * as vipApi from '@/common/api/market/recharge.js'
import {joinMember} from '@/common/api/order/index.js'
import {
ref,onMounted,computed
} from 'vue'
async function buy(){
const res=await joinMember()
}
function back() {
uni.navigateBack();
}
const list = ref([])
const sel = ref(0)
const money = ref(null);
async function init(){
const res=await vipApi.config()
if(res){
list.value=res.rechargeDetailList
}
}
const charge_money=computed(()=>{
const item= list.value[sel.value]
if(item){
return item.amount
}
return ''
})
onMounted(init)
</script>
<style scoped lang="scss">
.header-wrap {
width: 100%;
height: 600upx;
padding: calc(var(--status-bar-height) + 180upx) 28upx 28upx;
position: relative;
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
.color1 {
color: #5F2E0F;
}
.select-shop {
display: flex;
align-items: center;
.color2 {
color: #FF6300;
}
.buy-btn {
margin-top: 28rpx;
padding: 32rpx 32rpx;
color: #fff;
font-size: 16px;
font-weight: 700;
border-radius: 80rpx;
line-height: 1;
background: linear-gradient(98deg, #fe6d1100 40.64%, #FFD1B4 105.2%), linear-gradient(259deg, #FE6D11 50.14%, #FFD1B4 114.93%);
box-shadow: 0 14rpx 30.4rpx 0 #fe8b435e;
}
.other {
background: #F6F6F6;
padding: 24rpx 16rpx;
margin-top: 40rpx;
}
.header-wrap {
width: 100%;
height: 530rpx;
box-sizing: border-box;
padding: calc(var(--status-bar-height) + 180upx) 28upx 28upx;
position: relative;
.select-btn {
.bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.select-shop {
display: flex;
align-items: center;
gap: 12upx;
.t {
color: #333;
position: relative;
.select-btn {
display: flex;
align-items: center;
gap: 12upx;
.t {
color: #333;
}
}
}
}
.balance-wrap {
display: flex;
justify-content: space-between;
position: relative;
padding-top: 40upx;
.left {
.balance-wrap {
display: flex;
align-items: center;
.t {
color: #5e3110;
&.i {
position: relative;
top: 10upx;
justify-content: space-between;
position: relative;
padding-top: 40upx;
.left {
display: flex;
align-items: center;
.t {
color: #5e3110;
&.i {
position: relative;
top: 10upx;
font-size: 28upx;
}
&.n {
font-size: 64upx;
font-weight: bold;
}
}
}
.right {
display: flex;
flex-direction: column;
gap: 12upx;
.t {
color: #86491d;
font-size: 28upx;
}
&.n {
font-size: 64upx;
font-weight: bold;
}
}
}
.right {
display: flex;
flex-direction: column;
gap: 12upx;
.t {
color: #86491d;
font-size: 28upx;
}
}
}
}
</style>
.bottom {
background-color: rgba(255, 255, 255, .3);
padding: 40rpx 28rpx 0 28rpx;
transform: translateY(-140rpx);
border-radius: 74rpx 74rpx 0 0;
}
.list {
display: grid;
grid-template-columns: repeat(3, 1fr);
column-gap: 20rpx;
row-gap: 22rpx;
.item {
padding: 36rpx 22rpx;
border-radius: 42rpx;
background: linear-gradient(180deg, #F5F5F5 58.54%, #FFF 140.47%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
box-sizing: border-box;
border: 6rpx solid transparent;
transition: all .3s ease-in-out;
&.active {
background: linear-gradient(180deg, #FFC29A -26.17%, #FFF 64.06%);
border: 6rpx solid #FE6C0E;
box-shadow: 0 0 31rpx 2rpx #fe8b435e;
}
.sel {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%) translateY(21rpx);
.image {
width: 42rpx;
height: 42rpx;
}
}
}
}
</style>

View File

@@ -9,17 +9,21 @@
<image class="my_info_left_head" :src="userInfo.headImg" mode="aspectFill"></image>
<view class="name">{{userInfo.nickName}}</view>
</view>
<image class="my_info_right_qr" @click="clickEvent" v-if="userInfo.isVip == 1 && ShopId"
<image class="my_info_right_qr" @click="clickEvent" src="/static/icon/code.png" mode="aspectFill">
</image>
<!-- <image class="my_info_right_qr" @click="clickEvent" v-if="userInfo.isVip == 1 && ShopId"
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_qRcode.png'" mode="aspectFill">
</image>
<view class="my_info_right" @click="clickEvent" v-if="userInfo.isVip == 0 && ShopId">
<text>免费入会</text>
</view>
</view> -->
</view>
<up-gap height="26rpx" bg-color="#F9F9F9"></up-gap>
<view class="my_item my_assets" @click="Myassets">
<view class="my_item_title">我的资产</view>
<!-- <view class="my_item my_assets" @click="Myassets"> -->
<view class="my_item my_assets" >
<view class="my_item_title u-m-t-12">我的资产</view>
<view class="amount">
<view class="u-flex u-flex-between u-m-t-20">
<view class="u-flex">
@@ -45,7 +49,7 @@
</view>
<view class="font-12 color-666">这里是店铺名称</view>
</view>
</view>
<view class="u-flex u-flex-column u-flex-center">
<view class="text-center color-333 font-12">查看全部</view>
@@ -55,9 +59,7 @@
<view class="vip u-m-t-40">
<view class="u-flex u-flex-between u-m-t-20">
<view class="u-flex">
<image style="width: 50rpx;height: 37rpx;"
src="/static/icon/vip.png"
mode="aspectFill">
<image style="width: 50rpx;height: 37rpx;" src="/static/icon/vip.png" mode="aspectFill">
</image>
<text class="color-333 font-14 u-m-l-20">会员</text>
</view>
@@ -66,7 +68,7 @@
<up-icon name="arrow-down" color="#666" size="12px"></up-icon>
</view>
</view>
<view class="card-list">
<view class="card-list-item" v-for="(item,index) in 3" :key="index">
<up-image radius="20rpx" width="182rpx" height="182rpx"></up-image>
@@ -77,15 +79,15 @@
</view>
<view class="font-12 color-666">这里是店铺名称</view>
</view>
</view>
<view class="u-flex u-flex-column u-flex-center">
<view class="text-center color-333 font-12">查看全部</view>
<view class="text-center color-333 font-12" @click="tomemberList">查看全部</view>
</view>
</view>
</view>
</view>
<view class="my_item my_fun u-m-t-30">
@@ -126,6 +128,7 @@
import {
productStore
} from '@/stores/user.js';
import * as vipApi from '@/common/api/market/vip.js'
const store = productStore();
const myFunList = ref([{
name: "积分",
@@ -159,20 +162,38 @@
const userInfo = reactive({})
const ShopId = ref(uni.cache.get('shopId'))
function tomemberList(){
uni.navigateTo({
url:'/pages/user/member/list'
})
}
const clickEvent = () => {
if (ShopId.value) {
if (userInfo.isVip == 0) {
uni.pro.navigateTo('user/member/memberdetails', {
shopId: uni.cache.get('shopId')
if(!userInfo.isVip){
uni.navigateTo({
url: '/user/vip/buy-vip?shopId='+ShopId.value
})
} else {
uni.pro.navigateTo('user/member/paycode', {
shopId: uni.cache.get('shopId'),
shopInfo: JSON.stringify(uni.cache.get('orderVIP').shopInfo)
}else{
uni.navigateTo({
url: '/user/vip/vip?shopId='+ShopId.value
})
}
// if (userInfo.isVip == 0) {
// uni.pro.navigateTo('user/member/memberdetails', {
// shopId: uni.cache.get('shopId')
// })
// } else {
// uni.pro.navigateTo('user/member/paycode', {
// shopId: uni.cache.get('shopId'),
// shopInfo: JSON.stringify(uni.cache.get('orderVIP').shopInfo)
// })
// }
} else {
uni.pro.navigateTo('member/list', {
type: 'user_payCode'
@@ -246,6 +267,10 @@
break;
}
}
async function getData() {
const res = await vipApi.list()
console.log(res);
}
onShow(() => {
store.actionsAPIuser()
if (uni.cache.get('shopId')) {
@@ -256,6 +281,7 @@
...uni.cache.get('userInfo').assetsSummary
})
}
getData()
})
</script>
@@ -312,8 +338,8 @@
}
.my_info_right_qr {
width: 60rpx;
height: 60rpx;
width: 40rpx;
height: 40rpx;
}
}
@@ -420,10 +446,12 @@
grid-template-columns: repeat(4, 1fr);
column-gap: 40rpx;
margin-top: 20rpx;
.card-list-item{
.card-list-item {
max-width: 182rpx;
box-shadow: 8rpx 8rpx 32rpx 0 #0b18390f;
.info{
.info {
padding-bottom: 16rpx;
overflow: hidden;
}