yurong/pageOne/mes/evaluate.vue

96 lines
2.8 KiB
Vue

<template>
<view>
<view class="w100 rows rowsc">
<view class="w-710 bgff br-20 p-all-28">
<scroll-view scroll-y="true" style="max-height: 500rpx;">
<view class="rows mb-20" v-for="(itm,index) in infor.product" :key="index">
<image class="w-176 h-176 br-20 mr-20" :src="url + itm.cart_info.image" mode="aspectFill"></image>
<view class="rows rowsl h-176 rowsb">
<text class="fw-b col333 fs-28">{{itm.cart_info.title}}</text>
<view class="rows rowsm">
<text class="col888 fs-26 mr-20">{{itm.cart_info.sku.sku}}</text>
<text class="col888 fs-26">x{{itm.cart_info.number}}</text>
</view>
<text class="fs-20 fw-b" style="color: #CF2D22;">{{itm.cart_info.sub_price}}</text>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="w100 rows rowsc mt-20">
<view class="w-710 bgff br-20 p-all-24 rows rowsm rowsb">
<text class="fw-b col333 fs-28">评分</text>
<uni-rate :touchable="false" :value="5" @change="onChange" size="20"/>
</view>
</view>
<view class="w100 rows rowsc mt-20">
<view class="w-710 bgff br-20 p-all-24">
<text class="fw-b col333 fs-28">评价内容</text>
<view class="w-662 h-240 br-20 mt-20 p-all-20" style="background-color: #F7F7F7;">
<textarea class="fs-28" placeholder="请输入..." v-model="content"></textarea>
</view>
</view>
</view>
<view class="w100 rows rowsc mt-20">
<view class="w-710 bgff br-20 p-all-24">
<text class="fw-b col333 fs-28">图片</text>
<image class="w-212 h-212 mr-20" src="/static/images/053fe.png" mode=""></image>
</view>
</view>
<view class="w100 rows rowsc bgff fixed h-170 pt-30" style="bottom: 0rpx;">
<view class="w-690 h-88 rows rowsm rowsc bg_linear colfff fw-b fs-30 br-100" @click="refund">
提交
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
ids:'',
infor:{},
url:'',
content:''
}
},
onLoad(e) {
this.url = this.$tools.URL
this.ids = e.id
this.orderDetails()
},
methods: {
// 详情
orderDetails(){
this.$tools.axiosFromToken("GET","store/order/detail",{order_id:this.ids}).then(res => {
this.infor = res.data
})
},
refund(){
if(this.content=='') return this.$tools.showtt('退款原因不能为空')
this.$tools.axiosFromToken("POST","store/order/refund",{
order_id:this.ids,
content:this.content
}).then(res => {
if(res.code==1){
this.$tools.showtt(res.msg)
setTimeout(() => {
this.$tools.goBack()
},1000)
}else{
this.$tools.showtt(res.msg)
}
})
}
}
}
</script>
<style>
page{
background-color: #F7F8FA;
padding-top: 20rpx;
}
</style>