dedsudiyu hai 1 ano
pai
achega
e63947f4f6
Modificáronse 7 ficheiros con 1307 adicións e 1095 borrados
  1. 8 1
      api/basicsModules/index.js
  2. 2 2
      api/request/config.js
  3. 1 1
      manifest.json
  4. 8 0
      pages.json
  5. 502 423
      pages/login/login.vue
  6. 708 618
      pages/mine/mine.vue
  7. 78 50
      pages/saoCode/saoCode.vue

+ 8 - 1
api/basicsModules/index.js

@@ -62,7 +62,14 @@ export const systemAppletRolePermission = (data) => {
 		data: data,
 	})
 };
-
+//化学品终端-扫码登录
+export const chemicalAioIdentityScanLogin  = (data) => {
+	return apiResquest({
+		url: `/chemical/aio/identity/scanLogin`,
+		method: 'GET',
+		data: data,
+	})
+};
 
 
 

+ 2 - 2
api/request/config.js

@@ -1,8 +1,8 @@
 const config = {
 	// base_url: 'http://192.168.1.9:8080',//柴
-	base_url: 'http://192.168.1.24:8080',//林总
+	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
-	// base_url: 'http://192.168.1.17:8080',//小飞
+	base_url: 'http://192.168.1.17:8080',//小飞
 	// base_url: 'http://192.168.1.20:8080',//志伟
     // base_url: 'http://192.168.1.8:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成

+ 1 - 1
manifest.json

@@ -50,7 +50,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx0cbc02ca7f6e7f25",
+        "appid" : "wx60e12abd2e79c618",
         "setting" : {
             "urlCheck" : false,
             "minified" : true

+ 8 - 0
pages.json

@@ -30,6 +30,14 @@
 				"navigationBarBackgroundColor": "#0183FA" ,//导航背景色
 				"navigationStyle": "custom"
 			}
+		},
+		{
+			"path": "pages/saoCode/saoCode",//扫码中转
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
 		}
 	],
 	"subPackages": [

+ 502 - 423
pages/login/login.vue

@@ -1,443 +1,522 @@
 <!-- 登录 -->
 <template>
-  <view id="login">
-    <img class="login-max-big" :src="loginBanner">
-    <view class="login-box">
-	  <view class="tabTitle">
-	  	<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
-	  		<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
-	  	    <view :class="{on:curTab==index}" class="tabTitle_across"></view>
-	  	</view>
-	  </view>
-      <view class="input-max-box-one">
-        <view class="input-box">
-          <img src="@/images/basicsModules/img_log_in_account.png"/>
-          <input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
-        </view>
-      </view>
-      <view class="input-max-box-two">
-        <view class="input-box">
-          <img src="@/images/basicsModules/img_log_in_password.png"/>
-          <input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
-        </view>
-      </view>
-      <view class="check-box" @click="checkboxChange">
-        <img v-if="checkedType" src="@/images/basicsModules/icon_13.png"/>
-        <img v-if="!checkedType" src="@/images/basicsModules/icon_12.png"/>
-        <view>记住我</view>
-      </view>
-      <view class="button-box" @click="login">登录</view>
-      <view class="supplier" v-if="curTab==1">
-        <view class="supplier_l" @click="handleClick('forget')">忘记密码</view>
-        <view class="supplier_r" @click="handleClick('register')">没有账号,<text>立即注册</text></view>
-      </view>
-    </view>
-  </view>
+	<view id="login">
+		<img class="login-max-big" :src="loginBanner">
+		<view class="login-box">
+			<view class="tabTitle">
+				<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
+					<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
+					<view :class="{on:curTab==index}" class="tabTitle_across"></view>
+				</view>
+			</view>
+			<view class="input-max-box-one">
+				<view class="input-box">
+					<img src="@/images/basicsModules/img_log_in_account.png" />
+					<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
+				</view>
+			</view>
+			<view class="input-max-box-two">
+				<view class="input-box">
+					<img src="@/images/basicsModules/img_log_in_password.png" />
+					<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
+				</view>
+			</view>
+			<view class="check-box" @click="checkboxChange">
+				<img v-if="checkedType" src="@/images/basicsModules/icon_13.png" />
+				<img v-if="!checkedType" src="@/images/basicsModules/icon_12.png" />
+				<view>记住我</view>
+			</view>
+			<view class="button-box" @click="login">登录</view>
+			<view class="supplier" v-if="curTab==1">
+				<view class="supplier_l" @click="handleClick('forget')">忘记密码</view>
+				<view class="supplier_r" @click="handleClick('register')">没有账号,<text>立即注册</text></view>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-import md5 from '@/utils/md5.js'
-import { config } from '@/api/request/config.js'
-import { login,configInfo,getConfigByType,getGentleIdentifier,systemAppletRolePermission} from '@/api/basicsModules/index.js'
-import { Encrypt,Decrypt} from '@/utils/secret.js'
-export default {
-  data() {
-    return {
-      identityStatus:1,
-      // username:"superadmin",
-      // password:"zd123456",
-      username:"xiongmiao",
-      password:"zd123456",
-      checkedType:false,
-      loginBanner:uni.getStorageSync('loginBanner'),
-      infoList:[],//模板消息Id
-      tabText:['师生登录','供应商登录'],
-      curTab:0,
-      pageType:0,
-	  supplierType:false,
-    }
-  },
-
-  onLoad(option) {
-    //供应商注册成功后返回到供应商注册页面
-    if(option.status){
-      this.identityStatus=2
-    }
-    if(uni.getStorageSync('userName') && uni.getStorageSync('password')){
-      this.username = uni.getStorageSync('userName');
-      this.password = uni.getStorageSync('password');
-      this.checkedType = true;
-    }
-
-
-  },
-  onShow(){
-    this.getConfigInfo();
-  },
-  methods: {
-    //顶部tab点击
-    tabClick(index) {
-      this.curTab = index;
-    },
-	//登录
-	async login() {
-	  let self = this;
-	  let obj = {
-	    account:this.username,
-	    password:md5.hex_md5(this.password),
-	  }
-	  const {data} = await login(obj)
-	  if(data.code == 200){
-	    uni.setStorageSync('token',data.data.token);
-	    uni.setStorageSync('userId',data.data.userId);
-		// userType 0-系统 1-教职工 2-学生 3-大屏
-	    uni.setStorageSync('userType',data.data.userType==0||data.data.userType==1?'1':
-		(data.data.userType==2?'2':(data.data.userType==3?'3':'none')));
-	    if(this.checkedType){
-	      uni.setStorageSync('userName',this.username)
-	      uni.setStorageSync('password',this.password)
-	    }else{
-	      uni.removeStorageSync('userName')
-	      uni.removeStorageSync('password')
-	    }
-		//等待配置与字段获取到后跳转
-		Promise.all([
-			//获取开发配置
-			this.getConfigByType(),
+	import md5 from '@/utils/md5.js'
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		login,
+		configInfo,
+		getConfigByType,
+		getGentleIdentifier,
+		systemAppletRolePermission
+	} from '@/api/basicsModules/index.js'
+	import {
+		Encrypt,
+		Decrypt
+	} from '@/utils/secret.js'
+	export default {
+		data() {
+			return {
+				identityStatus: 1,
+				// username:"superadmin",
+				// password:"zd123456",
+				username: "xiongmiao",
+				password: "zd123456",
+				checkedType: false,
+				loginBanner: uni.getStorageSync('loginBanner'),
+				infoList: [], //模板消息Id
+				tabText: ['师生登录', '供应商登录'],
+				curTab: 0,
+				pageType: 0,
+				supplierType: false,
+			}
+		},
+
+		onLoad(option) {
+			//供应商注册成功后返回到供应商注册页面
+			if (option.status) {
+				this.identityStatus = 2
+			}
+			if (uni.getStorageSync('userName') && uni.getStorageSync('password')) {
+				this.username = uni.getStorageSync('userName');
+				this.password = uni.getStorageSync('password');
+				this.checkedType = true;
+			}
+
+
+		},
+		onShow() {
+			// this.getConfigInfo();
+		},
+		methods: {
+			//顶部tab点击
+			tabClick(index) {
+				this.curTab = index;
+			},
+			//登录
+			async login() {
+				let self = this;
+				let obj = {
+					account: this.username,
+					password: md5.hex_md5(this.password),
+				}
+				const {
+					data
+				} = await login(obj)
+				if (data.code == 200) {
+					uni.setStorageSync('token', data.data.token);
+					uni.setStorageSync('userId', data.data.userId);
+					// userType 0-系统 1-教职工 2-学生 3-大屏
+					uni.setStorageSync('userType', data.data.userType == 0 || data.data.userType == 1 ? '1' :
+						(data.data.userType == 2 ? '2' : (data.data.userType == 3 ? '3' : 'none')));
+					if (this.checkedType) {
+						uni.setStorageSync('userName', this.username)
+						uni.setStorageSync('password', this.password)
+					} else {
+						uni.removeStorageSync('userName')
+						uni.removeStorageSync('password')
+					}
+					//等待配置与字段获取到后跳转
+					Promise.all([
+						//获取开发配置
+						this.getConfigByType(),
+						//获取权限字段
+						this.systemAppletRolePermission()
+					]).then((result) => {
+						if(uni.getStorageSync('codeData')){
+							uni.redirectTo({
+								url: '/pages/saoCode/saoCode',
+							});
+						}else{
+							uni.redirectTo({
+								url: '/pages/mine/mine',
+							});
+						}
+					}).catch((error) => {
+						wx.showToast({
+							title: '数据异常,请稍候再试!',
+							icon: "none",
+							duration: 3000
+						});
+					})
+
+
+
+					//获取身份标识
+					// this.getGentleIdentifier();
+				}
+			},
 			//获取权限字段
-			this.systemAppletRolePermission()
-		]).then((result)=>{
-			uni.redirectTo({
-				url: '/pages/mine/mine',
-			});
-		}).catch((error) => {
-			wx.showToast({
-				title: '数据异常,请稍候再试!',
-				icon: "none",
-				duration: 3000
-			});
-		})
-		
-		
-		
-	    //获取身份标识
-	    // this.getGentleIdentifier();
-	  }
-	},
-	//获取权限字段
-	async systemAppletRolePermission(){
-		let self = this;
-		const {data} = await systemAppletRolePermission();
-		if(data.code==200){
-			uni.setStorageSync('permissions',data.data.data)
-		}
-	},
-    //获取用户身份标识"adminGentle": false,   
-	//管理员身份 "rectifyGentle": false,   
-	//整改身份"applyGentle": false    检查者身份
-    async getGentleIdentifier(){
-      let self = this;
-      const {data} = await getGentleIdentifier();
-      if(data.code==200){
-        uni.setStorageSync('gentleIdentifierData',data.data)
-        let list=[];
-        if(data.data.adminGentle || data.data.collegeGentle){//校级管理员
-          list.push({name:'管理员',pageType:1})
-        }
-        if(data.data.applyGentle ||data.data.myApplyGentle){
-          list.push({name:'检查者',pageType:2})
-        }
-        if(data.data.rectifyGentle){
-          list.push({name:'整改者',pageType:3})
-        }
-        if(!data.data.adminGentle && !data.data.applyGentle && !data.data.myApplyGentle  && !data.data.applyGentle && !data.data.collegeGentle){
-          self.pageType='mine'
-          list.push({name:'暂无权限',pageType:'mine'})
-        }
-        uni.setStorageSync('gentleIdentifier',list)
-        if(uni.getStorageSync('saoCode')){
-          uni.redirectTo({
-            url: '/pages/saoCode/saoCode'
-          });
-        }else if(self.pageType=='mine'){
-          uni.redirectTo({
-            url: '/pages/mine/mine',
-          });
-        }else{
-          uni.redirectTo({
-            url: '/pages/home/home',
-          });
-        }
-      }
-    },
-    switchClick(){
-      if(this.identityStatus==1){
-        this.identityStatus=2;
-      }else{
-        this.identityStatus=1;
-      }
-    },
-	//查询公共配置
-    async getConfigInfo(){
-      const {data} = await configInfo({ type: '1,2,4' });
-      if(data.code == 200){
-		let list = JSON.parse(data.data)
-		let newData = {};
-		list.forEach((item) => {
-			let obj = JSON.parse(item.configValue)
-			newData = {...newData,...obj}
-		})
-		uni.setStorageSync('circularLogo',config.base_url + newData.circularLogo)
-		uni.setStorageSync('videoCover',config.base_url + newData.videoCover)
-		this.$set(this,'loginBanner',config.base_url + newData.loginBanner);
-		uni.setStorageSync('loginBanner',config.base_url + newData.loginBanner)
-		this.$set(this,'supplierType',newData.supplier);
-		uni.setStorageSync('supplierType',newData.supplier)
-		uni.setStorageSync('homepageBanner',config.base_url + newData.homepageBanner)
-      }
-    },
-    //获取开发配置
-	async getConfigByType(){
-      const {data} = await getConfigByType({ category: 2, configType: 5 });
-      if(data.code == 200){
-        let obj = JSON.parse(data.data.configValue)
-        //文件预览地址
-        uni.setStorageSync('filePreviewUrl','https://'+obj.fileExtranetUrl)
-        //摄像头代理访问地址
-        uni.setStorageSync('cameraExtranetAgent','https://'+obj.cameraExtranetAgent)
-        //摄像头地址ip段
-        uni.setStorageSync('cameraIntranetAgent',obj.cameraIntranetAgent)
-        //摄像头访问地址
-        uni.setStorageSync('cameraUrl','https://'+obj.cameraExtranetUrl)
-        //MQTT地址
-        uni.setStorageSync('mqttUrl',Decrypt(obj.mqttExtranetUrl))
-        //MQTT账号
-        uni.setStorageSync('mqttUser',Decrypt(obj.mqttExtranetUser))
-        //MQTT密码
-        uni.setStorageSync('mqttPassword',Decrypt(obj.mqttExtranetPassword))
-      }
-    },
-    checkboxChange() {
-      this.checkedType = !this.checkedType;
-    },
-    //点击事件
-    handleClick(doType) {
-      if(doType=='register'){//供应商注册
-        uni.redirectTo({
-          url: '/pages_supplier/register/register?pageStatus=0'
-        });
-      }else if(doType=='forget'){//忘记密码
-        uni.showModal({
-          showCancel:false,
-          confirmColor:'#0183FA',
-          content: '请您联系学校相关管理人员申请重置密码',
-          success: function (res) {
-            if (res.confirm) {
-            }
-          }
-        });
-      }
-    },
-  },
-
-}
+			async systemAppletRolePermission() {
+				let self = this;
+				const {
+					data
+				} = await systemAppletRolePermission();
+				if (data.code == 200) {
+					uni.setStorageSync('permissions', data.data.data)
+				}
+			},
+			//获取用户身份标识"adminGentle": false,   
+			//管理员身份 "rectifyGentle": false,   
+			//整改身份"applyGentle": false    检查者身份
+			async getGentleIdentifier() {
+				let self = this;
+				const {
+					data
+				} = await getGentleIdentifier();
+				if (data.code == 200) {
+					uni.setStorageSync('gentleIdentifierData', data.data)
+					let list = [];
+					if (data.data.adminGentle || data.data.collegeGentle) { //校级管理员
+						list.push({
+							name: '管理员',
+							pageType: 1
+						})
+					}
+					if (data.data.applyGentle || data.data.myApplyGentle) {
+						list.push({
+							name: '检查者',
+							pageType: 2
+						})
+					}
+					if (data.data.rectifyGentle) {
+						list.push({
+							name: '整改者',
+							pageType: 3
+						})
+					}
+					if (!data.data.adminGentle && !data.data.applyGentle && !data.data.myApplyGentle && !data.data.applyGentle &&
+						!data.data.collegeGentle) {
+						self.pageType = 'mine'
+						list.push({
+							name: '暂无权限',
+							pageType: 'mine'
+						})
+					}
+					uni.setStorageSync('gentleIdentifier', list)
+					if (uni.getStorageSync('saoCode')) {
+						uni.redirectTo({
+							url: '/pages/saoCode/saoCode'
+						});
+					} else if (self.pageType == 'mine') {
+						uni.redirectTo({
+							url: '/pages/mine/mine',
+						});
+					} else {
+						uni.redirectTo({
+							url: '/pages/home/home',
+						});
+					}
+				}
+			},
+			switchClick() {
+				if (this.identityStatus == 1) {
+					this.identityStatus = 2;
+				} else {
+					this.identityStatus = 1;
+				}
+			},
+			//查询公共配置
+			async getConfigInfo() {
+				const {
+					data
+				} = await configInfo({
+					type: '1,2,4'
+				});
+				if (data.code == 200) {
+					let list = JSON.parse(data.data)
+					let newData = {};
+					list.forEach((item) => {
+						let obj = JSON.parse(item.configValue)
+						newData = {
+							...newData,
+							...obj
+						}
+					})
+					uni.setStorageSync('circularLogo', config.base_url + newData.circularLogo)
+					uni.setStorageSync('videoCover', config.base_url + newData.videoCover)
+					this.$set(this, 'loginBanner', config.base_url + newData.loginBanner);
+					uni.setStorageSync('loginBanner', config.base_url + newData.loginBanner)
+					this.$set(this, 'supplierType', newData.supplier);
+					uni.setStorageSync('supplierType', newData.supplier)
+					uni.setStorageSync('homepageBanner', config.base_url + newData.homepageBanner)
+				}
+			},
+			//获取开发配置
+			async getConfigByType() {
+				const {
+					data
+				} = await getConfigByType({
+					category: 2,
+					configType: 5
+				});
+				if (data.code == 200) {
+					let obj = JSON.parse(data.data.configValue)
+					//文件预览地址
+					uni.setStorageSync('filePreviewUrl', 'https://' + obj.fileExtranetUrl)
+					//摄像头代理访问地址
+					uni.setStorageSync('cameraExtranetAgent', 'https://' + obj.cameraExtranetAgent)
+					//摄像头地址ip段
+					uni.setStorageSync('cameraIntranetAgent', obj.cameraIntranetAgent)
+					//摄像头访问地址
+					uni.setStorageSync('cameraUrl', 'https://' + obj.cameraExtranetUrl)
+					//MQTT地址
+					uni.setStorageSync('mqttUrl', Decrypt(obj.mqttExtranetUrl))
+					//MQTT账号
+					uni.setStorageSync('mqttUser', Decrypt(obj.mqttExtranetUser))
+					//MQTT密码
+					uni.setStorageSync('mqttPassword', Decrypt(obj.mqttExtranetPassword))
+				}
+			},
+			checkboxChange() {
+				this.checkedType = !this.checkedType;
+			},
+			//点击事件
+			handleClick(doType) {
+				if (doType == 'register') { //供应商注册
+					uni.redirectTo({
+						url: '/pages_supplier/register/register?pageStatus=0'
+					});
+				} else if (doType == 'forget') { //忘记密码
+					uni.showModal({
+						showCancel: false,
+						confirmColor: '#0183FA',
+						content: '请您联系学校相关管理人员申请重置密码',
+						success: function(res) {
+							if (res.confirm) {}
+						}
+					});
+				}
+			},
+		},
+
+	}
 </script>
 
 
 <style lang="stylus" scoped>
