comment 8.1
This commit is contained in:
parent
865e2a741a
commit
854976c8f0
@ -3,7 +3,7 @@
|
|||||||
<view class="user">
|
<view class="user">
|
||||||
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
|
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
|
||||||
<text class="name">{{ content.geval_frommembername }}</text>
|
<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>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="text">{{ content.geval_content }}</view>
|
<view class="text">{{ content.geval_content }}</view>
|
||||||
@ -30,7 +30,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
count: 5,
|
count: 5,
|
||||||
rate: 2,
|
rate: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -24,11 +24,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" v-if="[1, 3, 4, 8].indexOf(order.view_type) >= 0">
|
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
|
||||||
<view class="calcel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
<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="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="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="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="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>
|
||||||
@ -79,6 +80,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
applyRefund() {
|
||||||
|
|
||||||
},
|
},
|
||||||
confirmReceive() {
|
confirmReceive() {
|
||||||
this.$u.api.confirmReceive({
|
this.$u.api.confirmReceive({
|
||||||
@ -204,7 +208,7 @@ export default {
|
|||||||
.logistics, .comment, .payment {
|
.logistics, .comment, .payment {
|
||||||
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
|
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
|
||||||
}
|
}
|
||||||
.calcel {
|
.cancel {
|
||||||
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
||||||
}
|
}
|
||||||
.service {
|
.service {
|
||||||
|
@ -35,6 +35,9 @@ export default {
|
|||||||
// this.getAllEvalue();
|
// this.getAllEvalue();
|
||||||
this.getEvaluateSpec();
|
this.getEvaluateSpec();
|
||||||
},
|
},
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(value) {
|
current(value) {
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="title u-line-2">
|
<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>
|
||||||
<view class="pic">
|
<view class="pic">
|
||||||
<text>¥{{ goodsInfo.goods_price }}</text>
|
<text>¥{{ goodsInfo.goods_price }}</text>
|
||||||
@ -40,7 +41,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
|
<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>
|
||||||
<view class="hr"></view>
|
<view class="hr"></view>
|
||||||
<view class="group-user" v-if="groupUser.length">
|
<view class="group-user" v-if="groupUser.length">
|
||||||
@ -227,6 +228,9 @@ export default {
|
|||||||
this.showGroupUser = false;
|
this.showGroupUser = false;
|
||||||
this.showInvolvementUser = false;
|
this.showInvolvementUser = false;
|
||||||
},
|
},
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||||
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
},
|
},
|
||||||
@ -379,7 +383,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* @description 下单 订单步骤1:展示结算数据
|
* @description 下单 订单步骤1:展示结算数据
|
||||||
* @params {Number} type 拼团或者开团
|
* @params {Number} type involvement 拼团或者 默认开团
|
||||||
* @params {Number} num 数量
|
* @params {Number} num 数量
|
||||||
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||||
**/
|
**/
|
||||||
@ -553,8 +557,7 @@ export default {
|
|||||||
.title{
|
.title{
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
line-height: 1.2;
|
.store-name {
|
||||||
>text{
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 8rpx 10rpx;
|
padding: 8rpx 10rpx;
|
||||||
margin: 0 10rpx 4rpx 0;
|
margin: 0 10rpx 4rpx 0;
|
||||||
@ -563,6 +566,10 @@ export default {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
background-color: #FF780F;
|
background-color: #FF780F;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.goods-name {
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pic{
|
.pic{
|
||||||
|
@ -97,7 +97,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!this.$u.test.mobile(this.phone)) {
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
this.$u.toast('请填写正确的新手机号');
|
this.$u.toast('请正确填写手机号');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.address)) {
|
if(this.$u.test.isEmpty(this.address)) {
|
||||||
@ -116,6 +116,10 @@ export default {
|
|||||||
this.$u.toast('预约时间错误');
|
this.$u.toast('预约时间错误');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(this.number > this.goodsInfo.goods_storage) {
|
||||||
|
this.$u.toast('库存不足');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
chooseDate(e) {
|
chooseDate(e) {
|
||||||
@ -134,9 +138,17 @@ export default {
|
|||||||
store_id: this.store.store_id,
|
store_id: this.store.store_id,
|
||||||
appointment_time: new Date(this.time),
|
appointment_time: new Date(this.time),
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$u.toast(res.message);
|
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// this.$u.route({ type: 'navigateBack' });
|
// 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() {
|
setTotalPrice() {
|
||||||
const goods = this.orderInfo.store_goods_total;
|
const goods = this.orderInfo.store_goods_total;
|
||||||
console.log(this.freight);
|
// console.log(this.freight);
|
||||||
const freight = this.freight;
|
const freight = this.freight;
|
||||||
let price = 0;
|
let price = 0;
|
||||||
// 商品价格加上运费
|
// 商品价格加上运费
|
||||||
|
@ -73,6 +73,9 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getCartList();
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getCartList();
|
this.getCartList();
|
||||||
},
|
},
|
||||||
@ -111,6 +114,7 @@ export default {
|
|||||||
getCartList() {
|
getCartList() {
|
||||||
this.$u.api.getCartTreeList().then(res => {
|
this.$u.api.getCartTreeList().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
let list = res.data.store_cart_list;
|
let list = res.data.store_cart_list;
|
||||||
list.forEach((item, l_index) => {
|
list.forEach((item, l_index) => {
|
||||||
// 判断有无 checked 属性,如果有取值再赋值, 没有给默认值 false
|
// 判断有无 checked 属性,如果有取值再赋值, 没有给默认值 false
|
||||||
|
@ -113,7 +113,7 @@ export default {
|
|||||||
filePath: res.tempFilePaths[0]
|
filePath: res.tempFilePaths[0]
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
this.$set(this, 'avatar', result.file_path);
|
// this.$set(this, 'avatar', result.file_path);
|
||||||
// this.avatar = result.file_path;
|
// this.avatar = result.file_path;
|
||||||
this.uploadPath = result.file_name;
|
this.uploadPath = result.file_name;
|
||||||
}, error => {
|
}, error => {
|
||||||
@ -142,7 +142,7 @@ export default {
|
|||||||
userInfo.member_mobile,
|
userInfo.member_mobile,
|
||||||
userInfo.member_birthday,
|
userInfo.member_birthday,
|
||||||
userInfo.member_sex,
|
userInfo.member_sex,
|
||||||
userInfo.member_avatar,
|
userInfo.member_avatar + '?' + new Date().getTime(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="information">
|
<view class="information">
|
||||||
<view class="info-avatar">
|
<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>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">昵称</view>
|
<view class="title">昵称</view>
|
||||||
|
@ -2,33 +2,7 @@
|
|||||||
<view class="comment">
|
<view class="comment">
|
||||||
<view class="main-container">
|
<view class="main-container">
|
||||||
<view class="goods-comment" v-for="(goods, index) in goodsList" :key="index">
|
<view class="goods-comment" v-for="(goods, index) in goodsList" :key="index">
|
||||||
<view class="goods-info">
|
<CommentView :goods="goods" :index="index" @setLocalImage="setLocalImage" @setContent="setContent" @setDescribe="setDescribe"></CommentView>
|
||||||
<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>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-rate">
|
<view class="order-rate">
|
||||||
@ -45,45 +19,60 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import CommentView from './commentItem';
|
||||||
|
import common from '@/static/js/common.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
orderId: '',
|
orderId: '',
|
||||||
count: 4, // 最大图片数量
|
count: 3, // 最大图片数量
|
||||||
logistics: 0, // 物流服务
|
logistics: 0, // 物流服务
|
||||||
service: 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: [],
|
describe: [],
|
||||||
content: [],
|
content: [],
|
||||||
imageList: [],
|
imageList: [], // 本地图片路径
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
imageIndex: 0, // 图片上传标识
|
uploadImageList: [], // 线上图片名字
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
components: {
|
||||||
// this.init();
|
CommentView
|
||||||
// this.getOrderInfo();
|
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.orderId = option.oid;
|
this.orderId = option.oid;
|
||||||
this.getOrderInfo(option.oid);
|
this.getOrderInfo(option.oid);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
uploadImage(lists) {
|
setLocalImage({ list, index }) {
|
||||||
let imageList = [];
|
this.imageList[index] = list;
|
||||||
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();
|
|
||||||
},
|
},
|
||||||
|
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) {
|
setModelKey(data) {
|
||||||
data.forEach(() => {
|
data.forEach(() => {
|
||||||
this.content.push('');
|
this.content.push('');
|
||||||
@ -96,8 +85,39 @@ export default {
|
|||||||
order_id: id,
|
order_id: id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// this.goodsList = res.data.extend_order_goods;
|
this.goodsList = res.data.extend_order_goods;
|
||||||
this.goodsList = [1,2];
|
// 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);
|
this.setModelKey(this.goodsList);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -112,25 +132,19 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
submitComment() {
|
submitComment() {
|
||||||
this.goodsList.forEach((_, index) => {
|
// console.log(this.content);
|
||||||
this.imageIndex = index;
|
// console.log(this.describe);
|
||||||
const upload = 'upload' + index;
|
// console.log(this.imageList);
|
||||||
this.$refs[upload][0].upload();
|
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() {
|
addOrderEvaluate() {
|
||||||
if(!this.verifyParams()) return false;
|
if(!this.verifyParams()) return false;
|
||||||
let files = [];
|
let files = [];
|
||||||
console.log(this.imageList);
|
// console.log(this.uploadImageList);
|
||||||
this.imageList.forEach((item, index) => {
|
this.uploadImageList.forEach((item, index) => {
|
||||||
files[index] = '';
|
files[index] = '';
|
||||||
// console.log(item);
|
// console.log(item);
|
||||||
item.forEach((img, idx) => {
|
item.forEach((img, idx) => {
|
||||||
@ -149,10 +163,10 @@ export default {
|
|||||||
scores_three: this.describe,
|
scores_three: this.describe,
|
||||||
file: files,
|
file: files,
|
||||||
};
|
};
|
||||||
// console.log(params);
|
console.log(params);
|
||||||
// this.$u.api.updateOrderEvaluate(params).then(res => {
|
this.$u.api.updateOrderEvaluate(params).then(res => {
|
||||||
// this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
// })
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(state) >= 0">
|
<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="cancel" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="logistics" v-if="state == '1'" @click="confirmReceive">确认收货</view>
|
<view class="logistics" v-if="state == '1'" @click="confirmReceive">确认收货</view>
|
||||||
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</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-name">美甲人姓名:{{ item.manicure_name }}</view>
|
||||||
<view class="order-date">时间:{{ item.manicure_time | dateFormat }}</view>
|
<view class="order-date">时间:{{ item.manicure_time | dateFormat }}</view>
|
||||||
</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>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@ -32,6 +32,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 1,
|
||||||
list: [{
|
list: [{
|
||||||
name: '我的订单'
|
name: '我的订单'
|
||||||
}, {
|
}, {
|
||||||
@ -42,18 +43,16 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
orderList: [],
|
orderList: [],
|
||||||
loadStatus: 'loadmore',
|
loadStatus: 'loadmore',
|
||||||
|
timer: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getManicureList({ load: 'reload' });
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
this.swiperCurrent = 0;
|
this.swiperCurrent = 0;
|
||||||
this.getManicureList().then(order => {
|
this.getManicureList({ load: 'reload' });
|
||||||
// console.log(order);
|
|
||||||
|
|
||||||
this.orderList = this.orderList.concat(order);
|
|
||||||
// console.log(this.orderList);
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
dateFormat(value) {
|
dateFormat(value) {
|
||||||
@ -66,27 +65,33 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getManicureList() {
|
async getManicureList({ load }) {
|
||||||
let res = await this.$u.api.getManicureList({
|
const res = await this.$u.api.getManicureList({
|
||||||
page: this.page
|
page: this.page
|
||||||
})
|
})
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
this.timer = true;
|
||||||
if (res.errCode == 0) {
|
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() {
|
reachBottom() {
|
||||||
// 修改当前的 loadStatus
|
if(!this.timer) return false;
|
||||||
this.loadStatus = "loading";
|
this.loadStatus = "loading";
|
||||||
this.page++;
|
this.page++;
|
||||||
this.getManicureList().then(order => {
|
this.getManicureList({ load: 'loadmore' }).then(length => {
|
||||||
if (!order.length) {
|
if(length == 0) {
|
||||||
// 如果没有数据page-1
|
|
||||||
this.page--;
|
this.page--;
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.orderList = this.orderList.concat(order);
|
this.loadStatus = 'loading';
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
|
25
pages.json
25
pages.json
@ -115,7 +115,16 @@
|
|||||||
"navigationBarTitleText": "商品详情",
|
"navigationBarTitleText": "商品详情",
|
||||||
"app-plus":{
|
"app-plus":{
|
||||||
"titleNView":{
|
"titleNView":{
|
||||||
"backgroundColor":"#ffffff"
|
"backgroundColor":"#ffffff",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"\ue636",
|
||||||
|
"float":"right",
|
||||||
|
"fontSize":"18",
|
||||||
|
"fontSrc": "/static/fonts/cart.ttf"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,7 +146,16 @@
|
|||||||
"navigationBarTitleText": "商品评价",
|
"navigationBarTitleText": "商品评价",
|
||||||
"app-plus":{
|
"app-plus":{
|
||||||
"titleNView":{
|
"titleNView":{
|
||||||
"backgroundColor":"#ffffff"
|
"backgroundColor":"#ffffff",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"\ue636",
|
||||||
|
"float":"right",
|
||||||
|
"fontSize":"18",
|
||||||
|
"fontSrc": "/static/fonts/cart.ttf"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,6 +259,7 @@
|
|||||||
{
|
{
|
||||||
"path": "cart/index",
|
"path": "cart/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "购物车",
|
"navigationBarTitleText": "购物车",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@ -608,6 +627,7 @@
|
|||||||
{
|
{
|
||||||
"path": "tool/Manicure",
|
"path": "tool/Manicure",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "美甲",
|
"navigationBarTitleText": "美甲",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@ -916,6 +936,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -224,6 +224,9 @@
|
|||||||
this.getZhiBoSwiper();
|
this.getZhiBoSwiper();
|
||||||
this.tabLiveList();
|
this.tabLiveList();
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
// this.getManicureList({ load: 'reload' });
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tabLiveList() {
|
tabLiveList() {
|
||||||
this.$u.api.tabLiveList().then((res) => {
|
this.$u.api.tabLiveList().then((res) => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<view class="mine">
|
<view class="mine">
|
||||||
<view class="mine-top">
|
<view class="mine-top">
|
||||||
<view class="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="user-info">
|
||||||
<view class="info-left">
|
<view class="info-left">
|
||||||
<view class="user-nickname">{{ userInfo.member_nickname }}</view>
|
<view class="user-nickname">{{ userInfo.member_nickname }}</view>
|
||||||
@ -68,13 +68,13 @@
|
|||||||
<view>试穿试送</view>
|
<view>试穿试送</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=5')">
|
<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>
|
<image src="/static/image/mine/9.png"></image>
|
||||||
<view>售后</view>
|
<view>售后</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view @click="toOtherPage('/order/Index?current=6')">
|
||||||
|
<image src="/static/image/mine/3.png"></image>
|
||||||
|
<view>待评价</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tool">
|
<view class="tool">
|
||||||
|
@ -45,7 +45,9 @@
|
|||||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||||
<!-- 拼团列表 -->
|
<!-- 拼团列表 -->
|
||||||
<group></group>
|
<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>
|
<youhq></youhq>
|
||||||
<list ref="recommendGoods"></list>
|
<list ref="recommendGoods"></list>
|
||||||
<view class="cart" @click="toCartPage">
|
<view class="cart" @click="toCartPage">
|
||||||
@ -87,12 +89,14 @@
|
|||||||
seckillTime: {}, // 秒杀时间
|
seckillTime: {}, // 秒杀时间
|
||||||
// couponGroupList: [], // 优惠券拼团分类
|
// couponGroupList: [], // 优惠券拼团分类
|
||||||
pinTuanPush: {}, // 拼团推荐
|
pinTuanPush: {}, // 拼团推荐
|
||||||
|
activityInfo: {},
|
||||||
areaList: [], // 位置信息
|
areaList: [], // 位置信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getShopTopList();
|
this.getShopTopList();
|
||||||
this.getLocation(); // 获取定位
|
this.getLocation(); // 获取定位
|
||||||
|
this.getStoreActivity();
|
||||||
// this.area = uni.getStorageSync("address") || "请选择";
|
// this.area = uni.getStorageSync("address") || "请选择";
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@ -195,6 +199,25 @@
|
|||||||
url: '/pageC/classify/index'
|
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>
|
</script>
|
||||||
@ -291,12 +314,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.activity-view {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
text-align: center;
|
||||||
.lingquan {
|
.lingquan {
|
||||||
width: 750rpx;
|
|
||||||
height: 177rpx;
|
|
||||||
margin-left: -33rpx;
|
|
||||||
margin-top: 29rpx;
|
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
|
width: 688rpx;
|
||||||
|
height: 138rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cart {
|
.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