first commit
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-loading {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-moz-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
-o-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-loading v-if="loading" type="spinner" color="#1989fa"></van-loading>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
classifyLists: [],
|
||||
classify: '',
|
||||
token: '',
|
||||
deviceType: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.login()
|
||||
},
|
||||
methods: {
|
||||
login() {
|
||||
this.loading = true
|
||||
tellGetToken_app((v, u) => {
|
||||
this.getTokenCall(v, u)
|
||||
})
|
||||
},
|
||||
getTokenCall(v, u) {
|
||||
this.classify = this.classifyLists[0]
|
||||
this.token = v
|
||||
this.deviceType = u
|
||||
document.title = '智慧工会平台'
|
||||
let obj = {back: true, close: true, rootView: true, title: true}
|
||||
|
||||
// window.location.href = '/mobile/app/index?token='+this.token
|
||||
$.get("/mobile/app/index", {token: this.token}).then((res) => {
|
||||
this.loading = false
|
||||
// alert(JSON.stringify(res))
|
||||
if (res.code === 0) {
|
||||
window.location.href = '/mobile/index/doLogin?username=' + res.data + '&platformCaptcha='
|
||||
} else if (res.code === 1 || res.code==2) {
|
||||
Dialog.alert({
|
||||
title: '标题',
|
||||
message: res.msg,
|
||||
theme: 'round-button',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user