Browse Source

移除多余请求

xiaohaizhao 4 months ago
parent
commit
7443ada373

+ 2 - 2
app.js

@@ -28,7 +28,7 @@ App({
 		})
 
 		//获取领域对应账户
-		this.globalData.http.basic({
+		/* this.globalData.http.basic({
 			"classname": "sysmanage.develop.optiontype.optiontype",
 			"method": "optiontypeselect",
 			"content": {
@@ -39,7 +39,7 @@ App({
 		}).then(res => {
 			console.log("查询领域对应列表", res)
 			wx.setStorageSync('domainrelatedaccounts', res.msg == '成功' ? res.data : [])
-		})
+		}) */
 		console.log(this.globalData.http.baseUrl.replace("https", "wss").replace("http", "ws") + '/yos/webSocket/' + wx.getStorageSync('userMsg').token)
 		this.globalData.SocketTask.onOpen(function (res) {
 			that.globalData.socketEstablish = true;

+ 0 - 1
packageA/activity/detail.scss

@@ -122,7 +122,6 @@ swiper {
 
 			.subfield {
 				margin-top: 6rpx;
-				height: 34rpx;
 				line-height: 34rpx;
 
 

+ 5 - 3
packageA/activity/detail.wxml

@@ -49,16 +49,18 @@
 				<view class="subfield line-1">
 					品号:{{item.itemno||' --'}}
 				</view>
+				<view class="subfield">
+					型号:{{item.model||' --'}}
+				</view>
 				<view class="subfield line-1">
-					<text style="margin-right: 15rpx;">型号:{{item.model||' --'}}</text>
-					<text>规格:{{item.spec||' --'}}</text>
+					规格:{{item.spec||' --'}}
 				</view>
 				<view class="price line-1">
 					价格:<text class="num">¥{{handleHide.verify(item.gradeprice || item.price,'列表金额',privacyFieldC)}}元</text><text wx:if="{{item.gradeprice<item.oldprice ||item.price<item.oldprice}}" style="text-decoration:line-through; color:#999;">/{{handleHide.verify(item.oldprice,'列表金额',privacyFieldC)}}元</text>
 				</view>
 				<view class="subfield line-1">
 					限购数量:{{item.groupqty==0?'不限购':(item.groupqty-item.saledqty)<=0?'已售罄':item.groupqty}} </view>
-					<!-- 	<view class="subfield">
+						<!-- 	<view class="subfield">
 							包装数量:{{item.packageqty}} ({{item.unitname}})
 						</view> -->
 				</view>

+ 1 - 1
packageA/dispatchBill/modules/rows/index.scss

@@ -16,7 +16,7 @@
 	}
 
 	.exp {
-		height: 34rpx;
+		line-height: 34rpx;
 		font-size: 24rpx;
 		margin-bottom: 8rpx;
 		color: #999999;

+ 2 - 2
packageA/favorites/index.js

@@ -25,7 +25,7 @@ Page({
         domainrelatedaccounts
       })
     } else {
-      _Http.basic({
+      /* _Http.basic({
         "classname": "sysmanage.develop.optiontype.optiontype",
         "method": "optiontypeselect",
         "content": {
@@ -43,8 +43,8 @@ Page({
           })
         }
       })
+    console.log("domainrelatedaccounts", domainrelatedaccounts) */
     }
-    console.log("domainrelatedaccounts", domainrelatedaccounts)
 
 
     try {

+ 0 - 1
packageA/toolBill/modules/toolDetail/list/index.scss

@@ -72,7 +72,6 @@
           .subfield {
             display: flex;
             margin-top: 8rpx;
-            height: 34rpx;
             line-height: 34rpx;
   
             text {

+ 4 - 2
packageA/toolBill/modules/toolDetail/list/index.wxml

@@ -16,8 +16,10 @@
 					编号:{{item.itemno}}
 				</view>
 				<view class="subfield">
-					<text class="line-1" style="margin-right: 6rpx;">型号:{{item.model||' --'}}</text>
-					<text class="line-1">规格:{{item.spec||' --'}}</text>
+					型号:{{item.model||' --'}}
+				</view>
+				<view class="subfield">
+					规格:{{item.spec||' --'}}
 				</view>
 				<view class="subfield">
 					<text class="line-1" style="margin-right: 6rpx;">材质:{{item.material||' --'}}</text>

+ 1 - 0
pages/index/annunciate/index.js

@@ -14,6 +14,7 @@ Component({
   },
   methods: {
     getList() {
+      return;
       _Http.basic({
         id: 20221111090904,
         content: {

+ 2 - 2
pages/index/collect/index.js

@@ -31,7 +31,7 @@ Component({
 					domainrelatedaccounts
 				})
 			} else {
-				_Http.basic({
+				/* _Http.basic({
 					"classname": "sysmanage.develop.optiontype.optiontype",
 					"method": "optiontypeselect",
 					"content": {
@@ -48,7 +48,7 @@ Component({
 							domainrelatedaccounts
 						})
 					}
-				})
+				}) */
 			}
 
 			try {

+ 1 - 0
pages/index/index.js

@@ -44,6 +44,7 @@ Page({
 		}
 	},
 	getAnnunciate() {
+		return
 		_Http.basic({
 			"id": 20221111090904,
 			"content": {

+ 95 - 46
pages/login/modules/account.js

@@ -84,60 +84,109 @@ Component({
 		},
 		/* 处理登录 */
 		async handleLogin() {
-			const s = _Http.baseUrl == "https://crm.meida.com:16691" ? await _Http.OldLogin(`?username=${this.data.accountno}&password=${encodeURIComponent(this.data.password)}`) : {
-				success: false
-			};
-			if(s.msg ==  "用户已锁定或失效") return wx.showModal({
-				title: '提示',
-				content: s.msg,
-				showCancel:false,
-			})
-			let res = s.success == true ? await _Http.SSO({
-				"accountno": s.data.userinfo.username,
-				"password": s.data.cookie.split("=")[1],
-				"imagecaptcha": this.data.imagecaptcha || '',
-				"systemclient": "wechatsaletool"
-			}) : await _Http.login({
-				"accountno": this.data.accountno,
-				"password": md5.hexMD5(this.data.password),
-				"imagecaptcha": this.data.imagecaptcha || '',
-				"systemclient": "wechatsaletool"
-			});
-
-			if (res.remindchangepassword) return wx.showModal({
-				title: '提示',
-				content: '当前密码为系统初始化密码,请修改后重新登录',
-				showCancel: false,
-				confirmText: "前去修改",
-				complete: () => {
-					wx.navigateTo({
-						url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
+			if (_Http.baseUrl == "https://crm.meida.com:16691") {
+				const s = _Http.baseUrl == "https://crm.meida.com:16691" ? await _Http.OldLogin(`?username=${this.data.accountno}&password=${encodeURIComponent(this.data.password)}`) : {
+					success: false
+				};
+				if (s.success == 'false') {
+					wx.showModal({
+						title: '提示',
+						content: s.msg,
+						showCancel: false,
 					})
-					_Http.claerPassword = function () {
-						this.setData({
-							password: ""
-						})
-					}.bind(this);
 					getCurrentPages()[0].setData({
 						loading: false
 					})
+					return
 				}
-			})
-			getCurrentPages()[0].setData({
-				loading: false
-			})
-			if (res.msg != '成功') {
-				wx.showToast({
-					title: res.msg,
-					icon: "none"
+				let res = s.success == true ? await _Http.SSO({
+					"accountno": s.data.userinfo.username,
+					"password": s.data.cookie.split("=")[1],
+					"imagecaptcha": this.data.imagecaptcha || '',
+					"systemclient": "wechatsaletool"
+				}) : await _Http.login({
+					"accountno": this.data.accountno,
+					"password": md5.hexMD5(this.data.password),
+					"imagecaptcha": this.data.imagecaptcha || '',
+					"systemclient": "wechatsaletool"
+				});
+				if (res.remindchangepassword) return wx.showModal({
+					title: '提示',
+					content: '当前密码为系统初始化密码,请修改后重新登录',
+					showCancel: false,
+					confirmText: "前去修改",
+					complete: () => {
+						wx.navigateTo({
+							url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
+						})
+						_Http.claerPassword = function () {
+							this.setData({
+								password: ""
+							})
+						}.bind(this);
+						getCurrentPages()[0].setData({
+							loading: false
+						})
+					}
+				})
+				getCurrentPages()[0].setData({
+					loading: false
 				})
-				this.changeTimestamp()
+				if (res.msg != '成功') {
+					wx.showToast({
+						title: res.msg,
+						icon: "none"
+					})
+					this.changeTimestamp()
+				} else {
+					wx.setStorageSync('loginMsg', {
+						accountno: this.data.accountno,
+						password: (this.data.memory) ? this.data.password : ''
+					})
+					loginMsg.loginMsg(res);
+				}
 			} else {
-				wx.setStorageSync('loginMsg', {
-					accountno: this.data.accountno,
-					password: (this.data.memory) ? this.data.password : ''
+				let res = await _Http.login({
+					"accountno": this.data.accountno,
+					"password": md5.hexMD5(this.data.password),
+					"imagecaptcha": this.data.imagecaptcha || '',
+					"systemclient": "wechatsaletool"
+				});
+				if (res.remindchangepassword) return wx.showModal({
+					title: '提示',
+					content: '当前密码为系统初始化密码,请修改后重新登录',
+					showCancel: false,
+					confirmText: "前去修改",
+					complete: () => {
+						wx.navigateTo({
+							url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
+						})
+						_Http.claerPassword = function () {
+							this.setData({
+								password: ""
+							})
+						}.bind(this);
+						getCurrentPages()[0].setData({
+							loading: false
+						})
+					}
 				})
-				loginMsg.loginMsg(res);
+				getCurrentPages()[0].setData({
+					loading: false
+				})
+				if (res.msg != '成功') {
+					wx.showToast({
+						title: res.msg,
+						icon: "none"
+					})
+					this.changeTimestamp()
+				} else {
+					wx.setStorageSync('loginMsg', {
+						accountno: this.data.accountno,
+						password: (this.data.memory) ? this.data.password : ''
+					})
+					loginMsg.loginMsg(res);
+				}
 			}
 		}
 	}

+ 1 - 1
pages/login/modules/account.wxml

@@ -8,7 +8,7 @@
     <input class="input" wx:if="{{inputType=='text'}}" focus='{{focus}}' bindinput="inputChange" data-name="password"
         value="{{password}}" placeholder="请输入密码" />
     <input class="input" wx:else type="password" focus='{{focus}}' bindinput="inputChange" data-name="password"
-        value="{{password}}" placeholder="请输入密码" />
+        value="{{password}}" password='true' placeholder="请输入密码" />
     <view slot='right-icon' style="width: 90rpx;height: 22.4px; display: flex; justify-content: flex-end;"
         catchtap="changePasswordType">
         <image class="image" src="{{inputType=='password'?'/static/image/dp-none.svg':'/static/image/dp-show.svg'}}" />

+ 0 - 1
select/addPreciseSearch/index.scss

@@ -84,7 +84,6 @@ page {
 
 			.subfield {
 				margin-top: 6rpx;
-				height: 34rpx;
 				line-height: 34rpx;
 
 

+ 1 - 1
select/addPreciseSearch/index.wxml

@@ -34,7 +34,7 @@
                 <view class="subfield line-1">
                     品名:{{item.itemname || '-'}}
                 </view>
-                <view class="subfield line-1">
+                <view class="subfield">
                     型号:{{item.model || '-'}}
                 </view>
                 <view class="subfield line-1">

+ 0 - 1
select/product/index.scss

@@ -93,7 +93,6 @@ page {
 
 			.subfield {
 				margin-top: 6rpx;
-				height: 34rpx;
 				line-height: 34rpx;
 
 

+ 1 - 1
select/product/index.wxml

@@ -43,7 +43,7 @@
                 <view class="subfield line-1">
                     品号:{{item.itemno}}
                 </view>
-                <view class="subfield line-1">
+                <view class="subfield">
                     型号:{{item.model||' --'}}
                 </view>
                 <view class="subfield line-1">

+ 0 - 1
select/product1/index.scss

@@ -73,7 +73,6 @@ page {
 
 			.subfield {
 				margin-top: 6rpx;
-				height: 34rpx;
 				line-height: 34rpx;
 
 

+ 1 - 1
select/product1/index.wxml

@@ -17,7 +17,7 @@
                 <view class="subfield line-1">
                     品号:{{item.itemno}}
                 </view>
-                <view class="subfield line-1">
+                <view class="subfield">
                     型号:{{item.model||' --'}}
                 </view>
                 <view class="subfield line-1">

+ 0 - 1
select/workOrderProduct/index.scss

@@ -74,7 +74,6 @@ page {
 
 			.subfield {
 				margin-top: 6rpx;
-				height: 34rpx;
 				line-height: 34rpx;
 
 

+ 1 - 1
select/workOrderProduct/index.wxml

@@ -23,7 +23,7 @@
                 <view class="subfield line-1">
                     品号:{{item.itemno}}
                 </view>
-                <view class="subfield line-1">
+                <view class="subfield">
                     型号:{{item.model||' --'}}
                 </view>
                 <view class="subfield line-1">

+ 1 - 0
utils/pay.js

@@ -61,6 +61,7 @@ const createOrder = (query = "") => {
 }
 //查询版本到期情况
 const vIndate = () => {
+    return
     const http = getApp().globalData.http;
     const isLeader = wx.getStorageSync('isLeader');
     return http.basic({