mao hace 1 año
padre
commit
06cbb82c04

+ 3 - 0
api/base/appPath.js

@@ -0,0 +1,3 @@
+const appURL = 'http://120.46.159.163:401/ezhizao-dms-production';
+
+export default appURL;

+ 13 - 0
api/business/app.js

@@ -0,0 +1,13 @@
+import req from '@/utils/request.js'
+
+/**
+ * 获取app信息列表BY类型
+ * @param {Object} data
+ */
+export function getAppInfoListByType(data) {
+	return req.request({
+		url:'/business/app/list',
+		method: 'GET',
+		data: data
+	})
+}

+ 2 - 1
components/dialog-selectEquipment/dialog-selectEquipment.vue

@@ -112,7 +112,8 @@
 	function init() {
 		getProcessList({
 			// tenantId: store.tenantId,
-			deptId: store.curDeptDetails.deptId
+			deptId: store.curDeptDetails.deptId,
+			dayworkId: store.dayworkInfo.id
 		}).then(res => {
 			console.log(res)
 			if (res.code == 200) {

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "德迈仕数字生产管理平台",
     "appid" : "__UNI__B065984",
     "description" : "",
-    "versionName" : "1.0.5",
-    "versionCode" : 104,
+    "versionName" : "1.0.6",
+    "versionCode" : 105,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 63 - 13
pages/index/index.vue

@@ -1,8 +1,9 @@
 <template>
 	<view class="page-container uni-column">
 		<view class="uni-row" style="align-items: center;margin:8rpx 0 16rpx 0">
-			<image class="logo" src="../../static/images/logo.png" @click="handleShowGear"/>
-			<uni-icons v-if="showGear > 4" class="icon-gear" type="gear-filled" size="60" @click="handleGear"></uni-icons>
+			<image class="logo" src="../../static/images/logo.png" @click="handleShowGear" />
+			<uni-icons v-if="showGear > 4" class="icon-gear" type="gear-filled" size="60"
+				@click="handleGear"></uni-icons>
 		</view>
 		<view class="title uni-row" v-if="loggedUsers.length > 0">
 			<text>点击头像切换用户</text>
@@ -49,6 +50,11 @@
 		getNickNameByUserName
 	} from '@/api/login/index.js'
 	import baseURL from '@/api/base/path.js'
+	import {
+		getAppInfoListByType
+	} from '@/api/business/app.js'
+	import appURL from '@/api/base/appPath.js'
+	import upgrade from '@/uni_modules/lgen-upgrade/js_sdk/upgrade.js'
 	// 登录过的用户
 	const loggedUsers = ref([])
 	const loginDialog = ref(null)
@@ -58,13 +64,57 @@
 	const baseUrl = ref(null)
 	const showInput = ref(false)
 	const showGear = ref(0)
+	const appInfo = ref({})
+	const newAppInfo = ref({})
+
+	onLoad(() => {})
 
-	onLoad(() => {
-		
+	onReady(() => {
 		initBaseUrl();
 		// getUser();
+		setTimeout(function() {
+			checkUpdate().then(res => {
+				if (!res) {
+					uni.showModal({
+						title: '更新',
+						content: '发现新版本',
+						showCancel: false,
+						success: function(res) {
+							if (res.confirm) {
+								update();
+							}
+						}
+					})
+				}
+			})
+		},500)
 	})
 
+	function checkUpdate() {
+		uni.getSystemInfo({
+			success: function(res) {
+				appInfo.value = res;
+			}
+		});
+		console.log(appInfo.value);
+		let flag = getAppInfoListByType({
+			type: appInfo.value.osName
+		}).then(res => {
+			console.log(res.rows[0]);
+			newAppInfo.value = res.rows[0];
+			if (res.rows[0]) {
+				return appInfo.value.appWgtVersion === newAppInfo.value.versionName;
+			} else {
+				return true;
+			}
+		})
+		return flag;
+	}
+
+	function update() {
+		upgrade.downloadInstallApp(appURL + newAppInfo.value.url);
+	}
+
 	function init() {
 		uni.getStorageInfo({
 			success: function(res) {
@@ -86,7 +136,7 @@
 									}
 								})
 							}
-							if(storagekey === 'baseUrl'){
+							if (storagekey === 'baseUrl') {
 								baseUrl.value = res.data;
 							}
 						}
@@ -95,8 +145,8 @@
 			}
 		});
 	}
-	
-	function initBaseUrl () {
+
+	function initBaseUrl() {
 		uni.getStorage({
 			key: 'baseUrl',
 			fail: function() {
@@ -107,14 +157,14 @@
 			}
 		});
 	}
-	
-	function handleShowGear(){
+
+	function handleShowGear() {
 		showGear.value += 1;
 	}
-	
+
 	function handleGear() {
 		showGear.value += 1;
-		if(showGear.value >= 7){
+		if (showGear.value >= 7) {
 			showGear.value = 0;
 		}
 		showInput.value = !showInput.value
@@ -200,13 +250,13 @@
 	.page-container {
 		overflow: auto;
 	}
-	
+
 	.logo {
 		width: 120rpx;
 		height: 120rpx;
 		margin: 0 auto;
 	}
-	
+
 	.title {
 		height: 80rpx;
 		justify-content: center;

+ 2 - 0
uni_modules/lgen-upgrade/changelog.md

@@ -0,0 +1,2 @@
+## 1.0.0(2022-07-21)
+首次发布

+ 324 - 0
uni_modules/lgen-upgrade/js_sdk/dialog.js

@@ -0,0 +1,324 @@
+/**
+ * @Descripttion: app升级弹框
+ * @Version: 1.0.0
+ * @Author: lgen
+ */
+
+import config from '@/lgen-config.js'
+import upgrade from './Upgrade'
+
+const {
+	title='发现新版本',
+	confirmText='立即更新',
+	cancelTtext='稍后再说',
+	confirmBgColor='#409eff',
+	showCancel=true,
+	titleAlign='left',
+	descriAlign='left',
+	icon,
+	description
+}=config.upgrade;
+
+class AppDialog{
+	constructor(){
+		this.maskEl={}
+		this.popupEl={}
+		this.screenHeight=600;
+		this.popupHeight=230;
+		this.popupWidth=300;
+		this.viewWidth=260;
+		this.descrTop=130;
+		this.viewPadding=20;
+		this.iconSize=80;
+		this.titleHeight=30;
+		this.textHeight=18;
+		this.textSpace=10;
+		this.popupContent=[]
+		this.apkUrl='';
+	}
+	
+	// 显示
+	show(apkUrl){
+		this.drawView()
+		this.maskEl.show()
+		this.popupEl.show()
+		this.apkUrl=apkUrl;
+	}
+	
+	// 隐藏
+	hide(){
+		this.maskEl.hide()
+		this.popupEl.hide()
+	}
+	
+	// 绘制
+	drawView(){
+		this.screenHeight=plus.screen.resolutionHeight;
+		this.popupWidth=plus.screen.resolutionWidth*0.8;
+		this.popupHeight=this.viewPadding*3+this.iconSize+100;
+		this.viewWidth=this.popupWidth-this.viewPadding*2;
+		this.descrTop=this.viewPadding+this.iconSize+this.titleHeight;
+		this.popupContent=[]
+		
+		// 图标
+		if(icon){
+			this.popupContent.push({
+				id:'logo',
+				tag:'img',
+				src:icon,
+				position:{
+					top:'0px',
+					left:(this.popupWidth-this.iconSize)/2+'px',
+					width:this.iconSize+'px',
+					height:this.iconSize+'px'
+				}
+			})
+		}else{
+			this.popupHeight-=this.iconSize/2;
+			this.descrTop-=this.iconSize/2-this.textSpace;
+		}
+		
+		// 标题
+		if(title){
+			this.popupContent.push({
+				id:'title',
+				tag:'font',
+				text:title,
+				textStyles:{
+					size:'18px',
+					color:'#333',
+					weight:'bold',
+					align:titleAlign
+				},
+				position:{
+					top:this.descrTop-this.titleHeight-this.textSpace+'px',
+					left:this.viewPadding+'px',
+					width:this.viewWidth+'px',
+					height:this.titleHeight+'px'
+				}
+			})
+		}else{
+			this.descrTop-=this.titleHeight;
+		}
+		
+		this.drawText()
+
+		// 取消
+		if(showCancel){
+			const width=(this.viewWidth-this.viewPadding)/2;
+			const confirmLeft=width+this.viewPadding*2;
+			this.drawBtn('cancel',width,cancelTtext)
+			this.drawBtn('confirm',width,confirmText,confirmLeft)
+		}else{
+			this.drawBtn('confirmBox',this.viewWidth,confirmText)
+		}
+		
+		this.drawBox(showCancel)
+	}
+	
+	// 描述内容
+	drawText(){
+		if(!description) return [];
+		const textArr=description.split('')
+		const len=textArr.length;
+		let prevNode=0;
+		let nodeWidth=0;
+		let letterWidth=0;
+		const chineseWidth=14;
+		const otherWidth=7;
+		let rowText=[];
+		
+		for(let i=0;i<len;i++){
+			// 包含中文
+			if(/[\u4e00-\u9fa5]|[\uFE30-\uFFA0]/g.test(textArr[i])){
+				// 包含字母
+				let textWidth=''
+				if(letterWidth>0){
+					textWidth=nodeWidth+chineseWidth+letterWidth*otherWidth;
+					letterWidth=0;
+				}else{
+					// 不含字母
+					textWidth=nodeWidth+chineseWidth;
+				}
+				
+				if(textWidth>this.viewWidth){
+					rowArrText(i,chineseWidth)
+				}else{
+					nodeWidth=textWidth;
+				}
+			}else{
+				// 不含中文
+				// 包含换行符
+				if(/\n/g.test(textArr[i])){
+					rowArrText(i,0,1)
+					letterWidth=0;
+				}else if(textArr[i]=='\\' && textArr[i+1]=='n'){
+					rowArrText(i,0,2)
+					letterWidth=0;
+				}else if(/[a-zA-Z0-9]/g.test(textArr[i])){
+					// 包含字母数字
+					letterWidth+=1;
+					const textWidth=nodeWidth+letterWidth*otherWidth;
+					if(textWidth>this.viewWidth){
+						const preNode=i+1-letterWidth;
+						rowArrText(preNode,letterWidth*otherWidth)
+						letterWidth=0;
+					}
+				}else{
+					if(nodeWidth+otherWidth>this.viewWidth){
+						rowArrText(i,otherWidth)
+					}else{
+						nodeWidth+=otherWidth;
+					}
+				}
+			}
+		}
+		
+		if(prevNode<len){
+			rowArrText(len,-1)
+		}
+		this.drawDesc(rowText)
+		
+		function rowArrText(i,nWidth=0,type=0){
+			const typeVal=type>0?'break':'text';
+			
+			rowText.push({
+				type:typeVal,
+				content:description.substring(prevNode,i)
+			})
+			
+			if(nWidth>=0){
+				prevNode=i+type;
+				nodeWidth=nWidth;
+			}
+		}
+	}
+	
+	// 描述
+	drawDesc(rowText){
+		rowText.forEach((item,index)=>{
+			if(index>0){
+				this.descrTop+=this.textHeight;
+				this.popupHeight+=this.textHeight;
+			}
+			
+			this.popupContent.push({
+				id:'content'+index+1,
+				tag:'font',
+				text:item.content,
+				textStyles:{
+					size:'14px',
+					color:'#666',
+					align:descriAlign
+				},
+				position:{
+					top:this.descrTop+'px',
+					left:this.viewPadding+'px',
+					width:this.viewWidth+'px',
+					height:this.textHeight+'px'
+				}
+			})
+			
+			if(item.type=='break'){
+				this.descrTop+=this.textSpace;
+				this.popupHeight+=this.textSpace;
+			}
+		})
+	}
+	
+	// 按钮
+	drawBtn(id,width,text,left=this.viewPadding){
+		let boxColor=confirmBgColor,
+			textColor='#ffffff';
+		if(id=='cancel'){
+			boxColor='#f0f0f0';
+			textColor='#666666';
+		}
+		
+		this.popupContent.push({
+			id:id+'Box',
+			tag:'rect',
+			rectStyles:{
+				radius:'6px',
+				color:boxColor
+			},
+			position:{
+				bottom:this.viewPadding+'px',
+				left:left+'px',
+				width:width+'px',
+				height:'40px'
+			}
+		})
+		
+		this.popupContent.push({
+			id:id+'Text',
+			tag:'font',
+			text:text,
+			textStyles:{
+				size:'14px',
+				color:textColor
+			},
+			position:{
+				bottom:this.viewPadding+'px',
+				left:left+'px',
+				width:width+'px',
+				height:'40px'
+			}
+		})
+	}
+	
+	// 内容框
+	drawBox(showCancel){
+		this.maskEl=new plus.nativeObj.View('maskEl',{
+			top:'0px',
+			left:'0px',
+			width:'100%',
+			height:'100%',
+			backgroundColor:'rgba(0,0,0,0.5)'
+		})
+		
+		this.popupEl=new plus.nativeObj.View('popupEl',{
+			tag:'rect',
+			top:(this.screenHeight-this.popupHeight)/2+'px',
+			left:'10%',
+			height:this.popupHeight+'px',
+			width:'80%'
+		})
+		
+		// 白色背景
+		this.popupEl.drawRect({
+			color:'#ffffff',
+			radius:'8px'
+		},{
+			top:this.iconSize/2+'px',
+			height:this.popupHeight-this.iconSize/2+'px'
+		})
+		
+		this.popupEl.draw(this.popupContent)
+		
+		this.popupEl.addEventListener('click',e=>{
+			const maxTop=this.popupHeight-this.viewPadding;
+			const maxLeft=this.popupWidth-this.viewPadding;
+			const buttonWidth=(this.viewWidth-this.viewPadding)/2;
+			if(e.clientY>maxTop-40 && e.clientY<maxTop){
+				if(showCancel){
+					// 取消
+					// if(e.clientX>this.viewPadding && e.clientX<maxLeft-buttonWidth-this.viewPadding){}
+					// 确定
+					if(e.clientX>maxLeft-buttonWidth && e.clientX<maxLeft){
+						upgrade.checkOs(this.apkUrl)
+					}
+				}else{
+					if(e.clientX>this.viewPadding && e.clientX<maxLeft){
+						upgrade.checkOs(this.apkUrl)
+					}
+				}
+				this.hide()
+			}
+			
+		})
+	}
+	
+}
+
+export default new AppDialog()

+ 66 - 0
uni_modules/lgen-upgrade/js_sdk/index.js

@@ -0,0 +1,66 @@
+/**
+ * @Descripttion: app检查更新
+ * @Version: 1.0.0
+ * @Author: lgen
+ */
+
+import config from '@/lgen-config.js'
+import appDialog from './dialog'
+const { timer=24 }=config.upgrade;
+
+class CheckUpate{
+	// 判断时间戳检测是否更新
+	judgeTimeStamp(){
+		uni.getStorage({
+			key:'appUpdateTime',
+			success:(res)=>{
+				const timeLength=1000*60*60*timer;
+				const currTimeStamp=new Date().getTime();
+				if((res.data+timeLength)<currTimeStamp){
+					this.getVersion();
+				}
+			},
+			fail:()=>{
+				// 获取缓存失败(第一次进入APP)检测更新
+				this.getVersion();
+			}
+		})
+	}
+	
+	// 获取当前版本信息
+	getVersion(){
+		plus.runtime.getProperty(plus.runtime.appid,(wgtinfo)=>{
+			CheckUpate.getUrl(wgtinfo.versionCode).then(res=>{
+				/* 
+				res.status 是否有新版本,0无,1有
+				res.path 新版 apk 地址
+				 */
+				if(res.status===1){
+					const path=res.path || '';
+					appDialog.show(path)
+				}
+			})
+			this.storageTimeStamp()
+		});
+	}
+	
+	// 缓存检测更新的时间戳
+	storageTimeStamp(){
+		const currTimeStamp=new Date().getTime();
+		uni.setStorage({
+			key:'appUpdateTime',
+			data:currTimeStamp
+		})
+	}
+}
+
+// type检测类型:0自动检测,1用户主动检测
+export default function(fn,type=0){
+	const cu=new CheckUpate()
+	if(type==1){
+		cu.getVersion();
+	}else{
+		cu.judgeTimeStamp();
+	}
+	CheckUpate.getUrl=fn;
+}

+ 93 - 0
uni_modules/lgen-upgrade/js_sdk/upgrade.js

@@ -0,0 +1,93 @@
+/**
+ * @Descripttion: app下载更新
+ * @Version: 1.0.0
+ * @Author: lgen
+ */
+// import config from '@/lgen-config.js'
+// const { upType=0 }=config.upgrade;
+
+class Upgrade{
+	
+	// 检测平台
+	checkOs(apkUrl){
+		uni.getSystemInfo({
+			success:(res) => {
+				if(res.osName=="android"){
+					if(upType==1 && packageName){
+						plus.runtime.openURL('market://details?id='+packageName)
+					}else{
+						this.downloadInstallApp(apkUrl)
+					}
+				}else if(osName=='ios' && appleId){
+					// apple id 在 app conection 上传的位置可以看到 https://appstoreconnect.apple.com
+					plus.runtime.launchApplication({
+						action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`
+					}, function(err) {
+						uni.showToast({
+							title:err.message,
+							icon:'none'
+						})
+					})
+				}
+			}  
+		})
+	}
+	
+	// 下载更新
+	downloadInstallApp(apkUrl){
+		const dtask = plus.downloader.createDownload(apkUrl, {}, function (d,status){
+			// 下载完成  
+			if (status == 200){
+				plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename),{},{},function(error){  
+					uni.showToast({  
+						title: '安装失败',
+						icon:'none'
+					});  
+				})
+			}else{
+				uni.showToast({
+					title: '更新失败',
+					icon:'none'
+				});
+			}
+		});
+		this.downloadProgress(dtask);
+	}
+	
+	// 下载进度
+	downloadProgress(dtask){
+		try{
+			dtask.start(); //开启下载任务
+			let prg=0;
+			let showLoading=plus.nativeUI.showWaiting('正在下载');
+			dtask.addEventListener('statechanged',function(task,status){
+				// 给下载任务设置监听
+				switch(task.state){
+					case 1:
+						showLoading.setTitle('正在下载');
+						break;
+					case 2:
+						showLoading.setTitle('已连接到服务器');
+						break;
+					case 3:
+						prg=parseInt((parseFloat(task.downloadedSize)/parseFloat(task.totalSize))*100);
+						showLoading.setTitle('正在下载'+prg+'%');
+						break;
+					case 4:
+						// 下载完成
+						plus.nativeUI.closeWaiting();
+						break;
+				}
+			})
+		}catch(e){
+			plus.nativeUI.closeWaiting();
+			uni.showToast({
+				title: '更新失败',
+				icon:'none'
+			})
+		}
+	}
+	
+}
+
+export default new Upgrade()

+ 84 - 0
uni_modules/lgen-upgrade/package.json

@@ -0,0 +1,84 @@
+{
+  "id": "lgen-upgrade",
+  "displayName": "app升级,检查更新,支持android和ios",
+  "version": "1.0.0",
+  "description": "uni-app 开发 APP 检查更新,弹窗提示,整包升级,可覆盖 tabbar,支持 安卓 和 苹果",
+  "keywords": [
+    "app升级"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "JS SDK",
+        "通用 SDK"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "插件不采集任何数据",
+      "permissions": "无"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "Vue": {
+          "vue2": "y",
+          "vue3": "y"
+        },
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "u",
+          "Android Browser": "u",
+          "微信浏览器(Android)": "u",
+          "QQ浏览器(Android)": "u"
+        },
+        "H5-pc": {
+          "Chrome": "u",
+          "IE": "u",
+          "Edge": "u",
+          "Firefox": "u",
+          "Safari": "u"
+        },
+        "小程序": {
+          "微信": "u",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+          "QQ": "u",
+          "钉钉": "u",
+          "快手": "u",
+          "飞书": "u",
+        "京东": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 109 - 0
uni_modules/lgen-upgrade/readme.md

@@ -0,0 +1,109 @@
+# lgen-upgrade
+
+> uni-app 开发 APP 检查更新,弹窗提示,整包升级,可覆盖 tabbar,支持 android 和 ios
+
+### 使用介绍
+
+1. 使用 HBuilderx 导入插件,在相关文件中引入
+
+> `lgen_upgeade(callback,type)` 方法接收两个参数:   
+>> `callback(versionCode)` 回调函数携带参数为当前应用版本号,例如 100,用来比较是否有新版本,返回对象 *{'status': 0 无新版本 | 1 有新版本, 'path': '新apk地址'}*   
+>>
+>> `type` 0 主动升级,1 用户检测升级,默认为 0
+
+2. **主动升级**,在 App.vue 中引入,在 onLaunch 应用生命周期中调用
+
+```
+import lgen_upgeade from '@/uni_modules/lgen-upgrade/js_sdk/index.js'
+
+export default {
+	onLaunch: function() {
+		lgen_upgeade(async (versionCode)=>{
+			//查询是否更新
+			const { statusCode,data }=await uni.request({
+				url:'https://xxx',
+				data:{
+					'versionCode':versionCode
+				},
+				method:'POST'
+			})
+			
+			if(statusCode==200){
+				return {
+					status:data.status, // 0 无新版本 | 1 有新版本
+					path:data.path // 新apk地址
+				}
+			}
+		})
+	}
+}
+```
+
+3. **用户检测升级**,在检测页面引入并调用
+
+```
+import lgen_upgeade from '@/uni_modules/lgen-upgrade/js_sdk/index.js'
+
+lgen_upgeade(async (versionCode)=>{
+	//查询是否更新
+	const { statusCode,data }=await uni.request({
+		url:'https://xxx',
+		data:{
+			'versionCode':versionCode
+		},
+		method:'POST'
+	})
+	
+	if(statusCode==200){
+		return {
+			status:data.status,
+			path:data.path
+		}
+	}else{
+		uni.showToast({
+			title:'当前已是最新版',
+			icon:'none'
+		})
+	}
+},1)
+```
+
+4. 在项目根目录下创建 `lgen-config.js` 配置文件,写入以下配置,下列对象的键值根据自己实际情况设置
+
+```
+export default {
+	upgrade:{
+		packageName:'',
+		appleId:'',
+		upType:0,
+		timer:24,
+		icon:'/static/logo.png',
+		title:'发现新版本',
+		confirmText:'立即更新',
+		cancelTtext:'稍后再说',
+		confirmBgColor:'#409eff',
+		showCancel:true,
+		titleAlign:'left',
+		descriAlign:'left',
+		description:'修复了已知BUG\n增加个人信息查询\\n增加了优惠券信息'
+	}
+}
+```
+
+5. lgen-config.js `upgrade` 配置说明,全部非必填
+
+|字段|描述|默认值|
+|--	|--	|-- |
+|upType|安卓升级方式,0 应用内更新 / 1 去应用商店更新|0|
+|packageName|android 包名,upType=1 时必填| |
+|appleId|ios 应用 id,<a href="https://appstoreconnect.apple.com" target="_blank">app store</a>中获取,ios必填| |
+|timer|主动检测间隔小时|24|
+|icon|弹窗图标| |
+|title|弹窗标题|发现新版本|
+|titleAlign|弹窗标题对齐方式,left / center|left|
+|confirmText|弹窗确定文字|立即更新|
+|confirmBgColor|弹窗确定背景颜色|#409eff|
+|cancelTtext|弹窗取消文字|稍后再说|
+|showCancel|弹窗是否显示取消,true / false|true|
+|descriAlign|更新描述对齐方式,left / center|left|
+|description|更新描述,\n 换行| |

+ 1 - 0
utils/request.js

@@ -15,6 +15,7 @@ function request({url, data, method="GET"}) {
 			data,
 			method,
 			header,
+			sslVerify: false,
 			success: (res) => {
 				if (res.statusCode === 200) {
 					//请求成功