验证码添加图形验证

This commit is contained in:
GGJ
2025-03-21 08:39:44 +08:00
parent 6023eac4fe
commit a388dec384
31 changed files with 1089 additions and 587 deletions

31
main.js
View File

@@ -7,9 +7,12 @@ Vue.config.productionTip = false
// 挂载 全局变量
Vue.prototype.devCode = "2aaecd0b124df819eda75e639a1f91fd";
// Vue.prototype.serverUrl = "https://pqmcc.com:8040/shiningCloud";
Vue.prototype.serverUrl = "http://112.4.156.196:8040/shiningCloud";
// Vue.prototype.serverUrl = "http://www.pqmcc.com:8040/shiningCloud";
// Vue.prototype.serverUrl = "http://112.4.156.196:8040/shiningCloud";
Vue.prototype.serverUrl = "http://www.pqmcc.com:8040/shiningCloud";
// Vue.prototype.serverUrl = "http://192.168.1.125:8889/shiningCloud";
Vue.prototype.key = "f81804778c89c779";
Vue.prototype.authTokenId = "";
Vue.prototype.getCid=function(){
var that = this
// #ifdef APP-PLUS
@@ -58,16 +61,36 @@ Vue.prototype.createMessage=function(title,payload,content){
}
Vue.prototype.cid = function(){
var that= this;
// return '088GgLnToXTWf6XUpi8N7Z47PcqaKmONlF0ChR7F4gjdSLRIyTnTruoYfLxGK3Oy'
var cidAES = uni.getStorageSync('cidAES');
// var cid = uni.getStorageSync('cid');
if(!(cidAES!=null&&cidAES!='null'&&cidAES!=''&&cidAES!=undefined)){
setTimeout(function() {
return that.cid();
}, 500);
}else{
return cidAES;
return cidAES;
}
}
Vue.prototype.authToken = function(){
var that= this;
console.log(123,that.cid())
uni.request({
url: that.serverUrl + '/user/authToken',
method: 'POST',
data: {
devCode:that.cid(),
},
header: {
'content-type': 'application/x-www-form-urlencoded'
},
sslVerify: false,
success: (res) => {
that.authTokenId=res.data.data
},
});
}
Vue.prototype.judgeLogin = function(){
var that= this;
if((!uni.getStorageSync('userInfo').userId)||(!uni.getStorageSync('userInfo').phone)){