Browse Source

2023-3-13

余额
我的收藏
我的云链
master
guoxing 2 years ago
parent
commit
a1f44d5c93
  1. 4
      mallplusui-uniapp-app/manifest.json
  2. 11
      mallplusui-uniapp-app/pages.json
  3. 70
      mallplusui-uniapp-app/pages/index/user.vue
  4. 4
      mallplusui-uniapp-app/pages/money/pay.vue
  5. 2
      mallplusui-uniapp-app/pages/order/order.vue
  6. 11
      mallplusui-uniapp-app/pages/public/reg.vue
  7. 143
      mallplusui-uniapp-app/pagesU/user/collect.vue

4
mallplusui-uniapp-app/manifest.json

@ -2,8 +2,8 @@
"name" : "汇融云链",
"appid" : "__UNI__FB2C9C4",
"description" : "",
"versionName" : "1.0.0.9",
"versionCode" : 1009,
"versionName" : "1.0.1.0",
"versionCode" : 1010,
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,

11
mallplusui-uniapp-app/pages.json

@ -46,13 +46,13 @@
"navigationBarTitleText": "消息列表"
}
},
},
{
"path": "pages/index/messageDetail",
"style": {
// "enablePullDownRefresh": true,
"navigationBarTitleText": "消息详情"
}
}, {
"path": "pages/search/search",
@ -210,7 +210,8 @@
"bounce": "none"
}
}
}, {
},
{
"path": "pages/order/createOrder",
"style": {
"navigationBarTitleText": "创建订单"
@ -705,11 +706,13 @@
"path": "user/collect",
"style": {
"navigationBarTitleText": "我的收藏",
"enablePullDownRefresh": true,
"onReachBottomDistance": 126, // px
"app-plus": {
"bounce": "none"
}
}
}, {
} ,{
"path": "user/deposit",
"style": {
"navigationBarTitleText": "余额冲",

70
mallplusui-uniapp-app/pages/index/user.vue

@ -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: '提示',

4
mallplusui-uniapp-app/pages/money/pay.vue

@ -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>

2
mallplusui-uniapp-app/pages/order/order.vue

@ -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 => {
//

11
mallplusui-uniapp-app/pages/public/reg.vue

@ -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',

143
mallplusui-uniapp-app/pagesU/user/collect.vue

@ -7,7 +7,7 @@
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
<scroll-view class="list-scroll-content" scroll-y>
<!-- 空白页 -->
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
@ -30,11 +30,10 @@
</view>
</view>
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
</scroll-view>
</swiper-item>
</swiper>
<uni-load-more :status="loadingType"></uni-load-more>
</view>
</template>
@ -58,7 +57,8 @@
data() {
return {
tabCurrentIndex: 0,
pageNum:1,
pageNum: 1,
loadingType: 'more', //
navList: [{
type: 1,
text: '收藏商品',
@ -105,10 +105,10 @@
onPullDownRefresh() {
console.log("onPullDownRefresh")
this.pageNum = this.pageNum + 1;
this.pageNum = 1;
// this.getNewProductList('refresh');
this.loadData();
this.loadData('refresh');
setTimeout(function() {
uni.stopPullDownRefresh();
}, 2000);
@ -123,31 +123,9 @@
});
},
//
async loadData(source) {
async loadData(type = 'add', loading) {
// console.log('=======================')
//tab
let index = this.tabCurrentIndex;
let navItem = this.navList[index];
let type = navItem.type;
if (source === 'tabChange' && navItem.loaded === true) {
//tab
return;
}
if (navItem.loadingType === 'loading') {
//
return;
}
navItem.loadingType = 'loading';
// if (!this.hasLogin) {
// url = '/pages/public/login';
// uni.navigateTo({
// url
// });
// } else {
//
if (type === 'add') {
if (this.loadingType === 'nomore') {
@ -157,33 +135,116 @@
} else {
this.loadingType = 'more';
}
//tab
let index = this.tabCurrentIndex;
let navItem = this.navList[index];
console.log(navItem);
let status = navItem.type;
let params = {
pageNum: this.pageNum,
};
let data = await Api.apiCall('get', Api.goods.listCollect, params);
console.log("data>>>>", data);
let orderList = data.records.filter(item => {
let orderList = data.records.filter(item => {
//
if (item.type == 1) {
if (item.meno3 == null) {
item.meno3 = 0;
}
item.meno3 = '销量:' + item.meno3;
return item;
}
item = Object.assign(item, this.orderStateExp(item.type));
item.addTime = this.dateFormat(item.addTime);
return item.type === type;
});
orderList.forEach(item => {
navItem.orderList.push(item);
});
//loaded
this.$set(navItem, 'loaded', true);
if (type === 'refresh') {
navItem.orderList = [];
}
console.log("orderList.length======:" + orderList.length)
navItem.orderList = navItem.orderList.concat(orderList);
console.log("data.total======:" + data.total)
console.log("length======:" + navItem.orderList.length)
//more nomore(20)
this.loadingType = navItem.orderList.length >= data.total ? 'nomore' : 'more';
console.log("type======:" + type)
console.log("loadingType======:" + this.loadingType)
if (type === 'refresh') {
if (loading == 1) {
uni.hideLoading();
} else {
uni.stopPullDownRefresh();
}
}
// //tab
// let index = this.tabCurrentIndex;
// let navItem = this.navList[index];
// let type = navItem.type;
// more noMore
navItem.loadingType = 'more';
// if (source === 'tabChange' && navItem.loaded === true) {
// //tab
// return;
// }
// if (navItem.loadingType === 'loading') {
// //
// return;
// }
// navItem.loadingType = 'loading';
// //
// if (type === 'add') {
// if (this.loadingType === 'nomore') {
// return;
// }
// this.loadingType = 'loading';
// } else {
// this.loadingType = 'more';
// }
// let params = {
// pageNum: this.pageNum,
// };
// console.log("params", params)
// let data = await Api.apiCall('get', Api.goods.listCollect, params);
// let orderList = data.records.filter(item => {
// //
// if (item.type == 1) {
// if (item.meno3 == null) {
// item.meno3 = 0;
// }
// item.meno3 = ':' + item.meno3;
// }
// item = Object.assign(item, this.orderStateExp(item.type));
// item.addTime = this.dateFormat(item.addTime);
// return item.type === type;
// });
// if (type === 'refresh') {
// navItem.orderList = [];
// }
// navItem.orderList = navItem.orderList.concat(orderList);
// // orderList.forEach(item => {
// // navItem.orderList.push(item);
// // });
// //loaded
// this.$set(navItem, 'loaded', true);
// // more noMore
// // navItem.loadingType = 'more';
// navItem.loadingType = navItem.orderList.length >= data.total ? 'nomore' : 'more';
// console.log("type======:" + type)
// console.log("loadingType======:" + navItem.loadingType)
// if (type === 'refresh') {
// if (loading == 1) {
// uni.hideLoading();
// } else {
// uni.stopPullDownRefresh();
// }
// }
},
//swiper

Loading…
Cancel
Save