Kaynağa Gözat

骑手评价和搜索上传图片接口联调

1410417013 11 ay önce
ebeveyn
işleme
6173b32e18

+ 2 - 2
config/index.js

@@ -24,9 +24,9 @@ module.exports = {
     proxyTable: devEnv.OPEN_PROXY === false ? {} : {
       '/proxyApi': {
         // target: 'https://mxys.chuanghai-tech.com/sqx_fast/', // 线上
-        target: 'http://192.168.161.190:8171/sqx_fast/', // 线上
+        // target: 'http://192.168.161.190:8171/sqx_fast/', // 线上
 
-        // target: 'https://mxys.chuanghai-tech.com/wm-test/wm-api',// 测试
+        target: 'https://mxys.chuanghai-tech.com/wm-test/wm-api',// 测试
         // target: 'http://iyfpk3.natappfree.cc/sqx_fast',// 开发
         changeOrigin: true,
         pathRewrite: {

+ 4 - 4
src/main.js

@@ -32,11 +32,11 @@ Vue.use(Viewer, {
   }
 });
 // Vue.prototype.Tupiantou ='https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload'//线上
-Vue.prototype.Tupiantou ='http://192.168.161.190:8171/sqx_fast/alioss/upload'//线上
-// Vue.prototype.Tupiantou ="https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/alioss/upload"; //线下
+// Vue.prototype.Tupiantou ='http://192.168.161.190:8171/sqx_fast/alioss/upload'//线上
+Vue.prototype.Tupiantou ="https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/alioss/upload"; //线下
 Vue.prototype.Tupian = function(img) {
-  // return "https://mxys.chuanghai-tech.com/wmfile" + img;
-  return "http://192.168.161.190:8171/wmfile" + img;
+  return "https://mxys.chuanghai-tech.com/wmfile" + img;
+  // return "http://192.168.161.190:8171/wmfile" + img;
 }; //全局图片请求头
 
 Vue.prototype.$axios = axios;

+ 2 - 2
src/utils/httpRequest.js

@@ -71,9 +71,9 @@ http.adornUrl = actionName => {
   // return 'http://iyfpk3.natappfree.cc/sqx_fast/' + actionName; // 开发
   // return 'https://www.daweilinli.com/sqx_fast/' + actionName
 
-  return 'http://192.168.161.190:8171/sqx_fast/' + actionName
+  // return 'http://192.168.161.190:8171/sqx_fast/' + actionName
   // return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName; //  线上
-  // return "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/" + actionName;// 测试
+  return "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/" + actionName;// 测试
 };
 
 http.adornUrl2 = actionName => {

+ 113 - 62
src/views/riderEvaluation/riderEvaluation.vue

@@ -12,7 +12,7 @@
           style="width: 160px;"
           @keydown.enter.native="select"
           placeholder="请输入订单号"
-          v-model="address"
+          v-model="ordeId"
         >
         </el-input
         >&nbsp;&nbsp;
@@ -23,7 +23,7 @@
           style="width: 160px;"
           @keydown.enter.native="select"
           placeholder="请输入骑手姓名"
-          v-model="address"
+          v-model="riderName"
         >
         </el-input
         >&nbsp;&nbsp;
@@ -34,18 +34,18 @@
           style="width: 160px;"
           @keydown.enter.native="select"
           placeholder="请输入骑手手机号"
-          v-model="address"
+          v-model="phone"
         >
         </el-input
         >&nbsp;&nbsp;
       </div>
       <div style="position: relative;display: inline-block;">
-        <span>用户:</span>
+        <span>用户手机号:</span>
         <el-input
           style="width: 160px;"
           @keydown.enter.native="select"
           placeholder="请输入用户"
-          v-model="address"
+          v-model="userPhone"
         >
         </el-input
         >&nbsp;&nbsp;
@@ -55,19 +55,22 @@
         <el-input
           style="width: 160px;"
           @keydown.enter.native="select"
-          placeholder="请输入店铺"
-          v-model="address"
+          placeholder="请输入店铺"
+          v-model="shopName"
         >
         </el-input
         >&nbsp;&nbsp;
       </div>
-      <div style="display: inline-block;">
-        <span>评价类型:</span>
-        <el-select v-model="flag" style="width:150px;margin-left: 10px;">
-          <el-option label="满意" value="满意"> </el-option>
-          <el-option label="一般" value="一般"> </el-option>
-          <el-option label="不满意" value="不满意"> </el-option> </el-select
-        >&nbsp;&nbsp;&nbsp;
+      <div style="position: relative;display: inline-block;">
+        <span>评价类型(如1代表1颗星)</span>
+        <el-input
+          style="width: 160px;"
+          @keydown.enter.native="select"
+          placeholder="请输入星级"
+          v-model="riderScore"
+        >
+        </el-input
+        >&nbsp;&nbsp;
       </div>
       <div style="display: inline-block;">
         <span>时间:</span>
@@ -124,20 +127,24 @@
         @click="cleans"
         >重置
       </el-button>
-      <el-button
+      <!-- <el-button
         style="margin-left:15px;"
         size="mini"
         type="primary"
         icon="document"
         @click="exportList"
         >导出
-      </el-button>
+      </el-button> -->
     </div>
     <el-table v-loading="tableDataLoading" :data="homeData.list">
       <el-table-column fixed prop="rankNum" label="编号" width="80">
-        <!-- <template slot-scope="scope">
-					<div>{{scope.$index+1}}</div>
-				</template> -->
+        <template slot-scope="scope">
+					  <span>{{scope.$index+1}}</span>
+				  </template>
+      </el-table-column>
+      <el-table-column prop="riderName" label="骑手姓名" width="120">
+      </el-table-column>
+      <el-table-column prop="phone" label="骑手手机号" width="120">
       </el-table-column>
       <el-table-column prop="riderNickName" label="用户头像" width="120">
         <template slot-scope="scope">
@@ -152,12 +159,12 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="nickName" label="用户" width="120">
+      <el-table-column prop="userPhone" label="用户手机号" width="120">
       </el-table-column>
-      <el-table-column prop="address" label="订单号"> </el-table-column>
-      <el-table-column prop="stationName" label="评价"> </el-table-column>
-      <el-table-column prop="moneyOrder" label="评价内容"> </el-table-column>
-      <el-table-column prop="riderBalance" label="店铺"> </el-table-column>
+      <el-table-column prop="orderNumber" label="订单号"> </el-table-column>
+      <el-table-column prop="riderScore" label="评分"> </el-table-column>
+      <el-table-column prop="evaluateRiderMessage" label="评价内容"> </el-table-column>
+      <el-table-column prop="shopName" label="店铺"> </el-table-column>
       <el-table-column prop="createTime" label="创建时间" width="160">
       </el-table-column>
       <el-table-column label="操作" width="150" align="center">
@@ -264,7 +271,6 @@ export default {
   },
   data() {
     return {
-      stationData: [], // 骑手站点数据
       stationName: "",
       size: 10,
       page: 1,
@@ -366,40 +372,34 @@ export default {
       info: {
         stockDate: this.getNowTime() //日期
       },
-      flags: [
-        {
-          value: "day",
-          label: "按天查询"
-        },
-        {
-          value: "month",
-          label: "按月查询"
-        },
-        {
-          value: "year",
-          label: "按年查询"
-        }
-      ],
       address: "",
 
       // 导出限制
       exportTitle: "导出错误",
       exportVisible: false,
-      exportFlag: 1 //1 超出限制  2导出中
+      exportFlag: 1 ,//1 超出限制  2导出中
+      phone:'',//骑手电话
+      ordeId:'',//订单号
+      riderName:'',//骑手姓名
+      userPhone:'',//用户手机号
+      shopName:'',//店铺名
+      riderScore:'',//评价类型,星
     };
   },
-  methods: {
-    // 站点下拉框
-    stationList() {
-      this.$http({
-        url: this.$http.adornUrl("admin/riderStation/stationList"),
-        method: "get",
-        params: this.$http.adornParams({})
-      }).then(({ data }) => {
-        console.log(data, "站点下拉框");
-        this.stationData = data.data;
-      });
+  watch: {
+    // 监听路由参数的变化
+      '$route.query.riderPhone': {
+        immediate: true, // 如果需要在组件创建时立即触发,设置为true
+        handler(newVal, oldVal) {
+          // 当路由参数变化时,这里会被调用
+          // 你可以在这里根据新的参数执行你的逻辑
+          console.log(newVal,oldVal);
+          this.phone = newVal
+          this.homeSelect()
+        }
+      }
     },
+  methods: {
     //处理默认选中当前日期
     getNowTime() {
       var now = new Date();
@@ -446,28 +446,77 @@ export default {
     },
     // 获取社区数据列表
     homeSelect() {
+      // console.log(this.info.stockDate,Array.isArray(this.info.stockDate))
+      let start=''
+      let end=''
+      if(Array.isArray(this.info.stockDate)){
+        start=this.info.stockDate[0]
+        end=this.info.stockDate[1]
+      }else{
+        start=''
+        end=''
+      }
       this.tableDataLoading = true;
       this.$http({
-        url: this.$http.adornUrl(`admin/dataCentre/rankingList`),
+        url: this.$http.adornUrl(`/admin/order/evaluateRiderPage`),
         method: "get",
         params: this.$http.adornParams({
           page: this.page,
           limit: this.limit,
-          address: this.address,
-          date: this.info.stockDate,
-          dateType: this.flag,
-          riderStationId: this.stationName
+          riderName: this.riderName,
+          phone: this.phone,
+          orderNumber: this.ordeId,
+          userPhone: this.userPhone,
+          shopName:this.shopName,
+          riderScore:this.riderScore,
+          start:start,
+          end:end,
         })
       }).then(({ data }) => {
         console.log(data, "骑手排行榜");
 
         this.tableDataLoading = false;
         let returnData = data.data;
-
-        console.log(data.data.state);
         this.homeData = data.data;
       });
     },
+    // 删除评论
+      downFile(row) {
+        this.$confirm(`确定要删除评论吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl('admin/order/delete'),
+            method: 'get',
+            params: this.$http.adornParams({
+              'evaluateRiderId': row.id
+            })
+          }).then(({
+            data
+          }) => {
+            if (data.code == 0) {
+              this.$message({
+                message: '删除成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.homeSelect()
+                }
+              })
+            } else {
+              this.$message({
+                message: data.msg,
+                type: 'warning',
+                duration: 1500,
+                onClose: () => {}
+              })
+            }
+
+          })
+        }).catch(() => {})
+      },
     // 信息数据
     InformationSelect() {
       this.userId = this.$store.state.user.id;
@@ -694,9 +743,12 @@ export default {
     },
     // 重置
     cleans() {
-      this.indentState = 0;
-      this.address = "";
-      this.flag = "";
+      this.riderName=''
+      this.phone=''
+      this.orderNumber=''
+      this.userPhone=''
+      this.shopName=''
+      this.riderScore=''
       this.info.stockDate = this.getNowTime();
       this.homeSelect();
     },
@@ -768,7 +820,6 @@ export default {
   },
   mounted() {
     this.homeSelect();
-    this.stationList();
   }
 };
 </script>

+ 25 - 0
src/views/riderTop/riderTop.vue

@@ -123,6 +123,19 @@
       </el-table-column>
       <el-table-column prop="moneyOrder" label="总收益"> </el-table-column>
       <el-table-column prop="riderBalance" label="骑手余额"> </el-table-column>
+      <el-table-column label="操作" width="150" align="center">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="primary"
+            :disabled="!isAuth('riderTop:watchPing')"
+            @click="downFile(scope.row)"
+            style="margin: 5px;"
+          >
+            骑手评价
+          </el-button>
+        </template>
+      </el-table-column>
       <!-- <el-table-column prop="createTime" label="创建时间" width="160">
 			</el-table-column> -->
       <!-- <el-table-column label="操作" width="150" align="center">
@@ -465,6 +478,18 @@ export default {
       this.shenheId = row.id;
       this.dialogFormVisible8 = true;
     },
+    // 跳转到骑手评价查看当前骑手信息
+    downFile(row) {
+      console.log(row.riderPhone);
+      if (row.riderPhone) {
+          this.$router.push({
+            path: "/riderEvaluation",
+            query: {
+              riderPhone: row.riderPhone
+            }
+          });
+      } 
+    },
     // 提交审核
     refuseto(row) {
       if (this.radio == 2 && this.contents == "") {

+ 21 - 11
src/views/selfShop/shopPublish.vue

@@ -739,7 +739,7 @@
     >
       <div>
         <div class="title">
-          <span>封面图:</span><span>共有条结果供选择</span>
+          <span>封面图:</span><span>共有<span>{{ cover.length }}</span>条结果供选择</span>
         </div>
         <div class="tupian" id="cover" @scroll="searchTupianScroll1">
           <div
@@ -761,7 +761,7 @@
       </div>
       <div>
         <div class="title">
-          <span>轮播图:</span><span>共有条结果供选择</span>
+          <span>轮播图:</span><span>共有<span>{{ carousel.length }}</span>条结果供选择</span>
         </div>
         <div class="tupian" id="carousel" @scroll="searchTupianScroll2">
           <div
@@ -773,7 +773,7 @@
           >
             <el-image
               class="el-image"
-              :src="item.goodsCover"
+              :src="item.goodsPicture"
               name="el-image"
               fit="cover"
             ></el-image>
@@ -783,7 +783,7 @@
       </div>
       <div>
         <div class="title">
-          <span>详情图:</span><span>共有条结果供选择</span>
+          <span>详情图:</span><span>共有<span>{{ detail.length }}</span>条结果供选择</span>
         </div>
         <div class="tupian" id="detail" @scroll="searchTupianScroll3">
           <div
@@ -795,7 +795,7 @@
           >
             <el-image
               class="el-image"
-              :src="item.goodsCover"
+              :src="item.goodsParticularsPicture"
               name="el-image"
               fit="cover"
             ></el-image>
@@ -1752,18 +1752,28 @@ export default {
     },
     // 确定图片
     searchAffirm() {
+      
       this.cover1.forEach(i=>{
         this.goodsCover=i.goodsCover
       })
       this.potost=[]
-      this.carousel1.forEach(i=>{
-        this.potost.push(i.goodsCover)
-      })
+      for(var a=0;a<this.carousel.length;a++){
+        this.carousel1.forEach(i=>{
+          if(i.id==this.carousel[a].id){
+            this.potost.push(this.carousel[a].goodsPicture)
+          }
+        })
+      }
       this.goodsParticularsPicture=[]
-      this.detail1.forEach(i=>{
-        this.goodsParticularsPicture.push(i.goodsCover)
-      })
+      for(var b=0;b<this.detail.length;b++){
+        this.detail1.forEach(i=>{
+          if(i.id==this.detail[b].id){
+            this.goodsParticularsPicture.push(this.detail[b].goodsParticularsPicture)
+          }
+        })
+      }
       this.tupianVisible = false;
+      console.log(this.potost,'iii')
     },
     // 取消弹出
     searchCancle() {

+ 1 - 1
src/views/shopsList/pingjiaList.vue

@@ -228,7 +228,7 @@
           }) => {
             if (data.code == 0) {
               this.$message({
-                message: '取消成功',
+                message: '删除成功',
                 type: 'success',
                 duration: 1500,
                 onClose: () => {