Compare commits
7 Commits
f17226cc97
...
dev
Author | SHA1 | Date | |
---|---|---|---|
2b48faf50d | |||
fab8d88faf | |||
5fc1378051 | |||
12480f3706 | |||
05af3d221c | |||
d17f6f09c5 | |||
8a085da7dc |
@ -208,7 +208,7 @@
|
||||
line-height: 24.23rpx;
|
||||
}
|
||||
.text-wrapper_9 {
|
||||
padding: 14.61rpx 0 13.33rpx;
|
||||
padding: 14.61rpx 0 14.61rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 28.13rpx;
|
||||
height: 56.25rpx;
|
||||
|
@ -179,7 +179,7 @@ Page({
|
||||
const token = res.data.data.token || res.data.data;
|
||||
// ← 新增:将 token 存到本地缓存
|
||||
wx.setStorageSync('token', token);
|
||||
|
||||
wx.setStorageSync('role', role)
|
||||
wx.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success',
|
||||
|
@ -54,7 +54,7 @@ Page({
|
||||
},
|
||||
|
||||
sendSmsCode() {
|
||||
const { phone } = this.data;
|
||||
const { phone, role } = this.data;
|
||||
if (!phone.trim()) {
|
||||
wx.showToast({ title: '请输入手机号', icon: 'none' });
|
||||
return;
|
||||
@ -68,7 +68,8 @@ Page({
|
||||
method: 'POST',
|
||||
header: { 'content-type': 'application/json' },
|
||||
data: {
|
||||
templateString: phone
|
||||
phoneNumber: phone,
|
||||
userRole: role
|
||||
},
|
||||
success: res => {
|
||||
// 假设后端返回 { success: true, ... }
|
||||
@ -192,6 +193,7 @@ Page({
|
||||
});
|
||||
}, 1000);
|
||||
} else {
|
||||
console.log(res.data)
|
||||
wx.showToast({
|
||||
title: res.data.message || '注册失败',
|
||||
icon: 'none',
|
||||
|
@ -35,6 +35,7 @@ Page({
|
||||
icon: 'success'
|
||||
})
|
||||
wx.removeStorageSync('token')
|
||||
wx.removeStorageSync('role')
|
||||
setTimeout(() => {
|
||||
wx.reLaunch({
|
||||
url: '/pages/welcome/homePage/homePage',
|
||||
|
@ -45,7 +45,7 @@ Page({
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.reLaunch({
|
||||
url: '/pages/loginModule/pwdLogin/pwdLogin',
|
||||
url: '/pages/welcome/homePage/homePage',
|
||||
})
|
||||
}, 1000); // 1000ms = 1秒
|
||||
|
||||
@ -69,7 +69,8 @@ Page({
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
data: {
|
||||
templateString: phone
|
||||
phoneNumber: phone,
|
||||
userRole: wx.getStorageSync('role')
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
|
@ -25,5 +25,5 @@
|
||||
"tabIndent": "auto",
|
||||
"tabSize": 2
|
||||
},
|
||||
"appid": "wx3f968a09e31d6bed"
|
||||
"appid": "wx8711c8d4fb04fef9"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
"projectname": "qingcheng-xiaochengxu",
|
||||
"setting": {
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": false,
|
||||
"urlCheck": true,
|
||||
"bigPackageSizeSupport": false
|
||||
},
|
||||
"condition": {},
|
||||
|
@ -3,6 +3,7 @@ export const caozhe = 'http://160.202.242.36:9093'
|
||||
export const dev = 'http://160.202.242.36:9091';
|
||||
export const test = 'http://160.202.242.36:9092';
|
||||
export const localTest = 'http://localhost:9092';
|
||||
export const baseUrl = test;
|
||||
export const ssl = 'https://www.chenxinzhi.top'
|
||||
export const baseUrl = ssl;
|
||||
|
||||
export const globalImgUrl = baseUrl + '/file/download/'
|
Reference in New Issue
Block a user