diff --git a/CHANGELOG.md b/CHANGELOG.md
index c933547..b3a447a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# 1.0.0 (2022-01-12)
+# 1.0.0 (2022-01-13)
### 🌟 新功能
范围|描述|commitId
@@ -30,6 +30,7 @@
### 🎨 代码样式
范围|描述|commitId
--|--|--
+ - | 更新代码 | [aa6093a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/aa6093a)
- | 细节调整 | [bdd5f87](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/bdd5f87)
- | calender格式及细节调整 | [db9602b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/db9602b)
diff --git a/apis/tall.js b/apis/tall.js
index d692b56..7a11375 100644
--- a/apis/tall.js
+++ b/apis/tall.js
@@ -6,9 +6,10 @@ const tall1 = `http://101.201.226.163/gateway/ptos`;
export function setupTall(app) {
uni.$u.api = { ...uni.$u.api } || {};
- // 登录
- // uni.$u.api.signin = params => login.index(params);
- uni.$u.api.signin = params => uni.$u.http.post(`${tall}/users/signin`, params); // 登录
+ // 登录
+ uni.$u.api.signin = params => uni.$u.http.post(`${tall}/users/signin`, params); // 登录
+ // 注册
+ uni.$u.api.signup = params => uni.$u.http.post(`${tall}/users/signup`, params); // 登录
// 获取图片验证码
uni.$u.api.getImageCode = () => uni.$u.get(`${tall}/users/code`);
// 获取短信验证码
diff --git a/hooks/user/userMixin.js b/hooks/user/userMixin.js
index 79d179f..36e64da 100644
--- a/hooks/user/userMixin.js
+++ b/hooks/user/userMixin.js
@@ -15,7 +15,7 @@ export default function userMixin() {
{
validator: (rule, value, callback) => {
// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
- return this.$u.test.mobile(value);
+ return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
// 触发器可以同时用blur和change,二者之间用英文逗号隔开
diff --git a/pages.json b/pages.json
index feb8e1e..6dbc3a4 100644
--- a/pages.json
+++ b/pages.json
@@ -28,6 +28,22 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
+ },
+ // 注册
+ {
+ "path": "pages/user/rigister",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ // 用户协议
+ {
+ "path": "pages/user/agreement",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
}
],
"globalStyle": {
diff --git a/pages/user/accountLogin.vue b/pages/user/accountLogin.vue
index 4061af2..6e5d351 100644
--- a/pages/user/accountLogin.vue
+++ b/pages/user/accountLogin.vue
@@ -41,7 +41,7 @@
const store = useStore();
const mixinInit = userMixin();
const loginForm = ref(null);
-
+
const form = reactive({
account: '',
password: ''
@@ -61,9 +61,15 @@
async function login() {
uni.$ui.showLoading();
- try {
+ try {
+ // #ifdef H5
+ const client = 0;
+ // #endif
+ // #ifdef APP-PLUS
+ const client = 1;
+ // #endif
const params = reactive({
- client: 1,
+ client: client,
data: {
identifier: form.account,
credential: form.password,
@@ -78,7 +84,7 @@
uni.$storage.setStorageSync('user', JSON.stringify(res));
uni.$ui.hideLoading();
-
+
uni.navigateTo({
url: '/pages/index/index'
});
diff --git a/pages/user/agreement.vue b/pages/user/agreement.vue
new file mode 100644
index 0000000..33ef0f9
--- /dev/null
+++ b/pages/user/agreement.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/login.vue b/pages/user/login.vue
index 9e48f86..d44648c 100644
--- a/pages/user/login.vue
+++ b/pages/user/login.vue
@@ -83,8 +83,15 @@
async function login() {
uni.$ui.showLoading();
try {
+ // #ifdef H5
+ const client = 0;
+ // #endif
+ // #ifdef APP-PLUS
+ const client = 1;
+ // #endif
+
const params = reactive({
- client: 1,
+ client: client,
data: {
identifier: form.phone,
credential: form.smsCode,
diff --git a/pages/user/rigister.vue b/pages/user/rigister.vue
index 48d48ea..3493e65 100644
--- a/pages/user/rigister.vue
+++ b/pages/user/rigister.vue
@@ -1,8 +1,159 @@
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+ 粘贴
+ {{ mixinInit.dataObj.interval }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 忘记密码
+
+
+
+
+ 立即注册
+
+
+
+
+
+
+ 已阅读并同意使用
+ 《时物链条用户协议》
+
+
+ 没有套路,真实需求
+
+
+
+
+ 已有账号,去登录
+
+
+
+
+
+