Merge branch 'master' into xbx

This commit is contained in:
luyuan 2020-08-03 19:51:22 +08:00
commit 5e22f0429c
12 changed files with 193 additions and 82 deletions

View File

@ -396,6 +396,10 @@ export default {
articleCollectList() { articleCollectList() {
return vm.$u.post('article/articleCollectList'); return vm.$u.post('article/articleCollectList');
}, },
// 关注用户列表
attentionMemberList() {
return vm.$u.post('member/attentionMemberList');
},
} }
} }
} }

View File

@ -15,11 +15,11 @@
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec"> <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text> <text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
</view> </view>
<!-- <view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view> --> <view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view>
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view> <view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价{{ goods.goods_price }}实付款{{ goods.goods_pay_price }}</view>
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40"> <view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
<image src="@/pageE/static/mine/26.png"></image> <image src="@/pageE/static/mine/26.png"></image>
<view>{{ order.add_time | date }}</view> <view>{{ order.add_time | date('yyyy-mm-dd hh:MM') }}</view>
</view> </view>
</view> </view>
</view> </view>

View File

@ -202,6 +202,7 @@ export default {
goodsNumber: 1, goodsNumber: 1,
sel: "", // sel: "", //
quanxuan: false, // quanxuan: false, //
debounce: true,
} }
}, },
components: { components: {
@ -224,6 +225,7 @@ export default {
this.setTitle(); this.setTitle();
}, },
onShow() { onShow() {
this.debounce = true;
this.showSpec = false; this.showSpec = false;
this.showGroupUser = false; this.showGroupUser = false;
this.showInvolvementUser = false; this.showInvolvementUser = false;
@ -235,34 +237,6 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
}, },
methods: { methods: {
// init() {
// this.id = this.$store.state.goods_id;
// this.type = this.$store.getters.getGoodsType;
// const info = this.$store.getters.getGoodsInfo;
// //
// if(this.type == 2) {
// this.user_suc = info.user_suc;
// this.groupUser = info.user;
// this.pintuan_id = info.pintuan_id;
// }
// //
// if (this.type == 3) {
// this.groupbuyInfo = this.$store.state.groupbuyInfo;
// this.setSpikeTime();
// }
// // console.log(this.groupbuyInfo);
// this.goodsInfo = info.goods;
// //
// let list = [];
// info.goods_image[0].forEach(item => {
// let temp = {
// image: item
// }
// list.push(temp);
// })
// this.list = list;
// this.setTitle();
// },
setSwiperList(list) { setSwiperList(list) {
let img = []; let img = [];
list.forEach(item => { list.forEach(item => {
@ -331,7 +305,7 @@ export default {
break; break;
} }
}, },
// //
ordinaryDetails(id) { ordinaryDetails(id) {
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{ this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
if (res.errCode == 0) { if (res.errCode == 0) {
@ -343,7 +317,7 @@ export default {
} }
}) })
}, },
// //
pinTuanDetails(id) { pinTuanDetails(id) {
this.$u.api.getPinTuanDetails({ this.$u.api.getPinTuanDetails({
pintuan_id: id pintuan_id: id
@ -358,7 +332,7 @@ export default {
} }
}) })
}, },
// //
spikeGoodsDetails(id) { spikeGoodsDetails(id) {
this.$u.api.getSpikeInfo({ this.$u.api.getSpikeInfo({
groupbuy_id: id groupbuy_id: id
@ -388,6 +362,8 @@ export default {
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀 * @params {Number} ifcart 结算方式 1:购物车 0:直接结算立即购买/拼团/秒杀
**/ **/
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) { settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
if(!this.debounce) return;
this.debounce = false;
let params = { let params = {
ifcart: ifcart, ifcart: ifcart,
cart_id: [this.goodsInfo.goods_id + '|' + num], cart_id: [this.goodsInfo.goods_id + '|' + num],
@ -413,6 +389,8 @@ export default {
this.$u.route({ this.$u.route({
url: '/pageC/cart/ConfirmOrder' url: '/pageC/cart/ConfirmOrder'
}) })
} else {
this.debounce = true;
} }
}) })
}, },

View File

@ -124,7 +124,7 @@ export default {
return true; return true;
}, },
chooseDate(e) { chooseDate(e) {
let time = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute; let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute;
this.time = time; this.time = time;
}, },
confirmBtn() { confirmBtn() {

View File

@ -122,6 +122,7 @@ export default {
choiceCoupon: {}, // 使 choiceCoupon: {}, // 使
goodsClass: [], goodsClass: [],
orderType: '', // 1 2 3 4 5 orderType: '', // 1 2 3 4 5
debounce: true,
} }
}, },
components: { components: {
@ -153,6 +154,7 @@ export default {
this.setTotalPrice(); this.setTotalPrice();
}, },
onShow() { onShow() {
this.debounce = true;
this.storeCoupon = {}; this.storeCoupon = {};
this.choiceCoupon = {}; this.choiceCoupon = {};
// //
@ -189,11 +191,14 @@ export default {
if(res.errCode == 0) { if(res.errCode == 0) {
this.sendOrder(0); this.sendOrder(0);
} else { } else {
this.debounce = true;
this.$u.toast(res.message); this.$u.toast(res.message);
} }
}) })
}, },
intermediate() { intermediate() {
if(!this.debounce) return;
this.debounce = false;
if(this.orderType == 2) { if(this.orderType == 2) {
this.withImmediate(); this.withImmediate();
} else if(this.orderType == 1) { } else if(this.orderType == 1) {
@ -258,6 +263,7 @@ export default {
} }
}) })
} else { } else {
this.debounce = true;
this.$u.toast(res.message); this.$u.toast(res.message);
} }
}) })

