清理TODO

pull/89/head
卢越 2024-08-26 17:00:29 +08:00
parent 1bff364d38
commit 4fef5c5f0e
2 changed files with 104 additions and 94 deletions

View File

@ -27,13 +27,23 @@
</view> </view>
<!-- 评价 --> <!-- 评价 -->
<view class="area-box"> <view class="area-box">
<uni-easyinput :inputBorder="false" type="textarea" maxlength="120" autoHeight <uni-easyinput
:inputBorder="false"
type="textarea"
maxlength="120"
autoHeight
v-model="state.commentList[index].content" v-model="state.commentList[index].content"
placeholder="宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~" /> placeholder="宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~"
<!-- TODO 卢越评论文件上传 --> />
<view class="img-box"> <view class="img-box">
<s-uploader v-model:url="state.commentList[index].images" fileMediatype="image" <s-uploader
limit="9" mode="grid" :imageStyles="{ width: '168rpx', height: '168rpx' }" @success="(payload) => uploadSuccess(payload, index)" /> v-model:url="state.commentList[index].images"
fileMediatype="image"
limit="9"
mode="grid"
:imageStyles="{ width: '168rpx', height: '168rpx' }"
@success="(payload) => uploadSuccess(payload, index)"
/>
</view> </view>
</view> </view>
<view class="checkbox-container"> <view class="checkbox-container">
@ -67,7 +77,7 @@
const state = reactive({ const state = reactive({
orderInfo: {}, orderInfo: {},
commentList: [], commentList: [],
id: null id: null,
}); });
/** /**
@ -107,14 +117,14 @@
onLoad(async (options) => { onLoad(async (options) => {
if (!options.id) { if (!options.id) {
sheep.$helper.toast(`缺少订单信息,请检查`); sheep.$helper.toast(`缺少订单信息,请检查`);
return return;
} }
state.id = options.id; state.id = options.id;
const { code, data } = await OrderApi.getOrder(state.id); const { code, data } = await OrderApi.getOrder(state.id);
if (code !== 0) { if (code !== 0) {
sheep.$helper.toast('无待评价订单'); sheep.$helper.toast('无待评价订单');
return return;
} }
// //
data.items.forEach((item) => { data.items.forEach((item) => {
@ -124,7 +134,7 @@
descriptionScores: 5, descriptionScores: 5,
benefitScores: 5, benefitScores: 5,
content: '', content: '',
picUrls: [] picUrls: [],
}); });
}); });
state.orderInfo = data; state.orderInfo = data;
@ -166,7 +176,7 @@
} }
} }
.checkbox-container{ .checkbox-container {
padding: 10rpx; padding: 10rpx;
} }

View File

@ -1,6 +1,6 @@
<!-- 商品评论的分页 --> <!-- 商品评论的分页 -->
<template> <template>
<s-layout title="全部评"> <s-layout title="全部评">
<su-tabs <su-tabs
:list="state.type" :list="state.type"
:scrollable="false" :scrollable="false"