Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx
This commit is contained in:
commit
aea71b6354
@ -40,4 +40,13 @@
|
|||||||
* @return { String } 处理好的富文本
|
* @return { String } 处理好的富文本
|
||||||
*/
|
*/
|
||||||
unescapeHTML(temp){}
|
unescapeHTML(temp){}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件(只能单文件上传)
|
||||||
|
* @param { String } url 服务器 url
|
||||||
|
* @param { String } filePath 要上传文件资源的路径
|
||||||
|
* @param { String } type 上传文件验证类型 默认: img 可选: video
|
||||||
|
* @return { object } promise 对象 resolve 为文件服务器地址 reject 为错误信息
|
||||||
|
*/
|
||||||
|
uploadFile({ url, filePath, type = 'img' } = {}) {}
|
||||||
```
|
```
|
@ -216,6 +216,19 @@ export default {
|
|||||||
page: page,
|
page: page,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 意见反馈列表
|
||||||
|
getFeedbackList({ page }) {
|
||||||
|
return vm.$u.post('Feedback/feedbackList', {
|
||||||
|
page: page,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 意见反馈-写意见
|
||||||
|
writeFeedback({ fb_content, fb_images }) {
|
||||||
|
return vm.$u.post('Feedback/writeFeedback', {
|
||||||
|
fb_content: fb_content,
|
||||||
|
fb_images: fb_images,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 订单列表
|
// 订单列表
|
||||||
getOrderList({ page, type }) {
|
getOrderList({ page, type }) {
|
||||||
let params = { page: page };
|
let params = { page: page };
|
||||||
@ -224,11 +237,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 订单详情
|
// 订单详情
|
||||||
getOrderInfo({ order_id }) {
|
getOrderInfo({ order_id }) {
|
||||||
return vm.$u.post('Goods/orderInfo', { order_id });
|
return vm.$u.post('Goods/orderInfo', { order_id: order_id });
|
||||||
},
|
},
|
||||||
// 查询订单的评价信息
|
// 查询订单的评价信息
|
||||||
getOrderEvaluateInfo({ id }) {
|
getOrderEvaluateInfo({ id }) {
|
||||||
return vm.$u.post('Order/getOrderEvaluateInfo', { id });
|
return vm.$u.post('Order/getOrderEvaluateInfo', { id: id });
|
||||||
},
|
},
|
||||||
// 订单评价/修改评价
|
// 订单评价/修改评价
|
||||||
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
||||||
@ -241,6 +254,15 @@ export default {
|
|||||||
file: file,
|
file: file,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 上传图片视频
|
||||||
|
uploadfile({ file }) {
|
||||||
|
const params = {
|
||||||
|
file: file
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
|
||||||
|
return vm.$u.post('Upload/uploadfile', params);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,30 +2,32 @@
|
|||||||
<view class="order-item">
|
<view class="order-item">
|
||||||
<view class="order-title">
|
<view class="order-title">
|
||||||
<view class="store-info">
|
<view class="store-info">
|
||||||
<image src="@/pageE/static/mine/23.png"></image>
|
<image :src="order.extend_store.store_avatar"></image>
|
||||||
<view class="store-name">胖胖的店</view>
|
<view class="store-name">{{ order.extend_store.store_name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-status">交易成功</view>
|
<view class="order-status">{{ order.order_state | viewState }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-info" @click="toDetailsPage">
|
<view class="goods-info">
|
||||||
<image src="@/pageE/static/mine/23.png"></image>
|
<view class="goods-item" @click="toDetailsPage" v-for="goods in order.extend_order_goods" :key="goods.goods_id">
|
||||||
|
<image :src="goods.goods_image"></image>
|
||||||
<view class="goods-text">
|
<view class="goods-text">
|
||||||
<view class="goods-name u-line-2">木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
|
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
||||||
<view class="goods-sku u-line-1" v-if="current !== 5 && current !== 6">XL;红色条纹XL;红色条纹XL;红色条纹</view>
|
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40">XL;红色条纹XL;红色条纹XL;红色条纹</view>
|
||||||
<view class="goods-time u-line-1" v-if="current == 1 || current == 4">距离结束:23:23:38</view>
|
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">距离结束:23:23:38</view>
|
||||||
<view class="goods-price u-line-1" v-if="current == 5 || current == 6">总价:¥99.00,实付款¥99</view>
|
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥99.00,实付款¥99</view>
|
||||||
<view class="goods-date" v-if="current == 5 || current == 6">
|
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
|
||||||
<image src="@/pageE/static/mine/26.png"></image>
|
<image src="@/pageE/static/mine/26.png"></image>
|
||||||
<view>2020.05.17</view>
|
<view>2020.05.17</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" v-if="[0, 2, 4].indexOf(current) < 0">
|
</view>
|
||||||
<view class="logistics" v-if="current == 3" @click="toLogistics">查看物流</view>
|
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
|
||||||
<view class="comment" v-if="current == 5" @click="toComment">立即评价</view>
|
<view class="logistics" v-if="order.order_state == 30" @click="toLogistics">查看物流</view>
|
||||||
<view class="payment" v-if="current == 1">立即支付</view>
|
<view class="comment" v-if="order.order_state == 20" @click="toComment">立即评价</view>
|
||||||
<view class="service" v-if="current == 6">联系官方客服</view>
|
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
||||||
<view class="submit" v-if="current == 6">提交官方审核</view>
|
<view class="service" v-if="order.order_state == 40">联系官方客服</view>
|
||||||
|
<view class="submit" v-if="order.order_state == 40">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -35,12 +37,40 @@ export default {
|
|||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
current: Number
|
order: Object
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
viewState(value) {
|
||||||
|
let state;
|
||||||
|
switch (value) {
|
||||||
|
case 10:
|
||||||
|
state = '待支付';
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
state = '已取消';
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
state = '待收货';
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
state = '试穿试送';
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
state = '待评价';
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
state = '售后';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageE/order/Details?current=' + this.current
|
url: '/pageE/order/Details?order.order_state=' + this.order.order_state
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toLogistics() {
|
toLogistics() {
|
||||||
@ -87,6 +117,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.goods-info {
|
.goods-info {
|
||||||
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
> image {
|
> image {
|
||||||
@ -134,6 +165,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.order-btn {
|
.order-btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="edit-info">
|
<view class="edit-info">
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<view class="info-avatar">
|
<view class="info-avatar" @click="changeAvatar">
|
||||||
<u-avatar :src="avatar" :size="120"></u-avatar>
|
<u-avatar :src="avatar" :size="120"></u-avatar>
|
||||||
<view class="avatar-text">更换头像</view>
|
<view class="avatar-text">更换头像</view>
|
||||||
</view>
|
</view>
|
||||||
@ -67,6 +67,25 @@ export default {
|
|||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeAvatar() {
|
||||||
|
const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sizeType: ['original', 'compressed'],
|
||||||
|
sourceType: ['album'],
|
||||||
|
success: (res) => {
|
||||||
|
this.avatar = res.tempFilePaths[0];
|
||||||
|
common.uploadFile({
|
||||||
|
url: url,
|
||||||
|
filePath: res.tempFilePaths[0]
|
||||||
|
}).then(result => {
|
||||||
|
this.avatar = result;
|
||||||
|
}, error => {
|
||||||
|
this.$u.toast(error);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$u.api.getMemberInfo().then(res => {
|
this.$u.api.getMemberInfo().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="complaints">
|
<view class="complaints">
|
||||||
<view class="complaints-box">
|
<view class="complaints-box" v-for="item in feedbackList" :key="item.fb_id">
|
||||||
<view class="suggestions">
|
<view class="suggestions">
|
||||||
<view class="text">您的满意是对我们最大的支持,茫茫德铭阳光之中能够遇到亲也是我们的荣幸</view>
|
<view class="text">{{ item.fb_content }}</view>
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image v-for="(url, index) in imgList" :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">
|
||||||
<view class="reply-title">后台回复:</view>
|
<view class="reply-title">后台回复:</view>
|
||||||
<view class="reply-content u-line-4">您的满意是对我们最大的支持,茫茫德铭阳光之中能够遇到亲也是我们的荣幸,您的评价是对我们付出最好的认可,我们会不断前行,不忘初衷,给亲们提供更好的服务和产品!我把对您的谢意写在纸上,被风吹走了;我把对您的谢意写在沙滩上,被海浪卷走了;我只好把对您的谢意写在解释里,这样才会永驻心间!感谢您对的支持!加油!加油!, 祝您生活愉快,工作顺利,期待我们下次合作愉快! ! !</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>2020-05-14</view>
|
<view>{{ reply_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -27,7 +27,9 @@ export default {
|
|||||||
require('../static/mine/23.png'),
|
require('../static/mine/23.png'),
|
||||||
require('../static/mine/23.png'),
|
require('../static/mine/23.png'),
|
||||||
require('../static/mine/23.png')
|
require('../static/mine/23.png')
|
||||||
]
|
],
|
||||||
|
feedbackList: [],
|
||||||
|
page: 1, // 默认1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap() {
|
||||||
@ -35,6 +37,18 @@ export default {
|
|||||||
url: '/pageE/more/WriteComments'
|
url: '/pageE/more/WriteComments'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getFeedbackList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getFeedbackList() {
|
||||||
|
this.$u.api.getFeedbackList({ page: this.page }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.feedbackList = res.data.feedbackList;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
|
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
|
||||||
<u-upload
|
<u-upload
|
||||||
ref="uUpload"
|
ref="uUpload"
|
||||||
@on-uploaded="onUploaded"
|
|
||||||
:custom-btn="true"
|
:custom-btn="true"
|
||||||
:max-count="count"
|
:max-count="count"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
@ -21,6 +20,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
action: $u.http.baseUrl + 'Upload/uploadfile',
|
||||||
count: 4, // 最大图片数量
|
count: 4, // 最大图片数量
|
||||||
text: '',
|
text: '',
|
||||||
imageList: []
|
imageList: []
|
||||||
@ -28,11 +28,33 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.uUpload.upload();
|
console.log(this.action);
|
||||||
|
console.log(this.imageList);
|
||||||
|
|
||||||
|
// this.$refs.uUpload.upload();
|
||||||
|
let promise = [];
|
||||||
|
this.imageList.forEach(url => {
|
||||||
|
// this.uploadImage(url);
|
||||||
|
})
|
||||||
|
Promise.all(promise).then(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async uploadImage(file) {
|
||||||
|
this.$u.api.uploadfile({
|
||||||
|
file: file,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
writeFeedback() {
|
||||||
|
this.$u.api.writeFeedback({
|
||||||
|
fb_content: this.text,
|
||||||
|
fb_images: '',
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onUploaded(list) {
|
|
||||||
console.log(this.text, list)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
||||||
<view>
|
<view>
|
||||||
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
||||||
<OrderItem :current="index"></OrderItem>
|
<OrderItem :order="order"></OrderItem>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="typeof orderList == Array ? (orderList.length >= 15) : (orderList >= 15)"></u-loadmore>
|
|
||||||
</view>
|
</view>
|
||||||
|
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
||||||
|
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length >= 15"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -37,7 +38,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
name: '售后'
|
name: '售后'
|
||||||
}],
|
}],
|
||||||
orderList: 15,
|
orderList: [],
|
||||||
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
||||||
page: 0,
|
page: 0,
|
||||||
current: 0,
|
current: 0,
|
||||||
@ -52,19 +53,17 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
current() {
|
current() {
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
this.getOrderList();
|
this.getOrderList('again');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if(option.current) {
|
const current = option.current ? Number(option.current) : 0;
|
||||||
this.current = Number(option.current);
|
this.current = current;
|
||||||
this.swiperCurrent = this.current;
|
this.swiperCurrent = this.current;
|
||||||
}
|
|
||||||
this.getOrderList();
|
|
||||||
this.setViewHeight();
|
this.setViewHeight();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getOrderList() {
|
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) {
|
||||||
@ -94,15 +93,16 @@ export default {
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
type: type,
|
type: type,
|
||||||
})
|
})
|
||||||
this.timer = false;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(res.data.length) this.orderList = this.orderList.concat(res.data);
|
if(reload) this.orderList = res.data;
|
||||||
|
else this.orderList.push(...res.data);
|
||||||
}
|
}
|
||||||
return res.data.length;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
return false;
|
|
||||||
if(!this.timer) return false;
|
if(!this.timer) return 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(length => {
|
this.getOrderList.then(length => {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view @click="toOtherPage('/mine/GoodsCollection')">
|
<view @click="toOtherPage('/mine/GoodsCollection')">
|
||||||
<view>{{ userInfo.member_fav_goods_num }}</view>
|
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
|
||||||
<view>商品收藏</view>
|
<view>商品收藏</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/mine/StoreCollection')">
|
<view @click="toOtherPage('/mine/StoreCollection')">
|
||||||
|
@ -9,5 +9,36 @@ const common = {
|
|||||||
temp = "" + temp;
|
temp = "" + temp;
|
||||||
return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
|
return temp.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'");
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 上传文件(只能单文件上传)
|
||||||
|
* @param { String } url 服务器 url
|
||||||
|
* @param { String } filePath 要上传文件资源的路径
|
||||||
|
* @param { String } type 上传文件验证类型 默认: img 可选: video
|
||||||
|
* @return { object } promise 对象 resolve 为文件服务器地址 reject 为错误信息
|
||||||
|
*/
|
||||||
|
uploadFile({ url, filePath, type = 'img' } = {}) {
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
|
const promise = new Promise((resolve, reject) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: url,
|
||||||
|
header: { "authorization": 'Bearer' + " " + token },
|
||||||
|
filePath: filePath,
|
||||||
|
name: 'file',
|
||||||
|
formData: { type: type },
|
||||||
|
success: uploadFileRes => {
|
||||||
|
const data = JSON.parse(uploadFileRes.data);
|
||||||
|
if(data.errCode.code == 0) {
|
||||||
|
resolve(data.errCode.url);
|
||||||
|
} else {
|
||||||
|
reject(data.errCode.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail(){
|
||||||
|
reject('上传失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
return promise;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
export default common
|
export default common
|
Loading…
Reference in New Issue
Block a user