浏览代码

【功能完善】商品评论上传图片

puhui999 8 月之前
父节点
当前提交
1407350bf7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pages/goods/comment/add.vue

+ 2 - 2
pages/goods/comment/add.vue

@@ -71,7 +71,7 @@
 <script setup>
 <script setup>
   import sheep from '@/sheep';
   import sheep from '@/sheep';
   import { onLoad } from '@dcloudio/uni-app';
   import { onLoad } from '@dcloudio/uni-app';
-  import { reactive, ref } from 'vue';
+  import { reactive } from 'vue';
   import OrderApi from '@/sheep/api/trade/order';
   import OrderApi from '@/sheep/api/trade/order';
 
 
   const state = reactive({
   const state = reactive({
@@ -111,7 +111,7 @@
    * @param commentIndex  当前评论的下标
    * @param commentIndex  当前评论的下标
    */
    */
   function uploadSuccess(payload, commentIndex) {
   function uploadSuccess(payload, commentIndex) {
-    state.commentList[commentIndex].picUrls = state.commentList[commentIndex].images;
+    state.commentList[commentIndex].picUrls = payload.tempFilePaths;
   }
   }
 
 
   onLoad(async (options) => {
   onLoad(async (options) => {