Merge branch 'ymf' of https://newgitea.sxczgkj.cn/czg_team/cashier_wx into gyq
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
<text class="contentboxitemlefttexttow">在线点不排队</text>
|
||||
</view>
|
||||
<view class="contentboxitemright">
|
||||
<view class="contentboxitemright_item flex-between"
|
||||
@click="memberindex('user/member/memberdetails')">
|
||||
<!-- <view class="contentboxitemright_item flex-between"
|
||||
@click="memberindex('user/member/memberdetails')"> -->
|
||||
<view class="contentboxitemright_item flex-between" @click="tomember">
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xvip.png" mode="aspectFill">
|
||||
</image>
|
||||
<view class="contentboxitemright_itembox flex-colum">
|
||||
@@ -19,7 +20,11 @@
|
||||
<text>入会享权益</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentboxitemright_item flex-between" @click="memberindex('user/member/index')">
|
||||
<!-- <view class="contentboxitemright_item flex-between"
|
||||
@click="memberindex('user/member/index')"
|
||||
> -->
|
||||
|
||||
<view class="contentboxitemright_item flex-between" @click="toCharge">
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/indexs/Xchong.png"
|
||||
mode="aspectFill"></image>
|
||||
<view class="contentboxitemright_itembox flex-colum">
|
||||
@@ -65,6 +70,27 @@
|
||||
type: 'index',
|
||||
})
|
||||
}
|
||||
|
||||
function tomember() {
|
||||
const shopUserInfo = uni.cache.get('shopUserInfo')||{}
|
||||
const shopId = uni.cache.get('shopId')
|
||||
if(!shopUserInfo.isVip){
|
||||
uni.navigateTo({
|
||||
url: '/user/vip/buy-vip?shopId=' + shopId
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/user/vip/vip?shopId=' + shopId
|
||||
})
|
||||
}
|
||||
|
||||
function toCharge() {
|
||||
const shopId = uni.cache.get('shopId')
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/czzx?shopId='+shopId
|
||||
})
|
||||
}
|
||||
const getQueryString = (url, name) => { //解码
|
||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||
var r = url.substr(1).match(reg)
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.modal-mask {
|
||||
|
||||
@@ -852,6 +852,8 @@
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
orderorderInfo()
|
||||
});
|
||||
let options = {}
|
||||
|
||||
|
||||
171
pages/user/member/amount-list.vue
Normal file
171
pages/user/member/amount-list.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="onecontentone">
|
||||
我的储值卡<text v-if="orderForm.list.length!=0">({{orderForm.list.length}})</text>
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="towcontentitem" v-if="orderForm.list.length>0" v-for="(item,index) in orderForm.list"
|
||||
:key="index" @click="eeInfo(item)">
|
||||
<image class="towcontentitemimage"
|
||||
src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharge.png" mode="aspectFill"></image>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" :src="item.logo" mode="aspectFill"></image>
|
||||
<text class="towcontentitemonetext" style="color: #333333;">{{item.chainName}}</text>
|
||||
<!-- 余额:<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text> -->
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color:#333333;">余额:{{item.amount}}</text>
|
||||
<text>{{item.shopName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderForm.list.length <= 0 " class="flex-colum">
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
|
||||
import {
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
APIusershopUservipCard
|
||||
} from '@/common/api/member.js'
|
||||
import * as rechargeApi from '@/common/api/market/recharge.js'
|
||||
|
||||
|
||||
const orderForm = reactive({
|
||||
type: '', //类型
|
||||
list: [],
|
||||
is_end: false,
|
||||
form: {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const paygetShopByMember = async () => {
|
||||
let res = await rechargeApi.list({
|
||||
page: orderForm.form.page,
|
||||
pageSize: orderForm.form.size,
|
||||
})
|
||||
orderForm.list = res;
|
||||
|
||||
}
|
||||
|
||||
const eeInfo = async (item) => {
|
||||
uni.navigateTo({
|
||||
url:'/pages/user/member/czzx?shopId='+item.shopId
|
||||
})
|
||||
}
|
||||
onReachBottom(() => {
|
||||
// paygetShopByMember()
|
||||
})
|
||||
onMounted((e) => {
|
||||
paygetShopByMember()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.content {
|
||||
border-top: 16rpx solid #f7f7f7;
|
||||
padding: 28rpx;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentone {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 96%;
|
||||
position: relative;
|
||||
height: 224rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
width: 60%;
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 18rpx;
|
||||
padding: 0 32rpx;
|
||||
// margin-top: 52rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
306
pages/user/member/billDetails - 副本.vue
Normal file
306
pages/user/member/billDetails - 副本.vue
Normal file
@@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<!-- 账单明细 -->
|
||||
<view style="padding-bottom: 40rpx;">
|
||||
<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>
|
||||
</view>
|
||||
<view class="bildRight">
|
||||
<text>我的积分</text>
|
||||
<view>{{formData.info.accountPoints||0}}</view>
|
||||
</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 @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>
|
||||
</view>
|
||||
<view class=" listrigth2">
|
||||
<view>{{item.createTime}}
|
||||
</view>
|
||||
<view v-if="formData.active == 1">余额:{{item.balance}}</view>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
|
||||
import {
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
APIshopUsermoneyRecord,
|
||||
APIshopUserpointsRecord
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
|
||||
function back(){
|
||||
uni.navigateBack()
|
||||
}
|
||||
const formData = reactive({
|
||||
active: 1,
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
status: 'loadmore',
|
||||
},
|
||||
info: {
|
||||
amount: '',
|
||||
accountPoints: ''
|
||||
},
|
||||
shopId: null
|
||||
})
|
||||
|
||||
const getlist = async () => {
|
||||
let res = null
|
||||
if (formData.active == 1) {
|
||||
res = await APIshopUsermoneyRecord({
|
||||
page: formData.form.page,
|
||||
size: formData.form.size,
|
||||
// status: formData.status,
|
||||
shopId: formData.shopId
|
||||
})
|
||||
} else {
|
||||
res = await APIshopUserpointsRecord({
|
||||
page: formData.form.page,
|
||||
size: formData.form.size,
|
||||
// status: formData.form.status,
|
||||
shopId: formData.shopId
|
||||
})
|
||||
}
|
||||
if (res.totalPage == 0 || res.totalPage == 1 && res.totalRow <= 10) {
|
||||
formData.form.status = 'nomore'
|
||||
formData.list = res.records
|
||||
if (formData.form.page == 1 && res.records.length == 0) {
|
||||
formData.records = []
|
||||
formData.is_end = true
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
formData.form.status = 'loading';
|
||||
if (formData.form.page == 1) {
|
||||
formData.list = res.records
|
||||
} else {
|
||||
formData.list = [...formData.list, ...res.records];
|
||||
}
|
||||
formData.form.page = ++formData.form.page;
|
||||
if (formData.form.page > res.totalPage) {
|
||||
formData.form.status = 'nomore';
|
||||
} else {
|
||||
formData.form.status = 'loading';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 检测是否包含In
|
||||
const checkIn = (str) => {
|
||||
let reg = RegExp(/In/)
|
||||
return str.match(reg)
|
||||
}
|
||||
|
||||
const clickEvent = (i) => {
|
||||
formData.active = i;
|
||||
formData.form.page = 1;
|
||||
formData.is_end = false
|
||||
formData.form.page = 1
|
||||
formData.form.size = 10
|
||||
formData.form.status = 'loadmore'
|
||||
getlist()
|
||||
}
|
||||
|
||||
onReachBottom(() => {
|
||||
getlist()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 获取当前页面实例
|
||||
const currentPage = pages[pages.length - 1];
|
||||
// 获取页面参数
|
||||
const options = currentPage.options;
|
||||
formData.info = JSON.parse(decodeURIComponent(options.shopInfo))
|
||||
formData.shopId = options.shopId
|
||||
formData.active = options.type
|
||||
console.log(formData.info)
|
||||
getlist()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.bild {
|
||||
height: 500rpx;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.bildLeft,
|
||||
.bildRight {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
|
||||
>view,
|
||||
>text {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
>view {
|
||||
margin-top: 34rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.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;
|
||||
|
||||
font-size: 28rpx;
|
||||
|
||||
.fonts {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
>view {
|
||||
position: relative;
|
||||
|
||||
.xian {
|
||||
width: 58rpx;
|
||||
height: 6rpx;
|
||||
background: #FFAA62;
|
||||
border-radius: 2rpx 2rpx 2rpx 2rpx;
|
||||
position: absolute;
|
||||
bottom: -16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.listStyle {
|
||||
padding: 28rpx;
|
||||
padding-top: 50rpx;
|
||||
width: 100%;
|
||||
|
||||
.listrigth,
|
||||
.listrigth2 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// padding-left: 32rpx;
|
||||
}
|
||||
|
||||
.listrigth {
|
||||
.colorStyle {
|
||||
color: #FF7127;
|
||||
}
|
||||
|
||||
>view {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.listStyle_left {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.head_img {
|
||||
border-radius: 50%;
|
||||
margin-right: 32rpx;
|
||||
}
|
||||
|
||||
.listrigth2 {
|
||||
margin-top: 16rpx;
|
||||
|
||||
>view {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -5,11 +5,11 @@
|
||||
<view class="bild" style="background-image: url(/static/czzx_header_bg.png);">
|
||||
<view class="bildLeft">
|
||||
<text>我的余额</text>
|
||||
<view>{{formData.info.amount||0}}</view>
|
||||
<view>{{shopUserInfo.amount||0}}</view>
|
||||
</view>
|
||||
<view class="bildRight">
|
||||
<text>我的积分</text>
|
||||
<view>{{formData.info.accountPoints||0}}</view>
|
||||
<view>{{shopUserInfo.accountPoints||0}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
@@ -92,16 +92,19 @@
|
||||
reactive,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
|
||||
|
||||
import {
|
||||
onReachBottom
|
||||
onReachBottom,onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
APIshopUsermoneyRecord,
|
||||
APIshopUserpointsRecord
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
import {
|
||||
APIusershopInfodetail,
|
||||
APIshopUserInfo
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
function back(){
|
||||
uni.navigateBack()
|
||||
@@ -181,20 +184,27 @@
|
||||
onReachBottom(() => {
|
||||
getlist()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 获取当前页面实例
|
||||
const currentPage = pages[pages.length - 1];
|
||||
// 获取页面参数
|
||||
const options = currentPage.options;
|
||||
formData.info = JSON.parse(decodeURIComponent(options.shopInfo))
|
||||
|
||||
const shopUserInfo=reactive({})
|
||||
async function getShopUserInfo(){
|
||||
const res=await APIshopUserInfo({
|
||||
shopId: options.shopId
|
||||
})
|
||||
if(res){
|
||||
Object.assign(shopUserInfo,res)
|
||||
}
|
||||
}
|
||||
const options=reactive({})
|
||||
onLoad((opt)=>{
|
||||
Object.assign(options,opt)
|
||||
console.log('options',options);
|
||||
formData.shopId = options.shopId
|
||||
formData.active = options.type
|
||||
console.log(formData.info)
|
||||
getlist()
|
||||
getShopUserInfo()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
<view class="select-shop">
|
||||
<view class="select-btn">
|
||||
<up-icon name="map" color="#333"></up-icon>
|
||||
<text class="t">双屿Pisces</text>
|
||||
<text class="t">{{shopInfo.shopName}}</text>
|
||||
<up-icon name="arrow-right" color="#333"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="balance-wrap">
|
||||
<view class="left">
|
||||
<text class="i t">余额</text>
|
||||
<text class="n t">12223.53</text>
|
||||
<text class="n t">{{shopUserInfo.amount}}</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
<text class="t">明细</text>
|
||||
<text class="t">密码设置</text>
|
||||
<text class="t" @click="toDetail">明细</text>
|
||||
<text class="t" @click="toPwd">密码设置</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-wrap">
|
||||
@@ -82,7 +82,7 @@
|
||||
<view>充值说明</view>
|
||||
<view class="u-m-t-16">
|
||||
<text>适用门店</text>
|
||||
<text class="color2 u-m-l-28">全国门店通用 > </text>
|
||||
<text class="color2 u-m-l-28">全国门店通用 {{'>'}} </text>
|
||||
</view>
|
||||
<view class="u-m-t-16">
|
||||
<text>有效期限</text>
|
||||
@@ -92,16 +92,16 @@
|
||||
<text class="no-wrap">注意事项</text>
|
||||
<view class="u-m-l-28">
|
||||
<view>1.储值完成后不支持自助退款,可联系商家处理</view>
|
||||
<view> 2.余额不支持转赠,不可提现,长期有效</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">
|
||||
此处显示内容:管理端配置,读取智慧充值中《充值说明》字段内容
|
||||
{{state.remark||''}}
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -110,35 +110,134 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as vipApi from '@/common/api/market/recharge.js'
|
||||
import {joinMember} from '@/common/api/order/index.js'
|
||||
import {
|
||||
ref,onMounted,computed
|
||||
APIusershopInfodetail,
|
||||
APIshopUserInfo
|
||||
} from '@/common/api/member.js'
|
||||
import * as rechargeApi from '@/common/api/market/recharge.js'
|
||||
import {
|
||||
recharge
|
||||
} from '@/common/api/order/index.js'
|
||||
import {
|
||||
joinMember
|
||||
} from '@/common/api/order/index.js'
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
computed,
|
||||
reactive,
|
||||
watch
|
||||
} from 'vue'
|
||||
|
||||
async function buy(){
|
||||
const res=await joinMember()
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
pay
|
||||
} from '@/utils/pay.js'
|
||||
async function buy() {
|
||||
if (!charge_money.value) {
|
||||
return uni.showToast({
|
||||
title: '请选择或者输入充值金额',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
const json = {
|
||||
shopId: option.shopId,
|
||||
shopUserId: shopUserInfo.id,
|
||||
}
|
||||
if (sel.value < 0) {
|
||||
json.amount = `${money.value}`.trim()*1
|
||||
} else {
|
||||
json.rechargeDetailId = list.value[sel.value].id
|
||||
json.amount = list.value[sel.value].amount
|
||||
}
|
||||
const res = await recharge(json)
|
||||
if (!res) {
|
||||
return uni.showToast({
|
||||
title: '充值失败',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
const payRes = await pay(res)
|
||||
console.log(payRes);
|
||||
if (payRes) {
|
||||
uni.showToast({
|
||||
title: '充值成功',
|
||||
icon: 'none'
|
||||
})
|
||||
init()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function toDetail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/billDetails?type=1&shopId=' + option.shopId
|
||||
})
|
||||
}
|
||||
|
||||
function toPwd() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/setPassword?type=1&shopId=' + option.shopId
|
||||
})
|
||||
}
|
||||
|
||||
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 option = reactive({
|
||||
shopId: ''
|
||||
})
|
||||
const shopInfo = reactive({})
|
||||
const shopUserInfo = reactive({})
|
||||
const state = reactive({})
|
||||
async function init() {
|
||||
const shopInfoRes = await APIusershopInfodetail({
|
||||
shopId: option.shopId
|
||||
})
|
||||
if (shopInfoRes) {
|
||||
Object.assign(shopInfo, shopInfoRes.shopInfo)
|
||||
}
|
||||
const shopUserInfoRes = await APIshopUserInfo({
|
||||
shopId: option.shopId
|
||||
})
|
||||
if (shopUserInfoRes) {
|
||||
Object.assign(shopUserInfo, shopUserInfoRes)
|
||||
}
|
||||
const res = await rechargeApi.config({
|
||||
shopId: option.shopId
|
||||
})
|
||||
if (res) {
|
||||
Object.assign(state, res)
|
||||
list.value = res.rechargeDetailList
|
||||
}
|
||||
}
|
||||
const charge_money=computed(()=>{
|
||||
const item= list.value[sel.value]
|
||||
if(item){
|
||||
const charge_money = computed(() => {
|
||||
if (sel.value < 0) {
|
||||
if (money.value > 0) {
|
||||
return money.value
|
||||
}
|
||||
return ''
|
||||
}
|
||||
const item = list.value[sel.value]
|
||||
if (item) {
|
||||
return item.amount
|
||||
}
|
||||
return ''
|
||||
})
|
||||
onMounted(init)
|
||||
onLoad((opt) => {
|
||||
Object.assign(option, opt)
|
||||
init()
|
||||
})
|
||||
|
||||
watch(() => money.value, (newval) => {
|
||||
if (newval && newval > 0) {
|
||||
sel.value = -1
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -172,7 +271,7 @@
|
||||
width: 100%;
|
||||
height: 530rpx;
|
||||
box-sizing: border-box;
|
||||
padding: calc(var(--status-bar-height) + 180upx) 28upx 28upx;
|
||||
padding: calc(var(--status-bar-height) + 140rpx) 28rpx 28rpx;
|
||||
position: relative;
|
||||
|
||||
.bg {
|
||||
|
||||
207
pages/user/member/list-back.vue
Normal file
207
pages/user/member/list-back.vue
Normal file
@@ -0,0 +1,207 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="onecontentone">
|
||||
我的会员卡<text v-if="orderForm.list.length!=0">({{orderForm.list.length}})</text>
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="towcontentitem" v-if="orderForm.list.length>0" v-for="(item,index) in orderForm.list"
|
||||
:key="index" @click="eeInfo(item)">
|
||||
<image class="towcontentitemimage"
|
||||
src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharge.png" mode="aspectFill"></image>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" :src="item.logo" mode="aspectFill"></image>
|
||||
<text class="towcontentitemonetext" style="color: #333333;">{{item.chainName}}</text>
|
||||
<!-- 余额:<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text> -->
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color:#333333;">余额:{{item.amount}}</text>
|
||||
<text>{{item.shopName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderForm.list.length <= 0 && orderForm.is_end" class="flex-colum">
|
||||
<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="orderForm.form.status" iconSize='12' fontSize='12' height='20' />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
} from 'vue';
|
||||
|
||||
import {
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
APIusershopUservipCard
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
const orderForm = reactive({
|
||||
type: '', //类型
|
||||
list: [],
|
||||
is_end: false,
|
||||
form: {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const paygetShopByMember = async () => {
|
||||
let res = await APIusershopUservipCard({
|
||||
page: orderForm.form.page,
|
||||
pageSize: orderForm.form.size,
|
||||
})
|
||||
|
||||
if (res.totalPage == 1 && res.totalRow <= 10) {
|
||||
orderForm.form.status = 'nomore'
|
||||
orderForm.list = res.records
|
||||
if (orderForm.form.page == 1 && res.records.length == 0) {
|
||||
orderForm.records = []
|
||||
orderForm.is_end = true
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
orderForm.form.status = 'loading';
|
||||
orderForm.list = [...orderForm.list, ...res.records];
|
||||
orderForm.form.page = ++orderForm.form.page;
|
||||
if (orderForm.form.page > res.totalPage) {
|
||||
orderForm.form.status = 'nomore';
|
||||
} else {
|
||||
orderForm.form.status = 'loading';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const eeInfo = async (item) => {
|
||||
// if (res.code == 0) {
|
||||
// uni.cache.set('shopUserInfo', res)
|
||||
// uni.cache.set('shopId', item.shopId)
|
||||
if (orderForm.type && orderForm.type == 'user_payCode') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(item)
|
||||
})
|
||||
} else if (orderForm.type && orderForm.type == 'user_recharge') {
|
||||
uni.pro.navigateTo('member/index', {
|
||||
shopId: item.shopId,
|
||||
type: 'index',
|
||||
})
|
||||
} else if (orderForm.type && orderForm.type == 'user_points') {
|
||||
uni.pro.navigateTo('/pagesPoints/index/index', {
|
||||
shopId: item.shopId,
|
||||
type: 'member_list',
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('user/member/memberdetails', {
|
||||
shopId: item.shopId
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
onReachBottom(() => {
|
||||
paygetShopByMember()
|
||||
})
|
||||
onMounted((e) => {
|
||||
paygetShopByMember()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.content {
|
||||
border-top: 16rpx solid #f7f7f7;
|
||||
padding: 28rpx;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentone {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 96%;
|
||||
position: relative;
|
||||
height: 224rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
width: 60%;
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 18rpx;
|
||||
padding: 0 32rpx;
|
||||
// margin-top: 52rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -14,16 +14,16 @@
|
||||
<!-- 余额:<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text> -->
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color:#333333;">余额:{{item.amount}}</text>
|
||||
<text></text>
|
||||
<!-- <text class="towcontentitemtowetext" style="color:#333333;">余额:{{item.amount}}</text> -->
|
||||
<text>{{item.shopName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderForm.list.length <= 0 && orderForm.is_end" class="flex-colum">
|
||||
<view v-if="orderForm.list.length <= 0 " class="flex-colum">
|
||||
<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="orderForm.form.status" iconSize='12' fontSize='12' height='20' />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
import {
|
||||
APIusershopUservipCard
|
||||
} from '@/common/api/member.js'
|
||||
import * as vipApi from '@/common/api/market/vip.js'
|
||||
|
||||
|
||||
const orderForm = reactive({
|
||||
type: '', //类型
|
||||
@@ -55,58 +57,21 @@
|
||||
|
||||
|
||||
const paygetShopByMember = async () => {
|
||||
let res = await APIusershopUservipCard({
|
||||
let res = await vipApi.list({
|
||||
page: orderForm.form.page,
|
||||
pageSize: orderForm.form.size,
|
||||
})
|
||||
|
||||
if (res.totalPage == 1 && res.totalRow <= 10) {
|
||||
orderForm.form.status = 'nomore'
|
||||
orderForm.list = res.records
|
||||
if (orderForm.form.page == 1 && res.records.length == 0) {
|
||||
orderForm.records = []
|
||||
orderForm.is_end = true
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
orderForm.form.status = 'loading';
|
||||
orderForm.list = [...orderForm.list, ...res.records];
|
||||
orderForm.form.page = ++orderForm.form.page;
|
||||
if (orderForm.form.page > res.totalPage) {
|
||||
orderForm.form.status = 'nomore';
|
||||
} else {
|
||||
orderForm.form.status = 'loading';
|
||||
}
|
||||
}
|
||||
orderForm.list = res;
|
||||
|
||||
}
|
||||
|
||||
const eeInfo = async (item) => {
|
||||
// if (res.code == 0) {
|
||||
// uni.cache.set('shopUserInfo', res)
|
||||
// uni.cache.set('shopId', item.shopId)
|
||||
if (orderForm.type && orderForm.type == 'user_payCode') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(item)
|
||||
})
|
||||
} else if (orderForm.type && orderForm.type == 'user_recharge') {
|
||||
uni.pro.navigateTo('member/index', {
|
||||
shopId: item.shopId,
|
||||
type: 'index',
|
||||
})
|
||||
} else if (orderForm.type && orderForm.type == 'user_points') {
|
||||
uni.pro.navigateTo('/pagesPoints/index/index', {
|
||||
shopId: item.shopId,
|
||||
type: 'member_list',
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('user/member/memberdetails', {
|
||||
shopId: item.shopId
|
||||
})
|
||||
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:'/user/vip/vip?shopId='+item.shopId
|
||||
})
|
||||
}
|
||||
onReachBottom(() => {
|
||||
paygetShopByMember()
|
||||
// paygetShopByMember()
|
||||
})
|
||||
onMounted((e) => {
|
||||
paygetShopByMember()
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
<view class="text">获取手机号</view>
|
||||
</button>
|
||||
</view> -->
|
||||
<view class="u-flex">
|
||||
<view class="u-p-r-40">
|
||||
<view class="color-333 font-16 font-700">密码支付</view>
|
||||
<view class="font-12 color-999 u-m-t-4">关闭时,使用余额支付将会直接扣除,不再进行确认</view>
|
||||
</view>
|
||||
<up-switch v-model="form.isOpen" active-color="#FFD158" :inactive-value="0"
|
||||
:active-value="1"></up-switch>
|
||||
</view>
|
||||
<view class="color-333 font-16 font-700" style="margin-top: 60rpx;">密码支付</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">当前账号</text>
|
||||
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" :disabled="true" />
|
||||
|
||||
</view>
|
||||
<view class="box_item flex-between" style="position:relative;">
|
||||
<text class="top_box_one_text"></text>
|
||||
<input type="number" v-model="form.checkCode" placeholder="请输入验证码"
|
||||
style="padding-right: 140rpx;color: #333" />
|
||||
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" :disabled="true" />
|
||||
<view class="top_box_one_texts">
|
||||
<view v-if="datalist.showText == true" class="yzm" @click="CodeRegister">{{ datalist.Recapture }}
|
||||
</view>
|
||||
@@ -25,6 +28,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box_item flex-between" style="position:relative;">
|
||||
<text class="top_box_one_text"></text>
|
||||
<input type="number" v-model="form.checkCode" placeholder="请输入验证码"
|
||||
style="padding-right: 140rpx;color: #333" />
|
||||
|
||||
</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">新密码</text>
|
||||
<input type="number" v-model="form.password" placeholder="请输入6位数字交易密码" maxlength="6"
|
||||
@@ -56,7 +65,7 @@
|
||||
import {
|
||||
APIshopUserInfo
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
|
||||
import {
|
||||
productStore
|
||||
} from '@/stores/user.js';
|
||||
@@ -70,7 +79,8 @@
|
||||
mobile: uni.cache.get('orderVIP').phone,
|
||||
password: '',
|
||||
payPassword: '',
|
||||
checkCode: ''
|
||||
checkCode: '',
|
||||
isOpen: 1
|
||||
})
|
||||
|
||||
const datalist = reactive({
|
||||
@@ -193,34 +203,12 @@
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// 获取当前页面栈
|
||||
const pages = getCurrentPages();
|
||||
// 获取当前页面实例
|
||||
const currentPage = pages[pages.length - 1];
|
||||
// 获取页面参数
|
||||
const options = currentPage.options;
|
||||
// if (options.shopId) {
|
||||
// let res = await APIshopUserInfo({F
|
||||
// shopId: options.shopId
|
||||
// })
|
||||
// uni.cache.set('shopId', options.shopId, 30)
|
||||
// uni.cache.set('orderVIP', res)
|
||||
// uni.cache.set('ordershopUserInfo', res.shopInfo)
|
||||
// } else {
|
||||
// shopUserInfo.shopInfo = JSON.parse(decodeURIComponent(options.shopInfo))
|
||||
// }
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.Box {
|
||||
padding: 0 28rpx;
|
||||
padding: 80rpx 28rpx 28rpx;
|
||||
|
||||
.box_one {
|
||||
margin-top: 26rpx;
|
||||
@@ -232,10 +220,9 @@
|
||||
|
||||
.box_box {
|
||||
background: #fff;
|
||||
padding: 0 32rpx;
|
||||
|
||||
.box_item {
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
// border-bottom: 1rpx solid #E5E5E5;
|
||||
position: relative;
|
||||
|
||||
.top_box_one_text {
|
||||
@@ -321,4 +308,13 @@
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.Box .box_box .box_item uni-input{
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
}
|
||||
.Box .box_box .box_item input{
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
}
|
||||
:deep(.Box .box_box .box_item uni-input){
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
}
|
||||
</style>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<up-gap height="26rpx" bg-color="#F9F9F9"></up-gap>
|
||||
<!-- <view class="my_item my_assets" @click="Myassets"> -->
|
||||
<view class="my_item my_assets" >
|
||||
<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">
|
||||
@@ -33,25 +33,27 @@
|
||||
</image>
|
||||
<text class="color-333 font-14 u-m-l-20">储值</text>
|
||||
</view>
|
||||
<view class="u-flex color-666">
|
||||
<text class="font-12 u-m-r-4">3家店</text>
|
||||
<view class="u-flex color-666" @click="toChargeList">
|
||||
<text class="font-12 u-m-r-4">{{rechargeList.length}}家店</text>
|
||||
<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>
|
||||
<view class="card-list-item" v-for="(item,index) in rechargeList" :key="index"
|
||||
@click="toCharge(item)">
|
||||
<up-image radius="20rpx" width="182rpx" height="182rpx" :src="item.logo"> </up-image>
|
||||
<view class="info text-center">
|
||||
<view class="color-333 u-m-t-14 ">
|
||||
<text class="font-10">¥</text>
|
||||
<text class="font-16 font-700 ">9999.99</text>
|
||||
<text class="font-16 font-700 ">{{item.amount}}</text>
|
||||
</view>
|
||||
<view class="font-12 color-666">这里是店铺名称</view>
|
||||
<view class="font-12 color-666 u-line-1">{{item.shopName}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="u-flex u-flex-column u-flex-center">
|
||||
<view class="u-flex u-flex-column u-flex-center" style="width: 12px;" v-if="rechargeList.length"
|
||||
@click="toChargeList">
|
||||
<view class="text-center color-333 font-12">查看全部</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -63,25 +65,22 @@
|
||||
</image>
|
||||
<text class="color-333 font-14 u-m-l-20">会员</text>
|
||||
</view>
|
||||
<view class="u-flex color-666">
|
||||
<text class="font-12 u-m-r-4">3家店</text>
|
||||
<view class="u-flex color-666" @click="tomemberList">
|
||||
<text class="font-12 u-m-r-4">{{memberList.length}}家店</text>
|
||||
<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>
|
||||
<view class="card-list-item" v-for="(item,index) in memberList" :key="index"
|
||||
@click="tomember(item)">
|
||||
<up-image radius="20rpx" width="182rpx" height="182rpx" :src="item.logo"></up-image>
|
||||
<view class="info text-center">
|
||||
<view class="color-333 u-m-t-14 ">
|
||||
<text class="font-10">¥</text>
|
||||
<text class="font-16 font-700 ">9999.99</text>
|
||||
</view>
|
||||
<view class="font-12 color-666">这里是店铺名称</view>
|
||||
<view class="font-12 color-666 u-m-t-14 u-line-1">{{item.shopName}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="u-flex u-flex-column u-flex-center">
|
||||
<view class="u-flex u-flex-column u-flex-center" style="width: 12px;" v-if="memberList.length">
|
||||
<view class="text-center color-333 font-12" @click="tomemberList">查看全部</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -129,11 +128,15 @@
|
||||
productStore
|
||||
} from '@/stores/user.js';
|
||||
import * as vipApi from '@/common/api/market/vip.js'
|
||||
import * as rechargeApi from '@/common/api/market/recharge.js'
|
||||
|
||||
|
||||
const store = productStore();
|
||||
const myFunList = ref([{
|
||||
name: "积分",
|
||||
type: "score",
|
||||
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"
|
||||
icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png",
|
||||
url: '/user/score/list'
|
||||
},
|
||||
{
|
||||
name: "优惠券",
|
||||
@@ -162,26 +165,32 @@
|
||||
const userInfo = reactive({})
|
||||
|
||||
const ShopId = ref(uni.cache.get('shopId'))
|
||||
|
||||
|
||||
function tomemberList(){
|
||||
console.log('ShopId', uni.cache.get('shopId'))
|
||||
|
||||
function tomemberList() {
|
||||
uni.navigateTo({
|
||||
url:'/pages/user/member/list'
|
||||
url: '/pages/user/member/list'
|
||||
})
|
||||
}
|
||||
|
||||
function tomember(item) {
|
||||
uni.navigateTo({
|
||||
url: '/user/vip/vip?shopId=' + item.shopId
|
||||
})
|
||||
}
|
||||
|
||||
const clickEvent = () => {
|
||||
if (ShopId.value) {
|
||||
if(!userInfo.isVip){
|
||||
if (!userInfo.isVip) {
|
||||
uni.navigateTo({
|
||||
url: '/user/vip/buy-vip?shopId='+ShopId.value
|
||||
url: '/user/vip/buy-vip?shopId=' + ShopId.value
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/user/vip/vip?shopId='+ShopId.value
|
||||
url: '/user/vip/vip?shopId=' + ShopId.value
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// if (userInfo.isVip == 0) {
|
||||
|
||||
|
||||
@@ -216,7 +225,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
function toCharge(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/czzx?shopId=' + item.shopId
|
||||
})
|
||||
}
|
||||
|
||||
function toChargeList() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/member/amount-list'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const clickTo = (item, index) => {
|
||||
if (item.url) {
|
||||
uni.navigateTo({
|
||||
url:item.url
|
||||
})
|
||||
return
|
||||
}
|
||||
let shopId = null;
|
||||
switch (item.type) {
|
||||
case 'my_order':
|
||||
@@ -267,9 +295,14 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const memberList = ref([])
|
||||
const rechargeList = ref([])
|
||||
async function getData() {
|
||||
const res = await vipApi.list()
|
||||
console.log(res);
|
||||
memberList.value = res.slice(0, 3);
|
||||
const res1 = await rechargeApi.list()
|
||||
rechargeList.value = res1.slice(0, 3);
|
||||
}
|
||||
onShow(() => {
|
||||
store.actionsAPIuser()
|
||||
@@ -450,9 +483,11 @@
|
||||
.card-list-item {
|
||||
max-width: 182rpx;
|
||||
box-shadow: 8rpx 8rpx 32rpx 0 #0b18390f;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
|
||||
.info {
|
||||
padding-bottom: 16rpx;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user