傅豪杰 2 днів тому
батько
коміт
5ca4008bd3

+ 2 - 2
config/dev.env.js

@@ -4,6 +4,6 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  // VUE_APP_BASE_API:"'http://47.101.145.23/tianzong'"
-  VUE_APP_BASE_API: "'/api'"
+  VUE_APP_BASE_API:"'/'"
+  // VUE_APP_BASE_API: "'/api'"
 })

+ 36 - 17
src/pages/express.vue

@@ -393,6 +393,8 @@ import {
   getListOfPrinters
 } from "../api/index";
 import { spiltAddress } from "../api/addressBoook";
+import { Decrypt, getUrlParam } from '../utils/utils.js'
+
 export default {
   data() {
     return {
@@ -412,18 +414,18 @@ export default {
       check: false, //契约条款
       bz: "", //快递备注
       showPicker: false, //快递
-      expressInfoShow: "顺丰快递", //快递公司展示
+      expressInfoShow: "京东快递", //快递公司展示
       expressPhone: "", //快递公司电话传值
-      expressInfo: "1", //快递公司传值
+      expressInfo: "2", //快递公司传值
       columns: [], //快递公司列表
       mailingTypeCol: [
-        { value: "顺丰特快", id: 1 },
         { value: "顺丰标快", id: 2 },
+        { value: "顺丰特快", id: 1 },
         { value: "港澳台寄件", id: 2 }
       ], //港澳列表
       isMailingType: false, //港澳弹窗
-      mailingTypeVlaue: "顺丰快", //港澳选择的值
-      mailingTypeId: 1, //传给后端的id
+      mailingTypeVlaue: "顺丰快", //港澳选择的值
+      mailingTypeId: 2, //传给后端的id
       columns2: ["个人件", "公司件"],
       declaredValue: "0", //声明价值
       showPicker2: false,
@@ -699,13 +701,13 @@ export default {
     },
     // 选择快递公司
     onConfirm(e) {
-      this.transmitMessageVlaue.addresseeProvince = "";
-      this.transmitMessageVlaue.addresseeCity = "";
-      this.transmitMessageVlaue.addresseeCounty = "";
-      this.transmitMessageVlaue.addresseeName = "";
-      this.transmitMessageVlaue.addresseePhone = "";
-      this.transmitMessageVlaue.addresseeTown = "";
-      this.transmitMessageVlaue.addresseeAddrInfo = "";
+      // this.transmitMessageVlaue.addresseeProvince = "";
+      // this.transmitMessageVlaue.addresseeCity = "";
+      // this.transmitMessageVlaue.addresseeCounty = "";
+      // this.transmitMessageVlaue.addresseeName = "";
+      // this.transmitMessageVlaue.addresseePhone = "";
+      // this.transmitMessageVlaue.addresseeTown = "";
+      // this.transmitMessageVlaue.addresseeAddrInfo = "";
 
       this.expressInfoShow = e.expresCompanyName;
       this.expressInfo = e.id;
@@ -820,7 +822,6 @@ export default {
       if (getPrinters.code == 0) {
         if (getPrinters.data.length == []) {
           this.shipServe();
-          Toast("没有打印机");
         } else {
           this.getPrintersList = getPrinters.data.map(item => {
             return { printerName: item.printerName, id: item.id };
@@ -894,15 +895,33 @@ export default {
         waybillNo: this.waybillNo, // 运单号
         expressTypeId: this.mailingTypeId //快递类型的id
       };
+
+      if(getUrlParam('posParams')){
+          try{
+              let posParams = getUrlParam('posParams')
+              posParams = Decrypt(posParams)
+              posParams = JSON.parse(posParams)
+              parmas.orderNo = posParams.orderId;
+              parmas.posParams = posParams.posParams;
+          }catch(err){
+              console.log(err)
+          }
+      }
       const res = await saveMailDo({ ...parmas });
       if (res.msg == "success") {
-        Toast("寄件成功");
-        this.$router.push("/");
+        this.$toast("寄件成功");
+        setTimeout(()=>{
+          $toast.clear();
+          this.$router.push("/");
+        },1000)
       } else {
         // this.$toast(res.error)
-        this.$toast(res.msg);
+        this.$toast(res.msg || '下单失败');
+        setTimeout(()=>{
+          $toast.clear();
+        },1000)
       }
-      $toast.clear();
+   
     }
   },
 

+ 2 - 2
src/pages/forgetpassword.vue

@@ -79,8 +79,8 @@ export default {
         password: this.password
       });
       if (res.msg == "success") {
-        localStorage.removeItem("userId");
-        this.$router.push({ path: "/" });
+        localStorage.clear();
+        window.location.href = window.location.origin+window.location.pathname
         Toast("修改成功");
       } else {
         Toast("修改失败");

+ 1 - 1
src/pages/inexpress.vue

@@ -389,7 +389,7 @@ export default {
       if (getPrinters.code == 0) {
         if (getPrinters.data.length == []) {
           this.save();
-          Toast("没有打印机");
+          // Toast("没有打印机");
         } else {
           this.getPrintersList = getPrinters.data.map(item => {
             return { printerName: item.printerName, id: item.id };

+ 1 - 2
src/pages/mailInfo.vue

@@ -46,7 +46,7 @@
         <p>省:{{ ObjectVlaue.addresseeProvince }}</p>
         <p>市:{{ ObjectVlaue.addresseeCity }}</p>
         <p>区:{{ ObjectVlaue.addresseeCounty }}</p>
-        <p>地址:{{ observable.addresseeAddress }}</p>
+        <p>地址:{{ ObjectVlaue.addresseeAddress }}</p>
         <p>
           财务核销码:{{
             ObjectVlaue.verificationCode == ""
@@ -83,7 +83,6 @@
 <script>
 import { Toast, Dialog } from "vant";
 import { findWithoutInfoById, findInsideInfoById } from "../api/index";
-import { observable } from "vue/types/umd";
 export default {
   data() {
     return {

+ 1 - 1
src/script/wxGetOpenId.js

@@ -9,7 +9,7 @@ export async function getWxOpenId() {
     
         var code = getUrlParam("code");
         console.log(code, 'code====++++')
-        if (code == 'undefined' || code == null || code == "") {
+        if (code == 'undefined' || code == null || code == "" || code == undefined) {
             // alert("参数异常,请返回首页重试");
             urlredirect();
             return;