You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
3.5 KiB
130 lines
3.5 KiB
<template>
|
|
<view>
|
|
<view class="box_dg">
|
|
<view class="aml_30 amr_30">
|
|
<view class="amt_30 tji_wp">
|
|
<view class="an_t_1">欢迎来到雄安文旅</view>
|
|
<view class=" pjia_time">
|
|
还没有账号,立即
|
|
<text @tap="goToPage('zhuce')" class="lg_tit_tips">注册</text>
|
|
</view>
|
|
</view>
|
|
<view class="amt_60 lg_bx_2">
|
|
<view class="at_t amt_60">用户名</view>
|
|
<view class="lg_2_l"><input v-model="lognameValue" class="uni-input" placeholder="请输入用户名" /></view>
|
|
|
|
<view class="at_t amt_60">密码</view>
|
|
<view class="lg_2_l"><input v-model="passwordValue" class="uni-input" password type="text" placeholder="请输入密码" /></view>
|
|
|
|
<view class="amt_60">
|
|
<view class="dy_fx" style="align-items: center;">
|
|
<view><radio @tap="radioChange" :checked="radioType" value="r2" style="transform:scale(0.7)" /></view><view class="t_col_2">我已阅读并同意</view><view @tap="goToPage('xieyi')" class="t_col_1">《用户协议》</view><view @tap="goToPage('zhengce')" class="t_col_1">《隐私政策》</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="amt_60 box_dg lg_btn_bd"><button @tap="loginFun" form-type="submit" class="yue_fm_btn yue_e_bun">登录</button></view>
|
|
|
|
<!-- <view class="amt_60 dib_fm box_dg">
|
|
<view class="agn_center pjia_time"><text>其他方式登录</text></view>
|
|
<view class="dy_flex pjfm_bqing amt_30">
|
|
<image src="../../../static/animg/icn_wx.png" mode="aspectFill" class="size_80"></image>
|
|
</view>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import aes from "@/common/aes.js";
|
|
export default {
|
|
data() {
|
|
return {
|
|
radioType:false,
|
|
lognameValue:"",
|
|
passwordValue:""
|
|
};
|
|
},
|
|
methods: {
|
|
goToPage:function(type){
|
|
if(type == 'zhuce'){
|
|
uni.navigateTo({
|
|
url:"/subPage/index/an_login/an_zhuce"
|
|
})
|
|
}else if(type == 'xieyi'){
|
|
uni.navigateTo({
|
|
url:"/subPage/xieyi/xieyi"
|
|
})
|
|
}else if(type == 'zhengce'){
|
|
uni.navigateTo({
|
|
url:"/subPage/zhengce/zhengce"
|
|
})
|
|
}
|
|
},
|
|
radioChange:function(){
|
|
this.radioType = !this.radioType
|
|
},
|
|
loginFun:function(){
|
|
var that = this;
|
|
if(that.lognameValue == ""){
|
|
uni.showToast({
|
|
title:"请输入账号",
|
|
icon:"none"
|
|
})
|
|
return;
|
|
}
|
|
if(that.lognameValue == ""){
|
|
uni.showToast({
|
|
title:"请输入密码",
|
|
icon:"none"
|
|
})
|
|
return;
|
|
}
|
|
if(!that.radioType){
|
|
uni.showToast({
|
|
title:"请勾选协议",
|
|
icon:"none"
|
|
})
|
|
return;
|
|
}
|
|
var data = {
|
|
loginname:that.lognameValue,
|
|
password:that.passwordValue
|
|
}
|
|
this.$Request.post(this.$config.loginApp,data).then(res => {
|
|
console.log(res);
|
|
if (res.status == 200) {
|
|
uni.showModal({
|
|
title:"提示",
|
|
content:"登录成功",
|
|
showCancel:false,
|
|
success() {
|
|
uni.setStorageSync("oauthTime",new Date().getTime())
|
|
uni.setStorageSync("unionid",aes.aesMinEncrypt(res.data.wx_unionid));
|
|
uni.setStorageSync("openid",aes.aesMinEncrypt(res.data.wx_openid));
|
|
uni.setStorageSync("nickname",aes.aesMinEncrypt(res.data.wx_nickname));
|
|
uni.setStorageSync("headimgurl","../../static/images/adm_img.png");
|
|
uni.setStorageSync("userid",aes.aesMinEncrypt(res.data.userid));
|
|
uni.switchTab({
|
|
url:'/pages/personcenter'
|
|
});
|
|
}
|
|
})
|
|
}else{
|
|
uni.showToast({
|
|
title:res.msg,
|
|
icon:"none"
|
|
})
|
|
}
|
|
});
|
|
},
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
page {
|
|
background-color: #fff;
|
|
}
|
|
</style>
|
|
|