Merge pull request 'zhy' (#55) from zhy into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/55
This commit is contained in:
commit
4dd2694839
@ -230,14 +230,15 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 订单列表
|
// 订单列表
|
||||||
getOrderList({ page, type }) {
|
getOrderList({ page, type, refund_state }) {
|
||||||
let params = { page: page };
|
let params = { page: page };
|
||||||
if(type >= 0) Object.assign(params, {state_type: type})
|
if(type >= 0 || typeof type == 'string') Object.assign(params, {state_type: type});
|
||||||
return vm.$u.post('Goods/orderList', params);
|
if(refund_state) Object.assign(params, {refund_state: refund_state});
|
||||||
|
return vm.$u.post('Order/orderList', params);
|
||||||
},
|
},
|
||||||
// 订单详情
|
// 订单详情
|
||||||
getOrderInfo({ order_id }) {
|
getOrderInfo({ order_id }) {
|
||||||
return vm.$u.post('Goods/orderInfo', { order_id: order_id });
|
return vm.$u.post('Order/orderInfo', { order_id: order_id });
|
||||||
},
|
},
|
||||||
// 查询订单的评价信息
|
// 查询订单的评价信息
|
||||||
getOrderEvaluateInfo({ id }) {
|
getOrderEvaluateInfo({ id }) {
|
||||||
@ -245,14 +246,15 @@ export default {
|
|||||||
},
|
},
|
||||||
// 订单评价/修改评价
|
// 订单评价/修改评价
|
||||||
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
||||||
return vm.$u.post('Order/orderEvaluate', {
|
let params = {
|
||||||
id: id,
|
id: id,
|
||||||
content: content,
|
content: content,
|
||||||
scores_one: scores_one,
|
scores_one: scores_one,
|
||||||
scores_two: scores_two,
|
scores_two: scores_two,
|
||||||
scores_three: scores_three,
|
scores_three: scores_three,
|
||||||
file: file,
|
}
|
||||||
});
|
if(file) Object.assign(params, { file: file });
|
||||||
|
return vm.$u.post('Order/orderEvaluate', params);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<image :src="order.extend_store.store_avatar"></image>
|
<image :src="order.extend_store.store_avatar"></image>
|
||||||
<view class="store-name">{{ order.extend_store.store_name }}</view>
|
<view class="store-name">{{ order.extend_store.store_name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-status">{{ order.order_state | viewState }}</view>
|
<view class="order-status">{{ state }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view class="goods-item" @click="toDetailsPage" v-for="goods in order.extend_order_goods" :key="goods.goods_id">
|
<view class="goods-item" @click="toOtherPage('Details')" v-for="goods in order.extend_order_goods" :key="goods.goods_id">
|
||||||
<image :src="goods.goods_image"></image>
|
<image :src="goods.goods_image"></image>
|
||||||
<view class="goods-text">
|
<view class="goods-text">
|
||||||
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
||||||
@ -23,67 +23,59 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
|
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
|
||||||
<view class="logistics" v-if="order.order_state == 30" @click="toLogistics">查看物流</view>
|
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="comment" v-if="order.order_state == 20" @click="toComment">立即评价</view>
|
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="calcel" v-if="order.order_state == 10">取消支付</view>
|
<view class="calcel" v-if="order.order_state == 10">取消支付</view>
|
||||||
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
||||||
<view class="service" v-if="order.order_state == 40">联系官方客服</view>
|
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
|
||||||
<view class="submit" v-if="order.order_state == 40">提交官方审核</view>
|
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
order: Object
|
order: Object
|
||||||
},
|
},
|
||||||
filters: {
|
created() {
|
||||||
viewState(value) {
|
this.viewState();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
viewState() {
|
||||||
let state;
|
let state;
|
||||||
switch (value) {
|
switch (this.order.order_state) {
|
||||||
case 10:
|
case 0: // 已取消
|
||||||
state = '待支付';
|
|
||||||
break;
|
|
||||||
case 0:
|
|
||||||
state = '已取消';
|
state = '已取消';
|
||||||
break;
|
break;
|
||||||
case 30:
|
case 10: // 未付款
|
||||||
|
state = '待支付';
|
||||||
|
break;
|
||||||
|
case 20: // 已付款
|
||||||
|
state = '交易成功';
|
||||||
|
break;
|
||||||
|
case 30: // 已发货
|
||||||
state = '待收货';
|
state = '待收货';
|
||||||
break;
|
break;
|
||||||
case -1:
|
case 40: // 已收货
|
||||||
state = '试穿试送';
|
if(this.order.evaluation_state == 0) state = '待评价';
|
||||||
break;
|
else state = '交易成功'
|
||||||
case 20:
|
|
||||||
state = '待评价';
|
|
||||||
break;
|
|
||||||
case 40:
|
|
||||||
state = '售后';
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
if(this.order.refund_state) state = '已退款';
|
||||||
|
this.state = state;
|
||||||
},
|
},
|
||||||
},
|
toOtherPage(url) {
|
||||||
methods: {
|
this.$u.route('/pageE/order/' + url, {
|
||||||
toDetailsPage() {
|
oid: this.order.order_id,
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageE/order/Details?id=' + this.order.order_id
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toLogistics() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageE/order/Logistics'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
toComment() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageE/order/Comment'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@ -5,9 +5,9 @@
|
|||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uview-ui": {
|
"uview-ui": {
|
||||||
"version": "1.4.3",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/uview-ui/download/uview-ui-1.4.3.tgz?cache=0&sync_timestamp=1593581462515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuview-ui%2Fdownload%2Fuview-ui-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.5.0.tgz",
|
||||||
"integrity": "sha1-iZXwicmK50MPu87vgbDDTBmm8eE="
|
"integrity": "sha512-1UdMUGJqWx60ALbXXXs3rQHKUNBARDIV5XHc06mKFxpccO/i0tzoSqS6RuPdmYwXU1q59wnIU+NLABvcU5u4vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,6 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uview-ui": "^1.4.3"
|
"uview-ui": "^1.5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
<image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
|
<image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="reply">
|
<view class="reply" v-if="item.is_reply">
|
||||||
<view class="reply-title">后台回复:</view>
|
<view class="reply-title">后台回复:</view>
|
||||||
<view class="reply-content u-line-4">{{ item.reply_content }}</view>
|
<view class="reply-content u-line-4">{{ item.reply_content }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="date">
|
<view class="date">
|
||||||
<image src="../static/mine/26.png"></image>
|
<image src="../static/mine/26.png"></image>
|
||||||
<view>{{ reply_time }}</view>
|
<view>{{ item.fb_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无意见" mode="list" color="#000000" icon-size="90" margin-top="300" v-if="!feedbackList.length"></u-empty>
|
<u-empty text="暂无意见" mode="list" color="#000000" icon-size="90" margin-top="300" v-if="!feedbackList.length"></u-empty>
|
||||||
@ -56,6 +56,7 @@ export default {
|
|||||||
.complaints-box {
|
.complaints-box {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
.suggestions {
|
.suggestions {
|
||||||
.text {
|
.text {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
@ -6,10 +6,12 @@
|
|||||||
ref="uUpload"
|
ref="uUpload"
|
||||||
:custom-btn="true"
|
:custom-btn="true"
|
||||||
:max-count="count"
|
:max-count="count"
|
||||||
:auto-upload="false"
|
|
||||||
:action="action"
|
:action="action"
|
||||||
|
:auto-upload="false"
|
||||||
:header="header"
|
:header="header"
|
||||||
:form-data="formData"
|
:form-data="formData"
|
||||||
|
:name="name"
|
||||||
|
@on-uploaded="setImageList"
|
||||||
>
|
>
|
||||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
<img src="../static/mine/27.png" />
|
<img src="../static/mine/27.png" />
|
||||||
@ -17,6 +19,7 @@
|
|||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="write-btn" @click="submit">发表意见</view>
|
<view class="write-btn" @click="submit">发表意见</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -26,40 +29,51 @@ export default {
|
|||||||
action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
|
action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
|
||||||
count: 4, // 最大图片数量
|
count: 4, // 最大图片数量
|
||||||
text: '',
|
text: '',
|
||||||
imageList: [],
|
|
||||||
header: {
|
header: {
|
||||||
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
||||||
},
|
},
|
||||||
|
name: 'common', // 与formData name 一样
|
||||||
formData: {
|
formData: {
|
||||||
name: '',
|
name: 'common', // 其他图片
|
||||||
}
|
},
|
||||||
|
imageList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
console.log(this.action);
|
|
||||||
console.log(this.imageList);
|
|
||||||
this.$refs.uUpload.upload();
|
this.$refs.uUpload.upload();
|
||||||
let promise = [];
|
|
||||||
this.imageList.forEach(url => {
|
|
||||||
// this.uploadImage(url);
|
|
||||||
})
|
|
||||||
// Promise.all(promise).then(() => {
|
|
||||||
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
async beforeUpload(index, list) {
|
setImageList(lists) {
|
||||||
console.log(index, list);
|
// console.log(lists);
|
||||||
|
let imageList = [];
|
||||||
// let data = await this.$u.post('url');
|
lists.forEach(res => {
|
||||||
// return true; // 或者根据逻辑返回false
|
if(res.response.errCode == 0) imageList.push(res.response.data.file_name);
|
||||||
|
})
|
||||||
|
// console.log(imageList);
|
||||||
|
this.imageList = imageList;
|
||||||
|
this.writeFeedback();
|
||||||
|
},
|
||||||
|
verifyContent() {
|
||||||
|
if(this.$u.test.isEmpty(this.text)) {
|
||||||
|
this.$u.toast('内容不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
writeFeedback() {
|
writeFeedback() {
|
||||||
|
if(!this.verifyContent()) return false;
|
||||||
this.$u.api.writeFeedback({
|
this.$u.api.writeFeedback({
|
||||||
fb_content: this.text,
|
fb_content: this.text,
|
||||||
fb_images: '',
|
fb_images: this.imageList,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {}
|
if(res.errCode == 0) {
|
||||||
|
this.$u.route({
|
||||||
|
type: "redirect",
|
||||||
|
url: '/pageE/more/Complaints',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -17,30 +17,63 @@
|
|||||||
<view class="rate">
|
<view class="rate">
|
||||||
<view>
|
<view>
|
||||||
<view class="title">物流评分</view>
|
<view class="title">物流评分</view>
|
||||||
<u-rate :count="5" current="1" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
<u-rate :count="5" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">服务态度</view>
|
<view class="title">服务态度</view>
|
||||||
<u-rate :count="5" current="1" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
<u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">描述相符</view>
|
<view class="title">描述相符</view>
|
||||||
<u-rate :count="5" current="1" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
<u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="write-btn">发表意见</view>
|
<view class="write-btn" @click="addOrderEvaluate">发表意见</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
count: 4,
|
orderId: '',
|
||||||
logistics: 1,
|
count: 4, // 最大图片数量
|
||||||
service: 1,
|
logistics: 5,
|
||||||
describe: 1
|
service: 5,
|
||||||
|
describe: 5,
|
||||||
|
content: '',
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.orderId = option.oid;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
verifyParams() {
|
||||||
|
if(this.$u.test.isEmpty(this.content)) {
|
||||||
|
this.$u.toast('内容不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
addOrderEvaluate() {
|
||||||
|
if(!this.verifyParams()) return false;
|
||||||
|
console.log(this.logistics);
|
||||||
|
console.log(this.service);
|
||||||
|
console.log(this.describe);
|
||||||
|
this.$u.api.updateOrderEvaluate({
|
||||||
|
id: this.orderId,
|
||||||
|
content: this.content,
|
||||||
|
scores_one: this.logistics,
|
||||||
|
scores_two: this.service,
|
||||||
|
scores_three: this.describe,
|
||||||
|
file: '',
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindTextAreaBlur(event) {
|
||||||
|
this.content = event.detail.value;
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="details">
|
<view class="details" v-if="orderInfo.extend_store">
|
||||||
<view class="status">
|
<view class="status" v-if="state">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="status-text">交易成功</view>
|
<view class="status-text">{{ s_object[state].text }}</view>
|
||||||
<view class="time" v-if="current == 2">距离结束22:22:22</view>
|
<view class="time" v-if="state == '2'">距离结束22:22:22</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../static/mine/31.png" v-if="current"></image>
|
<image :src="s_object[state].image"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="info-address">
|
<view class="info-address">
|
||||||
@ -49,11 +49,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">订单总价</view>
|
<view class="title">订单总价</view>
|
||||||
<view class="price">¥0.00</view>
|
<view class="price">¥{{ orderInfo.order_amount }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">实付费(含运费)</view>
|
<view class="title">实付费(含运费)</view>
|
||||||
<view class="price">¥0.00</view>
|
<view class="price">¥{{ orderInfo.goods_amount }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">支付方式</view>
|
<view class="title">支付方式</view>
|
||||||
@ -62,15 +62,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-order">
|
<view class="info-order">
|
||||||
<view>订单编号:2222222222222222</view>
|
<view>订单编号:{{ orderInfo.order_sn }}</view>
|
||||||
<view>微信交易号:2222222222222222</view>
|
<view>支付单号:{{ orderInfo.pay_sn }}</view>
|
||||||
<view>创建时间:2020-05-14</view>
|
<view>创建时间:{{ orderInfo.add_time | date}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="[0, 2, 4].indexOf(current) < 0">
|
<view class="btn" v-if="['1', '2', '6'].indexOf(state) >= 0">
|
||||||
<view class="logistics" v-if="current == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="comment" v-if="current == 5">立即评价</view>
|
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="payment" v-if="current == 1">立即支付</view>
|
<view class="cancel" v-if="state == '6'">取消支付</view>
|
||||||
|
<view class="payment" v-if="state == '6'">立即支付</view>
|
||||||
<view class="service" v-if="current == 6">联系官方客服</view>
|
<view class="service" v-if="current == 6">联系官方客服</view>
|
||||||
<view class="submit" v-if="current == 6">提交官方审核</view>
|
<view class="submit" v-if="current == 6">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
@ -80,6 +81,33 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付
|
||||||
|
s_object: {
|
||||||
|
'1': {
|
||||||
|
text: '待收货',
|
||||||
|
image: '../static/mine/32.png',
|
||||||
|
},
|
||||||
|
'2': {
|
||||||
|
text: '待评价',
|
||||||
|
image: '../static/mine/35.png',
|
||||||
|
},
|
||||||
|
'3': {
|
||||||
|
text: '交易成功',
|
||||||
|
image: '../static/mine/31.png',
|
||||||
|
},
|
||||||
|
'4': {
|
||||||
|
text: '已取消',
|
||||||
|
image: '../static/mine/33.png',
|
||||||
|
},
|
||||||
|
'5': {
|
||||||
|
text: '已退款',
|
||||||
|
image: '../static/mine/34.png',
|
||||||
|
},
|
||||||
|
'6': {
|
||||||
|
text: '待支付',
|
||||||
|
image: '../static/mine/31.png',
|
||||||
|
},
|
||||||
|
},
|
||||||
current: 0,
|
current: 0,
|
||||||
orderInfo: {}
|
orderInfo: {}
|
||||||
}
|
}
|
||||||
@ -89,12 +117,37 @@ export default {
|
|||||||
this.getOrderInfo(option.id);
|
this.getOrderInfo(option.id);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
viewState(value) {
|
||||||
|
let state;
|
||||||
|
switch (value) {
|
||||||
|
case 0: // 已取消
|
||||||
|
state = '4';
|
||||||
|
break;
|
||||||
|
case 10: // 未付款
|
||||||
|
state = '6';
|
||||||
|
break;
|
||||||
|
case 20: // 已付款
|
||||||
|
state = '3';
|
||||||
|
break;
|
||||||
|
case 30: // 已发货
|
||||||
|
state = '1';
|
||||||
|
break;
|
||||||
|
case 40: // 已收货
|
||||||
|
if(this.orderInfo.evaluation_state == 0) state = '2';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(this.orderInfo.refund_state) state = '5';
|
||||||
|
this.state = state;
|
||||||
|
},
|
||||||
getOrderInfo(id) {
|
getOrderInfo(id) {
|
||||||
this.$u.api.getOrderInfo({
|
this.$u.api.getOrderInfo({
|
||||||
order_id: id,
|
order_id: id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.orderInfo = res.data;
|
this.orderInfo = res.data;
|
||||||
|
this.viewState(this.orderInfo.order_state);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -113,8 +166,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
uni.navigateTo({
|
this.$u.route('/pageE/order/' + url, {
|
||||||
url: '/pageE/order/' + url
|
oid: this.orderInfo.order_id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -124,17 +177,15 @@ export default {
|
|||||||
.details {
|
.details {
|
||||||
min-height: calc(100vh - var(--window-top));
|
min-height: calc(100vh - var(--window-top));
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
|
padding-bottom: 98rpx;
|
||||||
.status {
|
.status {
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
height: calc(180rpx + var(--window-top));
|
height: 180rpx;
|
||||||
|
// height: calc(180rpx + var(--window-top));
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: rgba(255,120,15,1);
|
background: #ff780f;
|
||||||
z-index: 9;
|
|
||||||
.text {
|
.text {
|
||||||
margin: calc(74rpx + var(--window-top)) auto 0 73rpx;
|
margin: 74rpx auto 0 73rpx;
|
||||||
color: rgba(255,255,255,1);
|
color: rgba(255,255,255,1);
|
||||||
.status-text {
|
.status-text {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
@ -148,14 +199,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
> image {
|
> image {
|
||||||
margin: calc(36rpx + var(--window-top)) 70rpx 0 0;
|
margin: 36rpx 70rpx 0 0;
|
||||||
width: 126rpx;
|
width: 126rpx;
|
||||||
height: 109rpx;
|
height: 109rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info {
|
.info {
|
||||||
padding-top: 180rpx;
|
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
.info-address {
|
.info-address {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
@ -280,6 +330,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -300,6 +354,9 @@ 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));
|
||||||
}
|
}
|
||||||
|
.cancel {
|
||||||
|
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
||||||
|
}
|
||||||
.service {
|
.service {
|
||||||
@include btn-class($width: 216rpx, $color: rgba(155,153,153,1));
|
@include btn-class($width: 216rpx, $color: rgba(155,153,153,1));
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
current(value) {
|
current(value) {
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
this.getOrderList('again');
|
this.getOrderList({ reload: 'again' });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@ -63,7 +63,7 @@ export default {
|
|||||||
this.setViewHeight();
|
this.setViewHeight();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getOrderList(reload = '') {
|
async getOrderList({ reload = '' } = {}) {
|
||||||
let type;
|
let type;
|
||||||
// state_type 订单状态:0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
|
// state_type 订单状态:0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
|
||||||
switch (this.current) {
|
switch (this.current) {
|
||||||
@ -80,7 +80,7 @@ export default {
|
|||||||
type = -1; // 试穿试送
|
type = -1; // 试穿试送
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
type = 20; // 待评价
|
type = 'state_noeval'; // 待评价
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
type = 40; // 售后
|
type = 40; // 售后
|
||||||
@ -92,6 +92,7 @@ export default {
|
|||||||
const res = await this.$u.api.getOrderList({
|
const res = await this.$u.api.getOrderList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
type: type,
|
type: type,
|
||||||
|
refund_state: this.current == 6 ? '1' : 0, // 判断是不是售后列表
|
||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
@ -101,11 +102,13 @@ export default {
|
|||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
|
// 大于15条才会加载更多
|
||||||
|
if(this.orderList.length < 15) return false;
|
||||||
if(!this.timer) return false;
|
if(!this.timer) return false;
|
||||||
this.timer = false;
|
this.timer = false;
|
||||||
this.loadStatus.splice(this.current, 1, "loading");
|
this.loadStatus.splice(this.current, 1, "loading");
|
||||||
this.page++;
|
this.page++;
|
||||||
this.getOrderList.then(res => {
|
this.getOrderList().then(res => {
|
||||||
this.loadStatus.splice(this.current, 1, "nomore");
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
if(res.data.length == 0) this.page--;
|
if(res.data.length == 0) this.page--;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -135,9 +138,6 @@ export default {
|
|||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
// > uni-swiper {
|
|
||||||
// flex: 1;
|
|
||||||
// }
|
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
.item-container {
|
.item-container {
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
|
@ -749,7 +749,7 @@
|
|||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"titleColor": "#FFFFFF",
|
"titleColor": "#FFFFFF",
|
||||||
"backgroundColor": "rgba(255,255,255,0)"
|
"backgroundColor": "#ff780f"
|
||||||
},
|
},
|
||||||
"backButton": {
|
"backButton": {
|
||||||
"color": "#FFFFFF"
|
"color": "#FFFFFF"
|
||||||
|
@ -12,7 +12,7 @@ const common = {
|
|||||||
/**
|
/**
|
||||||
* 上传文件(只能单文件上传)
|
* 上传文件(只能单文件上传)
|
||||||
* @param { String } url 服务器 url
|
* @param { String } url 服务器 url
|
||||||
* @param { String } name 上传类型 goods-商品图片 avatar-用户头像 video-视频 store_logo-店铺logo store_banner-店铺banner store_avatar-店铺头像
|
* @param { String } name 上传类型 goods-商品图片 avatar-用户头像 video-视频 store_logo-店铺logo store_banner-店铺banner store_avatar-店铺头像 common-其他图片
|
||||||
* @param { String } filePath 要上传文件资源的路径
|
* @param { String } filePath 要上传文件资源的路径
|
||||||
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
|
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user