diff --git a/pages/login/components/main.vue b/pages/login/components/main.vue
index 821f8b8..02a5f5a 100644
--- a/pages/login/components/main.vue
+++ b/pages/login/components/main.vue
@@ -35,16 +35,17 @@
- 找回密码
- 立即注册
+ 找回密码
+ 立即注册
-
-
-
+
+
+
+ 我已阅读并同意网站的 《隐私政策 》和
+ 《用户注册协议》
+
+
@@ -181,7 +182,8 @@
})
.then(result => {
// 显示登录成功
- app.$toast(result.message)
+ app.$toast("登录成功")
+ //app.$toast(result.message)
// 相应全局事件订阅: 刷新上级页面数据
uni.$emit('syncRefresh', true)
// 跳转回原页面
@@ -209,7 +211,14 @@
} else {
this.$navTo('pages/index/index')
}
- }
+ },
+
+ /**
+ * 阅读注册协议和隐私
+ */
+ gotopage(str){
+ this.$toast(str)
+ }
}
}
@@ -318,5 +327,13 @@
.privacy{
display: flex;
margin-top: 10rpx;
+
+ .ckbox{
+ border-radius: 50%;
+ }
+
+ .atxt{
+ color: #4399ff;
+ }
}
diff --git a/store/modules/user.js b/store/modules/user.js
index 0c2f7ca..205089f 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -3,15 +3,15 @@ import storage from '@/utils/storage'
import * as LoginApi from '@/api/login'
// 登陆成功后执行
-const loginSuccess = (commit, { token, userId }) => {
+const loginSuccess = (commit, { token, accountId }) => {
// 过期时间30天
const expiryTime = 30 * 86400
// 保存tokne和userId到缓存
- storage.set(USER_ID, userId, expiryTime)
+ storage.set(USER_ID, accountId, expiryTime)
storage.set(ACCESS_TOKEN, token, expiryTime)
// 记录到store全局变量
commit('SET_TOKEN', token)
- commit('SET_USER_ID', userId)
+ commit('SET_USER_ID', accountId)
}
const user = {
@@ -40,6 +40,7 @@ const user = {
.then(response => {
console.log("login ret:",response)
const result = response.data
+ console.log("user rest:",result)
loginSuccess(commit, result)
resolve(response)
})