From 22f31116dda1026db5063713cc8efa5e812dff4e Mon Sep 17 00:00:00 2001
From: aihe <961836564@qq.com>
Date: Sat, 13 Jul 2024 16:34:34 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E8=B5=84=E6=BA=90=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/api/url.js | 4 +-
common/api/user.js | 8 +-
common/env.js | 4 +-
common/getCdnUrl.js | 9 +-
common/manageServer.js | 3 +-
.../buns-api}/get-user-info/get-user-info.vue | 0
components/buns-api/login/com-login.vue | 122 +++++++
components/buns-api/login/mp-login.vue | 63 ++++
.../request-payment/request-payment.vue | 0
pages.json | 25 +-
pages/API/login/login.vue | 322 ------------------
pages/login/login.vue | 105 ++----
sta_back/images/logo.png | Bin 0 -> 12611 bytes
static/test.txt | 1 -
14 files changed, 226 insertions(+), 440 deletions(-)
rename {pages/API => components/buns-api}/get-user-info/get-user-info.vue (100%)
create mode 100644 components/buns-api/login/com-login.vue
create mode 100644 components/buns-api/login/mp-login.vue
rename {pages/API => components/buns-api}/request-payment/request-payment.vue (100%)
delete mode 100644 pages/API/login/login.vue
create mode 100644 sta_back/images/logo.png
delete mode 100644 static/test.txt
diff --git a/common/api/url.js b/common/api/url.js
index 1d40df7..2cbe8f2 100644
--- a/common/api/url.js
+++ b/common/api/url.js
@@ -5,12 +5,12 @@ export const host = curEnvConf.apiHost
export default {
uploadFile: '/common/ossUpload',
loginByApp: `/loginByApp`, // 登录
+ loginByMP: `/loginByWeixin`, // 小程序登录 -- DONE
getInfoByApp: `/getInfoByApp`,// 获取用户基本信息
- updatePwdByApp: `/updatePwdByApp`,// 修改密码
getStaffQRCodePng: `/emis/emisStaff/getStaffQRCodePng`,// 获取用户二维码
getEmisCountry: `/emis/emisCountry/listSimple`, // 获取国家列表
getEmisRegion: `/emis/emisRegion/listSimple`,// 获取省市区列表
- getDicDataJson: `/common/getDicDataJson`, // 获取枚举字段
+ getDicDataJson: `/common/getDicDataJson`, // 获取枚举字段 -- DONE
getAppHomeStatData: `/emis/commonTools/getAppHomeStatData`,// 首页统计数据
getLatestNotices: `/emis/commonTools/getLatestNotices`,// 首页统计数据
getCustomerUserAddressList: `/emis/emisCustomerAddress/listSimple`, // 获取客户地址列表
diff --git a/common/api/user.js b/common/api/user.js
index f4c3be7..64766a2 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -5,9 +5,11 @@ export const loginByApp = (data = {})=> {
return coreRequest(url.loginByApp, data)
}
+export const loginByMP = (data = {})=> {
+ return coreRequest(url.loginByMP, data)
+}
+
export const getInfoByApp = (data = {})=> {
return coreRequest(url.getInfoByApp, data, {}, 'GET')
}
-export const updatePwdByApp = (data = {})=> {
- return coreRequest(url.updatePwdByApp, data, {}, 'GET')
-}
+
diff --git a/common/env.js b/common/env.js
index 5c0fc1c..3255f25 100644
--- a/common/env.js
+++ b/common/env.js
@@ -1,9 +1,9 @@
let envMap = {
development: {
- apiHost: 'http://47.102.220.189:58089/api/bizsvr',
+ apiHost: 'http://47.102.220.189:59089/api/omssvr',
},
production: {
- apiHost: 'http://api.emis.tanex56.com/api/bizsvr',
+ apiHost: 'https://api.sapp.tanex56.com/api/omssvr',
}
}
let curEnvConf
diff --git a/common/getCdnUrl.js b/common/getCdnUrl.js
index 62c1aa4..4c6c86f 100644
--- a/common/getCdnUrl.js
+++ b/common/getCdnUrl.js
@@ -1,4 +1,9 @@
export default (path)=> {
- // return `/sta_back/images/${path}`
- return `http://oss-emis.tanex56.com/sapp/${path}`
+ return `/sta_back/images/${path}`
+ // return `https://oms.tanex56.com/static/sapp/images/${path}`
+}
+
+export const getCdnRoot = (path)=> {
+ // return `/static/${path}`
+ return `https://oms.tanex56.com/static/sapp/${path}`
}
\ No newline at end of file
diff --git a/common/manageServer.js b/common/manageServer.js
index 09ea567..5cfffd8 100644
--- a/common/manageServer.js
+++ b/common/manageServer.js
@@ -8,7 +8,7 @@ const getCommonReqData = ()=> {
return {
header: {
"dataFrom": "sapp",
- "X-Token": xToken,
+ "Oms-X-Token": xToken,
}
}
}
@@ -82,6 +82,7 @@ async function handleResponse(options) {
resolve(data)
} else {
if ( code == 401) { // 统一判断需要认证, 并作页面跳转
+ debugger
setSessionXToken()
msg = '登录失效,请重新登录'
showToast(msg)
diff --git a/pages/API/get-user-info/get-user-info.vue b/components/buns-api/get-user-info/get-user-info.vue
similarity index 100%
rename from pages/API/get-user-info/get-user-info.vue
rename to components/buns-api/get-user-info/get-user-info.vue
diff --git a/components/buns-api/login/com-login.vue b/components/buns-api/login/com-login.vue
new file mode 100644
index 0000000..c6b6097
--- /dev/null
+++ b/components/buns-api/login/com-login.vue
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/buns-api/login/mp-login.vue b/components/buns-api/login/mp-login.vue
new file mode 100644
index 0000000..cc3b9a8
--- /dev/null
+++ b/components/buns-api/login/mp-login.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录
+
+
+
+
+
+
+
+
+
diff --git a/pages/API/request-payment/request-payment.vue b/components/buns-api/request-payment/request-payment.vue
similarity index 100%
rename from pages/API/request-payment/request-payment.vue
rename to components/buns-api/request-payment/request-payment.vue
diff --git a/pages.json b/pages.json
index b409a66..d6ad19f 100644
--- a/pages.json
+++ b/pages.json
@@ -179,28 +179,9 @@
}
],
- "subPackages": [{
- "root": "pages/API",
- "pages": [{
- "path": "login/login",
- "style": {
- "navigationBarTitleText": "授权登录"
- }
- },
- {
- "path": "get-user-info/get-user-info",
- "style": {
- "navigationBarTitleText": "获取用户信息"
- }
- },
- {
- "path": "request-payment/request-payment",
- "style": {
- "navigationBarTitleText": "发起支付"
- }
- }
- ]
- }],
+ "subPackages": [
+
+ ],
"globalStyle": {
"pageOrientation": "portrait",
"navigationBarTitleText": "探路物流",
diff --git a/pages/API/login/login.vue b/pages/API/login/login.vue
deleted file mode 100644
index 9ab812f..0000000
--- a/pages/API/login/login.vue
+++ /dev/null
@@ -1,322 +0,0 @@
-
-
-
-
-
-
- 已登录
-
-
- ({{phoneNumber}})
-
-
-
- 每个账号仅需登录 1 次,\n后续每次进入页面即可自动拉取用户信息。
-
-
-
- 未登录
-
- 请点击按钮登录
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 29b7a3e..a85f328 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -1,66 +1,31 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 登录
-
-
-
-
-
+
+