View File

@ -1,58 +1,77 @@
<template> <template>
<view class="concerns"> <view class="concerns">
<u-index-list :scrollTop="scrollTop"> <view>
<view v-for="(item, index) in indexList" :key="index"> <view v-for="(info, index) in list" :key="index">
<u-index-anchor :index="item" class="anchor-class" /> <view class="daren-item" @click="toDetailsPage">
<view class="list-cell"> <image class="head" :src="info.member_avatar"></image>
<image src="../static/mine/23.png"></image> <text class="name">{{ info.member_nickname }}</text>
<view>阿迪达斯</view> <text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
</view> <view class="guanzhu" @click="changeType(info.member_id)" v-if="info.is_attention == 1">关注</view>
<view class="list-cell"> <view class="guanzhu action" @click="changeType(info.member_id)" v-else >未关注</view>
列表2 </view>
</view>
<view class="list-cell">
列表3
</view> </view>
</view> </view>
</u-index-list>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
scrollTop: 0, list: [
indexList: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] {
member_avatar: '',
member_nickname: '111',
live_status: 0,
member_id: 1,
is_attention: 1,
}
]
} }
}, },
onPageScroll(e) {
this.scrollTop = e.scrollTop;
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.concerns { .concerns {
// padding: 35rpx 30rpx 0; .daren-item{
// .u-index-anchor { width: 215rpx;
// background-color: #ffffff !important; height: 282rpx;
// }
.list-cell {
display: flex; display: flex;
box-sizing: border-box; flex-direction: column;
align-items: center; align-items: center;
width: 100%; background-color: #fff;
overflow: hidden;
margin: 50rpx 0;
padding: 0 30rpx;
> image {
width: 70rpx;
height: 70rpx;
border-radius: 10rpx; border-radius: 10rpx;
margin-right: 30rpx; overflow: hidden;
.head{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-top: 24rpx;
background-color: #0f0;
} }
> view { .name{
font-size: 30rpx; font-size: 26rpx;
color: rgba(102,102,102,1); color: #333;
font-weight: 400;
margin-top: 23rpx;
}
.zhuangtai{
font-size:22rpx;
color: #999;
margin-top: 19rpx;
}
.guanzhu{
width: 130rpx;
height: 50rpx;
background-color: #FF780F;
font-size: 26rpx;
line-height: 50rpx;
color: #fff;
text-align: center;
margin-top: 19rpx;
border-radius: 25rpx;
}
.action{
background: #f3f3f3;
} }
} }
} }

View File

@ -11,6 +11,7 @@
</view> </view>
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view> <view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
<view class="distance">距离下一级还需要{{ memberInfo.member_exppoints | residualExp(rank[memberInfo.member_level - 1]) }}经验值</view> <view class="distance">距离下一级还需要{{ memberInfo.member_exppoints | residualExp(rank[memberInfo.member_level - 1]) }}经验值</view>
<!-- <view class="distance">距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值</view> -->
</view> </view>
<view class="body"> <view class="body">
<view class="title"> <view class="title">
@ -24,6 +25,9 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="body">
<u-parse :html="memberInfo.grade_rule"></u-parse>
</view> -->
</view> </view>
</template> </template>
<script> <script>

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="write-complaints"> <view class="write-complaints">
<view class="main-container"> <view class="main-container">
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" /> <textarea auto-height placeholder="发表您的意见吧,我们会做得更好" maxlength="200" v-model="text" />
<u-upload <u-upload
ref="uUpload" ref="uUpload"
:custom-btn="true" :custom-btn="true"
@ -12,6 +12,7 @@
:form-data="formData" :form-data="formData"
:name="name" :name="name"
@on-uploaded="setImageList" @on-uploaded="setImageList"
@on-error="uploadError"
> >
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="../static/mine/27.png"></image> <image src="../static/mine/27.png"></image>
@ -37,12 +38,21 @@ export default {
name: 'common', // name: 'common', //
}, },
imageList: [], imageList: [],
debounce: true,
} }
}, },
onShow() {
this.debounce = true;
},
methods: { methods: {
submit() { submit() {
if(!this.debounce) return;
this.debounce = false;
this.$refs.uUpload.upload(); this.$refs.uUpload.upload();
}, },
uploadError() {
this.debounce = true;
},
setImageList(lists) { setImageList(lists) {
// console.log(lists); // console.log(lists);
let imageList = []; let imageList = [];
@ -78,6 +88,7 @@ export default {
} }
}) })
} else { } else {
this.debounce = true;
this.$u.toast(res.message); this.$u.toast(res.message);
} }
}) })

