2023-3-13

余额
我的收藏
我的云链
This commit is contained in:
2023-03-13 18:14:28 +08:00
parent 1d7fb7b745
commit a1f44d5c93
7 changed files with 188 additions and 59 deletions

View File

@@ -8,9 +8,18 @@
<view class="" style="display: flex;align-items: center;">
<image class="portrait" mode="aspectFill" :src="userDetailInfo.icon" @click="toUserInfo">
</image>
<view class="user-name" style="margin-left: 10upx;color: #FFFFFF;" @click="toUserInfo">
{{ userDetailInfo.nickname || userDetailInfo.username }}
<view style="display: flex;flex-direction: column;">
<view class="user-name" style="margin-left: 20upx;color: #FFFFFF;font-size: 28px;"
@click="toUserInfo">
{{ userDetailInfo.nickname }}
</view>
<view class="user-name"
style="margin-left: 20upx;color: #FFFFFF;font-size: 18px;margin-top: 5px;"
@click="toUserInfo">
{{ userDetailInfo.phone }}
</view>
</view>
<view v-if="userDetailInfo.storeId" class="vip-card-box1"
@click="toNav('../../pagesC/seller/index')">
<view class="b-btn">卖家中心</view>
@@ -19,7 +28,13 @@
</template>
<template v-else>
<!-- #ifdef H5 || APP-PLUS -->
<image class="portrait" mode="aspectFill" src="/static/missing-face.png" @click="toLogin">
<view style="display: flex;flex-direction: row; align-items: center;" @click="toLogin">
<image class="portrait" mode="aspectFill" src="/static/missing-face.png">
<view class="user-name" style="margin-left: 20upx;color: #FFFFFF;font-size: 28px;">
注册/登录
</view>
</view>
</image>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
@@ -56,14 +71,25 @@
<image class="arc" src="/static/arc.png"></image>
<view class="tj-sction">
<view class="tj-item" @click="toNav('../../pagesU/user/deposit')">
<!-- <view class="tj-item" @click="toNav('../../pagesU/user/deposit')">
<text class="num">{{ userDetailInfo.blance || 0}}</text>
<text>余额</text>
</view>
</view> -->
<!-- <list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏"
@eventClick="navTo('../../pagesU/user/collect')"></list-cell>
-->
<view class="tj-item" @click="toNav('../../pagesU/user/coupon')">
<text class="num">{{ couponList.length || 0 }}</text>
<text>优惠券</text>
</view>
<view class="tj-item" @click="toNav('../../pagesU/user/collect')">
<text class="num">{{ listCollect || 0}}</text>
<!-- <image src="../../static/temp/antFill-gift.png" style="width:25px;height: 25px;margin-bottom: 8px;"></image> -->
<text>收藏</text>
</view>
<!-- <view class="tj-item" @click="toNav('/pages/integral/home/home')">
<text class="num">{{ userDetailInfo.integration || 0 }}</text>
<text>积分</text>
@@ -111,8 +137,8 @@
@eventClick="navTo('../../pagesU/user/profile')"></list-cell>
<!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></list-cell>
<list-cell icon="icon-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>-->
<list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏"
@eventClick="navTo('../../pagesU/user/collect')"></list-cell>
<!-- <list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏"
@eventClick="navTo('../../pagesU/user/collect')"></list-cell> -->
<!-- <list-cell
icon="icon-share cgtt"
iconColor="#0e68d7"
@@ -192,7 +218,8 @@
},
couponList: [],
viewList: []
viewList: [],
listCollect: 0
};
},
@@ -266,6 +293,7 @@
async getData() {
this.getuserinfo();
this.getHistory();
this.getCollect();
},
// 获取用户信息
async getuserinfo() {
@@ -297,6 +325,32 @@
this.viewList = data.result;
}
},
// 获取收藏记录
async getCollect() {
let that = this
if (this.hasLogin) {
let params = {};
let data = await Api.apiCall('get', Api.goods.listCollect, params);
console.log("listCollect", data)
console.log("listCollect", data.total)
this.listCollect = data.total
// if (data.records){
// let orderList = data.records.filter(item => {
// //添加不同状态下订单的表现形式
// if (item.type == 1) {
// if (item.meno3 == null) {
// item.meno3 = 0;
// }
// item.meno3 = '销量:' + item.meno3;
// return item;
// }
// });
// this.listCollect = orderList.length
// }
}
},
upData() {
uni.showModal({
title: '提示',

View File

@@ -28,7 +28,7 @@
</label>
</view>
<view class="type-item" @click="changePayType(3)">
<!-- <view class="type-item" @click="changePayType(3)">
<text class="icon yticon icon-erjiye-yucunkuan"></text>
<view class="con">
<text class="tit">预存款支付</text>
@@ -38,7 +38,7 @@
<radio value="" color="#fa436a" :checked='payType == 3' />
</label>
</view>
</view> -->
</view>
<text class="mix-btn" @click="confirm">确认支付</text>

View File

@@ -216,7 +216,7 @@
let data = await Api.apiCall('get', Api.order.orderList, params);
console.log("data:------" + data)
let goodsList = data.records;
let goodsListJson = JSON.stringify(goodsList)
// let goodsListJson = JSON.stringify(goodsList)
// console.log("goodsList:" + goodsListJson)
let orderList = goodsList.filter(item => {
//添加不同状态下订单的表现形式

View File

@@ -152,6 +152,17 @@
};
}
let data = await Api.apiCall('post', Api.index.simpleReg, params);
if(data.data.code==500){
uni.showToast({
icon: 'none',
mask: true,
title:data.data.data,
duration: 2000
});
return
}
uni.showToast({
icon: 'none',