diff --git a/App.vue b/App.vue
index 8cfa375..7143e68 100644
--- a/App.vue
+++ b/App.vue
@@ -1,5 +1,6 @@
+
+
+
+
diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue
new file mode 100644
index 0000000..75a5158
--- /dev/null
+++ b/pages/mine/mine.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
+ 个人信息
+
+
+
+
+
+
+ 关于
+
+
+
+ 退出
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/safeQuestion/safeQuestion.vue b/pages/safeQuestion/safeQuestion.vue
new file mode 100644
index 0000000..aa21e34
--- /dev/null
+++ b/pages/safeQuestion/safeQuestion.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/updateEmail/updateEmail.vue b/pages/updateEmail/updateEmail.vue
new file mode 100644
index 0000000..c9f7cc1
--- /dev/null
+++ b/pages/updateEmail/updateEmail.vue
@@ -0,0 +1,195 @@
+
+
+
+
+
+ {{text}}
+
+ 确定
+
+
+
+
+
+
+
+
diff --git a/pages/updateName/updateName.vue b/pages/updateName/updateName.vue
new file mode 100644
index 0000000..ede76f0
--- /dev/null
+++ b/pages/updateName/updateName.vue
@@ -0,0 +1,104 @@
+
+
+
+ 保存
+
+
+
+
+
+
+
+
diff --git a/pages/updatePassword/updatePassword.vue b/pages/updatePassword/updatePassword.vue
new file mode 100644
index 0000000..ceb5eea
--- /dev/null
+++ b/pages/updatePassword/updatePassword.vue
@@ -0,0 +1,137 @@
+
+
+
+
+
+ 密码必须是8-20位,至少包括数字/字母/符号中的2种
+ 保存
+
+
+
+
+
+
+
+
diff --git a/pages/userInfo/userInfo.vue b/pages/userInfo/userInfo.vue
new file mode 100644
index 0000000..c9e3a71
--- /dev/null
+++ b/pages/userInfo/userInfo.vue
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+ 昵称
+
+ {{userInfo.nickname}}
+
+
+
+
+
+ 手机号
+
+ {{userInfo.mobile}}
+
+
+
+
+
+
+ 邮箱
+
+ {{userInfo.email}}
+
+
+
+
+
+
+ 重置密码
+
+
+
+
+ 安全问题
+
+
+
+
+
+
+
+ 国家/地区
+
+ {{userInfo.countryName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/verifyEmail/verifyEmail.vue b/pages/verifyEmail/verifyEmail.vue
new file mode 100644
index 0000000..2afdd24
--- /dev/null
+++ b/pages/verifyEmail/verifyEmail.vue
@@ -0,0 +1,181 @@
+
+
+
+
+ {{text}}
+
+ 下一步
+
+
+
+
+
+
+
+
diff --git a/pages/webview/webview.vue b/pages/webview/webview.vue
new file mode 100644
index 0000000..32c3aec
--- /dev/null
+++ b/pages/webview/webview.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
diff --git a/static/images/background_mine.png b/static/images/background_mine.png
new file mode 100644
index 0000000..35b7cad
Binary files /dev/null and b/static/images/background_mine.png differ
diff --git a/static/images/icon_arrow.png b/static/images/icon_arrow.png
new file mode 100644
index 0000000..a0a91ec
Binary files /dev/null and b/static/images/icon_arrow.png differ
diff --git a/static/images/tabbar_key_no_select.png b/static/images/tabbar_key_no_select.png
new file mode 100644
index 0000000..ea6aa06
Binary files /dev/null and b/static/images/tabbar_key_no_select.png differ
diff --git a/static/images/tabbar_key_select.png b/static/images/tabbar_key_select.png
new file mode 100644
index 0000000..2adb1a3
Binary files /dev/null and b/static/images/tabbar_key_select.png differ
diff --git a/static/images/tabbar_mine_no_select.png b/static/images/tabbar_mine_no_select.png
new file mode 100644
index 0000000..5cd3e24
Binary files /dev/null and b/static/images/tabbar_mine_no_select.png differ
diff --git a/static/images/tabbar_mine_select.png b/static/images/tabbar_mine_select.png
new file mode 100644
index 0000000..4864337
Binary files /dev/null and b/static/images/tabbar_mine_select.png differ
diff --git a/static/logo.png b/static/logo.png
deleted file mode 100644
index b5771e2..0000000
Binary files a/static/logo.png and /dev/null differ
diff --git a/stores/basic.js b/stores/basic.js
new file mode 100644
index 0000000..2477917
--- /dev/null
+++ b/stores/basic.js
@@ -0,0 +1,110 @@
+import { defineStore } from 'pinia'
+
+// 页面配置
+const pages = [
+ {
+ name: 'home',
+ path: '/pages/home/home',
+ tabBar: true
+ },
+ {
+ name: 'mine',
+ path: '/pages/mine/mine',
+ tabBar: true
+ },
+ {
+ name: 'userInfo',
+ path: '/pages/userInfo/userInfo',
+ tabBar: false
+ },
+ {
+ name: 'updateName',
+ path: '/pages/updateName/updateName',
+ tabBar: false
+ },
+ {
+ name: 'updatePassword',
+ path: '/pages/updatePassword/updatePassword',
+ tabBar: false
+ },
+ {
+ name: 'updateEmail',
+ path: '/pages/updateEmail/updateEmail',
+ tabBar: false
+ },
+ {
+ name: 'verifyEmail',
+ path: '/pages/verifyEmail/verifyEmail',
+ tabBar: false
+ },
+ {
+ name: 'safeQuestion',
+ path: '/pages/safeQuestion/safeQuestion',
+ tabBar: false
+ },
+ {
+ name: 'webview',
+ path: '/pages/webview/webview',
+ tabBar: false
+ }
+]
+
+
+export const useBasicStore = defineStore('basic', {
+ state() {
+ return {
+ // 设备信息
+ deviceInfo: null,
+ // 胶囊按钮的位置信息
+ buttonInfo: null
+ }
+ },
+ actions: {
+ // 路由跳转
+ /* data 入参 name string页面名称 type string跳转方式 params object传递参数 delta number返回页面数
+ * 具体入参查看文档 https://www.uviewui.com/js/route.html */
+ routeJump(data) {
+ console.log(data)
+ const page = pages.find((page) => {
+ return page.name === data.name
+ })
+ if (page) {
+ uni.$u.route({
+ url: page.path,
+ ...data
+ })
+ }
+ },
+ // 获取设备信息
+ getDeviceInfo() {
+ const that = this
+ return new Promise((resolve) => {
+ if (that.deviceInfo?.model) {
+ resolve(that.deviceInfo)
+ return
+ }
+ uni.getSystemInfo({
+ success: function (res) {
+ that.deviceInfo = res
+ resolve(that.deviceInfo)
+ },
+ fail: function () {
+ resolve({})
+ }
+ })
+ })
+ },
+ // 获取胶囊信息
+ getButtonInfo() {
+ return new Promise((resolve, reject) => {
+ if (this.buttonInfo?.top) {
+ resolve(this.buttonInfo)
+ return
+ }
+ this.buttonInfo = uni.getMenuButtonBoundingClientRect()
+ resolve(this.buttonInfo)
+ return
+ })
+ },
+ }
+})
diff --git a/uni.scss b/uni.scss
index c712a1a..642511a 100644
--- a/uni.scss
+++ b/uni.scss
@@ -32,7 +32,7 @@ $uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
-$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-grey:#f3f3f3;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
diff --git a/utils/request.js b/utils/request.js
index 6248774..ba417e5 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -12,9 +12,10 @@ import baseConfig from '@/config/env'
const request = (config) => {
return new Promise((resolve) => {
+ const token = config?.token ? config.token : uni.getStorageSync('token')
const headerDefault = {
version: baseConfig.version,
- token: config?.token ? config.token : uni.getStorageSync('token')
+ authorization: `Bearer ${token}`
}
const URL = config.baseUrl ? config.baseUrl + config.url : baseConfig.baseUrl + config.url
const method = config.method || 'POST'
@@ -31,7 +32,11 @@ const request = (config) => {
const { statusCode, data } = res
if (statusCode === 200) {
// 根据情况添加处理代码
- resolve(data)
+ resolve({
+ code: data.errorCode,
+ data: data.data,
+ message: data.errorMsg
+ })
} else {
resolve({ code: -1, data, message: '网络不太好哦,请稍后再试' })
}
@@ -49,10 +54,9 @@ const request = (config) => {
console.log(URL.substring(baseConfig.baseUrl.length + 1), {
url: URL.substring(baseConfig.baseUrl.length + 1),
req: config?.data || {},
- code: res?.data?.code,
+ code: res?.data?.errorCode,
res: res?.data?.data,
- requestId: res?.header ? res?.header['X-Ca-Request-Id'] : '',
- token: header?.token || '',
+ token: header?.authorization || '',
duration: new Date().getTime() - timestamp
})
}