Procházet zdrojové kódy

feature_20260509_release环境下window.location.origin跳转方式问题

zhujindu před 1 dnem
rodič
revize
f9557f1769

+ 3 - 0
src/main.js

@@ -85,6 +85,9 @@ if (isProd) {
   Vue.use(vConsole);
 }
 
+const locationOrigin = process.env.NODE_ENV === 'development' ? '/releaseMobile' : '/mobile';
+Vue.prototype.locationOrigin = locationOrigin;
+
 Vue.use(directive);
 
 new Vue({

+ 2 - 2
src/views/clew/clewent.vue

@@ -562,7 +562,7 @@ export default {
               this.$toast.success('转发成功');
               this.show = false;
               if (this.$route.query.token != undefined) {
-                window.location.replace(window.location.origin + '/mobile/clew');
+                window.location.replace(window.location.origin + this.locationOrigin + '/clew');
               } else {
                 store.dispatch('setRefreshClewPage', true);
                 // 返回上一页不会刷新页面
@@ -773,7 +773,7 @@ export default {
           this.toastLoading().clear();
           if (res.code == 200) {
             if (this.$route.query.token != undefined) {
-              window.location.replace(window.location.origin + '/mobile/clew');
+              window.location.replace(window.location.origin + this.locationOrigin + '/clew');
             } else {
               store.dispatch('setRefreshClewPage', true);
               // 返回上一页不会刷新页面

+ 3 - 3
src/views/clew/complaintDetail/index.vue

@@ -303,7 +303,7 @@ export default {
                 showCancelButton: false,
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/clew');
+                window.location.replace(window.location.origin + this.locationOrigin + '/clew');
               });
           }
         } else {
@@ -337,7 +337,7 @@ export default {
           this.toastLoading().clear();
           if (res.code == 200) {
             if (this.$route.query.token != undefined) {
-              window.location.replace(window.location.origin + '/mobile/clew');
+              window.location.replace(window.location.origin + this.locationOrigin + '/clew');
             } else {
               store.dispatch('setRefreshClewPage', true);
               // 返回上一页不会刷新页面
@@ -484,7 +484,7 @@ export default {
               this.$toast.success('转发成功');
               this.show = false;
               if (this.$route.query.token != undefined) {
-                window.location.replace(window.location.origin + '/mobile/clew');
+                window.location.replace(window.location.origin + this.locationOrigin + '/clew');
               } else {
                 store.dispatch('setRefreshClewPage', true);
                 // 返回上一页不会刷新页面

+ 68 - 41
src/views/deviceOutside/oderSuccess.vue

@@ -1,72 +1,99 @@
 <template>
   <div>
-    <van-nav-bar class="navBar" title="下单成功"   />
-    <div style="    background-color: rgb(74, 202, 109);
-    color: #fff;
-    width: 132px;
-    height: 132px;
-    border-radius: 106px;
-    text-align: center;
-    line-height: 190px;    margin: 38% auto 80px;">
-      <van-icon name="success"  size="80"/>
+    <van-nav-bar class="navBar" title="下单成功" />
+    <div
+      style="
+        background-color: rgb(74, 202, 109);
+        color: #fff;
+        width: 132px;
+        height: 132px;
+        border-radius: 106px;
+        text-align: center;
+        line-height: 190px;
+        margin: 38% auto 80px;
+      ">
+      <van-icon name="success" size="80" />
     </div>
     <van-row gutter="20" style="text-align: center">
-      <van-col span="12"><van-button icon="home" style="width: 120px" size="small" round  type="primary" @click="goback">去首页</van-button>
+      <van-col span="12"
+        ><van-button
+          icon="home"
+          style="width: 120px"
+          size="small"
+          round
+          type="primary"
+          @click="goback"
+          >去首页</van-button
+        >
       </van-col>
-      <van-col span="12"><van-button icon="guide-o"  style="width: 120px" size="small" round  type="info" @click="visite">继续拜访</van-button></van-col>
+      <van-col span="12"
+        ><van-button
+          icon="guide-o"
+          style="width: 120px"
+          size="small"
+          round
+          type="info"
+          @click="visite"
+          >继续拜访</van-button
+        ></van-col
+      >
     </van-row>
   </div>
 </template>
 
 <script>
-import {addstoreRegister, addVisitsPosition, checkVisit, mobileReposition} from "@/api";
-import axios from "axios";
-import home from "@/assets/Icon/home.png";
-import {getVisitsParams} from "@/api/inventory";
+import { addstoreRegister, addVisitsPosition, checkVisit, mobileReposition } from '@/api';
+import axios from 'axios';
+import home from '@/assets/Icon/home.png';
+import { getVisitsParams } from '@/api/inventory';
 export default {
-  name: "success",
-  data(){
-    return{
-      fromValue:{},
-      home:home,
-    }
+  name: 'success',
+  data() {
+    return {
+      fromValue: {},
+      home: home,
+    };
   },
   created() {
-    this.addstoreRegister()
+    this.addstoreRegister();
   },
   watch: {
     $route(to, from) {
-      if (to.path == "/success") {
-        this.addstoreRegister()
+      if (to.path == '/success') {
+        this.addstoreRegister();
       }
-    }
+    },
   },
   methods: {
     addstoreRegister() {
-      getVisitsParams({storeCode: this.$route.query.storeCode}).then(res => {
-        this.fromValue = res.data
-      })
+      getVisitsParams({ storeCode: this.$route.query.storeCode }).then((res) => {
+        this.fromValue = res.data;
+      });
     },
     goback() {
-      window.location.replace(window.location.origin + "/mobile/")
+      window.location.replace(window.location.origin + this.locationOrigin + '/');
     },
     visite() {
       if (this.fromValue != undefined) {
         if (this.fromValue.url != undefined) {
-          window.location.replace(window.location.origin + "/mobile" + this.fromValue.url)
+          window.location.replace(
+            window.location.origin + this.locationOrigin + this.fromValue.url,
+          );
         } else {
-          this.$dialog.alert({
-            message: "拜访地址有误,请联系管理员!",
-          }).then(() => {
-          });
+          this.$dialog
+            .alert({
+              message: '拜访地址有误,请联系管理员!',
+            })
+            .then(() => {});
         }
       } else {
-        this.$dialog.alert({
-          message: "拜访地址有误,请联系管理员!",
-        }).then(() => {
-        });
+        this.$dialog
+          .alert({
+            message: '拜访地址有误,请联系管理员!',
+          })
+          .then(() => {});
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>

+ 6 - 4
src/views/deviceOutside/outabnormalVisit.vue

@@ -155,7 +155,9 @@ export default {
                   message: '拜访中任务结束成功!',
                 })
                 .then(() => {
-                  window.location.replace(window.location.origin + '/mobile/outsidelist/index');
+                  window.location.replace(
+                    window.location.origin + this.locationOrigin + '/outsidelist/index',
+                  );
                 });
             } else {
               this.$toast(res.msg);
@@ -166,7 +168,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     getPhotoTypeList() {
@@ -263,7 +265,7 @@ export default {
               that.$toast(res.msg);
             }
           });
-        }
+        },
       );
     },
     endVisitsFn() {
@@ -300,7 +302,7 @@ export default {
                 //   window.location.replace(window.location.origin + "/mobile/topStore?info=y")
                 // }else{
                 window.location.replace(
-                  window.location.origin + '/mobile/outsidelist/index?info=y'
+                  window.location.origin + this.locationOrigin + '/outsidelist/index?info=y',
                 );
                 // }
               });

+ 2 - 2
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -679,7 +679,7 @@ export default {
     onClickLeft() {
       localStorage.setItem('getRequestFlage', 'true');
       if (this.$route.query.urltype == 1) {
-        window.location.replace(window.location.origin + '/mobile/home');
+        window.location.replace(window.location.origin + this.locationOrigin + '/home');
       } else {
         this.$router.go(-1);
       }
@@ -752,7 +752,7 @@ export default {
             //   window.location.replace(window.location.origin + '/mobile/topStore?info=y');
             // } else {
             if (this.$route.query.urltype == 1) {
-              window.location.replace(window.location.origin + '/mobile/home');
+              window.location.replace(window.location.origin + this.locationOrigin + '/home');
             } else {
               this.onClickLeft();
               // window.location.replace(

+ 253 - 184
src/views/deviceWithin/abnormalVisit.vue

@@ -3,7 +3,7 @@
     <!--        顶部条-->
     <van-nav-bar class="navBar" title="异常拜访" left-arrow @click-left="onClickLeft">
       <template #right>
-        <span  @click="onstopVisit" class="navRightBtnTop">取消拜访</span>
+        <span @click="onstopVisit" class="navRightBtnTop">取消拜访</span>
       </template>
     </van-nav-bar>
     <!--        主体内容-->
@@ -12,42 +12,58 @@
       <van-form class="bgWhite">
         <div class="formLabel">
           <van-cell>
-            <template #title>
-              <span class="van-f-red">*</span>异常信息照
-            </template>
+            <template #title> <span class="van-f-red">*</span>异常信息照 </template>
             <template #right-icon>
-              <upload-img :uploadid="uploadid2" :imgArr="imgs" @newimgarr="newimgarr1"
-                          :visitModel="visitModel" :visitsId="visitId" :taskId="rdId"></upload-img>
+              <upload-img
+                :uploadid="uploadid2"
+                :imgArr="imgs"
+                @newimgarr="newimgarr1"
+                :visitModel="visitModel"
+                :visitsId="visitId"
+                :taskId="rdId"></upload-img>
             </template>
           </van-cell>
-          <div style="padding:10px 10px 0;" v-if="imgs.length>0">
+          <div style="padding: 10px 10px 0" v-if="imgs.length > 0">
             <delete-upload-img :imgs="imgs" @delimg="newimgarr1"></delete-upload-img>
           </div>
         </div>
         <div class="formLabel">
           <van-cell>
-            <template #title>
-              <span class="van-f-red">*</span>异常事由
-            </template>
+            <template #title> <span class="van-f-red">*</span>异常事由 </template>
           </van-cell>
           <van-radio-group v-model="abnormalReason" class="z-checkbox">
-            <van-radio :name="item.dictValue" v-for="(item,index) in typeList" :key="index">{{item.dictLabel }}</van-radio>
+            <van-radio :name="item.dictValue" v-for="(item, index) in typeList" :key="index">{{
+              item.dictLabel
+            }}</van-radio>
           </van-radio-group>
         </div>
-        <div class="formLabel" style="padding-bottom: 20px;">
+        <div class="formLabel" style="padding-bottom: 20px">
           <van-cell>
             <van-cell>
-              <template #title>
-                <span class="van-f-red">*</span>信息备注
-              </template>
+              <template #title> <span class="van-f-red">*</span>信息备注 </template>
             </van-cell>
           </van-cell>
-          <van-field v-model="remark" rows="3"  autosize maxlength="260" show-word-limit label=""
-                     :formatter="formatter" type="textarea" placeholder="请填写信息异常信息"/>
+          <van-field
+            v-model="remark"
+            rows="3"
+            autosize
+            maxlength="260"
+            show-word-limit
+            label=""
+            :formatter="formatter"
+            type="textarea"
+            placeholder="请填写信息异常信息" />
         </div>
       </van-form>
-      <div class="formLabel" style="margin:20px 16px;">
-        <van-button block type="info" size="normal" style="background-color: #0057ba;" @click="endVisitsFn">提交</van-button>
+      <div class="formLabel" style="margin: 20px 16px">
+        <van-button
+          block
+          type="info"
+          size="normal"
+          style="background-color: #0057ba"
+          @click="endVisitsFn"
+          >提交</van-button
+        >
       </div>
     </div>
     <div id="allmap"></div>
@@ -56,13 +72,13 @@
 
 <script>
 // import uploadImg from "@/components/uploadImg";
-import uploadImg from "@/components/uploadVvisit";
-import deleteUploadImg from "@/components/deleteUploadImg1";
-import {addVisits, getVisitsDetail, endVisits, getPhotoTypeList1, stopVisit} from "@/api/index";
+import uploadImg from '@/components/uploadVvisit';
+import deleteUploadImg from '@/components/deleteUploadImg1';
+import { addVisits, getVisitsDetail, endVisits, getPhotoTypeList1, stopVisit } from '@/api/index';
 
 export default {
-  name: "abnormalVisit",
-  components: {uploadImg, deleteUploadImg},
+  name: 'abnormalVisit',
+  components: { uploadImg, deleteUploadImg },
   data() {
     return {
       flag: false,
@@ -70,109 +86,118 @@ export default {
       checkboxGroup: [],
       PhotoTypeList: [],
       radio: '',
-      typeList: "",
+      typeList: '',
       imgs: [],
-      abnormalReason: "",
+      abnormalReason: '',
       uploadid2: 'uploadid2',
-      remark: "",
-      lat: "",
-      lon: "",
-      storeCode: "",
+      remark: '',
+      lat: '',
+      lon: '',
+      storeCode: '',
       dialogms: true,
-      visitModel: ""
-    }
+      visitModel: '',
+    };
   },
   created() {
-    this.getPhotoTypeList()
-    this.urlParameter = this.$route.query
-    this.storeId = this.$route.query.storeId + "";
+    this.getPhotoTypeList();
+    this.urlParameter = this.$route.query;
+    this.storeId = this.$route.query.storeId + '';
     this.visitId = this.$route.query.visitId;
-    this.rdId = this.$route.query.rdId + "";
+    this.rdId = this.$route.query.rdId + '';
     this.storeCode = this.$route.query.storeCode;
-    this.lat = this.$route.query.lat + "";
-    this.lon = this.$route.query.lon + "";
-    this.visitModel = this.$route.query.visitModel + "";
-    this.imgs = []
-    this.remark = ""
-    this.abnormalReason = ""
+    this.lat = this.$route.query.lat + '';
+    this.lon = this.$route.query.lon + '';
+    this.visitModel = this.$route.query.visitModel + '';
+    this.imgs = [];
+    this.remark = '';
+    this.abnormalReason = '';
   },
   watch: {
     $route(to, from) {
-      if (from.path == "/deviceWithin/index" && to.path == "/abnormalVisit") {
-        this.urlParameter = this.$route.query
-        this.storeId = this.$route.query.storeId + "";
+      if (from.path == '/deviceWithin/index' && to.path == '/abnormalVisit') {
+        this.urlParameter = this.$route.query;
+        this.storeId = this.$route.query.storeId + '';
         this.visitId = this.$route.query.visitId;
-        this.rdId = this.$route.query.rdId + "";
+        this.rdId = this.$route.query.rdId + '';
         this.storeCode = this.$route.query.storeCode;
-        this.lat = this.$route.query.lat + "";
-        this.lon = this.$route.query.lon + "";
-        this.visitModel = this.$route.query.visitModel + "";
-        this.imgs = []
-        this.remark = ""
-        this.abnormalReason = ""
+        this.lat = this.$route.query.lat + '';
+        this.lon = this.$route.query.lon + '';
+        this.visitModel = this.$route.query.visitModel + '';
+        this.imgs = [];
+        this.remark = '';
+        this.abnormalReason = '';
       }
-      if (from.path == "/abnormalVisit" && to.path == "/deviceWithin/index") {
-        localStorage.removeItem("visitId")
+      if (from.path == '/abnormalVisit' && to.path == '/deviceWithin/index') {
+        localStorage.removeItem('visitId');
       }
-    }
+    },
   },
   activated() {
     this.imgs = [];
-    this.remark = "";
-    this.abnormalReason = "";
-    this.visitModel = this.$route.query.visitModel + "";
-    if(this.$route.query.type=="edit"){
-      this.visitId = this.$route.query.visitId + "";
-      localStorage.setItem("visitId",this.$route.query.visitId);
-      this.getVisitsDetailFn()
-    }else{
-      this.addVisits()
+    this.remark = '';
+    this.abnormalReason = '';
+    this.visitModel = this.$route.query.visitModel + '';
+    if (this.$route.query.type == 'edit') {
+      this.visitId = this.$route.query.visitId + '';
+      localStorage.setItem('visitId', this.$route.query.visitId);
+      this.getVisitsDetailFn();
+    } else {
+      this.addVisits();
     }
   },
   methods: {
     // 结束拜访
-    onstopVisit(){
-      this.$dialog.confirm({
-        confirmButtonText:"确定",
-        cancelButtonText:"取消",
-        title: '系统提示',
-        message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
-      }).then(() => {
-        stopVisit({visitsId:this.visitId}).then(res=>{
-          if(res.code==200){
-            this.$dialog.alert({
-              title: '系统提示',
-              message: '拜访中任务结束成功!',
-            }).then(() => {
-              window.location.replace(window.location.origin+"/mobile/deviceWithin/index")
-            });
-          }else{
-            this.$toast(res.msg)
-          }
+    onstopVisit() {
+      this.$dialog
+        .confirm({
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          title: '系统提示',
+          message: '取消拜访会清空填写的拜访内容和照片,是否确认?',
         })
-      })
+        .then(() => {
+          stopVisit({ visitsId: this.visitId }).then((res) => {
+            if (res.code == 200) {
+              this.$dialog
+                .alert({
+                  title: '系统提示',
+                  message: '拜访中任务结束成功!',
+                })
+                .then(() => {
+                  window.location.replace(
+                    window.location.origin + this.locationOrigin + '/deviceWithin/index',
+                  );
+                });
+            } else {
+              this.$toast(res.msg);
+            }
+          });
+        });
     },
     formatter(value) {
-      return value.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi, '');
+      return value.replace(
+        /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
+        '',
+      );
     },
     getVisitsDetailFn() {
-      getVisitsDetail({visitsId: this.$route.query.visitId}).then(res => {
+      getVisitsDetail({ visitsId: this.$route.query.visitId }).then((res) => {
         if (res.code == 200) {
-          this.list = res.data
-          this.abnormalReason=res.data.abnormalReason+""
-          this.remark=res.data.remark
+          this.list = res.data;
+          this.abnormalReason = res.data.abnormalReason + '';
+          this.remark = res.data.remark;
           if (res.data.visitSource == 2) {
-            this.imgs = res.data.sysFileInfos
+            this.imgs = res.data.sysFileInfos;
           }
-        }else{
-          this.$toast(res.msg)
+        } else {
+          this.$toast(res.msg);
         }
-      })
+      });
     },
     getPhotoTypeList() {
-      getPhotoTypeList1({}).then(res => {
-        this.typeList = res.data
-      })
+      getPhotoTypeList1({}).then((res) => {
+        this.typeList = res.data;
+      });
     },
     newimgarr1(val) {
       this.imgs.push(val);
@@ -182,144 +207,188 @@ export default {
     },
     addVisits() {
       var that = this;
-      var map = new TMap.Map('allmap', {zoom: 14, center: new TMap.LatLng(39.986785, 116.301012),});
+      var map = new TMap.Map('allmap', {
+        zoom: 14,
+        center: new TMap.LatLng(39.986785, 116.301012),
+      });
       var geocoder = new TMap.service.Geocoder();
-      var markers = new TMap.MultiMarker({map: map, geometries: [],});
+      var markers = new TMap.MultiMarker({ map: map, geometries: [] });
       markers.setGeometries([]);
       var input = [that.urlParameter.marklat, that.urlParameter.marklon];
       var location = new TMap.LatLng(Number(input[0]), Number(input[1]));
       map.setCenter(location);
-      markers.updateGeometries([{id: 'main', position: location,},]);
-      geocoder.getAddress({ location: location }).then(function(result){
-            var addresses=result.result.formatted_addresses
+      markers.updateGeometries([{ id: 'main', position: location }]);
+      geocoder.getAddress({ location: location }).then(
+        function (result) {
+          var addresses = result.result.formatted_addresses;
           var params = {
             storeId: that.storeId,
             storeCode: that.storeCode,
-            visitSource: "2",
-            visitEntry: "0",
+            visitSource: '2',
+            visitEntry: '0',
             lat: that.urlParameter.lat,
             lon: that.urlParameter.lon,
             visitModel: that.$route.query.visitModel,
             routeDetailsId: that.rdId,
-            locationCity: "",
-            locationRemark:  addresses.recommend,
-            locationAccuracy: that.urlParameter.PointSum
-          }
-         localStorage.setItem('address', "");
+            locationCity: '',
+            locationRemark: addresses.recommend,
+            locationAccuracy: that.urlParameter.PointSum,
+          };
+          localStorage.setItem('address', '');
           if (that.visitId != null) {
-            params.id = that.visitId
+            params.id = that.visitId;
           }
-          addVisits(params).then(res => {
+          addVisits(params).then((res) => {
             if (res.code == 200) {
               localStorage.setItem('visitId', res.data);
-              that.visitId = res.data
-            }else{
-              this.$toast(res.msg)
+              that.visitId = res.data;
+            } else {
+              this.$toast(res.msg);
             }
-          })
-      },function(err){
-        var params = {
-          storeId: that.storeId,
-          storeCode: that.storeCode,
-          visitSource: "2",
-          visitEntry: "0",
-          lat: that.urlParameter.lat,
-          lon: that.urlParameter.lon,
-          visitModel: that.$route.query.visitModel,
-          routeDetailsId: that.rdId,
-          locationCity: "",
-          locationRemark:"",
-          locationAccuracy: that.urlParameter.PointSum
-        }
-        localStorage.setItem('address', "");
-        if (that.visitId != null) {
-          params.id = that.visitId
-        }
-        addVisits(params).then(res => {
-          if (res.code == 200) {
-            localStorage.setItem('visitId', res.data);
-            that.visitId = res.data
-          }else{
-            this.$toast(res.msg)
+          });
+        },
+        function (err) {
+          var params = {
+            storeId: that.storeId,
+            storeCode: that.storeCode,
+            visitSource: '2',
+            visitEntry: '0',
+            lat: that.urlParameter.lat,
+            lon: that.urlParameter.lon,
+            visitModel: that.$route.query.visitModel,
+            routeDetailsId: that.rdId,
+            locationCity: '',
+            locationRemark: '',
+            locationAccuracy: that.urlParameter.PointSum,
+          };
+          localStorage.setItem('address', '');
+          if (that.visitId != null) {
+            params.id = that.visitId;
           }
-        })
-      })
+          addVisits(params).then((res) => {
+            if (res.code == 200) {
+              localStorage.setItem('visitId', res.data);
+              that.visitId = res.data;
+            } else {
+              this.$toast(res.msg);
+            }
+          });
+        },
+      );
     },
     endVisitsFn() {
-      var insert=""
-      if(this.$route.query.type=="edit"){
-        insert=false
-      }else{
-        insert=true
+      var insert = '';
+      if (this.$route.query.type == 'edit') {
+        insert = false;
+      } else {
+        insert = true;
       }
       if (this.imgs.length == 0) {
-        this.$toast("请上传图片");
+        this.$toast('请上传图片');
         return;
-      } else if (this.abnormalReason == "") {
-        this.$toast("请选择事由");
+      } else if (this.abnormalReason == '') {
+        this.$toast('请选择事由');
         return;
-      } else if (this.remark.trim() == "") {
-        this.$toast("请填写异常内容");
+      } else if (this.remark.trim() == '') {
+        this.$toast('请填写异常内容');
         return;
       } else {
-        let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date())
+        let dwellTime = this.weekend(localStorage.getItem('startTime'), new Date());
         endVisits({
-          visitSource: "2",
+          visitSource: '2',
           dwellTime: dwellTime,
           remark: this.remark,
-          visitType: "0",
-          insert:insert,
+          visitType: '0',
+          insert: insert,
           abnormalReason: this.abnormalReason,
           id: this.visitId,
           storeCode: this.storeCode,
-          visitModel: this.$route.query.visitModel
-        }).then(res => {
+          visitModel: this.$route.query.visitModel,
+        }).then((res) => {
           if (res.code == 200) {
-            this.$dialog.alert({
-              title: '系统提示',
-              message: '保存成功',
-            }).then(() => {
-              if(insert){
-                window.location.replace(window.location.origin+"/mobile/deviceWithin/index")
-
-              }else{
-                this.$router.go(-1)
-              }
-            });
-            localStorage.removeItem("visitId")
+            this.$dialog
+              .alert({
+                title: '系统提示',
+                message: '保存成功',
+              })
+              .then(() => {
+                if (insert) {
+                  window.location.replace(
+                    window.location.origin + this.locationOrigin + '/deviceWithin/index',
+                  );
+                } else {
+                  this.$router.go(-1);
+                }
+              });
+            localStorage.removeItem('visitId');
             localStorage.removeItem('startTime');
           } else {
             this.$toast.fail(res.msg);
           }
-        })
+        });
       }
     },
     weekend(time1) {
       var arrtime1 = new Date(time1).getTime();
       var arrtime2 = new Date().getTime();
-      return (Math.round((arrtime2 - arrtime1) / 1000));
+      return Math.round((arrtime2 - arrtime1) / 1000);
     },
-  }
-}
+  },
+};
 </script>
 <style lang="scss" scoped>
-.container {padding-bottom: 50px;}
-.van-f-red {color: red;width: 4px;display: inline-block}
-.formLabel {margin: 0 16px;border-bottom: 1px solid #f1f1f1}
-.formLabel .van-cell {padding: 10px 0}
-.z-checkbox .van-radio {padding: 6px 0;}
+.container {
+  padding-bottom: 50px;
+}
+.van-f-red {
+  color: red;
+  width: 4px;
+  display: inline-block;
+}
+.formLabel {
+  margin: 0 16px;
+  border-bottom: 1px solid #f1f1f1;
+}
+.formLabel .van-cell {
+  padding: 10px 0;
+}
+.z-checkbox .van-radio {
+  padding: 6px 0;
+}
 </style>
 <style>
-.bgWhite {background-color: white;}
-.formLabel .van-field {border: 1px solid #f1f1f1;padding: 10px;width: 100%;background-color: #f1f1f1;}
-.formLabel .van-field__control {padding: 0 10px}
-.lineGrey {height: 10px;width: 100%;background: #f1f1f1;}
-.van-dialog__confirm, .van-dialog__confirm:active {color: #0057ba;}
-.navRightBtnTop{color: white; background: #74a4d9; display: block; padding: 6px 10px; border-radius: 6px;}
-#allmap{
+.bgWhite {
+  background-color: white;
+}
+.formLabel .van-field {
+  border: 1px solid #f1f1f1;
+  padding: 10px;
+  width: 100%;
+  background-color: #f1f1f1;
+}
+.formLabel .van-field__control {
+  padding: 0 10px;
+}
+.lineGrey {
+  height: 10px;
+  width: 100%;
+  background: #f1f1f1;
+}
+.van-dialog__confirm,
+.van-dialog__confirm:active {
+  color: #0057ba;
+}
+.navRightBtnTop {
+  color: white;
+  background: #74a4d9;
+  display: block;
+  padding: 6px 10px;
+  border-radius: 6px;
+}
+#allmap {
   width: 20px;
   height: 20px;
   left: -1000px;
   position: relative;
 }
-</style>
+</style>

+ 9 - 5
src/views/deviceWithin/storeVisit.vue

@@ -356,7 +356,9 @@ export default {
                   message: '拜访中任务结束成功!',
                 })
                 .then(() => {
-                  window.location.replace(window.location.origin + '/mobile/deviceWithin/index');
+                  window.location.replace(
+                    window.location.origin + this.locationOrigin + '/deviceWithin/index',
+                  );
                 });
             } else {
               this.$toast(res.msg);
@@ -847,7 +849,7 @@ export default {
     onClickLeft() {
       localStorage.setItem('getRequestFlage', 'true');
       if (this.$route.query.urltype == 2) {
-        window.location.replace(window.location.origin + '/mobile/home');
+        window.location.replace(window.location.origin + this.locationOrigin + '/home');
       } else {
         this.$router.go(-1);
       }
@@ -914,7 +916,7 @@ export default {
             if (res.code == 200) {
               this.editDwellTimes();
               if (this.$route.query.urltype == 2) {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               } else {
                 this.$router.go(-1);
                 // window.location.replace(window.location.origin + '/mobile/deviceWithin/index');
@@ -941,9 +943,11 @@ export default {
             loading1.clear();
             if (res.code == 200) {
               if (this.$route.query.urltype == 2) {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               } else {
-                window.location.replace(window.location.origin + '/mobile/historAllVisit');
+                window.location.replace(
+                  window.location.origin + this.locationOrigin + '/historAllVisit',
+                );
               }
             } else {
               this.$toast({

+ 2 - 1
src/views/storeManagement/storeAdd.vue

@@ -1991,7 +1991,8 @@ export default {
                       localStorage.setItem('chainNameR', res.data.sfaStore.storeName);
                       window.location.replace(
                         window.location.origin +
-                          '/mobile/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
+                          this.locationOrigin +
+                          '/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
                           res.data.sfaStore.storeId +
                           '&lat=' +
                           this.fromValue.lat +

+ 12 - 9
src/views/storeManagement/success.vue

@@ -90,7 +90,7 @@ export default {
       });
     },
     goback() {
-      window.location.replace(window.location.origin + '/mobile/My/index');
+      window.location.replace(window.location.origin + this.locationOrigin + '/My/index');
     },
     // 返回订单详情也
     gobackStoreDetail() {
@@ -100,7 +100,7 @@ export default {
       localStorage.setItem('successStoreId', this.fromValue.storeId);
       // 跳转到列表在跳到详情页在跳编辑页
       window.location.replace(
-        window.location.origin + '/mobile/storemanagementlist?source=successPage'
+        window.location.origin + this.locationOrigin + '/storemanagementlist?source=successPage',
       );
     },
     visite() {
@@ -204,7 +204,7 @@ export default {
                                     location.lat,
                                     location.lon,
                                     location.lat,
-                                    location.lon
+                                    location.lon,
                                   )
                                   .toFixed(2);
                                 that.$dialog
@@ -215,7 +215,8 @@ export default {
                                   .then(() => {
                                     window.location.replace(
                                       window.location.origin +
-                                        '/mobile/suishenbangOutstoreVisit?PointSum=' +
+                                        this.locationOrigin +
+                                        '/suishenbangOutstoreVisit?PointSum=' +
                                         PointSumval +
                                         '&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
                                         that.fromValue.storeId +
@@ -240,7 +241,7 @@ export default {
                                         '&marklat=' +
                                         res.latitude +
                                         '&marklon=' +
-                                        res.longitude
+                                        res.longitude,
                                     );
                                   });
                                 localStorage.setItem('startTime', new Date());
@@ -266,7 +267,8 @@ export default {
                           .then(() => {
                             window.location.replace(
                               window.location.origin +
-                                '/mobile/suishenbangOutstoreVisit?PointSum=' +
+                                this.locationOrigin +
+                                '/suishenbangOutstoreVisit?PointSum=' +
                                 PointSumval +
                                 '&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
                                 that.fromValue.storeId +
@@ -291,14 +293,15 @@ export default {
                                 '&marklat=' +
                                 res.latitude +
                                 '&marklon=' +
-                                res.longitude
+                                res.longitude,
                             );
                           })
                           .catch(() => {});
                       } else {
                         window.location.replace(
                           window.location.origin +
-                            '/mobile/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
+                            this.locationOrigin +
+                            '/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
                             that.fromValue.storeId +
                             '&lat=' +
                             that.fromValue.lat +
@@ -321,7 +324,7 @@ export default {
                             '&marklat=' +
                             res.latitude +
                             '&marklon=' +
-                            res.longitude
+                            res.longitude,
                         );
                       }
                       localStorage.setItem('startTime', new Date());

+ 3 - 3
src/views/week/assignAwait/JZfollowUp.vue

@@ -175,7 +175,7 @@ export default {
                 showCancelButton: false,
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/clew');
+                window.location.replace(window.location.origin + this.locationOrigin + '/clew');
               });
           }
         } else {
@@ -220,7 +220,7 @@ export default {
             this.toastLoading().clear();
             if (res.code == 200) {
               this.$toast(res.msg);
-              window.location.replace(window.location.origin + '/mobile/clew');
+              window.location.replace(window.location.origin + this.locationOrigin + '/clew');
             } else {
               this.$toast(res.msg);
             }
@@ -254,7 +254,7 @@ export default {
           this.toastLoading().clear();
           if (res.code == 200) {
             if (this.$route.query.token != undefined) {
-              window.location.replace(window.location.origin + '/mobile/clew');
+              window.location.replace(window.location.origin + this.locationOrigin + '/clew');
             } else {
               store.dispatch('setRefreshClewPage', true);
               // 返回上一页不会刷新页面

+ 6 - 4
src/views/week/assignAwait/assignPage.vue

@@ -157,7 +157,7 @@ export default {
               let userList = res.data.userList;
               if (this.assignTypeValue != '大型装企') {
                 let userListFilter = userList.filter(
-                  (item) => item.nickName.indexOf(this.infoData.companyName) != -1
+                  (item) => item.nickName.indexOf(this.infoData.companyName) != -1,
                 );
                 this.assignUserData = userListFilter || [];
               } else {
@@ -205,7 +205,7 @@ export default {
             let userList = res.data.userList;
             if (this.assignTypeValue != '大型装企') {
               let userListFilter = userList.filter(
-                (item) => item.nickName.indexOf(this.infoData.companyName) != -1
+                (item) => item.nickName.indexOf(this.infoData.companyName) != -1,
               );
               this.assignUserData = userListFilter || [];
             } else {
@@ -251,7 +251,9 @@ export default {
                 showCancelButton: false,
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/assignAwait');
+                window.location.replace(
+                  window.location.origin + this.locationOrigin + '/assignAwait',
+                );
               });
           }
           this.getDictOptionFun();
@@ -270,7 +272,7 @@ export default {
         this.toastLoading().clear();
         if (res.code == 200) {
           this.$toast(res.msg);
-          window.location.replace(window.location.origin + '/mobile/assignAwait');
+          window.location.replace(window.location.origin + this.locationOrigin + '/assignAwait');
         } else {
           this.$toast(res.msg);
         }

+ 5 - 3
src/views/week/daily.vue

@@ -690,7 +690,7 @@ export default {
                 message: '日报已提交或过期',
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               });
           } else {
             if (res.data.postName == '质感销售负责人' || res.data.postName == '质感销售专员') {
@@ -895,7 +895,7 @@ export default {
               })
               .catch(() => {
                 if (this.$route.query.reportId != undefined) {
-                  window.location.replace(window.location.origin + '/mobile/home');
+                  window.location.replace(window.location.origin + this.locationOrigin + '/home');
                 } else {
                   this.onClickLeft();
                 }
@@ -908,7 +908,9 @@ export default {
               })
               .then(() => {
                 if (this.$route.query.reportId != undefined) {
-                  window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+                  window.location.replace(
+                    window.location.origin + this.locationOrigin + '/myHistoricalDaily',
+                  );
                 } else {
                   this.onClickLeft();
                 }

+ 7 - 3
src/views/week/dailyApproval.vue

@@ -686,7 +686,9 @@ export default {
               message: '提交成功',
             })
             .then(() => {
-              window.location.replace(window.location.origin + '/mobile/dailyApprovalList');
+              window.location.replace(
+                window.location.origin + this.locationOrigin + '/dailyApprovalList',
+              );
             });
         } else {
           this.$toast.fail(res.msg);
@@ -725,7 +727,9 @@ export default {
               message: '提交成功',
             })
             .then(() => {
-              window.location.replace(window.location.origin + '/mobile/dailyApprovalList');
+              window.location.replace(
+                window.location.origin + this.locationOrigin + '/dailyApprovalList',
+              );
             });
         } else {
           this.$toast.fail(res.msg);
@@ -765,7 +769,7 @@ export default {
                 message: '日报已审批',
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               });
           } else {
             this.reportTargetAll = res.data.reportTargetAll;

+ 4 - 2
src/views/week/doubleWeekly.vue

@@ -228,7 +228,7 @@ export default {
                 message: '半月报已提交或过期',
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               });
           } else {
             this.reportTargetAll = res.data.reportTargetAll;
@@ -520,7 +520,9 @@ export default {
             })
             .then(() => {
               if (this.$route.query.reportId != undefined) {
-                window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+                window.location.replace(
+                  window.location.origin + this.locationOrigin + '/myHistoricalDaily',
+                );
               } else {
                 this.onClickLeft();
                 // window.location.replace(window.location.origin + '/mobile/home');

+ 7 - 3
src/views/week/doubleWeeklyApproval.vue

@@ -226,7 +226,9 @@ export default {
               message: '提交成功',
             })
             .then(() => {
-              window.location.replace(window.location.origin + '/mobile/dailyApprovalList');
+              window.location.replace(
+                window.location.origin + this.locationOrigin + '/dailyApprovalList',
+              );
             });
         } else {
           this.$toast.fail(res.msg);
@@ -264,7 +266,9 @@ export default {
               message: '提交成功',
             })
             .then(() => {
-              window.location.replace(window.location.origin + '/mobile/dailyApprovalList');
+              window.location.replace(
+                window.location.origin + this.locationOrigin + '/dailyApprovalList',
+              );
             });
         } else {
           this.$toast.fail(res.msg);
@@ -291,7 +295,7 @@ export default {
                 message: '半月报已审批',
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               });
           } else {
             this.reportTargetAll = res.data.reportTargetAll;

+ 4 - 2
src/views/week/weekly.vue

@@ -270,7 +270,7 @@ export default {
                 message: '周报已提交或过期',
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               });
           } else {
             this.reportTargetAll = res.data.reportTargetAll;
@@ -549,7 +549,9 @@ export default {
             })
             .then(() => {
               if (this.$route.query.reportId != undefined) {
-                window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+                window.location.replace(
+                  window.location.origin + this.locationOrigin + '/myHistoricalDaily',
+                );
               } else {
                 this.onClickLeft();
                 // window.location.replace(window.location.origin + '/mobile/home');

+ 7 - 3
src/views/week/weeklyApproval.vue

@@ -273,7 +273,9 @@ export default {
               message: '提交成功',
             })
             .then(() => {
-              window.location.replace(window.location.origin + '/mobile/dailyApprovalList');
+              window.location.replace(
+                window.location.origin + this.locationOrigin + '/dailyApprovalList',
+              );
             });
         } else {
           this.$toast.fail(res.msg);
@@ -311,7 +313,9 @@ export default {
               message: '保存成功',
             })
             .then(() => {
-              window.location.replace(window.location.origin + '/mobile/dailyApprovalList');
+              window.location.replace(
+                window.location.origin + this.locationOrigin + '/dailyApprovalList',
+              );
             });
         } else {
           this.$toast.fail(res.msg);
@@ -349,7 +353,7 @@ export default {
                 message: '周报已提交或过期',
               })
               .then(() => {
-                window.location.replace(window.location.origin + '/mobile/home');
+                window.location.replace(window.location.origin + this.locationOrigin + '/home');
               });
           } else {
             this.reportTargetAll = res.data.reportTargetAll;