设置密码 会员

This commit is contained in:
魏啾
2024-05-23 11:21:11 +08:00
parent d0cf4a5cc6
commit 8386120c87
9 changed files with 259 additions and 75 deletions

View File

@@ -2,17 +2,20 @@
<view class="content">
<view class="towcontentitem">
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="userInfo.headImg" mode="aspectFill"></image>
<image class="towcontentitemoneimage" :src="userInfo.logo" mode="aspectFill"></image>
<view class="towcontentitemonetext flex-colum-start">
<text class="towcontentitemonetextone">{{userInfo.nickName || '暂无昵称'}}</text>
<text class="towcontentitemonetextone">{{userInfo.chainName || '暂无昵称'}}</text>
</view>
</view>
<view class="towcontentitemthere flex-start">
余额<text class="towcontentitemtheretext">{{memberlist.vip_number || '0.00'}}</text>
余额<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text>
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext">{{memberlist.vip_number || '无'}}</text>
<text class="towcontentitemtowetext">vip{{userInfo.code || '无'}}</text>
</view>
<view class="towcontentitevip">
vip{{userInfo.is_vip}}
</view>
</view>
<view class="therecontent">
@@ -46,11 +49,24 @@
}
},
onLoad(e) {
// this.shopUser = uni.cache.get('shopUser')
this.userInfo = uni.cache.get('userInfo')
this.paygetActive()
console.log(e)
if (e.type == 'list') {//从列表进来的
this.paygetShopByMember(e.shopId_id)
}else{
this.paygetShopByMember(e.shopId_id)
}
this.paygetActive() //列表
},
methods: {
async paygetShopByMember(w) {
let res = await this.api.paygetShopByMember({
page: 1,
pageSize: 10,
userId: uni.cache.get('userInfo').id,
shopId: w
})
this.userInfo = res.data.list[0]
},
async paygetActive() {
let res = await this.api.paygetActive({
shopId: uni.cache.get('shopUser'),
@@ -201,13 +217,29 @@
}
.towcontentitemtow {
margin-top: 84rpx;
z-index: 10;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
.towcontentitevip{
position: absolute;
right: 0;
top: 0;
width: 92rpx;
height: 40rpx;
font-size: 20rpx;
background: #F4C380;
border-radius: 0rpx 12rpx 0rpx 12rpx;
text-align: center;
line-height: 40rpx;
color: #fff;
font-family:Source Han Sans CN-Medium;
font-weight: Medium;
}
.towcontentitemthere {
margin-left: 92rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
@@ -292,6 +324,8 @@
}
.fivecontent {
position: relative;
bottom: 44rpx;
margin-top: 62rpx;
padding: 20rpx 0;
text-align: center;

View File

@@ -9,20 +9,20 @@
<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.store_avatar" mode="aspectFill"></image>
<text class="towcontentitemonetext" style="color: #333333;">{{item.store_title}}</text>
<image class="towcontentitemoneimage" :src="item.logo" mode="aspectFill"></image>
<text class="towcontentitemonetext" style="color: #333333;">{{item.chainName}}</text>
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext" style="color:#333333;">{{item.vip_number}}</text>
<text>{{item.end_time}}</text>
<text class="towcontentitemtowetext" style="color:#333333;">{{item.is_vip}}</text>
<text>{{item.shopName}}</text>
</view>
</view>
</view>
<view v-if="list.length==0 && is_end == true" class="flex-colum">
<view v-if="list.length== 0 && is_end == true" class="flex-colum" >
<image :src="bgnothave" mode="aspectFill">
</image>
</view>
<u-loadmore :status="form.status" />
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
</view>
</template>
@@ -30,53 +30,57 @@
export default {
data() {
return {
bgnothave:uni.getStorageSync('bgnothave'),
bgnothave: uni.getStorageSync('bgnothave'),
list: [],
is_end: false,
nickname: uni.cache.get('loginuser').userinfo.nickname,
nickname: uni.cache.get('userInfo').nickName,
form: {
page: 1,
page: 1, //页数
size: 10, //页容量
status: 'loadmore',
},
}
},
onShow() {
this.userusercarlist()
this.paygetShopByMember()
},
onReachBottom() {
this.userusercarlist()
},
computed: {
this.paygetShopByMember()
},
computed: {},
methods: {
async userusercarlist() {
let res = await this.api.userusercarlist({
async paygetShopByMember() {
let res = await this.api.paygetShopByMember({
page: this.form.page,
store_id:uni.cache.get('store_id')
pageSize: this.form.size,
userId: uni.cache.get('userInfo').id,
shopId:''
})
if (res.length == 0) {
this.is_end = true
if (res.data.pages < this.form.page) {
this.form.status = 'nomore'
if (this.form.page == 1 && res.data.list == 0) {
this.is_end = true
}
return false;
} else {
this.form.status = 'loading';
this.form.page = ++this.form.page;
setTimeout(() => {
this.list = [...this.list, ...res];
if (res.length == 10) {
this.form.status = 'loading';
} else {
this.is_end = true;
this.list = [...this.list, ...res.data.list];
this.form.status = 'loading';
if (res.data.pageNum == res.data.pages) {
this.form.status = 'nomore';
} else {
this.form.status = 'loading';
}
}, 500)
}
},
eeInfo(e) {
uni.pro.navigateTo('my/member/memberinfo',{
id: e.vip_id,
lang:1
eeInfo(item) {
uni.pro.navigateTo('member/index',{
shopId_id:item.shopId,
type:'list'
})
},
}
@@ -137,6 +141,7 @@
.towcontentitemone {
position: relative;
z-index: 10;
.towcontentitemoneimage {
width: 76rpx;
height: 76rpx;
@@ -162,7 +167,7 @@
width: 100%;
left: 0;
bottom: 18rpx;
padding:0 32rpx;
padding: 0 32rpx;
// margin-top: 52rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;