comment 8.1
This commit is contained in:
parent
865e2a741a
commit
854976c8f0
@ -3,7 +3,7 @@
|
||||
<view class="user">
|
||||
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
|
||||
<text class="name">{{ content.geval_frommembername }}</text>
|
||||
<u-rate v-if="reply" :disabled='true' count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
|
||||
<u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="text">{{ content.geval_content }}</view>
|
||||
@ -30,7 +30,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
count: 5,
|
||||
rate: 2,
|
||||
rate: 0,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -24,11 +24,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-btn" v-if="[1, 3, 4, 8].indexOf(order.view_type) >= 0">
|
||||
<view class="calcel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
||||
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
|
||||
<view class="cancel" v-if="order.view_type == 3 || order.view_type == 2" @click="applyRefund">申请退款</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="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
|
||||
<view class="calcel" 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)">立即支付</view>
|
||||
<view class="service" v-if="order.view_type == 8">联系官方客服</view>
|
||||
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
|
||||
@ -79,6 +80,9 @@ export default {
|
||||
}
|
||||
this.$u.toast(res.message);
|
||||
})
|
||||
},
|
||||
applyRefund() {
|
||||
|
||||
},
|
||||
confirmReceive() {
|
||||
this.$u.api.confirmReceive({
|
||||
@ -204,7 +208,7 @@ export default {
|
||||
.logistics, .comment, .payment {
|
||||
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
|
||||
}
|
||||
.calcel {
|
||||
.cancel {
|
||||
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
||||
}
|
||||
.service {
|
||||
|
@ -35,6 +35,9 @@ export default {
|
||||
// this.getAllEvalue();
|
||||
this.getEvaluateSpec();
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||
},
|
||||
watch: {
|
||||
current(value) {
|
||||
this.page = 0;
|
||||
|
@ -19,7 +19,8 @@
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title u-line-2">
|
||||
<text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
|
||||
<text class="store-name">{{ goodsInfo.store_name }}</text>
|
||||
<text class="goods-name">{{ goodsInfo.goods_name }}</text>
|
||||
</view>
|
||||
<view class="pic">
|
||||
<text>¥{{ goodsInfo.goods_price }}</text>
|
||||
@ -40,7 +41,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
|
||||
<view class="comment-none">暂无评价</view>
|
||||
<view class="comment-none" v-else>暂无评价</view>
|
||||
</view>
|
||||
<view class="hr"></view>
|
||||
<view class="group-user" v-if="groupUser.length">
|
||||
@ -227,6 +228,9 @@ export default {
|
||||
this.showGroupUser = false;
|
||||
this.showInvolvementUser = false;
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
@ -379,7 +383,7 @@ export default {
|
||||
},
|
||||
/*
|
||||
* @description 下单 订单步骤1:展示结算数据
|
||||
* @params {Number} type 拼团或者开团
|
||||
* @params {Number} type involvement 拼团或者 默认开团
|
||||
* @params {Number} num 数量
|
||||
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||
**/
|
||||
@ -553,8 +557,7 @@ export default {
|
||||
.title{
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 30rpx;
|
||||
line-height: 1.2;
|
||||
>text{
|
||||
.store-name {
|
||||
display: inline-block;
|
||||
padding: 8rpx 10rpx;
|
||||
margin: 0 10rpx 4rpx 0;
|
||||
@ -563,6 +566,10 @@ export default {
|
||||
color: #fff;
|
||||
border-radius: 30rpx;
|
||||
background-color: #FF780F;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.goods-name {
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.pic{
|
||||
|
@ -97,7 +97,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
if(!this.$u.test.mobile(this.phone)) {
|
||||
this.$u.toast('请填写正确的新手机号');
|
||||
this.$u.toast('请正确填写手机号');
|
||||
return false;
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.address)) {
|
||||
@ -116,6 +116,10 @@ export default {
|
||||
this.$u.toast('预约时间错误');
|
||||
return false;
|
||||
}
|
||||
if(this.number > this.goodsInfo.goods_storage) {
|
||||
this.$u.toast('库存不足');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
chooseDate(e) {
|
||||
@ -134,9 +138,17 @@ export default {
|
||||
store_id: this.store.store_id,
|
||||
appointment_time: new Date(this.time),
|
||||
}).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if (res.errCode == 0) {
|
||||
// this.$u.route({ type: 'navigateBack' });
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
back: true,
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -297,7 +297,7 @@ export default {
|
||||
},
|
||||
setTotalPrice() {
|
||||
const goods = this.orderInfo.store_goods_total;
|
||||
console.log(this.freight);
|
||||
// console.log(this.freight);
|
||||
const freight = this.freight;
|
||||
let price = 0;
|
||||
// 商品价格加上运费
|
||||
|
@ -73,6 +73,9 @@ export default {
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getCartList();
|
||||
},
|
||||
onShow() {
|
||||
this.getCartList();
|
||||
},
|
||||
@ -111,6 +114,7 @@ export default {
|
||||
getCartList() {
|
||||
this.$u.api.getCartTreeList().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
uni.stopPullDownRefresh();
|
||||
let list = res.data.store_cart_list;
|
||||
list.forEach((item, l_index) => {
|
||||
// 判断有无 checked 属性,如果有取值再赋值, 没有给默认值 false
|
||||
|
@ -113,7 +113,7 @@ export default {
|
||||
filePath: res.tempFilePaths[0]
|
||||
}).then(result => {
|
||||
// console.log(result);
|
||||
this.$set(this, 'avatar', result.file_path);
|
||||
// this.$set(this, 'avatar', result.file_path);
|
||||
// this.avatar = result.file_path;
|
||||
this.uploadPath = result.file_name;
|
||||
}, error => {
|
||||
@ -142,7 +142,7 @@ export default {
|
||||
userInfo.member_mobile,
|
||||
userInfo.member_birthday,
|
||||
userInfo.member_sex,
|
||||
userInfo.member_avatar,
|
||||
userInfo.member_avatar + '?' + new Date().getTime(),
|
||||
];
|
||||
}
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="information">
|
||||
<view class="info-avatar">
|
||||
<u-avatar :src="userInfo.member_avatar" :size="120"></u-avatar>
|
||||
<u-avatar :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="120"></u-avatar>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="title">昵称</view>
|
||||
|
@ -2,33 +2,7 @@
|
||||
<view class="comment">
|
||||
<view class="main-container">
|
||||
<view class="goods-comment" v-for="(goods, index) in goodsList" :key="index">
|
||||
<view class="goods-info">
|
||||
<image :src="goods.goods_image"></image>
|
||||
<view class="goods-text">
|
||||
<view class="goods-name u-line-1">{{ goods.goods_name }}</view>
|
||||
<!-- <view class="goods-spec u-line-1">{{ }}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="rate">
|
||||
<view class="title">描述相符</view>
|
||||
<u-rate :count="5" v-model="describe[index]" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
||||
</view>
|
||||
<u-input v-model="content[index]" type="textarea" height="100" :auto-height="true" placeholder="发表你的评价吧,收货时心情如何?" />
|
||||
<u-upload
|
||||
:ref="'upload' + index"
|
||||
:custom-btn="true"
|
||||
:max-count="count"
|
||||
:auto-upload="false"
|
||||
@on-uploaded="uploadImage"
|
||||
:action="action"
|
||||
:header="header"
|
||||
:form-data="formData"
|
||||
:name="fileName"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<image src="../static/mine/27.png"></image>
|
||||
</view>
|
||||
</u-upload>
|
||||
<CommentView :goods="goods" :index="index" @setLocalImage="setLocalImage" @setContent="setContent" @setDescribe="setDescribe"></CommentView>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-rate">
|
||||
@ -45,45 +19,60 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CommentView from './commentItem';
|
||||
import common from '@/static/js/common.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
count: 4, // 最大图片数量
|
||||
count: 3, // 最大图片数量
|
||||
logistics: 0, // 物流服务
|
||||
service: 0, // 服务态度
|
||||
action: this.$u.http.config.baseUrl + '/Upload/uploadfile', // 下面是上传图片的参数
|
||||
header: {
|
||||
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
||||
},
|
||||
fileName: 'common', // 与formData name 一样
|
||||
formData: {
|
||||
name: 'common', // 其他图片
|
||||
},
|
||||
describe: [],
|
||||
content: [],
|
||||
imageList: [],
|
||||
imageList: [], // 本地图片路径
|
||||
goodsList: [],
|
||||
imageIndex: 0, // 图片上传标识
|
||||
uploadImageList: [], // 线上图片名字
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
// this.init();
|
||||
// this.getOrderInfo();
|
||||
components: {
|
||||
CommentView
|
||||
},
|
||||
onLoad(option) {
|
||||
this.orderId = option.oid;
|
||||
this.getOrderInfo(option.oid);
|
||||
},
|
||||
methods: {
|
||||
uploadImage(lists) {
|
||||
let imageList = [];
|
||||
lists.forEach(res => {
|
||||
if(res.response.errCode == 0) imageList.push(res.response.data.file_name);
|
||||
})
|
||||
this.imageList[this.imageIndex] = imageList;
|
||||
if(this.imageIndex == this.goodsList.length - 1) this.addOrderEvaluate();
|
||||
setLocalImage({ list, index }) {
|
||||
this.imageList[index] = list;
|
||||
},
|
||||
setContent({ content, index }) {
|
||||
this.content[index] = content;
|
||||
},
|
||||
setDescribe({ describe, index }) {
|
||||
this.describe[index] = describe;
|
||||
},
|
||||
uploadImage() {
|
||||
let allPromise = [];
|
||||
this.imageList.forEach((img, index) => {
|
||||
this.uploadImageList[index] = [];
|
||||
img.forEach(filePath => {
|
||||
let promise = common.uploadFile({
|
||||
url: this.$u.http.config.baseUrl + '/Upload/uploadfile',
|
||||
name: 'common',
|
||||
filePath: filePath,
|
||||
})
|
||||
promise.then(result => {
|
||||
this.uploadImageList[index].push(result.file_name);
|
||||
})
|
||||
allPromise.push(promise);
|
||||
})
|
||||
})
|
||||
Promise.all(allPromise).then(() => {
|
||||
this.addOrderEvaluate();
|
||||
})
|
||||
},
|
||||
// 设初始值
|
||||
setModelKey(data) {
|
||||
data.forEach(() => {
|
||||
this.content.push('');
|
||||
@ -96,8 +85,39 @@ export default {
|
||||
order_id: id,
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
// this.goodsList = res.data.extend_order_goods;
|
||||
this.goodsList = [1,2];
|
||||
this.goodsList = res.data.extend_order_goods;
|
||||
// this.goodsList = [{
|
||||
// "rec_id": 14,
|
||||
// "order_id": 13,
|
||||
// "goods_id": 39,
|
||||
// "goods_name": "自然堂 水润保湿两件套 补水保湿套装",
|
||||
// "goods_price": "69.40",
|
||||
// "goods_num": 1,
|
||||
// "goods_image": "1_2017092202443553519.jpg",
|
||||
// "goods_pay_price": "43.40",
|
||||
// "store_id": 1,
|
||||
// "buyer_id": 3,
|
||||
// "goods_type": "1",
|
||||
// "promotions_id": 0,
|
||||
// "commis_rate": 0,
|
||||
// "gc_id": 30
|
||||
// },
|
||||
// {
|
||||
// "rec_id": 13,
|
||||
// "order_id": 13,
|
||||
// "goods_id": 113,
|
||||
// "goods_name": "舒思盾经络按摩仪数码家用多功能针灸穴位电子理疗腰椎颈椎电疗仪",
|
||||
// "goods_price": "168.00",
|
||||
// "goods_num": 1,
|
||||
// "goods_image": "1_2017092901414663050.jpg",
|
||||
// "goods_pay_price": "106.00",
|
||||
// "store_id": 1,
|
||||
// "buyer_id": 3,
|
||||
// "goods_type": "1",
|
||||
// "promotions_id": 0,
|
||||
// "commis_rate": 0,
|
||||
// "gc_id": 72
|
||||
// }];
|
||||
this.setModelKey(this.goodsList);
|
||||
}
|
||||
})
|
||||
@ -112,25 +132,19 @@ export default {
|
||||
return true;
|
||||
},
|
||||
submitComment() {
|
||||
this.goodsList.forEach((_, index) => {
|
||||
this.imageIndex = index;
|
||||
const upload = 'upload' + index;
|
||||
this.$refs[upload][0].upload();
|
||||
// console.log(this.content);
|
||||
// console.log(this.describe);
|
||||
// console.log(this.imageList);
|
||||
this.uploadImage();
|
||||
// this.goodsList.forEach((_, index) => {
|
||||
|
||||
})
|
||||
// let i = 0;
|
||||
// while(JSON.stringify(this.imageList[this.imageIndex]) != '[]' && i <= this.goodsList.length) {
|
||||
// this.imageIndex = i;
|
||||
// const upload = 'upload' + index;
|
||||
// this.$refs[upload][0].upload();
|
||||
// i++;
|
||||
// }
|
||||
// })
|
||||
},
|
||||
addOrderEvaluate() {
|
||||
if(!this.verifyParams()) return false;
|
||||
let files = [];
|
||||
console.log(this.imageList);
|
||||
this.imageList.forEach((item, index) => {
|
||||
// console.log(this.uploadImageList);
|
||||
this.uploadImageList.forEach((item, index) => {
|
||||
files[index] = '';
|
||||
// console.log(item);
|
||||
item.forEach((img, idx) => {
|
||||
@ -149,10 +163,10 @@ export default {
|
||||
scores_three: this.describe,
|
||||
file: files,
|
||||
};
|
||||
// console.log(params);
|
||||
// this.$u.api.updateOrderEvaluate(params).then(res => {
|
||||
// this.$u.toast(res.message);
|
||||
// })
|
||||
console.log(params);
|
||||
this.$u.api.updateOrderEvaluate(params).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -68,7 +68,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(state) >= 0">
|
||||
<view class="cancel" v-if="state == '4' || state == '1' " @click="applyRefund">申请退款</view>
|
||||
<view class="cancel" v-if="state == '4' || state == '1'" @click="applyRefund">申请退款</view>
|
||||
<view class="cancel" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||
<view class="logistics" v-if="state == '1'" @click="confirmReceive">确认收货</view>
|
||||
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||
|
138
pageE/order/commentItem.vue
Normal file
138
pageE/order/commentItem.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view class="comment-item-view">
|
||||
<view class="view-container">
|
||||
<view class="goods-info">
|
||||
<image :src="goods.goods_image"></image>
|
||||
<view class="goods-text">
|
||||
<view class="goods-name u-line-1">{{ goods.goods_name }}</view>
|
||||
<!-- <view class="goods-spec u-line-1">{{ }}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="rate">
|
||||
<view class="title">描述相符</view>
|
||||
<u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
||||
</view>
|
||||
<u-input v-model="content" type="textarea" height="100" :auto-height="true" placeholder="发表你的评价吧,收货时心情如何?" />
|
||||
<u-upload
|
||||
:ref="'upload' + index"
|
||||
:custom-btn="true"
|
||||
:max-count="count"
|
||||
:auto-upload="false"
|
||||
:action="action"
|
||||
:header="header"
|
||||
:form-data="formData"
|
||||
:name="fileName"
|
||||
@on-list-change="setImageList"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<image src="../static/mine/27.png"></image>
|
||||
</view>
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
count: 3,
|
||||
action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
|
||||
header: {
|
||||
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
||||
},
|
||||
fileName: 'common', // 与formData name 一样
|
||||
formData: {
|
||||
name: 'common', // 其他图片
|
||||
},
|
||||
content: '',
|
||||
describe: '',
|
||||
imageList: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
goods: Object,
|
||||
index: Number
|
||||
},
|
||||
watch: {
|
||||
content(value) {
|
||||
this.$emit('setContent', { content: value, index: this.index });
|
||||
},
|
||||
describe(value) {
|
||||
this.$emit('setDescribe', { describe: value, index: this.index });
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
setImageList(lists) {
|
||||
// console.log(lists);
|
||||
this.imageList = [];
|
||||
lists.forEach(item => {
|
||||
this.imageList.push(item.url);
|
||||
})
|
||||
console.log(this.imageList);
|
||||
this.$emit('setLocalImage', { list: this.imageList, index: this.index });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.comment-item-view {
|
||||
.view-container {
|
||||
.goods-info {
|
||||
display: flex;
|
||||
margin-bottom: 40rpx;
|
||||
> image {
|
||||
width: 113rpx;
|
||||
height: 106rpx;
|
||||
border-radius: 5rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: antiquewhite;
|
||||
}
|
||||
.goods-text {
|
||||
.goods-name {
|
||||
width: 530rpx;
|
||||
font-size: 28rpx;
|
||||
color: rgba(0,0,51,1);
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.goods-spec {
|
||||
max-width: 300rpx;
|
||||
box-sizing: content-box;
|
||||
padding: 10rpx 15rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgba(153,153,153,1);
|
||||
background:rgba(236,236,236,1);
|
||||
border-radius: 6rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
textarea {
|
||||
width: 100% !important;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.slot-btn {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
background: rgba(236,236,236,1);
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
> image {
|
||||
margin-top: 48rpx;
|
||||
width: 54rpx;
|
||||
height: 49rpx;
|
||||
}
|
||||
}
|
||||
.rate {
|
||||
display: flex;
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 35rpx;
|
||||
}
|
||||
.title {
|
||||
margin-right: 25rpx;
|
||||
font-size: 28rpx;
|
||||
color: rgba(51,51,51,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -16,7 +16,7 @@
|
||||
<view class="order-name">美甲人姓名:{{ item.manicure_name }}</view>
|
||||
<view class="order-date">时间:{{ item.manicure_time | dateFormat }}</view>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@ -32,6 +32,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 1,
|
||||
list: [{
|
||||
name: '我的订单'
|
||||
}, {
|
||||
@ -42,18 +43,16 @@ export default {
|
||||
page: 1,
|
||||
orderList: [],
|
||||
loadStatus: 'loadmore',
|
||||
timer: true,
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
onShow() {
|
||||
this.current = 0;
|
||||
this.swiperCurrent = 0;
|
||||
this.getManicureList().then(order => {
|
||||
// console.log(order);
|
||||
|
||||
this.orderList = this.orderList.concat(order);
|
||||
// console.log(this.orderList);
|
||||
|
||||
});
|
||||
this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
filters: {
|
||||
dateFormat(value) {
|
||||
@ -66,27 +65,33 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getManicureList() {
|
||||
let res = await this.$u.api.getManicureList({
|
||||
async getManicureList({ load }) {
|
||||
const res = await this.$u.api.getManicureList({
|
||||
page: this.page
|
||||
})
|
||||
uni.stopPullDownRefresh();
|
||||
this.timer = true;
|
||||
if (res.errCode == 0) {
|
||||
return res.data.list;
|
||||
if(load == 'reload') this.orderList = res.data.list;
|
||||
else if(load == 'loadmore') this.orderList.push(...res.data.list);
|
||||
}
|
||||
return res.data.list.length;
|
||||
},
|
||||
// 加载更多
|
||||
reachBottom() {
|
||||
// 修改当前的 loadStatus
|
||||
if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getManicureList().then(order => {
|
||||
if (!order.length) {
|
||||
// 如果没有数据page-1
|
||||
this.getManicureList({ load: 'loadmore' }).then(length => {
|
||||
if(length == 0) {
|
||||
this.page--;
|
||||
this.loadStatus = "nomore";
|
||||
this.loadStatus = 'nomore';
|
||||
} else {
|
||||
this.orderList = this.orderList.concat(order);
|
||||
this.loadStatus = 'loading';
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loadStatus = "nomore";
|
||||
this.page--;
|
||||
})
|
||||
},
|
||||
tabsChange(index) {
|
||||
|
25
pages.json
25
pages.json
@ -115,7 +115,16 @@
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"app-plus":{
|
||||
"titleNView":{
|
||||
"backgroundColor":"#ffffff"
|
||||
"backgroundColor":"#ffffff",
|
||||
"buttons": [
|
||||
{
|
||||
"type":"none",
|
||||
"text":"\ue636",
|
||||
"float":"right",
|
||||
"fontSize":"18",
|
||||
"fontSrc": "/static/fonts/cart.ttf"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,7 +146,16 @@
|
||||
"navigationBarTitleText": "商品评价",
|
||||
"app-plus":{
|
||||
"titleNView":{
|
||||
"backgroundColor":"#ffffff"
|
||||
"backgroundColor":"#ffffff",
|
||||
"buttons": [
|
||||
{
|
||||
"type":"none",
|
||||
"text":"\ue636",
|
||||
"float":"right",
|
||||
"fontSize":"18",
|
||||
"fontSrc": "/static/fonts/cart.ttf"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -241,6 +259,7 @@
|
||||
{
|
||||
"path": "cart/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "购物车",
|
||||
"app-plus": {
|
||||
"titleSize": "36px",
|
||||
@ -608,6 +627,7 @@
|
||||
{
|
||||
"path": "tool/Manicure",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "美甲",
|
||||
"app-plus": {
|
||||
"titleSize": "36px",
|
||||
@ -916,6 +936,7 @@
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
@ -224,6 +224,9 @@
|
||||
this.getZhiBoSwiper();
|
||||
this.tabLiveList();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// this.getManicureList({ load: 'reload' });
|
||||
},
|
||||
methods: {
|
||||
tabLiveList() {
|
||||
this.$u.api.tabLiveList().then((res) => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<view class="mine">
|
||||
<view class="mine-top">
|
||||
<view class="top">
|
||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :size="110"></u-avatar>
|
||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
|
||||
<view class="user-info">
|
||||
<view class="info-left">
|
||||
<view class="user-nickname">{{ userInfo.member_nickname }}</view>
|
||||
@ -68,13 +68,13 @@
|
||||
<view>试穿试送</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=5')">
|
||||
<image src="/static/image/mine/3.png"></image>
|
||||
<view>待评价</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=6')">
|
||||
<image src="/static/image/mine/9.png"></image>
|
||||
<view>售后</view>
|
||||
</view>
|
||||
<view @click="toOtherPage('/order/Index?current=6')">
|
||||
<image src="/static/image/mine/3.png"></image>
|
||||
<view>待评价</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tool">
|
||||
|
@ -45,7 +45,9 @@
|
||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||
<!-- 拼团列表 -->
|
||||
<group></group>
|
||||
<image class="lingquan"></image>
|
||||
<view class="activity-view">
|
||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||
</view>
|
||||
<youhq></youhq>
|
||||
<list ref="recommendGoods"></list>
|
||||
<view class="cart" @click="toCartPage">
|
||||
@ -87,12 +89,14 @@
|
||||
seckillTime: {}, // 秒杀时间
|
||||
// couponGroupList: [], // 优惠券拼团分类
|
||||
pinTuanPush: {}, // 拼团推荐
|
||||
activityInfo: {},
|
||||
areaList: [], // 位置信息
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getShopTopList();
|
||||
this.getLocation(); // 获取定位
|
||||
this.getStoreActivity();
|
||||
// this.area = uni.getStorageSync("address") || "请选择";
|
||||
},
|
||||
onShow() {
|
||||
@ -195,6 +199,25 @@
|
||||
url: '/pageC/classify/index'
|
||||
});
|
||||
},
|
||||
getStoreActivity() {
|
||||
this.$u.api.getStoreActivity().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.activityInfo = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
activityLink({ type, id }) {
|
||||
if(type == 0 || type == 2) return false;
|
||||
// type 1 商品详情页, 2 店铺详情页
|
||||
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
||||
let params = { id: id };
|
||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||
if(type == 1) Object.assign(params, { type: 1 });
|
||||
this.$u.route({
|
||||
url: url,
|
||||
params: params
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -291,12 +314,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.activity-view {
|
||||
padding: 20rpx 30rpx;
|
||||
text-align: center;
|
||||
.lingquan {
|
||||
width: 750rpx;
|
||||
height: 177rpx;
|
||||
margin-left: -33rpx;
|
||||
margin-top: 29rpx;
|
||||
background-color: #ececec;
|
||||
width: 688rpx;
|
||||
height: 138rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cart {
|
||||
|
BIN
static/fonts/cart.ttf
Normal file
BIN
static/fonts/cart.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user