Merge branch 'master' of http://gitea.yxtsoft.com/yxt_group/mallplus
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
"name" : "汇融云链",
|
"name" : "汇融云链",
|
||||||
"appid" : "__UNI__FB2C9C4",
|
"appid" : "__UNI__FB2C9C4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0.9",
|
"versionName" : "1.0.1.0",
|
||||||
"versionCode" : 1009,
|
"versionCode" : 1010,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
|
|||||||
@@ -210,7 +210,8 @@
|
|||||||
"bounce": "none"
|
"bounce": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"path": "pages/order/createOrder",
|
"path": "pages/order/createOrder",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "创建订单"
|
"navigationBarTitleText": "创建订单"
|
||||||
@@ -705,11 +706,13 @@
|
|||||||
"path": "user/collect",
|
"path": "user/collect",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的收藏",
|
"navigationBarTitleText": "我的收藏",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"onReachBottomDistance": 126, //距离底部多远时触发 单位px
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"bounce": "none"
|
"bounce": "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
} ,{
|
||||||
"path": "user/deposit",
|
"path": "user/deposit",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "余额冲",
|
"navigationBarTitleText": "余额冲",
|
||||||
|
|||||||
@@ -8,9 +8,18 @@
|
|||||||
<view class="" style="display: flex;align-items: center;">
|
<view class="" style="display: flex;align-items: center;">
|
||||||
<image class="portrait" mode="aspectFill" :src="userDetailInfo.icon" @click="toUserInfo">
|
<image class="portrait" mode="aspectFill" :src="userDetailInfo.icon" @click="toUserInfo">
|
||||||
</image>
|
</image>
|
||||||
<view class="user-name" style="margin-left: 10upx;color: #FFFFFF;" @click="toUserInfo">
|
<view style="display: flex;flex-direction: column;">
|
||||||
{{ userDetailInfo.nickname || userDetailInfo.username }}
|
<view class="user-name" style="margin-left: 20upx;color: #FFFFFF;font-size: 28px;"
|
||||||
|
@click="toUserInfo">
|
||||||
|
{{ userDetailInfo.nickname }}
|
||||||
</view>
|
</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"
|
<view v-if="userDetailInfo.storeId" class="vip-card-box1"
|
||||||
@click="toNav('../../pagesC/seller/index')">
|
@click="toNav('../../pagesC/seller/index')">
|
||||||
<view class="b-btn">卖家中心</view>
|
<view class="b-btn">卖家中心</view>
|
||||||
@@ -19,7 +28,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<!-- #ifdef H5 || APP-PLUS -->
|
<!-- #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>
|
</image>
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
@@ -56,14 +71,25 @@
|
|||||||
<image class="arc" src="/static/arc.png"></image>
|
<image class="arc" src="/static/arc.png"></image>
|
||||||
|
|
||||||
<view class="tj-sction">
|
<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 class="num">{{ userDetailInfo.blance || 0}}</text>
|
||||||
<text>余额</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')">
|
<view class="tj-item" @click="toNav('../../pagesU/user/coupon')">
|
||||||
<text class="num">{{ couponList.length || 0 }}</text>
|
<text class="num">{{ couponList.length || 0 }}</text>
|
||||||
<text>优惠券</text>
|
<text>优惠券</text>
|
||||||
</view>
|
</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')">
|
<!-- <view class="tj-item" @click="toNav('/pages/integral/home/home')">
|
||||||
<text class="num">{{ userDetailInfo.integration || 0 }}</text>
|
<text class="num">{{ userDetailInfo.integration || 0 }}</text>
|
||||||
<text>积分</text>
|
<text>积分</text>
|
||||||
@@ -111,8 +137,8 @@
|
|||||||
@eventClick="navTo('../../pagesU/user/profile')"></list-cell>
|
@eventClick="navTo('../../pagesU/user/profile')"></list-cell>
|
||||||
<!--<list-cell icon="icon-share" iconColor="#9789f7" title="分享" tips="邀请好友赢10万大礼"></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-pinglun-copy" iconColor="#ee883b" title="晒单" tips="晒单抢红包"></list-cell>-->
|
||||||
<list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏"
|
<!-- <list-cell icon="icon-shoucang_xuanzhongzhuangtai" iconColor="#54b4ef" title="我的收藏"
|
||||||
@eventClick="navTo('../../pagesU/user/collect')"></list-cell>
|
@eventClick="navTo('../../pagesU/user/collect')"></list-cell> -->
|
||||||
<!-- <list-cell
|
<!-- <list-cell
|
||||||
icon="icon-share cgtt"
|
icon="icon-share cgtt"
|
||||||
iconColor="#0e68d7"
|
iconColor="#0e68d7"
|
||||||
@@ -192,7 +218,8 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
couponList: [],
|
couponList: [],
|
||||||
viewList: []
|
viewList: [],
|
||||||
|
listCollect: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -266,6 +293,7 @@
|
|||||||
async getData() {
|
async getData() {
|
||||||
this.getuserinfo();
|
this.getuserinfo();
|
||||||
this.getHistory();
|
this.getHistory();
|
||||||
|
this.getCollect();
|
||||||
},
|
},
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
async getuserinfo() {
|
async getuserinfo() {
|
||||||
@@ -297,6 +325,32 @@
|
|||||||
this.viewList = data.result;
|
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() {
|
upData() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
</label>
|
</label>
|
||||||
</view>
|
</view>
|
||||||
<view class="type-item" @click="changePayType(3)">
|
<!-- <view class="type-item" @click="changePayType(3)">
|
||||||
<text class="icon yticon icon-erjiye-yucunkuan"></text>
|
<text class="icon yticon icon-erjiye-yucunkuan"></text>
|
||||||
<view class="con">
|
<view class="con">
|
||||||
<text class="tit">预存款支付</text>
|
<text class="tit">预存款支付</text>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<radio value="" color="#fa436a" :checked='payType == 3' />
|
<radio value="" color="#fa436a" :checked='payType == 3' />
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<text class="mix-btn" @click="confirm">确认支付</text>
|
<text class="mix-btn" @click="confirm">确认支付</text>
|
||||||
|
|||||||
@@ -216,7 +216,7 @@
|
|||||||
let data = await Api.apiCall('get', Api.order.orderList, params);
|
let data = await Api.apiCall('get', Api.order.orderList, params);
|
||||||
console.log("data:------" + data)
|
console.log("data:------" + data)
|
||||||
let goodsList = data.records;
|
let goodsList = data.records;
|
||||||
let goodsListJson = JSON.stringify(goodsList)
|
// let goodsListJson = JSON.stringify(goodsList)
|
||||||
// console.log("goodsList:" + goodsListJson)
|
// console.log("goodsList:" + goodsListJson)
|
||||||
let orderList = goodsList.filter(item => {
|
let orderList = goodsList.filter(item => {
|
||||||
//添加不同状态下订单的表现形式
|
//添加不同状态下订单的表现形式
|
||||||
|
|||||||
@@ -153,6 +153,17 @@
|
|||||||
}
|
}
|
||||||
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
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({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
mask: true,
|
mask: true,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
|
||||||
<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
|
<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>
|
<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
|
||||||
|
|
||||||
@@ -30,11 +30,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<uni-load-more :status="tabItem.loadingType"></uni-load-more>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
<uni-load-more :status="loadingType"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -58,7 +57,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabCurrentIndex: 0,
|
tabCurrentIndex: 0,
|
||||||
pageNum:1,
|
pageNum: 1,
|
||||||
|
loadingType: 'more', //加载更多状态
|
||||||
navList: [{
|
navList: [{
|
||||||
type: 1,
|
type: 1,
|
||||||
text: '收藏商品',
|
text: '收藏商品',
|
||||||
@@ -105,10 +105,10 @@
|
|||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
|
||||||
console.log("onPullDownRefresh")
|
console.log("onPullDownRefresh")
|
||||||
this.pageNum = this.pageNum + 1;
|
this.pageNum = 1;
|
||||||
// this.getNewProductList('refresh');
|
// this.getNewProductList('refresh');
|
||||||
|
|
||||||
this.loadData();
|
this.loadData('refresh');
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
@@ -123,31 +123,9 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取订单列表
|
//获取订单列表
|
||||||
async loadData(source) {
|
async loadData(type = 'add', loading) {
|
||||||
// console.log('=======================')
|
// 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 (type === 'add') {
|
||||||
if (this.loadingType === 'nomore') {
|
if (this.loadingType === 'nomore') {
|
||||||
@@ -157,10 +135,18 @@
|
|||||||
} else {
|
} else {
|
||||||
this.loadingType = 'more';
|
this.loadingType = 'more';
|
||||||
}
|
}
|
||||||
|
//这里是将订单挂载到tab列表下
|
||||||
|
let index = this.tabCurrentIndex;
|
||||||
|
let navItem = this.navList[index];
|
||||||
|
console.log(navItem);
|
||||||
|
let status = navItem.type;
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
pageNum: this.pageNum,
|
pageNum: this.pageNum,
|
||||||
};
|
};
|
||||||
|
|
||||||
let data = await Api.apiCall('get', Api.goods.listCollect, params);
|
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 => {
|
||||||
//添加不同状态下订单的表现形式
|
//添加不同状态下订单的表现形式
|
||||||
@@ -169,21 +155,96 @@
|
|||||||
item.meno3 = 0;
|
item.meno3 = 0;
|
||||||
}
|
}
|
||||||
item.meno3 = '销量:' + item.meno3;
|
item.meno3 = '销量:' + item.meno3;
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
//判断是否还有数据, 有改为 more, 没有改为noMore
|
// //这里是将订单挂载到tab列表下
|
||||||
navItem.loadingType = 'more';
|
// 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 (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 切换
|
//swiper 切换
|
||||||
|
|||||||
Reference in New Issue
Block a user