Commit f3f1ae77 authored by 李苏's avatar 李苏 💬

调整

parent 6b99c952
...@@ -9,6 +9,8 @@ import {RouterMount} from './plugin/uni-simple-router/index.js' ...@@ -9,6 +9,8 @@ import {RouterMount} from './plugin/uni-simple-router/index.js'
console.log("main") console.log("main")
// 注册缓存器 // 注册缓存器
Vue.use(MinCache,{timeout: 6}) Vue.use(MinCache,{timeout: 6})
//判定isCloud
Vue.prototype.isCloud=true;
// store // store
Vue.prototype.$store=store; Vue.prototype.$store=store;
// tip // tip
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
"path": "pages/login/login", "path": "pages/login/login",
"style": {} "style": {}
}, },
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
<!-- <image src="https://static.jeecg.com/upload/test/login4_1595818039175.png" mode="aspectFit" class="round"></image> --> <!-- <image src="https://static.jeecg.com/upload/test/login4_1595818039175.png" mode="aspectFit" class="round"></image> -->
<view class="gray-text">登录中...</view> <view class="gray-text">登录中...</view>
</view> </view>
<view @tap="changErp()" style="position: absolute;bottom: 20px;right: 10px;text-decoration:underline"> <!-- <view @tap="changErp()" style="position: absolute;bottom: 20px;right: 10px;text-decoration:underline">
切换到格物erp登录 切换到格物erp登录
</view> </view> -->
</view> </view>
</template> </template>
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
}, },
onLoad:function(da){ onLoad:function(da){
this.isCloud=true
if(da&&da.query){ if(da&&da.query){
let infor=JSON.parse(da.query).infor let infor=JSON.parse(da.query).infor
this.userName=infor.userName this.userName=infor.userName
...@@ -144,10 +145,31 @@ ...@@ -144,10 +145,31 @@
// #endif // #endif
}, },
watch:{ watch:{
loginBz:function(val){ },
computed: {
isSendSMSEnable() {
return this.smsCountDown <= 0 && this.phoneNo.length > 4;
},
getSendBtnText() {
if (this.smsCountDown > 0) {
return this.smsCountDown + '秒后发送';
} else {
return '发送验证码';
}
},
canSMSLogin() {
return this.userName.length > 4 && this.smsCode.length > 4;
},
canPwdLogin() {
return this.userName.length > 4 && this.password.length > 4;
},
},
methods: {
...mapActions([ "mLogin","PhoneLogin","ThirdLogin" ]),
// 二次登录
loginT(){
let _this =this; let _this =this;
http.config.baseUrl = "http://192.168.20.214:9090/erp"; http.config.baseUrl = "http://localhost:9090/erp";
if(val){
this.$http.post(this.loginurl,{}).then((resp) => { this.$http.post(this.loginurl,{}).then((resp) => {
if(resp.data.success){ if(resp.data.success){
console.log("success") console.log("success")
...@@ -201,29 +223,8 @@ ...@@ -201,29 +223,8 @@
this.$tip.alert(resp.data.message||"登录失败"); this.$tip.alert(resp.data.message||"登录失败");
} }
}) })
}
}
},
computed: {
isSendSMSEnable() {
return this.smsCountDown <= 0 && this.phoneNo.length > 4;
},
getSendBtnText() {
if (this.smsCountDown > 0) {
return this.smsCountDown + '秒后发送';
} else {
return '发送验证码';
}
},
canSMSLogin() {
return this.userName.length > 4 && this.smsCode.length > 4;
},
canPwdLogin() {
return this.userName.length > 4 && this.password.length > 4;
},
}, },
methods: {
...mapActions([ "mLogin","PhoneLogin","ThirdLogin" ]),
changErp(){ changErp(){
this.$Router.replaceAll({name:'login'}) this.$Router.replaceAll({name:'login'})
}, },
...@@ -240,7 +241,7 @@ ...@@ -240,7 +241,7 @@
onLogin: function (){ onLogin: function (){
// http.config.baseUrl='http://'+this.fwq+'/'+this.dkh // http.config.baseUrl='http://'+this.fwq+'/'+this.dkh
let _this=this; let _this=this;
http.config.baseUrl = "http://192.168.20.214:9080/" http.config.baseUrl = "http://localhost:9080/"
if(!this.userName || this.userName.length==0){ if(!this.userName || this.userName.length==0){
this.$tip.toast('请填写用户名'); this.$tip.toast('请填写用户名');
return; return;
...@@ -268,9 +269,11 @@ ...@@ -268,9 +269,11 @@
},3000) },3000)
this.$http.post("/erp/clouderp/cusmer/login",params).then((resp) => { this.$http.post("/erp/clouderp/cusmer/login",params).then((resp) => {
if(resp.data.success){ if(resp.data.success){
this.loginBz=true; this.loading=false;
this.loginurl =resp.data.data.records+"&&tp='1'"; this.loginurl =resp.data.data.records+"&&tp='1'";
this.loginT()
}else{ }else{
this.loading=false;
this.$tip.alert(resp.data.message||"请求失败"); this.$tip.alert(resp.data.message||"请求失败");
} }
}) })
......
...@@ -76,9 +76,9 @@ ...@@ -76,9 +76,9 @@
<!-- <image src="https://static.jeecg.com/upload/test/login4_1595818039175.png" mode="aspectFit" class="round"></image> --> <!-- <image src="https://static.jeecg.com/upload/test/login4_1595818039175.png" mode="aspectFit" class="round"></image> -->
<view class="gray-text">登录中...</view> <view class="gray-text">登录中...</view>
</view> </view>
<view @tap="changErp()" style="position: absolute;bottom: 20px;right: 10px;text-decoration:underline"> <!-- <view @tap="changErp()" style="position: absolute;bottom: 20px;right: 10px;text-decoration:underline">
切换到格物云erp登录 切换到格物云erp登录
</view> </view> -->
</view> </view>
</template> </template>
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
}, },
onLoad:function(da){ onLoad:function(da){
this.isCloud=false
if(da&&da.query){ if(da&&da.query){
let infor=JSON.parse(da.query).infor let infor=JSON.parse(da.query).infor
this.userName=infor.userName this.userName=infor.userName
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<text class="text-grey">设置</text> <text class="text-grey">设置</text>
</view> </view>
</navigator> </navigator>
<navigator style="" class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]" url="/pages/login/login" hover-class="none"> <navigator style="" class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]" :url="isCloud?'/pages/login/login':'/pages/login/cusmerLogin'" hover-class="none">
<view class="content" @click="clearToken()"> <view class="content" @click="clearToken()">
<text class="cuIcon-exit text-cyan"></text> <text class="cuIcon-exit text-cyan"></text>
<text class="text-grey">退出</text> <text class="text-grey">退出</text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment