|
|
|
|
@ -15,7 +15,6 @@
|
|
|
|
|
<view class="loginFoot">
|
|
|
|
|
<u-button :ripple="true" @click="loginBind" ripple-bg-color="#0385e5" type="primary">登陆</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
<view>{{url}}{{token}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -34,7 +33,7 @@
|
|
|
|
|
onLoad: function(options) {
|
|
|
|
|
let userinfo = uni.getStorageSync('userInfo_token');
|
|
|
|
|
this.paraString = window.location.href;
|
|
|
|
|
let token =this.getQueryVariable('token')
|
|
|
|
|
let token =decodeURIComponent(this.getQueryVariable('token'))
|
|
|
|
|
if (!util.isNull(token) && options.tp == "hdgl") {
|
|
|
|
|
let url = util.HOST + '/api/mobile/auth/oss-login';
|
|
|
|
|
this.token = token;
|
|
|
|
|
@ -47,9 +46,9 @@
|
|
|
|
|
'tp': options.tp
|
|
|
|
|
},
|
|
|
|
|
success: function(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
console.log(!res.data.errcode)
|
|
|
|
|
if (!res.data.errcode) {
|
|
|
|
|
uni.setStorageSync('userInfo_token', res);
|
|
|
|
|
uni.setStorageSync('userInfo_token', res.data);
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/index/index'
|
|
|
|
|
});
|
|
|
|
|
|