-#login{
-  height:100%;
-  width:100%;
-  background #f5f5f5
-  position relative
-  .login-max-big{
-    width:750rpx;
-    height:1177rpx;
-    z-index:0;
-  }
-  .login-box{
-    z-index:3;
-    position: absolute
-    top:446rpx;
-    left:46rpx;
-    width:658rpx;
-    height:700rpx;
-    // background #fff
-	/* 切换按钮 */
-	.tabTitle{
-		display flex;
-		width:100%;
-		height: 100rpx;
-		position: absolute;
-		top: 50rpx;
-		justify-content: center;
-		>view:nth-of-type(1){
-			margin-right: 100rpx;
+	#login {
+		height: 100%;
+		width: 100%;
+
+		background #f5f5f5;
+		position relative;
+
+		.login-max-big {
+			width: 750rpx;
+			height: 1177rpx;
+			z-index: 0;
 		}
-		.tabTitle_li{
-			width:168rpx;
-			text-align center;
-			.tabTitle_text{
-				display: inline-block;
-				font-size: 32rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-				line-height: 90rpx;
-				&.on{
-					color:#0183FA;
+
+		.login-box {
+			z-index: 3;
+			position: absolute;
+			top:446rpx;
+			left: 46rpx;
+			width: 658rpx;
+			height: 700rpx;
+
+			// background #fff
+			/* 切换按钮 */
+			.tabTitle {
+				display flex;
+				width: 100%;
+				height: 100rpx;
+				position: absolute;
+				top: 50rpx;
+				justify-content: center;
+
+				>view:nth-of-type(1) {
+					margin-right: 100rpx;
+				}
+
+				.tabTitle_li {
+					width: 168rpx;
+					text-align center;
+
+					.tabTitle_text {
+						display: inline-block;
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+						line-height: 90rpx;
+
+						&.on {
+							color: #0183FA;
+						}
+					}
+
+					.tabTitle_across {
+						width: 100rpx;
+						height: 4rpx;
+						background: #0183FA;
+						border-radius: 2rpx;
+						margin-left 30rpx;
+						display none;
+
+						&.on {
+							display block;
+						}
+					}
+
 				}
 			}
-			.tabTitle_across{
-				width: 100rpx;
-				height: 4rpx;
+
+			border-radius:20rpx;
+
+			.input-max-box-one {
+				overflow: hidden;
+				margin-top: 68rpx;
+
+				.input-box {
+					display flex;
+					width: 600rpx;
+					height: 80rpx;
+					border: 1rpx solid #e0e0e0;
+					border-radius: 40rpx;
+					margin: 147rpx auto 0;
+
+					img {
+						width: 28rpx;
+						height: 32rpx;
+						margin: 24rpx 31rpx;
+					}
+
+					input {
+						flex: 1;
+						font-size: 24rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						margin-right: 31rpx;
+					}
+				}
+
+				.text-box {
+					height: 59rpx;
+					line-height: 59rpx;
+					color: #DC1616;
+					font-size: 24rpx;
+					margin-left: 102rpx;
+				}
+			}
+
+			.input-max-box-two {
+				margin-top: 40rpx;
+
+				.input-box {
+					display flex;
+					width: 600rpx;
+					height: 80rpx;
+					border: 1rpx solid #e0e0e0;
+					border-radius: 40rpx;
+					margin: 0 auto 0;
+
+					img {
+						width: 30rpx;
+						height: 32rpx;
+						margin: 24rpx 30rpx;
+					}
+
+					input {
+						flex: 1;
+						font-size: 24rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						margin-right: 31rpx;
+					}
+				}
+
+				.text-box {
+					height: 59rpx;
+					line-height: 59rpx;
+					color: #DC1616;
+					font-size: 24rpx;
+					margin-left: 102rpx;
+				}
+			}
+
+			.check-box {
+				margin: 30rpx 0 30rpx 104rpx;
+				width: 300rpx;
+				height: 50rpx;
+				display: flex;
+
+				img {
+					margin-top: 10rpx;
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 10rpx;
+				}
+
+				view {
+					font-size: 24rpx;
+					line-height: 50rpx;
+				}
+			}
+
+			.button-box {
+				width: 600rpx;
+				line-height: 80rpx;
 				background: #0183FA;
-				border-radius: 2rpx;
-				margin-left 30rpx;
-				display none;
-				&.on{
-					display block;
+				border-radius: 40rpx;
+				font-size: 36rpx;
+				color: #fff;
+				text-align center;
+				margin: 0 auto 0;
+			}
+
+			/* 供应商注册 */
+			.supplier {
+				display: flex;
+				justify-content: space-between;
+				margin: 30rpx 40rpx 0;
+
+				.supplier_l {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 24rpx;
+				}
+
+				.supplier_r {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 24rpx;
+
+					>text {
+						color: #0183FA;
+					}
+				}
+			}
+
+			/* 供应商切换 */
+			.switch_btn {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #0183FA;
+				line-height: 24rpx;
+				margin-top: 60rpx;
+
+				>img {
+					width: 24rpx;
+					height: 24rpx;
+					margin-left: 12rpx;
 				}
 			}
+		}
 
+		.top-back {
+			z-index: 2;
+			position: absolute;
+			top:261rpx;
+			left: 375rpx;
+			height: 296rpx;
+			width: 366rpx;
 		}
 	}
-    border-radius:20rpx;
-    .input-max-box-one{
-		overflow: hidden;
-		margin-top:68rpx;
-      .input-box{
-        display flex
-        width:600rpx;
-        height:80rpx;
-        border:1rpx solid #e0e0e0;
-        border-radius:40rpx;
-        margin:147rpx auto 0;
-        img{
-          width:28rpx;
-          height:32rpx;
-          margin:24rpx 31rpx;
-        }
-        input{
-          flex:1;
-          font-size:24rpx;
-          height:80rpx;
-          line-height:80rpx;
-          margin-right:31rpx;
-        }
-      }
-      .text-box{
-        height:59rpx;
-        line-height:59rpx;
-        color:#DC1616;
-        font-size:24rpx;
-        margin-left:102rpx;
-      }
-    }
-    .input-max-box-two{
-      margin-top:40rpx;
-      .input-box{
-        display flex
-        width:600rpx;
-        height:80rpx;
-        border:1rpx solid #e0e0e0;
-        border-radius:40rpx;
-        margin:0 auto 0;
-        img{
-          width:30rpx;
-          height:32rpx;
-          margin:24rpx 30rpx;
-        }
-        input{
-          flex:1;
-          font-size:24rpx;
-          height:80rpx;
-          line-height:80rpx;
-          margin-right:31rpx;
-        }
-      }
-      .text-box{
-        height:59rpx;
-        line-height:59rpx;
-        color:#DC1616;
-        font-size:24rpx;
-        margin-left:102rpx;
-      }
-    }
-    .check-box{
-      margin:30rpx 0 30rpx 104rpx;
-      width:300rpx;
-      height:50rpx;
-      display:flex;
-      img{
-        margin-top:10rpx;
-        width:32rpx;
-        height:32rpx;
-        margin-right:10rpx;
-      }
-      view{
-        font-size:24rpx;
-        line-height:50rpx;
-      }
-    }
-    .button-box{
-      width: 600rpx;
-      line-height: 80rpx;
-      background: #0183FA;
-      border-radius: 40rpx;
-      font-size: 36rpx;
-      color:#fff;
-      text-align center
-      margin:0 auto 0;
-    }
-    /* 供应商注册 */
-    .supplier{
-      display: flex;
-      justify-content: space-between;
-      margin:30rpx 40rpx 0;
-      .supplier_l{
-        font-size: 24rpx;
-        font-family: PingFang SC;
-        font-weight: 400;
-        color: #333333;
-        line-height: 24rpx;
-      }
-      .supplier_r{
-        font-size: 24rpx;
-        font-family: PingFang SC;
-        font-weight: 400;
-        color: #333333;
-        line-height: 24rpx;
-        >text{
-          color: #0183FA;
-        }
-      }
-    }
-    /* 供应商切换 */
-    .switch_btn{
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      font-size: 24rpx;
-      font-family: PingFang SC;
-      font-weight: 400;
-      color: #0183FA;
-      line-height: 24rpx;
-      margin-top: 60rpx;
-      >img{
-        width: 24rpx;
-        height: 24rpx;
-        margin-left: 12rpx;
-      }
-    }
-  }
-  .top-back{
-    z-index:2;
-    position: absolute
-    top:261rpx;
-    left:375rpx;
-    height:296rpx;
-    width:366rpx;
-  }
-}
 </style>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 708 - 618
pages/mine/mine.vue


+ 78 - 50
pages/saoCode/saoCode.vue

@@ -1,62 +1,90 @@
 <!--扫描二维码页面-->
 <template>
-    <view id="saoCode">
-        <web-view :src="baseUrl+'admin/#/codeHtml?code='+code+'&type='+type"></web-view>
-    </view>
+	<view id="saoCode">
+		<web-view :src="baseUrl+'admin/#/codeHtml?code='+code+'&type='+type"></web-view>
+	</view>
 </template>
 
 <script>
-	import { config } from '@/api/request/config.js'
-    export default {
-		
-        name: "saoCode",
-        data() {
-            return {
-				baseUrl:config.base_url,
-                code:"",
-                type:"",
-            }
-        },
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		chemicalAioIdentityScanLogin
+	} from '@/api/basicsModules/index.js'
 
-        onLoad(option) {
-            let self = this;
-            if(option.q){
-                let text = decodeURIComponent(option.q)
-                let list = text.split("?")[1].split("&");
-                for(let i=0;i<list.length;i++){
-                    let newList = list[i].split("=");
-                    if(newList[0] == 'code'){
-                        self.code = newList[1];
-                    }else if(newList[0] == 'type'){
-                        self.type = newList[1];
-                    }
-                }
-                if(!uni.getStorageSync('token')){
-                    uni.setStorageSync('saoCode',this.code);
-                    uni.setStorageSync('saoType',this.type);
-                    uni.redirectTo({
-                        url: '/pages/login',
-                    });
-                }
-            }else{
-                this.code = uni.getStorageSync('saoCode');
-                this.type = uni.getStorageSync('saoType');
-                uni.removeStorageSync('saoCode');
-                uni.removeStorageSync('saoType');
-            }
-        },
-        mounted(){
+	export default {
+		name: "saoCode",
+		data() {
+			return {
+				baseUrl: config.base_url,
+				code: "",
+				type: "",
+			}
+		},
+		onLoad(option) {
+			let self = this;
+			if (option.q) {
+				let text = decodeURIComponent(option.q)
+				let list = text.split("?")[1].split("&");
+				let codeData = {};
+				list.forEach((item) => {
+					codeData[item.split("=")[0]] = item.split("=")[1];
+				})
+				if (!uni.getStorageSync('token')) {
+					uni.setStorageSync('codeData', codeData);
+					uni.redirectTo({
+						url: '/pages/login/login',
+					});
+				} else {
+					if (codeData.type == 11) {
+						//化学品终端-扫码登录
+						this.chemicalAioIdentityScanLogin(codeData.code, codeData.subId, codeData.macId);
+					}
+				}
+			} else {
+				let codeData = uni.getStorageSync('codeData');
+				uni.removeStorageSync('codeData');
+				if (codeData.type == 11) {
+					//化学品终端-扫码登录
+					this.chemicalAioIdentityScanLogin(codeData.code, codeData.subId, codeData.macId);
+				}
+			}
+		},
+		mounted() {
 
-        },
+		},
 
-        methods:{
-
-        },
-    }
+		methods: {
+			//化学品终端-扫码登录
+			async chemicalAioIdentityScanLogin(code, subId, macId) {
+				const {
+					data
+				} = await chemicalAioIdentityScanLogin({
+					code: code,
+					subId: subId,
+					userId: uni.getStorageSync('userId'),
+					macId: macId
+				});
+				uni.showToast({
+					mask: true,
+					icon: "none",
+					position: "center",
+					title: data.message,
+					duration: 2000
+				});
+				setTimeout(function() {
+					uni.redirectTo({
+						url: '/pages/mine/mine',
+					});
+				}, 2000);
+			},
+		},
+	}
 </script>
 
 <style lang="stylus" scoped>
-    #saoCode{
-        overflow scroll
-    }
+	#saoCode {
+		overflow scroll
+	}
 </style>