对接部分接口
This commit is contained in:
+12
-5
@@ -8,12 +8,13 @@
|
||||
<view class="inputs_button">
|
||||
<view class="inputs">
|
||||
<view class="account">
|
||||
<input type="number" v-model="email" :adjust-position="false" placeholder="手机号" />
|
||||
<input type="text" v-model="email" placeholder="账号" />
|
||||
</view>
|
||||
<view class="password">
|
||||
<u--input
|
||||
type="password"
|
||||
placeholder="请输入内容"
|
||||
placeholder="密码"
|
||||
v-model="password"
|
||||
border="none"
|
||||
></u--input>
|
||||
</view>
|
||||
@@ -46,6 +47,7 @@
|
||||
</view>
|
||||
<view class="pact">
|
||||
<radio :checked="pactChecked" activeBackgroundColor="#3264ed" activeBorderColor="#3264ed"
|
||||
borderColor="#3264ed" color="#fff" @click="pactChange" />
|
||||
<view>我已经阅读并同意<text @click="toPact">《用户协议》</text>和<text @click="toPact">《隐私协议》</text></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -58,8 +60,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
email: "",
|
||||
password: "",
|
||||
email: "1696136552@qq.com",
|
||||
password: "123456",
|
||||
pactChecked: false,
|
||||
}
|
||||
},
|
||||
@@ -67,6 +69,9 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
pactChange() {
|
||||
this.pactChecked = !this.pactChecked
|
||||
},
|
||||
login() {
|
||||
if(this.email==''){
|
||||
uni.showToast({
|
||||
@@ -102,9 +107,11 @@
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
});token
|
||||
|
||||
} else if (res.data.code == 0) {
|
||||
//存取session
|
||||
uni.setStorageSync('token', res.data.data.token);
|
||||
//返回数据接收成功
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index',// 替换为你要跳转的页面路径
|
||||
|
||||
Reference in New Issue
Block a user