Merge pull request 'fixing bug' (#335) from zhy into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/335
This commit is contained in:
hansu 2020-09-05 14:28:11 +08:00
commit d4a1439bf9
8 changed files with 72 additions and 42 deletions

View File

@ -375,10 +375,9 @@ export default {
return vm.$u.post('member/getClothesTypeList'); return vm.$u.post('member/getClothesTypeList');
}, },
// 送洗评价 // 送洗评价
sendOrderComment({ id, comment }) { sendOrderComment({ id, comment, comment_img }) {
return vm.$u.post('member/sendOrderComment', { return vm.$u.post('member/sendOrderComment', {
id: id, id, comment, comment_img
comment: comment,
}); });
}, },
// 送洗确认完成 // 送洗确认完成

View File

@ -6,8 +6,8 @@
</view> </view>
<view class="user-comment"> <view class="user-comment">
<view class="text u-line-2">{{ info.comment }}</view> <view class="text u-line-2">{{ info.comment }}</view>
<view class="image"> <view class="image" v-if="info.comment_img">
<image v-for="(src, index) in info.images" :key="index" :src="src" mode="aspectFit"></image> <image :src="info.comment_img" mode="aspectFit" @click="previewImage(info.comment_img)"></image>
</view> </view>
</view> </view>
</view> </view>
@ -19,6 +19,14 @@ export default {
}, },
props: { props: {
info: Object, info: Object,
},
methods: {
previewImage(urls) {
// console.log(urls)
uni.previewImage({
urls: urls,
});
},
} }
}; };
</script> </script>
@ -47,12 +55,12 @@ export default {
font-size: 26rpx; font-size: 26rpx;
color: rgba(51,51,51,1); color: rgba(51,51,51,1);
line-height: 40rpx; line-height: 40rpx;
margin-bottom: 19rpx;
} }
.image { .image {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
> image { > image {
margin-top: 20rpx;
width: 210rpx; width: 210rpx;
height: 210rpx; height: 210rpx;
border-radius: 10rpx; border-radius: 10rpx;

View File

@ -110,7 +110,6 @@ export default {
left: 0; left: 0;
top: 0; top: 0;
z-index: 8; z-index: 8;
background-color: aqua;
} }
&:last-child { &:last-child {
left: 32rpx; left: 32rpx;

View File

@ -236,6 +236,13 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/*坑解决iphoneX等大屏手机底部小黑条挡住tab的解决方法安全区域距离底部边界距离env() 跟 constant() 需要同时存在,而且顺序不能换。*/
/* #ifdef H5 */
body {
padding-bottom: constant(safe-area-inset-bottom);/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
}
/* #endif */
.merchant { .merchant {
// min-height: 100vh; // min-height: 100vh;
background-color: #ECECEC; background-color: #ECECEC;

View File

@ -3,7 +3,7 @@
<view class="status" v-if="orderstate"> <view class="status" v-if="orderstate">
<view class="text"> <view class="text">
<view class="status-text">{{ s_object[orderstate].text }}</view> <view class="status-text">{{ s_object[orderstate].text }}</view>
<view class="time" v-if="orderInfo.view_type == 1 || orderInfo.view_type == 9">距离结束{{ countdown }}</view> <!-- <view class="time" v-if="orderInfo.view_type == 1 || orderInfo.view_type == 9">距离结束{{ countdown }}</view> -->
</view> </view>
<image :src="s_object[orderstate].image"></image> <image :src="s_object[orderstate].image"></image>
</view> </view>
@ -209,8 +209,8 @@ export default {
if(res.errCode == 0) { if(res.errCode == 0) {
this.orderInfo = res.data; this.orderInfo = res.data;
this.setTitle(this.orderInfo.view_type); this.setTitle(this.orderInfo.view_type);
if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time); // if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time);
else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime); // else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime);
} }
uni.stopPullDownRefresh(); // uni.stopPullDownRefresh(); //
}) })

View File

@ -3,7 +3,7 @@
<scroll-view scroll-y class="history-box" @scrolltolower="reachBottom"> <scroll-view scroll-y class="history-box" @scrolltolower="reachBottom">
<view class="item-box"> <view class="item-box">
<!-- 需求只显示最近五十条数据 后台未作限制 --> <!-- 需求只显示最近五十条数据 后台未作限制 -->
<view v-for="(item, index) in historyList.slice(0, 50)" :key="index" class="history-item"> <view v-for="(item, index) in historyList" :key="index" class="history-item">
<view class="item-title" @click="viewStoreDetails(item.store_id)"> <view class="item-title" @click="viewStoreDetails(item.store_id)">
<image :src="item.store_avatar"></image> <image :src="item.store_avatar"></image>
<view class="u-line-1">{{ item.store_name }}</view> <view class="u-line-1">{{ item.store_name }}</view>

View File

@ -57,10 +57,6 @@
<view class="order-view order-area" @click="showAddress=true"> <view class="order-view order-area" @click="showAddress=true">
<view class="title">省市区:</view> <view class="title">省市区:</view>
<input type="text" v-model="area" disabled /> <input type="text" v-model="area" disabled />
<!-- <view class="location">
<image src="../static/mine/28.png"></image>
<view>定位</view>
</view> -->
</view> </view>
<view class="order-view order-address"> <view class="order-view order-address">
<view class="title">详细地址:</view> <view class="title">详细地址:</view>
@ -113,10 +109,6 @@
<view class="order-view order-area" @click="showAddress=true"> <view class="order-view order-area" @click="showAddress=true">
<view class="title">省市区:</view> <view class="title">省市区:</view>
<input type="text" v-model="area" disabled /> <input type="text" v-model="area" disabled />
<!-- <view class="location">
<image src="../static/mine/28.png"></image>
<view>定位</view>
</view> -->
</view> </view>
<view class="order-view order-address"> <view class="order-view order-address">
<view class="title">详细地址:</view> <view class="title">详细地址:</view>
@ -254,7 +246,6 @@ export default {
// this.current = 0; // this.current = 0;
// this.swiperCurrent = 0; // this.swiperCurrent = 0;
this.showPopup = false; this.showPopup = false;
this.choose = false;
}, },
onLoad() { onLoad() {
this.getOrderList(); this.getOrderList();
@ -270,6 +261,7 @@ export default {
this.phone = ''; this.phone = '';
this.area = ''; this.area = '';
this.address = ''; this.address = '';
this.choose = false;
} }
}, },
methods: { methods: {

View File

@ -2,20 +2,25 @@
<view class="comment"> <view class="comment">
<view class="main-container"> <view class="main-container">
<u-input v-model="content" type="textarea" height="300" maxlength="200" /> <u-input v-model="content" type="textarea" height="300" maxlength="200" />
<!-- <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"
:action="action"
:header="header"
:form-data="formData"
:name="fileName"
:size-type="['original']"
@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">
<image src="../static/mine/27.png"></image> <image src="../static/mine/27.png"></image>
</view> </view>
</u-upload> --> </u-upload>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<view class="write-btn" @click="addWashEvaluate">发表评价</view> <view class="write-btn" @click="setLoaclList">发表评价</view>
</view> </view>
</template> </template>
<script> <script>
@ -23,8 +28,17 @@ export default {
data() { data() {
return { return {
washId: '', washId: '',
// count: 4, // count: 1,
action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
header: {
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
},
fileName: 'common', // formData name
formData: {
name: 'common', //
},
content: '', content: '',
imageList: [],
} }
}, },
onLoad(option) { onLoad(option) {
@ -38,11 +52,22 @@ export default {
} }
return true; return true;
}, },
setLoaclList() {
this.$refs.uUpload.upload();
},
setImageList(lists) {
// console.log(lists);
lists.forEach(item => {
this.imageList.push(item.response.data.file_name);
})
this.addWashEvaluate();
},
addWashEvaluate() { addWashEvaluate() {
if(!this.verifyParams()) return false; if(!this.verifyParams()) return false;
this.$u.api.sendOrderComment({ this.$u.api.sendOrderComment({
id: this.washId, id: this.washId,
comment: this.content, comment: this.content,
comment_img: this.imageList[0]
}).then(res => { }).then(res => {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.message, title: res.message,
@ -65,23 +90,23 @@ export default {
background-color: #ffffff; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
// textarea { textarea {
// width: 100% !important; width: 100% !important;
// height: 500rpx; height: 500rpx;
// margin-bottom: 60rpx; margin-bottom: 60rpx;
// } }
// .slot-btn { .slot-btn {
// width: 140rpx; width: 140rpx;
// height: 140rpx; height: 140rpx;
// background: rgba(236,236,236,1); background: rgba(236,236,236,1);
// border-radius: 10rpx; border-radius: 10rpx;
// text-align: center; text-align: center;
// > img { > image {
// margin-top: 48rpx; margin-top: 48rpx;
// width: 54rpx; width: 54rpx;
// height: 49rpx; height: 49rpx;
// } }
// } }
} }
.write-btn { .write-btn {
margin: 120rpx auto 0; margin: 120rpx auto 0;