flx:提交中水免登录

This commit is contained in:
Rain_ 2025-08-06 10:09:11 +08:00
parent 253fedc8dd
commit 268616e85e
4 changed files with 171 additions and 1 deletions

View File

@ -125,7 +125,8 @@ if (process.env.NODE_ENV === 'development') {
// Vue.prototype.url_config = 'http://101.43.164.214:11112/'// 新金湾
Vue.prototype.work_url = 'http://101.43.164.214:11137'// 新金湾地址 通用
Vue.prototype.url_config = 'http://jxj.zhgdyun.com:9500/'// 测试环境h5
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:9500/'// 测试环境h5
Vue.prototype.url_config = 'https://192.168.1.2/'// 青海中水北方
// Vue.prototype.url_config = 'http://222.80.185.228:6090/' // 木垒县新能源工程线上地址

View File

@ -0,0 +1,76 @@
<template>
<view v-if="viewParam.isWeixin" class="scandownload_main"></view>
</template>
<script>
export default {
data() {
return {
viewParam: {},
scanInfoUrl: "",
}
},
onLoad(ops) {
console.log(ops);
this.scanInfoUrl = ops.url;
this.modelUtilInit();
},
methods: {
//
modelUtilInit() {
var UA = navigator.userAgent,
isAndroid = /android|adr/gi.test(UA),
isIOS = /iphone|ipod|ipad/gi.test(UA) && !isAndroid,
isBlackBerry = /BlackBerry/i.test(UA),
isWindowPhone = /IEMobile/i.test(UA),
isMobile = isAndroid || isIOS || isBlackBerry || isWindowPhone;
this.viewParam = {
isAndroid: isAndroid,
isIOS: isIOS,
isMobile: isMobile,
isWeixin: /MicroMessenger/gi.test(UA),
isQQ: /QQ/gi.test(UA)
};
console.log(this.viewParam);
this.downloadCourseware()
},
/** 下载文件 */
downloadCourseware() {
// plus.runtime.openURL('https://uniapp.dcloud.io/h5')
//
if (this.viewParam.isWeixin) {
//
// if (this.viewParam.isAndroid) {
// // var iframe = document.createElement("iframe");
// // iframe.style.display = "none";
// // iframe.src = 'http://192.168.34.133:20626/123456.xlsx';
// // document.body.appendChild(iframe);
// // iframe.click();
// }
// // IOS
// else if (this.viewParam.isIOS) {
// var entityDom = document.getElementById('BtnClick');
// entityDom.href = this.scanInfoUrl;
// entityDom.click();
// }
// window.location.href = this.scanInfoUrl;
// plus.runtime.openURL('https://uniapp.dcloud.io/h5')
}
//
else {
window.location.replace(this.scanInfoUrl);
}
},
}
}
</script>
<style scoped>
.scandownload_main {
width: 100vw;
height: 1200rpx;
background-image: url('@/static/scandownload_bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
</style>

93
pages/login/uidLogin.vue Normal file
View File

@ -0,0 +1,93 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
opts: {
UID: '',
type: '',
searchsn: '',
}
}
},
onLoad(opts) {
console.log(opts);
this.opts = opts;
this.formSubmit();
},
methods: {
formSubmit(e) {
let fileType = this.opts.type;
var json = {
uid: this.opts.UID,
}
this.sendRequest({
url: "xmgl/base/getUserByUid",
data: json,
method: "POST",
success: (res) => {
// #ifdef APP-PLUS
// add:CID 2022420 10:47:41 // add:CID 2022420 10:47:41
plus.push.getClientInfoAsync((info) => {
const cid = info["clientid"];
// console.log(cid,"cidcidcidcidcid")
// const cid = "f4b3246189fc051c5875a35e198ca223";
const userId = res.result.userId;
const jsonParams = {
clientId: cid,
alias: userId
}
//
this.sendRequest({
url: "xmgl/push/bindAlias", //
data: jsonParams,
method: "POST",
})
});
// #endif
// uni.setStorageSync('account', e.detail.value.account);
// uni.setStorageSync('password', e.detail.value.password);
uni.setStorageSync('userInfo', JSON.stringify(res.result));
this.searchsn = res.result.sn;
this.getProjectDetail();
setTimeout(() => {
const objUrl = {
1: '/pages/projectEnd/laborManage/index',
2: '/pages/projectEnd/environment/menu'
}
uni.redirectTo({
url: objUrl[fileType]
})
}, 800);
}
})
},
getProjectDetail() {
var that = this
this.sendRequest({
url: 'xmgl/project/getProjectInfoBySn',
data: {
projectSn: this.searchsn
// projectSn
},
method: 'POST',
success(res) {
uni.setStorageSync('projectDetail', JSON.stringify(res.result))
// that.loadWeather()
}
})
},
}
}
</script>
<style>
</style>

BIN
static/scandownload_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB