Browse Source

E订单修改

zhaoxiaohai 2 years ago
parent
commit
b783f7bd2d
6 changed files with 14 additions and 7 deletions
  1. 3 0
      Eservice/api/http.js
  2. 2 4
      app.js
  3. 1 1
      packageA/market/detail.wxml
  4. 6 1
      packageA/tool/index.js
  5. 1 1
      packageA/tool/index.wxml
  6. 1 0
      utils/Http.js

+ 3 - 0
Eservice/api/http.js

@@ -3,6 +3,9 @@ var app = getApp(); //引入全局app.js,我们可以在globalData中定义一
 const request = function (url = "", options) {
   // const baseUrl = "http://61.164.207.46:8000/yos/rest/index" + url;
   const baseUrl = "http://122.226.136.204:8082/yos/rest/index" + url;
+
+//   const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index" + url;
+
   console.log(baseUrl)
   options.data.accesstoken = wx.getStorageSync('userMsg').token
   return new Promise((resolve, reject) => {

+ 2 - 4
app.js

@@ -1,5 +1,3 @@
-
-
 import {
     ApiModel
 } from './utils/Api';
@@ -31,7 +29,7 @@ App({
     initSocket() {
         let that = this;
         this.globalData.SocketTask = wx.connectSocket({
-            url: 'wss://meida.cnyunl.com/yos/webSocket/' + wx.getStorageSync('userMsg').token,
+            url: 'wss://oms.idcgroup.com.cn:8079/yos/webSocket/' + wx.getStorageSync('userMsg').token,
             complete: (res) => {
                 console.log(res)
             }
@@ -59,6 +57,6 @@ App({
             that: null, //保存this
             callback: function () {}
         },
-        host:"http://122.226.136.204:8082"
+        host: "http://122.226.136.204:8082"
     }
 })

+ 1 - 1
packageA/market/detail.wxml

@@ -62,7 +62,7 @@
 	</van-tab>
 </van-tabs>
 
-<block wx:if="{{userrole!='业务员'}}">
+<block wx:if="{{userrole=='业务员'}}">
 	<!-- 底部 -->
 	<view style="height: 150rpx;" />
 	<view class="footer">

+ 6 - 1
packageA/tool/index.js

@@ -8,6 +8,7 @@ Page({
         cType: {},
         loading: true,
         "content": {
+            nocache: true,
             "pageNumber": 1,
             "pageTotal": 1,
             "tradefield": "",
@@ -29,6 +30,9 @@ Page({
         }]
     },
     onLoad(options) {
+        this.setData({
+            userrole: wx.getStorageSync('userrole')
+        })
         this.getBrand()
         this.getNum();
         this.getDomain();
@@ -186,6 +190,7 @@ Page({
     },
     /* 获取购物车数量 */
     getNum() {
+        if (this.data.userrole == '业务员') return;
         _Http.basic({
             "id": 20220927093202,
             "content": {}
@@ -196,6 +201,6 @@ Page({
         });
     },
     onShow() {
-        if (getApp().globalData.num) this.selectComponent("#Float").setNum(getApp().globalData.num)
+        if (this.data.userrole != '业务员' && getApp().globalData.num) this.selectComponent("#Float").setNum(getApp().globalData.num)
     }
 })

+ 1 - 1
packageA/tool/index.wxml

@@ -10,4 +10,4 @@
 <!-- 筛选条件 -->
 <Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />
 <!-- 购物车按钮 -->
-<Float id="Float" pageType='Tool' />
+<Float wx:if="{{userrole!='业务员'}}" id="Float" pageType='Tool' />

+ 1 - 0
utils/Http.js

@@ -1,6 +1,7 @@
 // const baseUrl = "https://meida.cnyunl.com/yos/rest/index";
 // const baseUrl = "http://61.164.207.46:8000/yos/rest/index";
 const baseUrl = "http://122.226.136.204:8082/yos/rest/index";
+// const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index";
 
 class HTTP {
     request({