gdpao
This commit is contained in:
@@ -67,6 +67,34 @@ export default {
|
||||
onLoad() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
// 监听头像裁剪
|
||||
created() {
|
||||
// uni.$on('uAvatarCropper', path => {
|
||||
// const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
|
||||
// this.avatar = path;
|
||||
// // 可以在此上传到服务端
|
||||
// // uni.uploadFile({
|
||||
// // url: 'http://www.example.com/upload',
|
||||
// // filePath: path,
|
||||
// // name: 'file',
|
||||
// // complete: (res) => {
|
||||
// // console.log(res);
|
||||
// // }
|
||||
// // });
|
||||
// common.uploadFile({
|
||||
// url: url,
|
||||
// name: 'avatar',
|
||||
// filePath: path
|
||||
// }).then(result => {
|
||||
// // console.log(result);
|
||||
// this.$set(this, 'avatar', result.file_path);
|
||||
// // this.avatar = result.file_path;
|
||||
// this.uploadPath = result.file_name;
|
||||
// }, error => {
|
||||
// this.$u.toast(error);
|
||||
// })
|
||||
// })
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if( e.index == 0 ) uni.navigateBack();
|
||||
},
|
||||
@@ -94,6 +122,17 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 头像裁剪
|
||||
// chooseAvatar() {
|
||||
// this.$u.route({
|
||||
// url: '/uview-ui/components/u-avatar-cropper/u-avatar-cropper',
|
||||
// params: {
|
||||
// destWidth: 300,
|
||||
// rectWidth: 200,
|
||||
// fileType: 'jpg',
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
getUserInfo() {
|
||||
this.$u.api.getMemberInfo().then(res => {
|
||||
if (res.errCode == 0) {
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<view class="integral-top">
|
||||
<view>
|
||||
<view class="title">总积分</view>
|
||||
<view class="value">{{ memberInfo.member_points }}</view>
|
||||
<view class="value">{{ memberInfo.member_points || 0 }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">经验值</view>
|
||||
<view class="value">{{ memberInfo.member_exppoints }}</view>
|
||||
<view class="value">{{ memberInfo.member_exppoints || 0 }}</view>
|
||||
</view>
|
||||
<view @click="viewProgress">
|
||||
<view class="title">预计进度</view>
|
||||
|
||||
@@ -3,20 +3,11 @@
|
||||
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom">
|
||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||
<!-- <img src="../static/mine/23.png" />
|
||||
<view class="coupon-main">
|
||||
<view class="coupon-title">萌店十元优惠券</view>
|
||||
<view class="coupon-date">
|
||||
<img src="../static/mine/26.png" />
|
||||
<view>2020.05.17-2020.06.17</view>
|
||||
</view>
|
||||
<view class="coupon-integral">299积分</view>
|
||||
</view>
|
||||
<view class="coupon-btn">兑换</view> -->
|
||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -28,6 +19,7 @@ import Coupon from "@/components/mine/coupon/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 1,
|
||||
swiperHeight: '',
|
||||
couponCurrent: 0,
|
||||
swiperCouponCurrent: 0,
|
||||
@@ -48,20 +40,18 @@ export default {
|
||||
watch: {
|
||||
couponCurrent(index) {
|
||||
const id = this.couponGroupList[index].gc_id;
|
||||
this.getCouponList({ gc_id: id });
|
||||
this.getCouponList({ gc_id: id, load: 'reload' });
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadMore(page) {
|
||||
onreachBottom() {
|
||||
if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getGoodsRecommend({
|
||||
gc_id: this.classifyList[this.current].gc_id,
|
||||
page: this.page,
|
||||
reload: false,
|
||||
this.getCouponList({
|
||||
gc_id: this.couponGroupList[this.couponCurrent].gc_id,
|
||||
load: 'loadmore',
|
||||
}).then(length => {
|
||||
// console.log(length);
|
||||
if(length == 0) {
|
||||
this.page--;
|
||||
this.loadStatus = 'nomore';
|
||||
@@ -77,24 +67,24 @@ export default {
|
||||
this.$u.api.getGoodsClass().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.couponGroupList = res.data;
|
||||
this.getCouponList(this.couponGroupList[0].gc_id);
|
||||
this.getCouponList({ gc_id: this.couponGroupList[0].gc_id, load: 'reload' });
|
||||
}
|
||||
})
|
||||
},
|
||||
getCouponList({ gc_id }) {
|
||||
this.$u.api.getCouponList({
|
||||
async getCouponList({ gc_id, load }) {
|
||||
const res = await this.$u.api.getCouponList({
|
||||
page: this.page,
|
||||
gc_id: gc_id,
|
||||
}).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.couponList = res.data;
|
||||
} else {
|
||||
this.couponList = [];
|
||||
}
|
||||
})
|
||||
this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
if(load == 'reload') this.couponList = res.data;
|
||||
else if(load == 'loadmore') this.couponList.push(...res.data);
|
||||
}
|
||||
return res.data.length;
|
||||
},
|
||||
exchangeCoupon(id) {
|
||||
console.log(id);
|
||||
// console.log(id);
|
||||
|
||||
},
|
||||
couponTabsChange(index) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
@on-uploaded="setImageList"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<img src="../static/mine/27.png" />
|
||||
<image src="../static/mine/27.png"></image>
|
||||
</view>
|
||||
</u-upload>
|
||||
</view>
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
background: rgba(236,236,236,1);
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
> img {
|
||||
> image {
|
||||
margin-top: 48rpx;
|
||||
width: 54rpx;
|
||||
height: 49rpx;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:auto-upload="false"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<img src="../static/mine/27.png" />
|
||||
<image src="../static/mine/27.png"></image>
|
||||
</view>
|
||||
</u-upload>
|
||||
</view>
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
background: rgba(236,236,236,1);
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
> img {
|
||||
> image {
|
||||
margin-top: 48rpx;
|
||||
width: 54rpx;
|
||||
height: 49rpx;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<view class="logistics">
|
||||
<view class="logistics-info">
|
||||
<view class="express">
|
||||
<!-- <view class="express">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<view class="dispatcher-info">
|
||||
<view>派件员:xxx</view>
|
||||
<view>手机:123456789</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="express-status">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<image :src="expressInfo.goods_image"></image>
|
||||
<view>
|
||||
<view class="status">物流状态:已签收</view>
|
||||
<view>承运来源:百世快递</view>
|
||||
<view>运单编号:3253463464777</view>
|
||||
<view>官方电话:4009-565-656</view>
|
||||
<view class="status">物流状态:{{ expressInfo.is_check }}</view>
|
||||
<view>承运来源:{{ expressInfo.express_name || '' }}</view>
|
||||
<view>运单编号:{{ expressInfo.shipping_code || '' }}</view>
|
||||
<view>官方电话:{{ expressInfo.express_phone || '' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,8 +22,8 @@
|
||||
<view class="title">物流跟踪</view>
|
||||
<view class="main">
|
||||
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
||||
<view class="info u-line-2">{{ item.address }}</view>
|
||||
<view class="date">{{ item.date }}</view>
|
||||
<view class="info u-line-2">{{ item.content }}</view>
|
||||
<view class="date">{{ item.kd_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -33,24 +33,23 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
||||
date: '2019-12-25 09:38:21'
|
||||
},
|
||||
{
|
||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
||||
date: '2019-12-25 09:38:21'
|
||||
},
|
||||
{
|
||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
||||
date: '2019-12-15 09:38:20'
|
||||
},
|
||||
{
|
||||
address: '卖家已发货',
|
||||
date: '2019-12-15 09:38:20'
|
||||
list: [],
|
||||
expressInfo: {},
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.getOrderLogistics(option.oid);
|
||||
},
|
||||
methods: {
|
||||
getOrderLogistics(id) {
|
||||
this.$u.api.orderLogistics({ id: 16 }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.expressInfo = res.data.express_info;
|
||||
this.list = res.data.express_list;
|
||||
} else {
|
||||
this.list = [];
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ export default {
|
||||
return {
|
||||
name: '',
|
||||
time: '',
|
||||
address: '四川省攀枝花市银江镇',
|
||||
address: '',
|
||||
params: {
|
||||
year: true,
|
||||
month: true,
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
<view class="order-info">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
||||
<view>骑手名字:{{ item.takeawayer_name }}</view>
|
||||
<view>联系方式:{{ item.member_phone }}</view>
|
||||
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
||||
<view>联系方式:{{ item.member_phone || '' }}</view>
|
||||
<view>所属公司:{{ item.company || '' }}</view>
|
||||
</view>
|
||||
<view v-if="item.order_status == 0">
|
||||
<view>正在等待接单</view>
|
||||
@@ -35,7 +36,7 @@
|
||||
<view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">
|
||||
确认完成
|
||||
</view>
|
||||
<view class="btn" v-if="item.order_status == 50">
|
||||
<view class="btn" v-if="item.order_status == 50" @click="toComment(item.laundry_id)">
|
||||
去评价
|
||||
</view>
|
||||
</view>
|
||||
@@ -49,8 +50,8 @@
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y class="comment">
|
||||
<view v-for="(item, index) in 3" :key="index" class="comment-item">
|
||||
<Comment></Comment>
|
||||
<view v-for="(comment, index) in commentList" :key="index" class="comment-item">
|
||||
<Comment :info="comment"></Comment>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -84,6 +85,7 @@ export default {
|
||||
page: 1,
|
||||
orderList: [],
|
||||
timer: true,
|
||||
commentList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -111,11 +113,22 @@ export default {
|
||||
return state;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
current(index) {
|
||||
if(index == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pageE/tool/WashOrder'
|
||||
});
|
||||
this.showPopup = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.current = 0;
|
||||
this.swiperCurrent = 0;
|
||||
this.showPopup = false;
|
||||
this.sendLaundryOrderList();
|
||||
this.sendCommentList();
|
||||
},
|
||||
methods: {
|
||||
async sendLaundryOrderList({ load = 'reload' } = {}) {
|
||||
@@ -159,31 +172,33 @@ export default {
|
||||
this.page--;
|
||||
})
|
||||
},
|
||||
// 送洗评论列表
|
||||
sendCommentList() {
|
||||
this.$u.api.sendCommentList().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.commentList = res.data.list;
|
||||
} else {
|
||||
this.commentList = [];
|
||||
}
|
||||
})
|
||||
},
|
||||
toComment(id) {
|
||||
this.$u.route('/pageE/tool/washComment', {
|
||||
id: id
|
||||
});
|
||||
},
|
||||
tabsChange(index) {
|
||||
this.swiperCurrent = index;
|
||||
this.toApplyPage(index);
|
||||
if (index == 0){
|
||||
this.showPopup = !this.showPopup;
|
||||
} else {
|
||||
this.showPopup = false;
|
||||
}
|
||||
},
|
||||
animationfinish(e) {
|
||||
let current = e.detail.current;
|
||||
this.swiperCurrent = current;
|
||||
this.current = current;
|
||||
this.toApplyPage(current);
|
||||
},
|
||||
toApplyPage(index) {
|
||||
var that = this;
|
||||
if(index == 1) {
|
||||
this.showPopup = false;
|
||||
uni.navigateTo({
|
||||
url: '/pageE/tool/WashOrder'
|
||||
});
|
||||
} else if (index == 0){
|
||||
this.history();
|
||||
} else {
|
||||
this.showPopup = false;
|
||||
}
|
||||
},
|
||||
history(){
|
||||
this.showPopup = true;
|
||||
},
|
||||
replaces(e){
|
||||
if(e == 1){
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y="true" style="height: 100%;">
|
||||
<view class="order-info">
|
||||
<view class="order-name" @click="order()">
|
||||
<view class="order-name" @click="showPopup=true">
|
||||
<view class="title titles" >
|
||||
<text>选择订单:</text>
|
||||
<image src="../../static/image/shop/2.png" mode=""></image>
|
||||
@@ -38,9 +38,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-view order-phone">
|
||||
<view class="title">衣服状况:</view>
|
||||
<input type="text" v-model="goodsStatus" />
|
||||
</view>
|
||||
<view class="order-view order-type" @click="showClothesType=true">
|
||||
<view class="title">商品类型:</view>
|
||||
<input type="text" v-model="type" disabled />
|
||||
<input type="text" v-model="type.label" disabled />
|
||||
</view>
|
||||
<view class="order-view order-name">
|
||||
<view class="title">送洗人:</view>
|
||||
@@ -66,18 +70,22 @@
|
||||
<view class="upload-image">
|
||||
<view class="title">上传商品图片</view>
|
||||
<u-upload
|
||||
ref="uUpload"
|
||||
@on-uploaded="onUploaded"
|
||||
ref="platform"
|
||||
:custom-btn="true"
|
||||
:max-count="count"
|
||||
:max-count="count"
|
||||
:action="uaction"
|
||||
:auto-upload="false"
|
||||
:header="uheader"
|
||||
:form-data="uformData"
|
||||
:name="uname"
|
||||
@on-uploaded="setImageList"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<img src="../static/mine/27.png" />
|
||||
<image src="../static/mine/27.png"></image>
|
||||
</view>
|
||||
</u-upload>
|
||||
</view>
|
||||
<view class="wash-btn" @click="reset()">确认送洗</view>
|
||||
<view class="wash-btn" @click="submitImage">确认送洗</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
@@ -86,18 +94,22 @@
|
||||
<view class="title">商品名称:</view>
|
||||
<input type="text" v-model="goodsName" />
|
||||
</view>
|
||||
<view class="order-view order-phone" @click="showClothesType=true">
|
||||
<view class="title">商品类型:</view>
|
||||
<input type="text" v-model="type" disabled />
|
||||
</view>
|
||||
<view class="order-view order-phone">
|
||||
<view class="title">衣服状况:</view>
|
||||
<input type="text" v-model="name" />
|
||||
<input type="text" v-model="goodsStatus" />
|
||||
</view>
|
||||
<view class="order-view order-phone" @click="showClothesType=true">
|
||||
<view class="title">商品类型:</view>
|
||||
<input type="text" v-model="type.label" disabled />
|
||||
</view>
|
||||
<view class="order-view order-name">
|
||||
<view class="title">送洗人:</view>
|
||||
<input type="text" v-model="name" />
|
||||
</view>
|
||||
<view class="order-view order-phone">
|
||||
<view class="title">手机号:</view>
|
||||
<input type="text" v-model="phone" maxlength="11" />
|
||||
</view>
|
||||
<view class="order-view order-area" @click="showAddress=true">
|
||||
<view class="title">省市区:</view>
|
||||
<input type="text" v-model="area" disabled />
|
||||
@@ -114,28 +126,33 @@
|
||||
<view class="upload-image">
|
||||
<view class="title">上传商品图片</view>
|
||||
<u-upload
|
||||
ref="uUpload"
|
||||
@on-uploaded="onUploaded"
|
||||
ref="physical"
|
||||
:custom-btn="true"
|
||||
:max-count="count"
|
||||
:max-count="count"
|
||||
:action="uaction"
|
||||
:auto-upload="false"
|
||||
:header="uheader"
|
||||
:form-data="uformData"
|
||||
:name="uname"
|
||||
@on-uploaded="setImageList"
|
||||
>
|
||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||
<img src="../static/mine/27.png" />
|
||||
<image src="../static/mine/27.png"></image>
|
||||
</view>
|
||||
</u-upload>
|
||||
</view>
|
||||
<view class="wash-btn">确认送洗</view>
|
||||
<view class="wash-btn" @click="submitImage">确认送洗</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType"></u-select>
|
||||
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" :safe-area-inset-bottom="true" mode="single-column"></u-select>
|
||||
<u-select v-model="showAddress"
|
||||
mode="mutil-column-auto"
|
||||
:list="areaList"
|
||||
value-name="area_id"
|
||||
label-name="area_name"
|
||||
child-name="_child"
|
||||
@confirm="setArea">
|
||||
@confirm="setArea"
|
||||
:safe-area-inset-bottom="true">
|
||||
</u-select>
|
||||
<u-popup v-model="showPopup" mode="bottom" border-radius="20">
|
||||
<view class="order-popup">
|
||||
@@ -182,49 +199,50 @@
|
||||
<view class="order-btn" @click="confirm">确认</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
// items: [],
|
||||
count: 4, // 最大图片数量
|
||||
type: '',
|
||||
name: '',
|
||||
phone: '',
|
||||
area: '',
|
||||
address: '',
|
||||
// platformForm: {
|
||||
// type: '',
|
||||
// name: '',
|
||||
// phone: '',
|
||||
// area: '',
|
||||
// address: '',
|
||||
// },
|
||||
// physicalForm: {
|
||||
|
||||
// },
|
||||
goodsName: '',
|
||||
type: {}, // 商品类型
|
||||
name: '', // 送洗人
|
||||
phone: '', // 手机号
|
||||
area: '', // 省市区
|
||||
goodsStatus: '', // 衣服状况
|
||||
address: '', // 详细地址
|
||||
goodsName: '', // 商品名称
|
||||
list: [{
|
||||
name: '平台历史订单'
|
||||
}, {
|
||||
name: '实体店历史订单'
|
||||
}],
|
||||
typeList: [],
|
||||
orderList: [],
|
||||
typeList: [], // 商品类型列表
|
||||
orderList: [], // 商品列表
|
||||
page: 0,
|
||||
current: 0,
|
||||
areaList: [],
|
||||
swiperCurrent: 0,
|
||||
areaList: [], // 地址列表
|
||||
showClothesType: false,
|
||||
showAddress: false,
|
||||
swiperCurrent: 0,
|
||||
showPopup : false,
|
||||
checkedList: [],
|
||||
page: 0,
|
||||
swiperHeight: '',
|
||||
value: '', // radio
|
||||
checkedGoods: {},
|
||||
choose: false, // 是否选择商品
|
||||
checkedGoods: {}, // 选中的商品
|
||||
choose: false, // 是否选择了商品
|
||||
filesArr: [], // 选择的图片
|
||||
uploadImage: [], // 图片名称(后台返回)列表
|
||||
uaction: this.$u.http.config.baseUrl + '/Upload/uploadfile', // 下面是上传图片的参数
|
||||
uheader: {
|
||||
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
||||
},
|
||||
uname: 'common', // 与formData name 一样
|
||||
uformData: {
|
||||
name: 'common', // 其他图片
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -242,12 +260,17 @@ export default {
|
||||
methods: {
|
||||
getClothesTypeList() {
|
||||
this.$u.api.getClothesTypeList().then(res => {
|
||||
this.typeList = res.data.typeList;
|
||||
if (res.errCode == 0) {
|
||||
this.typeList = res.data.typeList;
|
||||
} else {
|
||||
this.typeList = [];
|
||||
}
|
||||
console.log(this.typeList);
|
||||
})
|
||||
},
|
||||
confirmType(e) {
|
||||
// console.log(e);
|
||||
this.type = e[0].label;
|
||||
// console.log(e[0]);
|
||||
this.type = e[0];
|
||||
},
|
||||
async getOrderList({ load = 'reload' } = {}) {
|
||||
const res = await this.$u.api.getOrderList({
|
||||
@@ -261,15 +284,96 @@ export default {
|
||||
}
|
||||
return res;
|
||||
},
|
||||
submit() {
|
||||
this.$refs.uUpload.upload();
|
||||
},
|
||||
onUploaded(list) {
|
||||
console.log(list);
|
||||
submitImage() {
|
||||
// this.$refs.uUpload.upload();
|
||||
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
|
||||
// this.confirmSend();
|
||||
},
|
||||
tabsChange(index) {
|
||||
this.swiperCurrent = index;
|
||||
},
|
||||
setImageList(lists) {
|
||||
console.log(lists);
|
||||
let imageList = [];
|
||||
lists.forEach(res => {
|
||||
if(res.response.errCode == 0) imageList.push(res.response.data.file_name);
|
||||
})
|
||||
// console.log(imageList);
|
||||
this.filesArr = imageList;
|
||||
console.log(this.filesArr);
|
||||
this.confirmSend();
|
||||
},
|
||||
validationParams() {
|
||||
if (this.current == 1) {
|
||||
if(this.$u.test.isEmpty(this.goodsName)) {
|
||||
this.showToast('商品名称不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(this.current == 0) {
|
||||
if(JSON.stringify(this.checkedGoods) != '{}') {
|
||||
this.showToast('订单不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.goodsStatus)) {
|
||||
this.showToast('衣服状况不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
if(JSON.stringify(this.type) != '{}') {
|
||||
this.showToast('商品类型不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.name)) {
|
||||
this.showToast('送洗人不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.phone)) {
|
||||
this.showToast('手机号不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
if(!this.$u.test.mobile(this.phone)) {
|
||||
this.showToast('手机号错误', 'warning');
|
||||
return false;
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.area)) {
|
||||
this.showToast('地址不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
if(this.$u.test.isEmpty(this.address)) {
|
||||
this.showToast('详细地址不能为空', 'warning');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
confirmSend() {
|
||||
if(!this.validationParams) return false;
|
||||
let params = {
|
||||
tid: this.type.value,
|
||||
member_name: this.name,
|
||||
area_info: this.area,
|
||||
address_info: this.address,
|
||||
goods_images: this.filesArr,
|
||||
member_phone: this.phone,
|
||||
condition: this.goodsStatus,
|
||||
}
|
||||
if(this.current == 0) {
|
||||
Object.assign(params, {
|
||||
type: 1,
|
||||
order_id: this.checkedGoods.order_id,
|
||||
goods_id: this.checkedGoods.goods.goods_id,
|
||||
});
|
||||
} else if(this.current == 1) {
|
||||
Object.assign(params, {
|
||||
type: 2,
|
||||
goods_name: this.goodsName,
|
||||
});
|
||||
}
|
||||
// console.log(params);
|
||||
this.$u.api.sendLaundrySave(params).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
})
|
||||
},
|
||||
radioChange(e){
|
||||
const ids = e.split(" ");
|
||||
console.log(ids)
|
||||
@@ -278,6 +382,7 @@ export default {
|
||||
if(order.order_id == ids[0]) {
|
||||
Object.assign(checkedGoods, { store: order.extend_store });
|
||||
Object.assign(checkedGoods, { order_sn: order.order_sn });
|
||||
Object.assign(checkedGoods, { order_id: order.order_id });
|
||||
order.extend_order_goods.forEach(goods => {
|
||||
if(goods.goods_id == ids[1]) {
|
||||
Object.assign(checkedGoods, { goods: goods });
|
||||
@@ -301,6 +406,8 @@ export default {
|
||||
this.$u.api.getArea().then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
this.areaList = res.data;
|
||||
} else {
|
||||
this.areaList = [];
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -308,30 +415,13 @@ export default {
|
||||
let current = e.detail.current;
|
||||
this.swiperCurrent = current;
|
||||
this.current = current;
|
||||
this.toApplyPage(current);
|
||||
},
|
||||
order() {
|
||||
this.showPopup = true;
|
||||
},
|
||||
toApplyPage(index) {
|
||||
// console.log(index)
|
||||
if(index == 1) {
|
||||
this.showPopup = false;
|
||||
this.choose = false
|
||||
}
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||
// this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||
this.swiperHeight = res.windowHeight + 'px';
|
||||
},
|
||||
// replaces(){
|
||||
// if(this.list[0].name=='实体店历史订单'){
|
||||
// this.$set(this.list,0,{name: '平台历史订单'} )
|
||||
// }else{
|
||||
// this.$set(this.list,0,{name: '实体店历史订单'} )
|
||||
// }
|
||||
// },
|
||||
confirm(){
|
||||
confirm(e){
|
||||
this.showPopup = false;
|
||||
if(JSON.stringify(this.checkedGoods) != '{}'){
|
||||
this.choose = true;
|
||||
@@ -342,9 +432,12 @@ export default {
|
||||
close(){
|
||||
this.showPopup = false
|
||||
},
|
||||
reset(){
|
||||
this.choose = false
|
||||
},
|
||||
showToast(message, type) {
|
||||
this.$refs.uToast.show({
|
||||
title: message,
|
||||
type: type,
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -487,7 +580,7 @@ export default {
|
||||
background: rgba(236,236,236,1);
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
> img {
|
||||
> image {
|
||||
width: 54rpx;
|
||||
height: 49rpx;
|
||||
margin-top: 48rpx;
|
||||
|
||||
98
pageE/tool/washComment.vue
Normal file
98
pageE/tool/washComment.vue
Normal file
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<view class="comment">
|
||||
<view class="main-container">
|
||||
<u-input v-model="content" type="textarea" height="300" maxlength="200" />
|
||||
<!-- <u-upload
|
||||
ref="uUpload"
|
||||
@on-uploaded="onUploaded"
|
||||
:custom-btn="true"
|
||||
:max-count="count"
|
||||
:auto-upload="false"
|
||||
>
|
||||
<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>
|
||||
<u-toast ref="uToast" />
|
||||
<view class="write-btn" @click="addWashEvaluate">发表评价</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
washId: '',
|
||||
// count: 4, // 最大图片数量
|
||||
content: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.washId = option.id;
|
||||
},
|
||||
methods: {
|
||||
verifyParams() {
|
||||
if(this.$u.test.isEmpty(this.content)) {
|
||||
this.$u.toast('内容不可为空');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
addWashEvaluate() {
|
||||
if(!this.verifyParams()) return false;
|
||||
this.$u.api.sendOrderComment({
|
||||
id: this.washId,
|
||||
comment: this.content,
|
||||
}).then(res => {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
back: true,
|
||||
})
|
||||
})
|
||||
},
|
||||
bindTextAreaBlur(event) {
|
||||
this.content = event.detail.value;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.comment {
|
||||
min-height: calc(100vh - var(--window-top));
|
||||
background-color: #ECECEC;
|
||||
border-top: 1rpx solid #ffffff;
|
||||
.main-container {
|
||||
background-color: #ffffff;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 10rpx;
|
||||
// textarea {
|
||||
// width: 100% !important;
|
||||
// height: 500rpx;
|
||||
// margin-bottom: 60rpx;
|
||||
// }
|
||||
// .slot-btn {
|
||||
// width: 140rpx;
|
||||
// height: 140rpx;
|
||||
// background: rgba(236,236,236,1);
|
||||
// border-radius: 10rpx;
|
||||
// text-align: center;
|
||||
// > img {
|
||||
// margin-top: 48rpx;
|
||||
// width: 54rpx;
|
||||
// height: 49rpx;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
.write-btn {
|
||||
margin: 120rpx auto 0;
|
||||
width: 690rpx;
|
||||
height: 98rpx;
|
||||
background: rgba(255,120,15,1);
|
||||
border-radius: 46rpx;
|
||||
font-size: 36rpx;
|
||||
color: rgba(255,255,255,1);
|
||||
text-align: center;
|
||||
line-height: 98rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user