This commit is contained in:
2020-07-10 17:38:21 +08:00
parent 66f21e230a
commit 7cff88b5d6
11 changed files with 215 additions and 116 deletions

View File

@@ -17,30 +17,63 @@
<view class="rate">
<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 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 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 class="write-btn">发表意见</view>
<view class="write-btn" @click="addOrderEvaluate">发表意见</view>
</view>
</template>
<script>
export default {
data() {
return {
count: 4,
logistics: 1,
service: 1,
describe: 1
orderId: '',
count: 4, // 最大图片数量
logistics: 5,
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>
<style lang="scss" scoped>