loadmore 7.27
This commit is contained in:
parent
100f31c6f9
commit
6eabd3a575
@ -278,6 +278,17 @@ export default {
|
|||||||
searchwordlist() {
|
searchwordlist() {
|
||||||
return vm.$u.post('ShopSearch/searchwordlist')
|
return vm.$u.post('ShopSearch/searchwordlist')
|
||||||
},
|
},
|
||||||
|
saveGoodsTry({ member_name, member_mobile, area_info, address_detail, goods_id, num, store_id }) {
|
||||||
|
return vm.$u.post('Order/saveGoodsTry', {
|
||||||
|
member_name: member_name,
|
||||||
|
member_mobile: member_mobile,
|
||||||
|
area_info: area_info,
|
||||||
|
address_detail: address_detail,
|
||||||
|
goods_id: goods_id,
|
||||||
|
num: num,
|
||||||
|
store_id: store_id,
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,6 +240,10 @@ export default {
|
|||||||
getAfterSaleList({ page }) {
|
getAfterSaleList({ page }) {
|
||||||
return vm.$u.post('order/afterSaleList', { page: page });
|
return vm.$u.post('order/afterSaleList', { page: page });
|
||||||
},
|
},
|
||||||
|
// 试穿列表
|
||||||
|
goodsTryOrderList() {
|
||||||
|
return vm.$u.post('order/goodsTryOrderList');
|
||||||
|
},
|
||||||
// 订单详情
|
// 订单详情
|
||||||
getOrderInfo({ order_id }) {
|
getOrderInfo({ order_id }) {
|
||||||
return vm.$u.post('Order/orderInfo', { order_id: order_id });
|
return vm.$u.post('Order/orderInfo', { order_id: order_id });
|
||||||
|
@ -42,17 +42,6 @@ export default {
|
|||||||
// this.loadStatus = "nomore";
|
// this.loadStatus = "nomore";
|
||||||
// this.tpage--;
|
// this.tpage--;
|
||||||
// })
|
// })
|
||||||
// this.$parent.callback({ page: this.tpage }).then(length => {
|
|
||||||
// if(length == 0) {
|
|
||||||
// this.tpage--;
|
|
||||||
// this.status = 'nomore';
|
|
||||||
// } else {
|
|
||||||
// this.status = 'loading';
|
|
||||||
// }
|
|
||||||
// }).catch(() => {
|
|
||||||
// this.loadStatus = "nomore";
|
|
||||||
// this.tpage--;
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -96,6 +96,7 @@ export default {
|
|||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$emit("refreshOrderList", { reload: 'again' });
|
this.$emit("refreshOrderList", { reload: 'again' });
|
||||||
}
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
|
@ -14,12 +14,10 @@
|
|||||||
</swiper>
|
</swiper>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20"></u-loadmore>
|
||||||
<!-- <loadmore ref="loadmore" @callback="getGoodsRecommend" bgColor="#FFF" :page="page"></loadmore> -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import item from "./item";
|
import item from "./item";
|
||||||
import loadmore from "@/components/loadmore/index";
|
|
||||||
export default {
|
export default {
|
||||||
name:"list",
|
name:"list",
|
||||||
data() {
|
data() {
|
||||||
@ -36,10 +34,10 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
item,
|
item,
|
||||||
loadmore
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(index) {
|
current(index) {
|
||||||
|
this.page = 1;
|
||||||
const id = this.classifyList[index].gc_id;
|
const id = this.classifyList[index].gc_id;
|
||||||
this.getGoodsRecommend({gc_id: id});
|
this.getGoodsRecommend({gc_id: id});
|
||||||
}
|
}
|
||||||
@ -68,8 +66,6 @@ export default {
|
|||||||
this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
this.page--;
|
this.page--;
|
||||||
})
|
})
|
||||||
// this.$refs.loadmore.reachBottom();
|
|
||||||
// this.getGoodsRecommend(this.classifyList[this.current].gc_id);
|
|
||||||
},
|
},
|
||||||
getGoodsClassRecommend(gc_id) {
|
getGoodsClassRecommend(gc_id) {
|
||||||
this.$u.api.getGoodsClassRecommend().then(res => {
|
this.$u.api.getGoodsClassRecommend().then(res => {
|
||||||
@ -77,7 +73,6 @@ export default {
|
|||||||
// 初始化 current
|
// 初始化 current
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
this.classifyList = res.data.gc_recommend;
|
this.classifyList = res.data.gc_recommend;
|
||||||
// this.getGoodsRecommend(this.classifyList[0].gc_id);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="comment">
|
<scroll-view scroll-y class="comment" @scrolltolower="loadMore">
|
||||||
<view class="label-list">
|
<view class="label-list">
|
||||||
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + '}' }}</view>
|
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + '}' }}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -9,7 +9,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无评论" mode="list" v-if="!evalueList.length" margin-top="120" color="#333"></u-empty>
|
<u-empty text="暂无评论" mode="list" v-if="!evalueList.length" margin-top="120" color="#333"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<!-- 加载更多 -->
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#EEEBEE" margin-top="20" margin-bottom="20" v-if="evalueList.length >= 12"></u-loadmore>
|
||||||
|
</scroll-view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import comment from "@/components/comment/index";
|
import comment from "@/components/comment/index";
|
||||||
@ -21,6 +23,8 @@ export default {
|
|||||||
page: 0,
|
page: 0,
|
||||||
evalueList: [],
|
evalueList: [],
|
||||||
evaluateSpec: {},
|
evaluateSpec: {},
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -33,13 +37,31 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(value) {
|
current(value) {
|
||||||
this.getAllEvalue(value);
|
this.page = 0;
|
||||||
|
this.getAllEvalue({ type: value });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadMore() {
|
||||||
|
if(this.evalueList.length < 12) return false;
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getAllEvalue({ type: this.current, load: 'more' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
getEvaluateSpec() {
|
getEvaluateSpec() {
|
||||||
this.$u.api.getEvaluateSpec({
|
this.$u.api.getEvaluateSpec({
|
||||||
id: this.id
|
id: this.id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.evaluateSpec = res.data;
|
this.evaluateSpec = res.data;
|
||||||
@ -47,19 +69,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAllEvalue(type) {
|
async getAllEvalue({ type, load } = {}) {
|
||||||
let params = {
|
let params = {
|
||||||
goods_id: this.id,
|
goods_id: this.id,
|
||||||
page: this.page,
|
page: this.page,
|
||||||
}
|
}
|
||||||
if(type) Object.assign(params, { type: type });
|
if(type) Object.assign(params, { type: type });
|
||||||
this.$u.api.getAllEvalue(params).then(res => {
|
const res = await this.$u.api.getAllEvalue(params);
|
||||||
if(res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.evalueList = res.data;
|
if(load) this.evalueList.push(...res.data);
|
||||||
} else {
|
else this.evalueList = res.data;
|
||||||
this.evalueList = [];
|
} else {
|
||||||
}
|
this.evalueList = [];
|
||||||
})
|
}
|
||||||
|
return res.data.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -9,10 +9,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}件</view>
|
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}件</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right" v-if="!isSpike">
|
||||||
<view class="title">秒杀倒计时</view>
|
<view class="title">秒杀倒计时</view>
|
||||||
<view class="time">{{ spikeTime }}</view>
|
<view class="time">{{ spikeTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="right" v-else>
|
||||||
|
<view class="title">时间已结束</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="title u-line-2">
|
<view class="title u-line-2">
|
||||||
@ -139,7 +142,7 @@
|
|||||||
<image src="/static/image/common/19.png"></image>
|
<image src="/static/image/common/19.png"></image>
|
||||||
客服
|
客服
|
||||||
</view>
|
</view>
|
||||||
<view class="button" style="background:rgba(253,211,96,0.6);" v-if="goodsInfo.goods_try == 1">试穿试送</view>
|
<view class="button" style="background:rgba(253,211,96,0.6);" v-if="goodsInfo.goods_try == 1" @click="tryDress">试穿试送</view>
|
||||||
<view class="button" style="background:rgba(253,211,96,1);" @click="addCart">加入购物车</view>
|
<view class="button" style="background:rgba(253,211,96,1);" @click="addCart">加入购物车</view>
|
||||||
<view class="button" style="background:rgba(255,120,15,1);" @click="settlementOrder">立即购买</view>
|
<view class="button" style="background:rgba(255,120,15,1);" @click="settlementOrder">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
@ -190,6 +193,7 @@ export default {
|
|||||||
involvemenGroupInfo: [], // 参团的人
|
involvemenGroupInfo: [], // 参团的人
|
||||||
groupbuyInfo: {}, // 秒杀详情
|
groupbuyInfo: {}, // 秒杀详情
|
||||||
spikeTime: '',
|
spikeTime: '',
|
||||||
|
isSpike: false, // 是否超过秒杀时间
|
||||||
timer: '', // 秒杀时间定时器
|
timer: '', // 秒杀时间定时器
|
||||||
spec_id: '', // 规格 id, 下单用的
|
spec_id: '', // 规格 id, 下单用的
|
||||||
evaluate: {}, // 评价内容
|
evaluate: {}, // 评价内容
|
||||||
@ -272,6 +276,7 @@ export default {
|
|||||||
// const time = this.groupbuyInfo.groupbuy_endtime;
|
// const time = this.groupbuyInfo.groupbuy_endtime;
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
let spikeTime = time * 1000 - new Date().getTime();
|
let spikeTime = time * 1000 - new Date().getTime();
|
||||||
|
if(spikeTime <= 0) this.isSpike = true;
|
||||||
// 计算天数
|
// 计算天数
|
||||||
const days = Math.floor(spikeTime/(24*3600*1000));
|
const days = Math.floor(spikeTime/(24*3600*1000));
|
||||||
//计算出小时数
|
//计算出小时数
|
||||||
@ -363,6 +368,15 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 试穿
|
||||||
|
tryDress() {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pageB/triedDress/index',
|
||||||
|
params: {
|
||||||
|
id: this.id,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
* @description 下单 订单步骤1:展示结算数据
|
* @description 下单 订单步骤1:展示结算数据
|
||||||
* @params {Number} type 拼团或者开团
|
* @params {Number} type 拼团或者开团
|
||||||
|
260
pageB/triedDress/index.vue
Normal file
260
pageB/triedDress/index.vue
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
<template>
|
||||||
|
<view class="tried">
|
||||||
|
<view class="user-info">
|
||||||
|
<view>
|
||||||
|
<label for="name">试穿人:</label>
|
||||||
|
<input type="text" id="name" placeholder="" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<label for="phone">手机号:</label>
|
||||||
|
<input type="text" id="phone" placeholder="" maxlength="11" v-model="phone" />
|
||||||
|
</view>
|
||||||
|
<view class="area" @click="show=true">
|
||||||
|
<label for="address">省市区:</label>
|
||||||
|
<input type="text" id="address" placeholder="" v-model="address" disabled />
|
||||||
|
<view>
|
||||||
|
<image src="/static/image/mine/24.png"></image>
|
||||||
|
<text>定位</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<label for="area">详细地址:</label>
|
||||||
|
<input type="text" id="area" placeholder="" v-model="area" />
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<label for="time">预约时间:</label>
|
||||||
|
<input type="text" id="time" placeholder="" v-model="time" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="goods-container">
|
||||||
|
<view class="store">
|
||||||
|
<image :src="store.store_avatar"></image>
|
||||||
|
<text>{{ store.store_name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="goods">
|
||||||
|
<image :src="goodsInfo.goods_image"></image>
|
||||||
|
<view class="right">
|
||||||
|
<view class="name u-line-2">{{ goodsInfo.goods_name }}</view>
|
||||||
|
<u-number-box v-model="number" bg-color="#FFFFFF" :min="1" :input-width="38" :input-height="38" color="#FF780F"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="edit-btn" @click="confirmBtn">确认试穿</view>
|
||||||
|
<u-select v-model="show"
|
||||||
|
mode="mutil-column-auto"
|
||||||
|
:list="areaList"
|
||||||
|
value-name="area_id"
|
||||||
|
label-name="area_name"
|
||||||
|
child-name="_child"
|
||||||
|
@confirm="setArea">
|
||||||
|
</u-select>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
areaList: [],
|
||||||
|
checked: false, // 是否设为默认地址
|
||||||
|
name: '',
|
||||||
|
phone: '',
|
||||||
|
address: '', // 选择地址
|
||||||
|
area: '', // 详细地址
|
||||||
|
time: '',
|
||||||
|
number: 1, // 商品数量
|
||||||
|
area_id: '', // 地区id 省
|
||||||
|
city_id: '', // 城市id
|
||||||
|
goodsInfo: {},
|
||||||
|
store: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getAreaData();
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.ordinaryDetails(option.id);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
verification() {
|
||||||
|
if(this.$u.test.isEmpty(this.name)) {
|
||||||
|
this.$u.toast('姓名不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.phone)) {
|
||||||
|
this.$u.toast('手机号不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
|
this.$u.toast('请填写正确的新手机号');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.address)) {
|
||||||
|
this.$u.toast('地址不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.area)) {
|
||||||
|
this.$u.toast('详细地址不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
confirmBtn() {
|
||||||
|
if(!this.verification) return false;
|
||||||
|
this.$u.api.saveGoodsTry({
|
||||||
|
member_name: this.name,
|
||||||
|
member_mobile: this.phone,
|
||||||
|
area_info: this.address,
|
||||||
|
address_detail: this.area,
|
||||||
|
goods_id: this.goodsInfo.goods_id,
|
||||||
|
num: this.number,
|
||||||
|
store_id: this.store.store_id,
|
||||||
|
}).then((res)=>{
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
// this.$u.route({ type: 'navigateBack' });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAreaData() {
|
||||||
|
this.$u.api.getArea().then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.areaList = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setArea(area) {
|
||||||
|
// console.log(area);
|
||||||
|
this.area_id = area[0].value;
|
||||||
|
this.city_id = area[1].value;
|
||||||
|
let temp = '';
|
||||||
|
area.forEach(e => {
|
||||||
|
temp += e.label + ' ';
|
||||||
|
});
|
||||||
|
this.address = temp;
|
||||||
|
},
|
||||||
|
ordinaryDetails(id) {
|
||||||
|
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.goodsInfo = res.data.goods;
|
||||||
|
this.store = res.data.store;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.tried {
|
||||||
|
.user-info {
|
||||||
|
border-top: 1rpx solid rgba(235,235,235,1);
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 98rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-bottom: 2rpx solid rgba(235,235,235,1);
|
||||||
|
font-size: 30rpx;
|
||||||
|
> label {
|
||||||
|
width: 150rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
> input {
|
||||||
|
flex: 1;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.area {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
display: flex;
|
||||||
|
> input {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
> view {
|
||||||
|
margin-left: 30rpx;
|
||||||
|
width: 50rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: rgba(255,120,15,1);
|
||||||
|
> image {
|
||||||
|
width: 26rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goods-container {
|
||||||
|
padding: 30rpx;
|
||||||
|
.store {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
> image {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
background-color: antiquewhite;
|
||||||
|
}
|
||||||
|
> text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goods {
|
||||||
|
display: flex;
|
||||||
|
> image {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
background-color: aquamarine;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
.name {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
line-height: 44rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
/deep/ .u-numberbox {
|
||||||
|
border: 1rpx solid rgba(217,215,215,1);
|
||||||
|
.u-icon-minus, .u-icon-plus {
|
||||||
|
width: 38rpx;
|
||||||
|
.u-icon {
|
||||||
|
.u-icon__icon {
|
||||||
|
font-size: 11rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.u-number-input {
|
||||||
|
margin: 0;
|
||||||
|
border: 1rpx solid rgba(229,229,229,1) {
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-btn {
|
||||||
|
margin: 122rpx auto 0;
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255,119,15,1);
|
||||||
|
border-radius: 49rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color:rgba(255,255,255,1);
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -68,13 +68,13 @@
|
|||||||
<u-popup v-model="couponStatus" mode="bottom">
|
<u-popup v-model="couponStatus" mode="bottom">
|
||||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 1">
|
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 1">
|
||||||
<view class="title">优惠券详情</view>
|
<view class="title">优惠券详情</view>
|
||||||
<view class="text">店铺优惠券</view>
|
<view class="text">平台优惠券</view>
|
||||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
||||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length"></u-empty>
|
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 2">
|
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 2">
|
||||||
<view class="title">优惠券详情</view>
|
<view class="title">优惠券详情</view>
|
||||||
<view class="text">平台优惠券</view>
|
<view class="text">店铺优惠券</view>
|
||||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
||||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length"></u-empty>
|
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@ -121,7 +121,6 @@ export default {
|
|||||||
choiceCoupon: {}, // 使用的平台优惠券
|
choiceCoupon: {}, // 使用的平台优惠券
|
||||||
goodsClass: [],
|
goodsClass: [],
|
||||||
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
|
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -152,6 +151,8 @@ export default {
|
|||||||
this.getGoodsClass();
|
this.getGoodsClass();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.storeCoupon = {};
|
||||||
|
this.choiceCoupon = {};
|
||||||
// 判断是不是从选择地址页面返回
|
// 判断是不是从选择地址页面返回
|
||||||
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
||||||
this.$store.commit('updateAddress', this.orderInfo.address_info);
|
this.$store.commit('updateAddress', this.orderInfo.address_info);
|
||||||
@ -256,6 +257,7 @@ export default {
|
|||||||
this.$u.api.sendOrder(params).then(res => {
|
this.$u.api.sendOrder(params).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
|
type: 'redirect',
|
||||||
url: '/pageC/cart/cashier',
|
url: '/pageC/cart/cashier',
|
||||||
params: {
|
params: {
|
||||||
pay_sn: res.data.pay_sn,
|
pay_sn: res.data.pay_sn,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
||||||
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
|
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
|
||||||
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
||||||
<!-- <loadmore ref="loadmore" @callback="getPinTuanList" bgColor="#FFF"></loadmore> -->
|
<loadmore ref="loadmore" @callback="getPinTuanList" bgColor="#FFF"></loadmore>
|
||||||
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -39,8 +39,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(index) {
|
current(index) {
|
||||||
// console.log(this.tabList);
|
this.getPinTuanList({ id: this.tabList[index].gc_id });
|
||||||
this.getPinTuanList({id: this.tabList[index].gc_id });
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -81,20 +80,20 @@ export default {
|
|||||||
// scroll-view到底部加载更多
|
// scroll-view到底部加载更多
|
||||||
onreachBottom() {
|
onreachBottom() {
|
||||||
this.$$refs.loadmore.reachBottom();
|
this.$$refs.loadmore.reachBottom();
|
||||||
// if(!this.timer) return false;
|
if(!this.timer) return false;
|
||||||
// this.loadStatus = "loading";
|
this.loadStatus = "loading";
|
||||||
// this.page++;
|
this.page++;
|
||||||
// this.getPinTuanList().then(length => {
|
this.getPinTuanList().then(length => {
|
||||||
// if(length == 0) {
|
if(length == 0) {
|
||||||
// this.page--;
|
this.page--;
|
||||||
// this.status = 'nomore';
|
this.status = 'nomore';
|
||||||
// } else {
|
} else {
|
||||||
// this.status = 'loading';
|
this.status = 'loading';
|
||||||
// }
|
}
|
||||||
// }).catch(() => {
|
}).catch(() => {
|
||||||
// this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
// this.page--;
|
this.page--;
|
||||||
// })
|
})
|
||||||
},
|
},
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
|
@ -13,11 +13,25 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>'
|
nodes: '',
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getMemberPointsStat();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMemberPointsStat() {
|
||||||
|
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
const nodes = res.data.grade_rule;
|
||||||
|
this.nodes = common.unescapeHTML(nodes);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -34,6 +34,8 @@ export default {
|
|||||||
couponGroupList: [],
|
couponGroupList: [],
|
||||||
couponList: [],
|
couponList: [],
|
||||||
page: 0,
|
page: 0,
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -50,6 +52,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadMore(page) {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getGoodsRecommend({
|
||||||
|
gc_id: this.classifyList[this.current].gc_id,
|
||||||
|
page: this.page,
|
||||||
|
reload: false,
|
||||||
|
}).then(length => {
|
||||||
|
// console.log(length);
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
getGoodsClass() {
|
getGoodsClass() {
|
||||||
this.$u.api.getGoodsClass().then(res => {
|
this.$u.api.getGoodsClass().then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
|
@ -73,7 +73,7 @@ export default {
|
|||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
percentExp(value, rank) {
|
percentExp(value, rank) {
|
||||||
console.log(rank);
|
// console.log(rank);
|
||||||
let result = '0/0';
|
let result = '0/0';
|
||||||
if(rank) result = value + '/' + rank.max;
|
if(rank) result = value + '/' + rank.max;
|
||||||
return result;
|
return result;
|
||||||
@ -93,7 +93,7 @@ export default {
|
|||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.memberInfo = res.data;
|
this.memberInfo = res.data;
|
||||||
this.percent = (this.memberInfo.member_exppoints / this.rank[this.memberInfo.member_level - 1].max) * 100;
|
this.percent = (this.memberInfo.member_exppoints / this.rank[this.memberInfo.member_level - 1].max) * 100;
|
||||||
console.log(this.percent);
|
// console.log(this.percent);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -55,6 +55,13 @@ export default {
|
|||||||
this.page = 0;
|
this.page = 0;
|
||||||
// again 重新请求列表 不然往列表里添加
|
// again 重新请求列表 不然往列表里添加
|
||||||
value == 6 ? this.getAfterSaleList({ reload: 'again' }): this.getOrderList({ reload: 'again' });
|
value == 6 ? this.getAfterSaleList({ reload: 'again' }): this.getOrderList({ reload: 'again' });
|
||||||
|
if(value == 6) {
|
||||||
|
this.getAfterSaleList({ reload: 'again' });
|
||||||
|
} else if(value == 4) {
|
||||||
|
this.goodsTryOrderList({ reload: 'again' });
|
||||||
|
} else {
|
||||||
|
this.getOrderList({ reload: 'again' });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@ -113,6 +120,17 @@ export default {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
|
async goodsTryOrderList({ reload = '' } = {}) {
|
||||||
|
const res = await this.$u.api.goodsTryOrderList({
|
||||||
|
page: this.page,
|
||||||
|
})
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
if(reload) this.orderList = res.data;
|
||||||
|
else this.orderList.push(...res.data);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
},
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
// 大于15条才会加载更多
|
// 大于15条才会加载更多
|
||||||
if(this.orderList.length < 15) return false;
|
if(this.orderList.length < 15) return false;
|
||||||
@ -122,6 +140,7 @@ export default {
|
|||||||
this.page++;
|
this.page++;
|
||||||
let promise;
|
let promise;
|
||||||
if(this.current == 6) promise = this.getAfterSaleList();
|
if(this.current == 6) promise = this.getAfterSaleList();
|
||||||
|
else if(this.current == 4) promise = this.goodsTryOrderList();
|
||||||
else promise = this.getOrderList();
|
else promise = this.getOrderList();
|
||||||
promise.then(res => {
|
promise.then(res => {
|
||||||
this.loadStatus.splice(this.current, 1, "nomore");
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
|
@ -88,7 +88,6 @@ export default {
|
|||||||
this.toApplyPage(current);
|
this.toApplyPage(current);
|
||||||
},
|
},
|
||||||
toApplyPage(index) {
|
toApplyPage(index) {
|
||||||
console.log(index)
|
|
||||||
var that = this;
|
var that = this;
|
||||||
if(index == 1) {
|
if(index == 1) {
|
||||||
this.showPopup = false
|
this.showPopup = false
|
||||||
@ -175,7 +174,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.send-btn{
|
.send-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@ -183,7 +182,6 @@ export default {
|
|||||||
.btn{
|
.btn{
|
||||||
width: 154rpx;
|
width: 154rpx;
|
||||||
height: 54rpx;
|
height: 54rpx;
|
||||||
background: RGBA(255, 254, 255, 1);
|
|
||||||
border-radius: 49rpx;
|
border-radius: 49rpx;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
@ -131,7 +131,7 @@
|
|||||||
<swiper style="height: 1000px;" vertical="true">
|
<swiper style="height: 1000px;" vertical="true">
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y class="order-list">
|
<scroll-view scroll-y class="order-list">
|
||||||
<view v-for="(items, index) in 3" :key="items.index">
|
<view v-for="(items, index) in 3" :key="index">
|
||||||
<view class="store">
|
<view class="store">
|
||||||
<view>
|
<view>
|
||||||
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
|
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
|
||||||
|
11
pages.json
11
pages.json
@ -113,6 +113,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "triedDress/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "试穿订单",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"backgroundColor":"#ffffff"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "comment/index",
|
"path": "comment/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
Loading…
Reference in New Issue
Block a user