Merge branch 'master' into xbx
This commit is contained in:
commit
817c886d84
@ -61,13 +61,15 @@ const install = (Vue, vm) => {
|
|||||||
vm.$u.route('/pageA/login/login')
|
vm.$u.route('/pageA/login/login')
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
if (res.cancel) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} else if (res.data.errCode == 1) {
|
} else if (res.errCode == 1) {
|
||||||
// console.log(res.message);
|
console.log(res.message);
|
||||||
return res.data;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
// 如果返回false,则会调用Promise的reject回调,
|
// 如果返回false,则会调用Promise的reject回调,
|
||||||
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
// 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
||||||
|
@ -44,49 +44,57 @@
|
|||||||
this.$emit('tochange');
|
this.$emit('tochange');
|
||||||
let member_mobile = this.member_mobile;
|
let member_mobile = this.member_mobile;
|
||||||
// 校验手机号
|
// 校验手机号
|
||||||
let type_phone = this.$u.test.mobile(member_mobile)
|
let type_phone = this.$u.test.mobile(member_mobile);
|
||||||
console.log(member_mobile)
|
// console.log(member_mobile);
|
||||||
console.log(this.smslog_type)
|
// console.log(this.smslog_type);
|
||||||
// 判断是否有手机号为空
|
// 判断是否有手机号为空
|
||||||
if (type_phone == false) {
|
if (type_phone == false) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号格式不正确',
|
title: "手机号格式不正确"
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 验证码倒计时
|
// 验证码倒计时
|
||||||
if (this.$refs.uCode.canGetCode) {
|
if (this.$refs.uCode.canGetCode) {
|
||||||
// 模拟向后端请求验证码
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在获取验证码'
|
title: '正在获取验证码'
|
||||||
})
|
})
|
||||||
|
// 请求接口
|
||||||
|
this.$u.api.sendSmsCode({
|
||||||
|
member_mobile: this.member_mobile,
|
||||||
|
smslog_type: this.smslog_type
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
console.log(res);
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
// 这里此提示会被this.start()方法中的提示覆盖
|
// 这里此提示会被this.start()方法中的提示覆盖
|
||||||
this.$u.toast('验证码已发送');
|
// this.$u.toast('验证码已发送');
|
||||||
// 通知验证码组件内部开始倒计时
|
// 通知验证码组件内部开始倒计时
|
||||||
this.$refs.uCode.start();
|
this.$refs.uCode.start();
|
||||||
}, 2000);
|
}, 100);
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
// this.$u.toast('倒计时结束后再发送');
|
// this.$u.toast('倒计时结束后再发送');
|
||||||
console.log("倒计时结束后再发送");
|
// console.log("倒计时结束后再发送");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
end() {
|
end() {
|
||||||
this.$u.toast('倒计时结束');
|
// this.$u.toast('倒计时结束');
|
||||||
},
|
},
|
||||||
start() {
|
start() {
|
||||||
// this.$u.toast('倒计时开始');
|
// this.$u.toast('倒计时开始');
|
||||||
console.log(this.smslog_type)
|
// console.log(this.smslog_type)
|
||||||
// 倒计时请求
|
// 倒计时请求
|
||||||
this.$u.api.sendSmsCode({
|
|
||||||
member_mobile: this.member_mobile,
|
|
||||||
smslog_type: this.smslog_type
|
|
||||||
}).then((res) => {
|
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,7 @@ export default {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.title-wrap {
|
.title-wrap {
|
||||||
|
flex: 1;
|
||||||
.item-top {
|
.item-top {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order-item">
|
<view class="order-item" v-if="order.extend_store">
|
||||||
<view class="order-title">
|
<view class="order-title">
|
||||||
<view class="store-info">
|
<view class="store-info">
|
||||||
<image :src="order.extend_store.store_avatar"></image>
|
<image :src="order.extend_store.store_avatar"></image>
|
||||||
@ -24,13 +24,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
|
<view class="order-btn" v-if="[1, 2, 3, 4, 8, 9].indexOf(order.view_type) >= 0">
|
||||||
<view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
|
<view class="cancel" v-if="(order.view_type == 3 || order.view_type == 2) && order.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
|
||||||
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
|
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
|
||||||
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>
|
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>
|
||||||
<view class="payment" v-if="order.view_type == 1" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view>
|
<view class="cancel" v-if="order.view_type == 9" @click="cancelOrder">取消订单</view>
|
||||||
|
<view class="payment" v-if="order.view_type == 1 || order.view_type == 9" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view>
|
||||||
<view class="service" v-if="order.view_type == 8">联系官方客服</view>
|
<view class="service" v-if="order.view_type == 8">联系官方客服</view>
|
||||||
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
|
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -297,17 +297,18 @@
|
|||||||
height: 560rpx;
|
height: 560rpx;
|
||||||
|
|
||||||
.protocol_content {
|
.protocol_content {
|
||||||
|
display: block;
|
||||||
width: 494rpx;
|
width: 494rpx;
|
||||||
height: 528rpx;
|
height: 528rpx;
|
||||||
|
margin: 10rpx auto 30rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: rgba(51, 51, 51, 1);
|
|
||||||
display: block;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
margin: 80rpx auto 33rpx;
|
|
||||||
letter-spacing: 1rpx;
|
|
||||||
text-align: justify;
|
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
|
text-align: justify;
|
||||||
|
letter-spacing: 1rpx;
|
||||||
|
text-indent: 2rem;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="label">
|
<view class="label">
|
||||||
<u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
|
<!-- <u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> -->
|
||||||
|
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
|
||||||
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
||||||
<!-- 最多显示3个 -->
|
<!-- 最多显示3个 -->
|
||||||
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
|
<view v-if="groupList[i]">
|
||||||
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length" style="margin: 0 auto;"></u-empty>
|
<sitem :info="info" v-for="(info, index) in groupList[i].slice(0, 3)" :key="index"></sitem>
|
||||||
|
</view>
|
||||||
|
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList[i] || !groupList[i].length" style="margin: 0 auto;"></u-empty>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@ -58,7 +61,9 @@ export default {
|
|||||||
page: 0,
|
page: 0,
|
||||||
gc_id: id,
|
gc_id: id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.groupList = res.data;
|
this.groupList[this.current] = res.data;
|
||||||
|
// console.log(this.groupList);
|
||||||
|
this.$forceUpdate();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="top">商品推荐</view>
|
<view class="top">商品推荐</view>
|
||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="26" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
|
<!-- <u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="26" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> -->
|
||||||
|
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
||||||
<view class="goods-item" v-if="goodsList.length">
|
<view class="goods-item">
|
||||||
<item v-for="item in goodsList" :key="item.goods_id" :info="item"></item>
|
<item v-for="item in goodsList[index]" :key="item.goods_id" :info="item"></item>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无商品" mode="list" color="#000" margin-top="20" v-else></u-empty>
|
<u-empty text="暂无商品" mode="list" color="#000" margin-top="20" v-if="!goodsList[index] || !goodsList[index].length"></u-empty>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
@ -39,7 +40,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
current(index) {
|
current(index) {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.goodsList = [];
|
// this.goodsList = [];
|
||||||
const id = this.classifyList[index].gc_id;
|
const id = this.classifyList[index].gc_id;
|
||||||
this.getGoodsRecommend({gc_id: id});
|
this.getGoodsRecommend({gc_id: id});
|
||||||
}
|
}
|
||||||
@ -86,34 +87,30 @@ export default {
|
|||||||
// this.swiperCurrent = this.current;
|
// this.swiperCurrent = this.current;
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(reload) this.goodsList = res.data.goodsList;
|
if(reload) this.goodsList[this.current] = res.data.goodsList;
|
||||||
else this.goodsList.push(...res.data.goodsList);
|
else this.goodsList[this.current].push(...res.data.goodsList);
|
||||||
// console.log(this.goodsList);
|
// console.log(this.goodsList);
|
||||||
this.setSwiperHeight();
|
this.setSwiperHeight();
|
||||||
}
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
return res.data.goodsList.length;
|
return res.data.goodsList.length;
|
||||||
},
|
},
|
||||||
setSwiperHeight() {
|
setSwiperHeight() {
|
||||||
// height: 230px, margin-bottom: 13
|
// height: 480rpx, margin-bottom: 26rpx
|
||||||
const height = Math.ceil(this.goodsList.length / 2) * (540 + 26);
|
const height = Math.ceil(this.goodsList[this.current].length / 2) * (480 + 26);
|
||||||
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
||||||
// this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px';
|
// console.log(this.swiperHeight);
|
||||||
},
|
},
|
||||||
// tabs通知swiper切换
|
// tabs通知swiper切换
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.current = index;
|
this.current = index;
|
||||||
|
this.swiperCurrent = this.current;
|
||||||
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
||||||
},
|
},
|
||||||
// swiper-item左右移动,通知tabs的滑块跟随移动
|
|
||||||
transition(e) {
|
|
||||||
let dx = e.detail.dx;
|
|
||||||
this.$refs.uTabs.setDx(dx);
|
|
||||||
},
|
|
||||||
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
|
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
|
||||||
// swiper滑动结束,分别设置tabs和swiper的状态
|
// swiper滑动结束,分别设置tabs和swiper的状态
|
||||||
animationfinish(e) {
|
animationfinish(e) {
|
||||||
let current = e.detail.current;
|
let current = e.detail.current;
|
||||||
this.$refs.uTabs.setFinishCurrent(current);
|
|
||||||
this.current = current;
|
this.current = current;
|
||||||
this.swiperCurrent = current;
|
this.swiperCurrent = current;
|
||||||
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
||||||
@ -136,8 +133,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.swiper-box {
|
.swiper-box {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 20rpx 0;
|
padding-top: 20rpx;
|
||||||
margin-bottom: 10rpx;
|
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
// height: 100%;
|
// height: 100%;
|
||||||
.goods-item {
|
.goods-item {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<image :src="info.goods_image" mode="aspectFill" class="img"></image>
|
<image :src="info.goods_image" mode="aspectFill" class="img"></image>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="title u-line-2">{{ info.goods_name }}</text>
|
<text class="title u-line-2">{{ info.goods_name }}</text>
|
||||||
<text class="jianjie u-line-1">{{ info.goods_advword }}</text>
|
<!-- <text class="jianjie u-line-1">{{ info.goods_advword }}</text> -->
|
||||||
<text class="price">¥{{ info.goods_price }}</text>
|
<text class="price">¥{{ info.goods_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -44,7 +44,7 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item{
|
.item{
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 520rpx;
|
height: 480rpx;
|
||||||
margin-bottom: 26rpx;
|
margin-bottom: 26rpx;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
||||||
@ -62,10 +62,12 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
.title{
|
.title{
|
||||||
line-height: 40rpx;
|
margin-bottom: 16rpx;
|
||||||
font-size: 30rpx;
|
font-size: 26rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 13rpx;
|
|
||||||
}
|
}
|
||||||
.jianjie{
|
.jianjie{
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<text>今日秒杀推荐</text>
|
<text>今日秒杀推荐</text>
|
||||||
<view class="more" @click="toOthersPage">
|
<view class="more" @click="toOthersPage">
|
||||||
<text>点击查看更多</text>
|
<text>查看更多</text>
|
||||||
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
|
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="connect">
|
<view class="connect" @click="toOthersPage">
|
||||||
<view class="time" v-if="type == 'spike'">
|
<view class="time" v-if="type == 'spike'">
|
||||||
<image src="/static/image/common/15.png"></image>
|
<image src="/static/image/common/15.png"></image>
|
||||||
<text>{{ info.groupbuy_starttime_histime }}</text>
|
<text>{{ info.groupbuy_starttime_histime }}</text>
|
||||||
@ -42,8 +42,8 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
params: {
|
||||||
id: this.recommendData.groupbuy_id,
|
id: this.recommendData.goods_id,
|
||||||
type: 3,
|
// type: 3,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -68,6 +68,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #999;
|
color: #999;
|
||||||
|
font-size: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.connect{
|
.connect{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<text>今日拼团推荐</text>
|
<text>今日拼团推荐</text>
|
||||||
<view class="more" @click="toDetailsPage">
|
<view class="more" @click="toDetailsPage">
|
||||||
<text>点击查看详情</text>
|
<text>查看详情</text>
|
||||||
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
|
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<text>¥{{ info.goods_price }}</text>
|
<text>¥{{ info.goods_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="img" :src="info.pintuan_image" @click="toDetailsPage"></image>
|
<image class="img" :src="info.pintuan_image" @click="toDetailsPage" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -159,10 +159,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.img{
|
.img{
|
||||||
width: 213rpx;
|
|
||||||
height: 160rpx;
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-left: 13rpx;
|
width: 210rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
background-color: antiquewhite;
|
background-color: antiquewhite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<text class="num">00</text>
|
<text class="num">00</text>
|
||||||
<text class="mah">:</text>
|
<text class="mah">:</text>
|
||||||
<text class="num">00</text>
|
<text class="num">00</text>
|
||||||
<text>-</text>
|
<text class="heng">-</text>
|
||||||
<text class="num">{{ time.bigHour }}</text>
|
<text class="num">{{ time.bigHour }}</text>
|
||||||
<text class="mah">:</text>
|
<text class="mah">:</text>
|
||||||
<text class="num">00</text>
|
<text class="num">00</text>
|
||||||
@ -47,10 +47,10 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.seckill{
|
.seckill{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 30rpx;
|
padding: 0 30rpx 30rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
.top{
|
.top{
|
||||||
height: 60rpx;
|
height: 90rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -66,13 +66,23 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
|
.heng {
|
||||||
|
margin: 0 6rpx;
|
||||||
|
}
|
||||||
.num{
|
.num{
|
||||||
box-sizing: content-box;
|
|
||||||
width: 25rpx;
|
width: 25rpx;
|
||||||
height: 25rpx;
|
height: 25rpx;
|
||||||
background-color: #bfbfbf;
|
padding: 2rpx 4rpx;
|
||||||
margin: 0 10rpx;
|
margin: 0 6rpx;
|
||||||
padding: 2rpx;
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 25rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
box-sizing: content-box;
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
.mah {
|
||||||
|
vertical-align: text-top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,7 +95,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.list{
|
.list{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item" @click="spikeGoods">
|
<view class="item" @click="spikeGoods">
|
||||||
<image class="head" :src="item.groupbuy_image1"></image>
|
<image class="head" :src="item.groupbuy_image1" mode="aspectFill"></image>
|
||||||
<text class="title u-line-2">{{ item.goods_name }}</text>
|
<text class="title u-line-2">{{ item.goods_name }}</text>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<text>¥{{ item.groupbuy_price }}</text>
|
<text>¥{{ item.groupbuy_price }}</text>
|
||||||
<text class="origin">¥{{ item.goods_price }}</text>
|
<text class="origin">¥{{ item.goods_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info" v-if="0">
|
||||||
<text>剩余{{ item.inventory | formatValue }}件</text>
|
<text>剩余{{ item.inventory | formatValue }}件</text>
|
||||||
<text>立即购买</text>
|
<text>立即购买</text>
|
||||||
</view>
|
</view>
|
||||||
@ -56,23 +56,28 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item{
|
.item{
|
||||||
width: 220rpx;
|
width: 30%;
|
||||||
|
margin-right: 50rpx;
|
||||||
.head{
|
.head{
|
||||||
width: 210rpx;
|
width: 100%;
|
||||||
height: 131rpx;
|
height: 210rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
background-color: antiquewhite;
|
background-color: antiquewhite;
|
||||||
}
|
}
|
||||||
.title{
|
.title{
|
||||||
|
width: 200rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
margin-top: 6rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-top: 16rpx;
|
-webkit-line-clamp: 1 !important;
|
||||||
}
|
}
|
||||||
.price{
|
.price{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 19rpx;
|
margin-top: 10rpx;
|
||||||
>text:first-child{
|
>text:first-child{
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #FF3131;
|
color: #FF3131;
|
||||||
@ -89,7 +94,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
margin-top: 19rpx;
|
margin-top: 10rpx;
|
||||||
>text:first-child{
|
>text:first-child{
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
@ -61,8 +61,8 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
params: {
|
||||||
id: this.item.groupbuy_id,
|
id: this.item.goods_id,
|
||||||
type: 3,
|
// type: 3,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -85,8 +85,8 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
params: {
|
params: {
|
||||||
id: this.item.pintuan_id,
|
id: this.item.goods_id,
|
||||||
type: 2,
|
// type: 2,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -4,15 +4,18 @@
|
|||||||
<view class="title">全部优惠券</view>
|
<view class="title">全部优惠券</view>
|
||||||
<view class="view-more" @click="toCouponPage">查看更多></view>
|
<view class="view-more" @click="toCouponPage">查看更多></view>
|
||||||
</view>
|
</view>
|
||||||
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="60" ></u-tabs-swiper>
|
<!-- <u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="60" ></u-tabs-swiper> -->
|
||||||
|
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
<!-- :style="{ height: swiperHeight }" -->
|
<!-- :style="{ height: swiperHeight }" -->
|
||||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
|
<swiper class="box" :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
<!-- 最多显示四个 -->
|
<!-- 最多显示四个 -->
|
||||||
<view v-for="(coupon, index) in couponList.slice(0, 4)" :key="index" class="coupon-item">
|
<view v-if="couponList[i]">
|
||||||
|
<view v-for="(coupon, index) in couponList[i].slice(0, 4)" :key="index" class="coupon-item">
|
||||||
<Coupon :couponInfo="coupon" :status='0' :type="0"></Coupon>
|
<Coupon :couponInfo="coupon" :status='0' :type="0"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
</view>
|
||||||
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList[i] || !couponList[i].length"></u-empty>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@ -56,16 +59,18 @@ export default {
|
|||||||
gc_id: gc_id,
|
gc_id: gc_id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.couponList = res.data;
|
this.couponList[this.couponCurrent] = res.data;
|
||||||
} else {
|
} else {
|
||||||
this.couponList = [];
|
this.couponList[this.couponCurrent] = [];
|
||||||
}
|
}
|
||||||
// 设置 swiper 高度
|
// 设置 swiper 高度
|
||||||
this.setViewHeight();
|
this.setViewHeight();
|
||||||
|
this.$forceUpdate();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
couponTabsChange(index) {
|
couponTabsChange(index) {
|
||||||
this.couponCurrent = index;
|
this.couponCurrent = index;
|
||||||
|
this.swiperCouponCurrent = this.couponCurrent;
|
||||||
},
|
},
|
||||||
couponAnimationFinish(e) {
|
couponAnimationFinish(e) {
|
||||||
const current = e.detail.current;
|
const current = e.detail.current;
|
||||||
@ -75,8 +80,8 @@ export default {
|
|||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
// 一个优惠券的高度 97px, 下距离 10px
|
// 一个优惠券的高度 97px, 下距离 10px
|
||||||
let num = 0;
|
let num = 0;
|
||||||
num = this.couponList.length
|
num = this.couponList[this.couponCurrent].length
|
||||||
? this.couponList.length > 4 ? 4 : this.couponList.length
|
? this.couponList[this.couponCurrent].length > 4 ? 4 : this.couponList[this.couponCurrent].length
|
||||||
: 1
|
: 1
|
||||||
this.swiperHeight = (200 + 20) * num + 'rpx';
|
this.swiperHeight = (200 + 20) * num + 'rpx';
|
||||||
},
|
},
|
||||||
@ -107,10 +112,12 @@ export default {
|
|||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
.view-more {
|
.view-more {
|
||||||
font-size: 18rpx;
|
font-size: 20rpx;
|
||||||
color: rgba(153,153,153,1);
|
color: rgba(153,153,153,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.box {
|
||||||
|
padding-top: 20rpx;
|
||||||
.swiper-coupon-item {
|
.swiper-coupon-item {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -120,5 +127,6 @@ export default {
|
|||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -101,7 +101,7 @@
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 数据的请求
|
// 数据的请求
|
||||||
this.apiwelcome();
|
// this.apiwelcome();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let pages = getCurrentPages();
|
let pages = getCurrentPages();
|
||||||
@ -123,7 +123,9 @@
|
|||||||
...mapMutations(['loginIn']),
|
...mapMutations(['loginIn']),
|
||||||
apiwelcome() {
|
apiwelcome() {
|
||||||
this.$u.api.sendSmsCode({}).then((res) => {
|
this.$u.api.sendSmsCode({}).then((res) => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 协议跳转
|
// 协议跳转
|
||||||
@ -148,21 +150,18 @@
|
|||||||
if (this.member_mobile == '') {
|
if (this.member_mobile == '') {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号不能为空',
|
title: '手机号不能为空',
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (type_phone == false) {
|
if (type_phone == false) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号格式不正确',
|
title: '手机号格式不正确',
|
||||||
type: 'error'
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.sms_code == '') {
|
if (this.sms_code == '') {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '验证码不能为空',
|
title: '验证码不能为空',
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -176,7 +175,6 @@
|
|||||||
if (res.data == '') {
|
if (res.data == '') {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
@ -205,7 +203,6 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -109,28 +109,24 @@
|
|||||||
if( this.member_mobile == ''){
|
if( this.member_mobile == ''){
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号不能为空!',
|
title: '手机号不能为空!',
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (type_phone == false) {
|
if (type_phone == false) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号格式不正确!',
|
title: '手机号格式不正确!',
|
||||||
type: 'error'
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( this.sms_code == ''){
|
if( this.sms_code == ''){
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '验证码不能为空!',
|
title: '验证码不能为空!',
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.is_check) {
|
if (this.is_check) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '请同意协议!',
|
title: '请同意协议!',
|
||||||
type: 'error'
|
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -138,10 +134,6 @@
|
|||||||
member_mobile: this.member_mobile,
|
member_mobile: this.member_mobile,
|
||||||
sms_code: this.sms_code
|
sms_code: this.sms_code
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log('3333333333',res);
|
|
||||||
// 校验手机号
|
|
||||||
|
|
||||||
// console.log(res)
|
|
||||||
if(res.errCode == 0){
|
if(res.errCode == 0){
|
||||||
//存储一个字符传值
|
//存储一个字符传值
|
||||||
me.loginIn(res.data.token);
|
me.loginIn(res.data.token);
|
||||||
@ -159,19 +151,17 @@
|
|||||||
// type: 'success',
|
// type: 'success',
|
||||||
// url: '/pageA/topick/topick'
|
// url: '/pageA/topick/topick'
|
||||||
// })
|
// })
|
||||||
}
|
} else if(res.errCode == 2){
|
||||||
if(res.errCode == 1){
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: res.message,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if(res.errCode == 2){
|
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
url: '/pageA/login/login'
|
url: '/pageA/login/login'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'primary'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -196,7 +186,6 @@
|
|||||||
// console.log("调用父组件的方法")
|
// console.log("调用父组件的方法")
|
||||||
// console.log('2222',this._data.member_mobile)
|
// console.log('2222',this._data.member_mobile)
|
||||||
let member_mobile = this._data.member_mobile;
|
let member_mobile = this._data.member_mobile;
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<!-- 评论 -->
|
<!-- 评论 -->
|
||||||
<view class="operat pinglun">
|
<view class="operat pinglun">
|
||||||
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
|
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
|
||||||
<text>{{item.comment_num}}</text>
|
<text>{{ comment_num }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 购物车 -->
|
<!-- 购物车 -->
|
||||||
<view class="operat gouwu">
|
<view class="operat gouwu">
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:'userinfo',
|
name:'userinfo',
|
||||||
props:['list','cart','comment'],
|
props:['list','cart','comment','num'],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
is_follow: this.list.is_attention || false,
|
is_follow: this.list.is_attention || false,
|
||||||
@ -82,6 +82,7 @@ export default {
|
|||||||
is_collect: this.list.is_collect || false,
|
is_collect: this.list.is_collect || false,
|
||||||
is_content: false,
|
is_content: false,
|
||||||
is_cart: false,
|
is_cart: false,
|
||||||
|
comment_num: this.list.comment_num || 0,
|
||||||
item: this.list || {}
|
item: this.list || {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -92,15 +93,21 @@ export default {
|
|||||||
this.is_follow = this.list.is_attention || false;
|
this.is_follow = this.list.is_attention || false;
|
||||||
this.is_like = this.list.is_like || false;
|
this.is_like = this.list.is_like || false;
|
||||||
this.is_collect = this.list.is_collect || false;
|
this.is_collect = this.list.is_collect || false;
|
||||||
|
this.comment_num = this.list.comment_num || 0;
|
||||||
},
|
},
|
||||||
cart(newValue,old) {
|
cart(newValue,old) {
|
||||||
// console.log(newValue,old);
|
// console.log(newValue);
|
||||||
this.is_cart = newValue;
|
this.is_cart = newValue;
|
||||||
},
|
},
|
||||||
comment(newValue,old) {
|
comment(newValue,old) {
|
||||||
// console.log(newValue,old);
|
// console.log(newValue,old);
|
||||||
this.is_content = newValue;
|
this.is_content = newValue;
|
||||||
},
|
},
|
||||||
|
num(newVal,old) {
|
||||||
|
// console.log(newVal);
|
||||||
|
this.comment_num = newVal;
|
||||||
|
// this.item.comment_num = newVal;
|
||||||
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -102,7 +102,7 @@ export default {
|
|||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
this.listInfo = res.data.list;
|
this.listInfo = res.data.list;
|
||||||
console.log(this.listInfo);
|
// console.log(this.listInfo);
|
||||||
} else {
|
} else {
|
||||||
console.log(res.message);
|
console.log(res.message);
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 用户操作 -->
|
<!-- 用户操作 -->
|
||||||
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openPopup"></userinfo>
|
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
|
||||||
<!-- 评论 -->
|
<!-- 评论 -->
|
||||||
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
|
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text>评论</text>
|
<text>评论</text>
|
||||||
<u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
|
<u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="scroll-box" scroll-y="true" @scrolltolower="scrollBottom">
|
<scroll-view class="scroll-box" scroll-y="true" lower-threshold="50" @scrolltolower="scrollBottom">
|
||||||
<block v-for="(item,index) in commentList" :key="index">
|
<block v-for="(item,index) in commentList" :key="index">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<image :src="item.member_avatar" mode="aspectFill"></image>
|
<image :src="item.member_avatar" mode="aspectFill"></image>
|
||||||
@ -55,7 +55,8 @@
|
|||||||
<view class="more-reply" v-if="item.reply_count" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></view>
|
<view class="more-reply" v-if="item.reply_count" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<!-- <view class="no-data" v-else>111</view> -->
|
<view class="no-data" v-if="!commentList.length">还没有评论,快来评论吧!</view>
|
||||||
|
<u-loadmore v-else :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="editing" @click="openKeyInput">
|
<view class="editing" @click="openKeyInput">
|
||||||
<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
|
<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
|
||||||
@ -258,9 +259,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.no-data {
|
.no-data {
|
||||||
margin-top: 100rpx;
|
margin-top: 200rpx;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.editing {
|
.editing {
|
||||||
|
z-index: 1000;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -411,10 +414,19 @@ export default {
|
|||||||
cartList: [],
|
cartList: [],
|
||||||
cart_len: 0,
|
cart_len: 0,
|
||||||
photo_len: 0,
|
photo_len: 0,
|
||||||
|
comment_num: 0,
|
||||||
edit_text: "有爱评论,说点好听的 ~",
|
edit_text: "有爱评论,说点好听的 ~",
|
||||||
edit_text_other: "有爱评论,说点好听的 ~",
|
edit_text_other: "有爱评论,说点好听的 ~",
|
||||||
commentList: [], // 评论
|
commentList: [], // 评论
|
||||||
allList: [], // 全部子评论
|
allList: [], // 全部子评论
|
||||||
|
status: 'loadmore',
|
||||||
|
iconType: 'circle',
|
||||||
|
loadText: {
|
||||||
|
loadmore: '轻轻上拉',
|
||||||
|
loading: '努力加载中',
|
||||||
|
nomore: '暂时没有更多了',
|
||||||
|
no: '评论'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option){
|
onLoad(option){
|
||||||
@ -455,7 +467,7 @@ export default {
|
|||||||
this.is_comment = data.comment;
|
this.is_comment = data.comment;
|
||||||
if (this.is_comment) {
|
if (this.is_comment) {
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
this.getComment(this.article_id,0);
|
this.getComment();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取评论
|
// 获取评论
|
||||||
@ -464,13 +476,20 @@ export default {
|
|||||||
article_id: this.article_id,
|
article_id: this.article_id,
|
||||||
page: this.page,
|
page: this.page,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
this.status = "loading";
|
||||||
if (res.errCode == 0 && this.page == 0) {
|
// console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
if (this.commentList.length < 8) {
|
||||||
|
this.status = "nomore";
|
||||||
|
}
|
||||||
|
if (this.page == 0) {
|
||||||
this.commentList = res.data;
|
this.commentList = res.data;
|
||||||
} else if (res.errCode == 0 && this.page > 0) {
|
} else if (res.data.length == 0 && this.page > 0) {
|
||||||
this.commentList = this.commentList.concat(res.data);
|
this.status = "nomore";
|
||||||
} else {
|
} else {
|
||||||
|
this.commentList = this.commentList.concat(res.data);
|
||||||
|
}
|
||||||
|
this.page++;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -501,6 +520,8 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
// console.log(res.data.data);
|
// console.log(res.data.data);
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
this.comment_num = res.data.num;
|
||||||
|
// console.log(this.comment_num);
|
||||||
this.is_edit = false;
|
this.is_edit = false;
|
||||||
if (res.data.data.pid) {
|
if (res.data.data.pid) {
|
||||||
this.commentList[this.comment_id].reply_count = true;
|
this.commentList[this.comment_id].reply_count = true;
|
||||||
@ -540,7 +561,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 评论滚动到底部
|
// 评论滚动到底部
|
||||||
scrollBottom(e) {
|
scrollBottom(e) {
|
||||||
this.page++;
|
|
||||||
this.getComment();
|
this.getComment();
|
||||||
},
|
},
|
||||||
// 跳转到商品
|
// 跳转到商品
|
||||||
|
@ -201,7 +201,7 @@ export default {
|
|||||||
showInvolvementUser: false, // 参团
|
showInvolvementUser: false, // 参团
|
||||||
involvemenGroupInfo: [], // 参团的人
|
involvemenGroupInfo: [], // 参团的人
|
||||||
groupbuyInfo: {}, // 秒杀详情
|
groupbuyInfo: {}, // 秒杀详情
|
||||||
spikeTime: '',
|
spikeTime: '00:00:00',
|
||||||
isSpike: false, // 是否超过秒杀时间
|
isSpike: false, // 是否超过秒杀时间
|
||||||
timer: '', // 秒杀时间定时器
|
timer: '', // 秒杀时间定时器
|
||||||
spec_id: '', // 规格 id, 下单用的
|
spec_id: '', // 规格 id, 下单用的
|
||||||
@ -360,7 +360,7 @@ export default {
|
|||||||
this.id = res.data.goods.pintuan_id;
|
this.id = res.data.goods.pintuan_id;
|
||||||
this.getGoodsDetails(this.id);
|
this.getGoodsDetails(this.id);
|
||||||
} else if(this.type == 3) {
|
} else if(this.type == 3) {
|
||||||
this.id = res.data.goods.groupbuy_id;
|
this.id = res.data.groupbuy_id;
|
||||||
this.getGoodsDetails(this.id);
|
this.getGoodsDetails(this.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -388,12 +388,12 @@ export default {
|
|||||||
groupbuy_id: id
|
groupbuy_id: id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.id = res.data.groupbuy_id;
|
// this.id = res.data.groupbuy_id;
|
||||||
this.groupbuyInfo = res.data.groupbuyInfo;
|
this.groupbuyInfo = res.data.groupbuyInfo;
|
||||||
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.goodsInfo.goods;
|
this.goodsInfo = res.data.goodsInfo.goods;
|
||||||
this.setSwiperList(res.data.goodsInfo.goods_image);
|
this.setSwiperList(res.data.goodsInfo.goods_image);
|
||||||
this.setSpikeTime(res.data.groupbuyInfo.groupbuy_endtime);
|
this.setSpikeTime(res.data.groupbuyInfo.groupbuy_starttime);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -423,7 +423,7 @@ export default {
|
|||||||
if(type == 'involvement') {
|
if(type == 'involvement') {
|
||||||
// const userId = uni.getStorageSync('user_info').member.member_id;
|
// const userId = uni.getStorageSync('user_info').member.member_id;
|
||||||
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
|
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
|
||||||
console.log(this.$store.state.pintuangroup_headid);
|
// console.log(this.$store.state.pintuangroup_headid);
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.id,
|
pintuan_id: this.id,
|
||||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
|
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
|
||||||
@ -492,6 +492,7 @@ export default {
|
|||||||
title = '秒杀商品详情';
|
title = '秒杀商品详情';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
title = '商品详情';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
@ -464,6 +464,8 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.name {
|
.name {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
.cart-info {
|
.cart-info {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<view class="price">¥{{ price }}</view>
|
<view class="price">¥{{ price }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay-view">
|
<view class="pay-view">
|
||||||
<u-radio-group v-model="pay_way" @change="radioGroupChange" size="16">
|
<u-radio-group v-model="pay_way" size="16">
|
||||||
<view v-for="(item, index) in payLiat" :key="index" class="pay-item">
|
<view v-for="(item, index) in payLiat" :key="index" class="pay-item">
|
||||||
<view class="pay-way">
|
<view class="pay-way">
|
||||||
<image :src="item.icon"></image>
|
<image :src="item.icon"></image>
|
||||||
@ -53,12 +53,6 @@ export default {
|
|||||||
this.order_id = option.order_id;
|
this.order_id = option.order_id;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
radioGroupChange(e) {
|
|
||||||
// console.log(e);
|
|
||||||
},
|
|
||||||
// getProvider() {
|
|
||||||
// uni.getProvider({service: 'payment'})
|
|
||||||
// },
|
|
||||||
payOrder(provider, orderInfo) {
|
payOrder(provider, orderInfo) {
|
||||||
let me = this;
|
let me = this;
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="name">全部秒杀</view>
|
<view class="name">全部秒杀</view>
|
||||||
<view class="time">
|
<view class="time">
|
||||||
<text class="num">{{ seckillTime.littleHour }}</text>
|
<text class="num">{{ seckillTime.littleHour || '00' }}</text>
|
||||||
<text class="mah">:</text>
|
<text class="mah">:</text>
|
||||||
<text class="num">00</text>
|
<text class="num">00</text>
|
||||||
<text class="mah">:</text>
|
<text class="mah">:</text>
|
||||||
<text class="num">00</text>
|
<text class="num">00</text>
|
||||||
<text>-</text>
|
<text>-</text>
|
||||||
<text class="num">{{ seckillTime.bigHour }}</text>
|
<text class="num">{{ seckillTime.bigHour || '00' }}</text>
|
||||||
<text class="mah">:</text>
|
<text class="mah">:</text>
|
||||||
<text class="num">00</text>
|
<text class="num">00</text>
|
||||||
<text class="mah">:</text>
|
<text class="mah">:</text>
|
||||||
@ -18,6 +18,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="spike-list">
|
<view class="spike-list">
|
||||||
<SpecialGoods v-for="(item, index) in spikeList" :key="index" :item="item" type='spike'></SpecialGoods>
|
<SpecialGoods v-for="(item, index) in spikeList" :key="index" :item="item" type='spike'></SpecialGoods>
|
||||||
|
<u-empty mode="list" v-if="!spikeList.length" :margin-top="240"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="coupon-swiper">
|
<view class="coupon-swiper">
|
||||||
<scroll-view scroll-x="true" class="classify-coupon">
|
<!-- <scroll-view scroll-x="true" class="classify-coupon">
|
||||||
<view v-for="(classify, index) in couponGroupList" :key="index" class="classify-item" :class="{ 'active': couponCurrent == index }" @click="couponTabsChange(index)">{{ classify.gc_name }}</view>
|
<view v-for="(classify, index) in couponGroupList" :key="index" class="classify-item" :class="{ 'active': couponCurrent == index }" @click="couponTabsChange(index)">{{ classify.gc_name }}</view>
|
||||||
</scroll-view>
|
</scroll-view> -->
|
||||||
<!-- <swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
|
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll">
|
||||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||||
@ -13,14 +14,14 @@
|
|||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper> -->
|
</swiper>
|
||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll" :style="{ height: swiperHeight }">
|
<!-- <scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll" :style="{ height: swiperHeight }">
|
||||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -67,13 +67,14 @@
|
|||||||
<view>创建时间:{{ orderInfo.add_time | date}}</view>
|
<view>创建时间:{{ orderInfo.add_time | date}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(orderstate) >= 0">
|
<view class="btn" v-if="['1', '2', '4', '6', '8'].indexOf(orderstate) >= 0">
|
||||||
<view class="cancel" v-if="(orderstate == '4' || orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
|
<view class="cancel" v-if="(orderstate == '4' || orderstate == '1') && orderInfo.is_refund == 1" @click="toOtherPage('RefundOrder')">申请退款</view>
|
||||||
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
|
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
|
||||||
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
|
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
|
||||||
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
|
<view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view>
|
||||||
|
<view class="payment" v-if="orderstate == '6' || orderstate == '8'" @click="payNow">立即支付</view>
|
||||||
<view class="service" v-if="orderstate == '7'">联系官方客服</view>
|
<view class="service" v-if="orderstate == '7'">联系官方客服</view>
|
||||||
<view class="submit" v-if="orderstate == '7'">提交官方审核</view>
|
<view class="submit" v-if="orderstate == '7'">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
@ -83,7 +84,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
orderstate: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付 7: 待退款 8: 已退款
|
orderstate: '',
|
||||||
s_object: {
|
s_object: {
|
||||||
'1': {
|
'1': {
|
||||||
text: '待收货',
|
text: '待收货',
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="tabs" :list="list" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
|
<!-- <u-tabs-swiper ref="tabs" :list="list" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper> -->
|
||||||
|
<u-tabs :list="list" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="26" :gutter="20" inactive-color="#333333"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom" class="order-scroll">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom" class="order-scroll">
|
||||||
<view>
|
<view v-if="orderList[index]">
|
||||||
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
<view class="item-container" v-for="order in orderList[index]" :key="order.order_id">
|
||||||
<OrderItem :order="order" @refreshOrderList="refreshOrderList" v-if="current != 4"></OrderItem>
|
<OrderItem :order="order" @refreshOrderList="refreshOrderList" v-if="current != 4"></OrderItem>
|
||||||
<TryOrderItem :order="order" @refreshOrderList="refreshOrderList" v-else></TryOrderItem>
|
<TryOrderItem :order="order" @refreshOrderList="refreshOrderList" v-else></TryOrderItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList[index] || !orderList[index].length"></u-empty>
|
||||||
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="current != 4 && orderList.length>3" class="order-loadmore"></u-loadmore>
|
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="current != 4 && (!orderList[index] || orderList[index].length>3)" class="order-loadmore"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -57,9 +58,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(value, origin) {
|
current(value, origin) {
|
||||||
if((origin == 4 && value != 4) || (value == 4 && origin != 4)) {
|
// this.orderList = [];
|
||||||
this.orderList = [];
|
|
||||||
}
|
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
// reload 重新请求列表 loadmore 往列表里添加
|
// reload 重新请求列表 loadmore 往列表里添加
|
||||||
if(value == 4) {
|
if(value == 4) {
|
||||||
@ -69,6 +68,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.refreshOrderList();
|
||||||
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
const current = option.current ? Number(option.current) : 0;
|
const current = option.current ? Number(option.current) : 0;
|
||||||
this.current = current;
|
this.current = current;
|
||||||
@ -131,23 +133,25 @@ export default {
|
|||||||
this.timer = true;
|
this.timer = true;
|
||||||
uni.stopPullDownRefresh(); // 结束刷新
|
uni.stopPullDownRefresh(); // 结束刷新
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(load == 'reload') this.orderList = res.data;
|
if(load == 'reload') this.orderList[this.current] = res.data;
|
||||||
else if(load == 'loadmore') this.orderList.push(...res.data);
|
else if(load == 'loadmore') this.orderList[this.current].push(...res.data);
|
||||||
}
|
|
||||||
return res.data.length;
|
|
||||||
},
|
|
||||||
// 售后
|
|
||||||
async getAfterSaleList({ load = 'loadmore' } = {}) {
|
|
||||||
const res = await this.$u.api.getAfterSaleList({
|
|
||||||
page: this.page,
|
|
||||||
})
|
|
||||||
this.timer = true;
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
if(load == 'reload') this.orderList = res.data;
|
|
||||||
else if(load == 'loadmore') this.orderList.push(...res.data);
|
|
||||||
}
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
|
// console.log(this.orderList);
|
||||||
return res.data.length;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
|
// 售后 废弃
|
||||||
|
// async getAfterSaleList({ load = 'loadmore' } = {}) {
|
||||||
|
// const res = await this.$u.api.getAfterSaleList({
|
||||||
|
// page: this.page,
|
||||||
|
// })
|
||||||
|
// this.timer = true;
|
||||||
|
// if(res.errCode == 0) {
|
||||||
|
// if(load == 'reload') this.orderList[this.current] = res.data;
|
||||||
|
// else if(load == 'loadmore') this.orderList[this.current].push(...res.data);
|
||||||
|
// }
|
||||||
|
// return res.data.length;
|
||||||
|
// },
|
||||||
// 试穿
|
// 试穿
|
||||||
async goodsTryOrderList({ load = 'loadmore' } = {}) {
|
async goodsTryOrderList({ load = 'loadmore' } = {}) {
|
||||||
const res = await this.$u.api.goodsTryOrderList({
|
const res = await this.$u.api.goodsTryOrderList({
|
||||||
@ -156,9 +160,10 @@ export default {
|
|||||||
uni.stopPullDownRefresh(); // 结束刷新
|
uni.stopPullDownRefresh(); // 结束刷新
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(load == 'reload') this.orderList = res.data.list;
|
if(load == 'reload') this.orderList[this.current] = res.data.list;
|
||||||
else if(load == 'loadmore') this.orderList.push(...res.data.list);
|
else if(load == 'loadmore') this.orderList[this.current].push(...res.data.list);
|
||||||
}
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
return res.data.list.length;
|
return res.data.list.length;
|
||||||
},
|
},
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
|
||||||
<scroll-view scroll-y class="scroll-coupon">
|
<scroll-view scroll-y class="scroll-coupon">
|
||||||
<view class="coupon-item" v-for="(coupon, c_index) in couponList" :key="c_index">
|
<view v-if="couponList[index]">
|
||||||
|
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
|
||||||
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
<Coupon :couponInfo="coupon" :status='index' :type="1" @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList.length"></u-empty>
|
</view>
|
||||||
|
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -59,10 +61,11 @@ export default {
|
|||||||
status: current
|
status: current
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.couponList = res.data;
|
this.couponList[this.current] = res.data;
|
||||||
} else {
|
} else {
|
||||||
this.couponList = [];
|
this.couponList[this.current] = [];
|
||||||
}
|
}
|
||||||
|
this.$forceUpdate();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
useCoupon(id) {
|
useCoupon(id) {
|
||||||
|
@ -20,20 +20,21 @@
|
|||||||
</view>
|
</view>
|
||||||
<swiper class="card" @change="dianji" :current="num">
|
<swiper class="card" @change="dianji" :current="num">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
<scroll-view style="width:100%;height:100%" scroll-y="true" lower-threshold="200" @scrolltolower="swiperBottom">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
|
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view>
|
<view>
|
||||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
<videoItem v-for="(item,id) in articleList.filter((_, index) => !(index&1))" :key="id" :item="item"
|
||||||
@getArticlelist="getArticlelist"></videoItem>
|
@getArticlelist="getArticlelist"></videoItem>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left:20rpx">
|
<view style="margin-left:20rpx">
|
||||||
<videoItem v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id" :item="item"
|
<videoItem v-for="(item,id) in articleList.filter((_, index) => index&1)" :key="id" :item="item"
|
||||||
@getArticlelist="getArticlelist"></videoItem>
|
@getArticlelist="getArticlelist"></videoItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-loadmore :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -55,7 +56,7 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="followBotton" lower-threshold="200">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="tuijian">
|
<view class="tuijian">
|
||||||
<view class="title" @click="toSearchPage">
|
<view class="title" @click="toSearchPage">
|
||||||
@ -74,9 +75,11 @@
|
|||||||
<view class="rec-list">
|
<view class="rec-list">
|
||||||
<view class="rec-box">
|
<view class="rec-box">
|
||||||
<!-- {{ fansList }} -->
|
<!-- {{ fansList }} -->
|
||||||
<videoItem isguanzhu="true" v-for="item in fansList" :key="item.article_id"
|
<view class="item">
|
||||||
:item="item"></videoItem>
|
<videoItem isguanzhu="true" v-for="(item,id) in fansList" :key="id" :item="item"></videoItem>
|
||||||
<view class="no-data" v-show="!fansList.length">您还没有关注哦,赶紧去点点关注!</view>
|
</view>
|
||||||
|
<view class="no-data" v-if="!fansList.length">您还没有关注哦,赶紧去点点关注!</view>
|
||||||
|
<u-loadmore v-else :status="status_1" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -182,14 +185,18 @@
|
|||||||
.rec-list {
|
.rec-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.rec-box {
|
.rec-box {
|
||||||
|
width: 100%;
|
||||||
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.no-data {
|
.no-data {
|
||||||
margin: 200rpx auto 0;
|
margin: 200rpx auto 0;
|
||||||
}
|
text-align: center;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
@ -215,12 +222,21 @@
|
|||||||
}],
|
}],
|
||||||
num: 0,
|
num: 0,
|
||||||
page: 0, // 0即第一页
|
page: 0, // 0即第一页
|
||||||
|
follow_page: 0, //
|
||||||
articleList: [],
|
articleList: [],
|
||||||
recommendList: [], // 推荐达人
|
recommendList: [], // 推荐达人
|
||||||
indexImageSwiper: [],
|
indexImageSwiper: [],
|
||||||
zhiboImageSwiper: [],
|
zhiboImageSwiper: [],
|
||||||
tabLiveLists: [],
|
tabLiveLists: [],
|
||||||
fansList: [], // 关注的发现列表
|
fansList: [], // 关注的发现列表
|
||||||
|
status: 'loadmore',
|
||||||
|
status_1: 'loadmore',
|
||||||
|
iconType: 'circle',
|
||||||
|
loadText: {
|
||||||
|
loadmore: '轻轻上拉',
|
||||||
|
loading: '努力加载中',
|
||||||
|
nomore: '实在没有了'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -230,6 +246,8 @@
|
|||||||
darenItem
|
darenItem
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.articleList = [];
|
||||||
|
this.page = 0;
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
},
|
},
|
||||||
@ -277,8 +295,9 @@
|
|||||||
this.$u.api.attentionMember({
|
this.$u.api.attentionMember({
|
||||||
member_id: member_id
|
member_id: member_id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
this.getRecommendList();
|
this.follow_page = 0;
|
||||||
|
this.getRecommendList(); // 关注列表
|
||||||
this.getFollowList(); // 刷新发现的列表
|
this.getFollowList(); // 刷新发现的列表
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -299,12 +318,16 @@
|
|||||||
}
|
}
|
||||||
// 状态请求
|
// 状态请求
|
||||||
if (this.num == 0) {
|
if (this.num == 0) {
|
||||||
|
this.page = 0;
|
||||||
|
this.status = "loadmore";
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
} else if (this.num == 1) {
|
} else if (this.num == 1) {
|
||||||
this.getZhiBoSwiper(); // 直播轮播
|
this.getZhiBoSwiper(); // 直播轮播
|
||||||
this.tabLiveList();
|
this.tabLiveList();
|
||||||
} else if (this.num == 2) {
|
} else if (this.num == 2) {
|
||||||
|
this.follow_page = 0;
|
||||||
|
this.status = "loadmore";
|
||||||
if (this.hasLogin) {
|
if (this.hasLogin) {
|
||||||
this.getFollowList(); // 关注列表
|
this.getFollowList(); // 关注列表
|
||||||
}
|
}
|
||||||
@ -317,13 +340,33 @@
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
is_video_img: 0, // 查询视频1 图文2 都查0
|
is_video_img: 0, // 查询视频1 图文2 都查0
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.status = "loading";
|
||||||
|
if (res.errCode == 0) {
|
||||||
// uni.stopPullDownRefresh();
|
// uni.stopPullDownRefresh();
|
||||||
// console.log('37647744ghj', res)
|
// console.log('37647744ghj', res)
|
||||||
if (res.errCode == 0) {
|
if (this.page == 0) {
|
||||||
this.articleList = res.data.list;
|
this.articleList = res.data.list;
|
||||||
|
this.status = "loadmore";
|
||||||
|
} else if (res.data.length == 0 && this.page > 0) {
|
||||||
|
this.status = "nomore";
|
||||||
|
} else {
|
||||||
|
this.articleList = this.articleList.concat(res.data.list);
|
||||||
|
}
|
||||||
|
this.page++;
|
||||||
|
} else {
|
||||||
|
this.status = "nomore"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 发现下拉加载
|
||||||
|
swiperBottom(e) {
|
||||||
|
this.getArticlelist();
|
||||||
|
// console.log(e);
|
||||||
|
},
|
||||||
|
followBotton(e) {
|
||||||
|
this.getFollowList();
|
||||||
|
// console.log(e);
|
||||||
|
},
|
||||||
// 达人列表
|
// 达人列表
|
||||||
getRecommendList() {
|
getRecommendList() {
|
||||||
this.$u.api.getRecommendList().then(res => {
|
this.$u.api.getRecommendList().then(res => {
|
||||||
@ -336,12 +379,24 @@
|
|||||||
// 关注发现列表
|
// 关注发现列表
|
||||||
getFollowList() {
|
getFollowList() {
|
||||||
this.$u.post("article/attentionArticleList",{
|
this.$u.post("article/attentionArticleList",{
|
||||||
page: 0,
|
page: this.follow_page,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.status_1 = "loading";
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
// uni.stopPullDownRefresh();
|
||||||
|
// console.log('37647744ghj', res)
|
||||||
|
if (this.follow_page == 0) {
|
||||||
this.fansList = res.data.list;
|
this.fansList = res.data.list;
|
||||||
|
this.status_1 = "loadmore";
|
||||||
|
} else if (res.data.list.length == 0 && this.follow_page > 0) {
|
||||||
|
this.status_1 = "nomore";
|
||||||
|
} else {
|
||||||
|
this.fansList = this.fansList.concat(res.data.list);
|
||||||
|
}
|
||||||
|
this.follow_page++;
|
||||||
|
} else {
|
||||||
|
this.status_1 = "nomore"
|
||||||
}
|
}
|
||||||
// console.log(res);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toSearchPage() {
|
toSearchPage() {
|
||||||
|
@ -226,9 +226,10 @@
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.shop {
|
.shop {
|
||||||
height: calc(100vh - var(--window-top));
|
height: calc(100% - var(--window-top));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #F0EDF1;
|
background-color: #F0EDF1;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
Loading…
Reference in New Issue
Block a user