Преглед на файлове

消息完成 订单创建时间回显

743180155@qq.com преди 11 месеца
родител
ревизия
caa234429c
променени са 3 файла, в които са добавени 15 реда и са изтрити 9 реда
  1. 7 5
      src/pages/client/clientPackage/goodsEstimation.vue
  2. 6 2
      src/pages/client/clientPackage/orderAll.vue
  3. 2 2
      src/utils/request.js

+ 7 - 5
src/pages/client/clientPackage/goodsEstimation.vue

@@ -8,7 +8,7 @@
       <view class="content-box">
         <view class="title">评价内容:</view>
         <view class="comment-box">
-          <u--textarea v-model="queryParams.content" count placeholder="请输入评价内容" ></u--textarea>
+          <u--textarea v-model="queryParams.remark" count placeholder="请输入评价内容" ></u--textarea>
         </view>
       </view>
     </view>
@@ -23,7 +23,7 @@
       return{
         queryParams:{
           score:0,//评价打分
-          content:'',//评价内容
+          remark:'',//评价内容
           goodsId: "", // 商品id
           orderId: "", // 订单id
           merchantId: "", // 商家id
@@ -31,13 +31,15 @@
       }
     },
     onLoad(option){
-      this.queryParams.orderId = option.orderList.orderId
-      this.queryParams.goodsId = option.goodsList.goodsId
-      this.queryParams.merchantId = option.orderList.merchantId
+	  let { goodsList , orderList } = option
+      this.queryParams.orderId = goodsList.orderId
+      this.queryParams.goodsId = goodsList.goodsId
+      this.queryParams.merchantId = orderList.merchantId
     },
     methods:{
       // 测试提交
       handlerContextSumbit(){
+		console.log("@@@queryParams",this.queryParams)
         goodsCommentsAdd(this.queryParams).then(res=>{
           console.log('@@@@res',res);
           if(res.code === 'OK'){

+ 6 - 2
src/pages/client/clientPackage/orderAll.vue

@@ -15,7 +15,7 @@
               <view class="top-right">{{ type_name }}</view>
             </view>
             <view class="item-top">
-              <view class="top-left gray-color">支付时间 : 2024-01-12</view>
+              <view class="top-left gray-color">支付时间 : {{ item.createTimeText }}</view>
               <view class="top-right"></view>
             </view>
           </view>
@@ -36,7 +36,7 @@
                 </view>
               </view>
               <view class="r-r">
-                <view class="r-item" @click.stop="handlerSkipComment(item, itm)" v-if="type == 4">
+                <view class="r-item" @click.stop="handlerSkipComment(item, itm)" v-if="type == 4 && itm.assessStatus == 0">
                   <u-icon name="chat" color="#000" size="28"></u-icon>
                   <span>评价</span>
                 </view>
@@ -165,6 +165,10 @@
         });
         if ((res.code = 200 && res.data)) {
           this.init_list = res.data.records;
+		  this.init_list.map(rs=>{
+			  console.log("@@@rs",rs)
+			  rs.createTimeText = uni.$u.timeFormat(rs.createTime, 'yyyy-mm-dd hh:MM:ss');
+		  })
         }
       },
 

+ 2 - 2
src/utils/request.js

@@ -11,9 +11,9 @@ import {
 
 // 每次请求都创建一个新的实例
 const instance = axios.create({
-  baseURL: 'https://test.api.chelvc.com',
+  // baseURL: 'https://test.api.chelvc.com',
   // baseURL: "http://192.168.68.77:11000",
-  // baseURL: "https://358175z5l5.yicp.fun",
+  baseURL: "https://358175z5l5.yicp.fun",
   timeout: 10000,
   adapter: UniAdapter,
 });