View File

@ -3,7 +3,7 @@
<view class="status" v-if="state"> <view class="status" v-if="state">
<view class="text"> <view class="text">
<view class="status-text">{{ s_object[state].text }}</view> <view class="status-text">{{ s_object[state].text }}</view>
<view class="time" v-if="orderInfo.view_type == 1">结束时间{{ orderInfo.end_time }}</view> <view class="time" v-if="orderInfo.view_type == 1">距离结束{{ countdown }}</view>
</view> </view>
<image :src="s_object[state].image"></image> <image :src="s_object[state].image"></image>
</view> </view>
@ -116,6 +116,9 @@ export default {
}, },
orderInfo: {}, orderInfo: {},
oid: '', oid: '',
timer: '',
countdown: '', //
isSpike: false, //
} }
}, },
onLoad(option) { onLoad(option) {
@ -127,6 +130,9 @@ export default {
onPullDownRefresh() { onPullDownRefresh() {
this.getOrderInfo(this.oid); this.getOrderInfo(this.oid);
}, },
beforeDestroy() {
clearInterval(this.timer);
},
methods: { methods: {
viewState(value) { viewState(value) {
let state; let state;
@ -154,12 +160,43 @@ export default {
} }
this.state = state; this.state = state;
}, },
setSpikeTime(time) {
// console.log(time);
this.timer = setInterval(() => {
let spikeTime = time * 1000 - new Date().getTime();
// console.log(spikeTime);
if(spikeTime <= 0) {
this.isSpike = true;
this.spikeTime = '00:00:00'
clearInterval(this.timer);
return false;
};
//
const days = Math.floor(spikeTime/(24*3600*1000));
//
const leave1 = spikeTime % (24*3600*1000) //
let hours = Math.floor(leave1/(3600*1000));
//
const leave2 = leave1 % (3600*1000) //
let minutes = Math.floor(leave2 / (60*1000))
//
const leave3 = leave2 % (60*1000) //
let seconds = Math.round(leave3 / 1000)
//
hours = days * 24 + hours;
if(hours < 10) hours = '0' + hours;
if(minutes < 10) minutes = '0' + minutes;
if(seconds < 10) seconds = '0' + seconds;
this.countdown = hours + ':' + minutes + ':' + seconds;
}, 1000)
},
getOrderInfo(id) { getOrderInfo(id) {
this.$u.api.getOrderInfo({ this.$u.api.getOrderInfo({
order_id: id, order_id: id,
}).then(res => { }).then(res => {
if(res.errCode == 0) { if(res.errCode == 0) {
this.orderInfo = res.data; this.orderInfo = res.data;
this.setSpikeTime(res.data.end_time);
this.viewState(this.orderInfo.view_type); this.viewState(this.orderInfo.view_type);
this.setTitle(this.orderInfo.view_type); this.setTitle(this.orderInfo.view_type);
} }

View File

@ -122,6 +122,9 @@ export default {
this.showPopup = false; this.showPopup = false;
} }
} }
},
onPullDownRefresh() {
this.sendLaundryOrderList();
}, },
onShow() { onShow() {
this.current = 0; this.current = 0;
@ -137,6 +140,7 @@ export default {
type: type, type: type,
page: this.page, page: this.page,
}) })
uni.stopPullDownRefresh();
this.timer = false; this.timer = false;
if(res.errCode == 0) { if(res.errCode == 0) {
// this.orderList = res.data.list; // this.orderList = res.data.list;

View File

@ -144,7 +144,7 @@
<view class="wash-btn" @click="submitImage">确认送洗</view> <view class="wash-btn" @click="submitImage">确认送洗</view>
</swiper-item> </swiper-item>
</swiper> </swiper>
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" :safe-area-inset-bottom="true" mode="single-column"></u-select> <u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
<u-select v-model="showAddress" <u-select v-model="showAddress"
mode="mutil-column-auto" mode="mutil-column-auto"
:list="areaList" :list="areaList"
@ -243,9 +243,11 @@ export default {
uformData: { uformData: {
name: 'common', // name: 'common', //
}, },
debounce: true,
} }
}, },
onShow() { onShow() {
this.debounce = true;
this.current = 0; this.current = 0;
this.swiperCurrent = 0; this.swiperCurrent = 0;
this.showPopup = false; this.showPopup = false;
@ -269,7 +271,7 @@ export default {
}) })
}, },
confirmType(e) { confirmType(e) {
// console.log(e[0]); console.log(e);
this.type = e[0]; this.type = e[0];
}, },
async getOrderList({ load = 'reload' } = {}) { async getOrderList({ load = 'reload' } = {}) {
@ -285,22 +287,22 @@ export default {
return res; return res;
}, },
submitImage() { submitImage() {
// this.$refs.uUpload.upload(); if(!this.debounce) return;
this.debounce = false;
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload(); this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
// this.confirmSend();
}, },
tabsChange(index) { tabsChange(index) {
this.swiperCurrent = index; this.swiperCurrent = index;
}, },
setImageList(lists) { setImageList(lists) {
console.log(lists); // console.log(lists);
let imageList = []; let imageList = [];
lists.forEach(res => { lists.forEach(res => {
if(res.response.errCode == 0) imageList.push(res.response.data.file_name); if(res.response.errCode == 0) imageList.push(res.response.data.file_name);
}) })
// console.log(imageList); // console.log(imageList);
this.filesArr = imageList; this.filesArr = imageList;
console.log(this.filesArr); // console.log(this.filesArr);
this.confirmSend(); this.confirmSend();
}, },
validationParams() { validationParams() {
@ -372,6 +374,11 @@ export default {
// console.log(params); // console.log(params);
this.$u.api.sendLaundrySave(params).then(res => { this.$u.api.sendLaundrySave(params).then(res => {
this.$u.toast(res.message); this.$u.toast(res.message);
if(res.errCode == 0) {
} else {
this.debounce = true;
}
}) })
}, },
radioChange(e){ radioChange(e){
@ -412,6 +419,8 @@ export default {
}) })
}, },
animationfinish(e) { animationfinish(e) {
//
this.debounce = true;
let current = e.detail.current; let current = e.detail.current;
this.swiperCurrent = current; this.swiperCurrent = current;
this.current = current; this.current = current;

View File

@ -109,7 +109,16 @@
"navigationBarTitleText": "商品详情", "navigationBarTitleText": "商品详情",
"app-plus":{ "app-plus":{
"titleNView":{ "titleNView":{
"backgroundColor":"#ffffff" "backgroundColor":"#ffffff",
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
} }
} }
} }
@ -131,7 +140,16 @@
"navigationBarTitleText": "商品评价", "navigationBarTitleText": "商品评价",
"app-plus":{ "app-plus":{
"titleNView":{ "titleNView":{
"backgroundColor":"#ffffff" "backgroundColor":"#ffffff",
"buttons": [
{
"type":"none",
"text":"\ue636",
"float":"right",
"fontSize":"18",
"fontSrc": "/static/fonts/cart.ttf"
}
]
} }
} }
} }
@ -237,6 +255,7 @@
{ {
"path": "cart/index", "path": "cart/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "购物车", "navigationBarTitleText": "购物车",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -604,6 +623,7 @@
{ {
"path": "tool/Manicure", "path": "tool/Manicure",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "美甲", "navigationBarTitleText": "美甲",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -630,6 +650,7 @@
{ {
"path": "tool/SendWash", "path": "tool/SendWash",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "送洗", "navigationBarTitleText": "送洗",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -640,6 +661,19 @@
} }
} }
}, },
{
"path": "tool/washComment",
"style": {
"navigationBarTitleText": "送洗评价",
"app-plus": {
"titleSize": "36px",
"titleNView": {
"titleColor": "#333333",
"backgroundColor": "#FFFFFF"
}
}
}
},
{ {
"path": "tool/WashOrder", "path": "tool/WashOrder",
"style": { "style": {
@ -696,6 +730,7 @@
{ {
"path": "mine/MineConcerns", "path": "mine/MineConcerns",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的关注", "navigationBarTitleText": "我的关注",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -833,6 +868,7 @@
{ {
"path": "order/Index", "path": "order/Index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的订单", "navigationBarTitleText": "我的订单",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -846,6 +882,7 @@
{ {
"path": "order/Details", "path": "order/Details",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",
@ -905,6 +942,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@ -928,6 +966,7 @@
{ {
"path": "pages/mine/index", "path": "pages/mine/index",
"style": { "style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"app-plus": { "app-plus": {
"titleSize": "36px", "titleSize": "36px",