Browse Source

公众号页面更改,货主权限隔离修改

luhuan 1 month ago
parent
commit
ae15a4a098
4 changed files with 29 additions and 26 deletions
  1. 5 1
      api/request.js
  2. 12 21
      manifest.json
  3. 8 3
      pages/index/index.vue
  4. 4 1
      pages/index/login.vue

+ 5 - 1
api/request.js

@@ -1,4 +1,6 @@
 /** 访问后端接口的域名或IP */
+// const Base_url = "http://172.16.182.222:8080/BH_CLIS/"
+// const Base_url = "https://c56.hr-network.cn/BH_CLIS/"
 const Base_url = "http://localhost:8012/BH_CLIS/"
 
 /** 同时发送异步代码的次数,防止一次点击中有多次请求 */
@@ -36,4 +38,6 @@ export const request = (options) => {
 			}
 		})
 	})
-}
+}
+
+export default Base_url;

+ 12 - 21
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "tms",
-    "appid" : "",
+    "appid" : "__UNI__43290E7",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",
@@ -46,27 +46,18 @@
             "sdkConfigs" : {}
         }
     },
-    /* 快应用特有相关 */
-    "quickapp" : {},
-    /* 小程序特有相关 */
-    "mp-weixin" : {
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : false
-        },
-        "usingComponents" : true
-    },
-    "mp-alipay" : {
-        "usingComponents" : true
-    },
-    "mp-baidu" : {
-        "usingComponents" : true
-    },
-    "mp-toutiao" : {
-        "usingComponents" : true
-    },
     "uniStatistics" : {
         "enable" : false
     },
-    "vueVersion" : "2"
+    "vueVersion" : "2",
+    "h5" : {
+        "title" : "榕川TMS",
+        "router" : {
+            "mode" : "hash",
+            "base" : "/data/rongchuan"
+        },
+        "devServer" : {
+            "https" : true
+        }
+    }
 }

+ 8 - 3
pages/index/index.vue

@@ -74,6 +74,7 @@ import {evaluationOrder, getOrderList} from "@/api";
 		data() {
 			return {
         accountId:undefined,
+        userId:undefined,
         show:false,
         numValue:undefined,
         triggered:false,
@@ -120,16 +121,20 @@ import {evaluationOrder, getOrderList} from "@/api";
       if (uni.getStorageSync('accountId')) {
         this.accountId = uni.getStorageSync('accountId')
       }
-        this.getList(this.accountId)
+      if (uni.getStorageSync('userId')) {
+        this.userId = uni.getStorageSync('userId')
+      }
+        this.getList(this.accountId,this.userId)
     },
 		onLoad() {
 			this.loadmore();
 		},
 		methods: {
-      getList(accountId){
+      getList(accountId,userId){
         // 获取当前订单list
         let params = {
-          accountId: accountId
+          accountId: accountId,
+          userId: userId
         }
         getOrderList(params).then(res => {
           if (res.data){

+ 4 - 1
pages/index/login.vue

@@ -86,6 +86,7 @@
 </template>
 
 <script>
+import Base_url from "@/api/request.js";
 export default {
   data() {
     return {
@@ -120,7 +121,7 @@ export default {
         "password": this.loginForm.password
       }
       uni.request({
-        url: 'http://localhost:8012/BH_CLIS/landed3.action',
+        url: Base_url + 'landed3.action',
         method: 'POST',
         data:obj,
         // data: obj,
@@ -133,6 +134,7 @@ export default {
             wx.setStorageSync('userName', this.loginForm.username);
             wx.setStorageSync('password', this.loginForm.password);
             wx.setStorageSync('accountId', res.data.data.accountId);
+            wx.setStorageSync('userId', res.data.data.userId);
             if (res.data.data.customerVOS.length > 0) {
               wx.setStorageSync('customerVOS', res.data.data.customerVOS);
             }
@@ -164,6 +166,7 @@ export default {
         },
         fail: (err) => {
           console.error('登录请求失败:', err)
+          console.log(err)
           uni.showToast({
             title: '网络错误',
             icon: 'none'