From 46a6927de9be17a131f175078ec63bfca5c6c7f7 Mon Sep 17 00:00:00 2001
From: xuminyui <576362016@qq.com>
Date: Sat, 23 Sep 2023 14:59:54 +0800
Subject: [PATCH] fix
---
App.vue | 3 +-
http/index.js | 2 +
http/interface.js | 2 +-
http/mine.js | 34 +++++
pages/home/index.vue | 2 +-
pages/login/login.vue | 116 +++++++++--------
pages/mine/index.vue | 49 ++++++-
pages/mine/set-up.vue | 249 ++++++++++++++++++++++++------------
pages/realName/realName.vue | 37 ++++--
9 files changed, 340 insertions(+), 154 deletions(-)
create mode 100644 http/mine.js
diff --git a/App.vue b/App.vue
index f94cbc9..01334e7 100644
--- a/App.vue
+++ b/App.vue
@@ -3,7 +3,7 @@ import tabBar from "./util/tabbar";
export default {
onLaunch: function() {
- uni.setStorageSync("token",'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MCwiT3BlbklkIjoib01qYXY2eFFjQUttUW1ZUTFXV20zOXlCQUZ4byIsIk5pY2tOYW1lIjoiIiwiVGVsTnVtIjoiMTgyMDUwNTI2MjciLCJBdmF0YXIiOiIiLCJJRE51bSI6IiIsImV4cCI6MTY5NTQzNjEwMSwiaXNzIjoibWFsbCJ9.qYzFMtoOOBuawYDTl7iuwlTTz7Fakhr8657PjxWhQ8I')
+ // uni.setStorageSync("token",'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MCwiT3BlbklkIjoib01qYXY2eFFjQUttUW1ZUTFXV20zOXlCQUZ4byIsIk5pY2tOYW1lIjoiIiwiVGVsTnVtIjoiMTgyMDUwNTI2MjciLCJBdmF0YXIiOiIiLCJJRE51bSI6IiIsImV4cCI6MTY5NTQzNjEwMSwiaXNzIjoibWFsbCJ9.qYzFMtoOOBuawYDTl7iuwlTTz7Fakhr8657PjxWhQ8I')
uni.hideTabBar();
uni.setStorageSync("tabBar", tabBar);
},
@@ -28,5 +28,4 @@ export default {
.u-border-top {
border: none !important;
}
-
diff --git a/http/index.js b/http/index.js
index a31ef89..8db1aee 100644
--- a/http/index.js
+++ b/http/index.js
@@ -1,6 +1,8 @@
import login from "./login";
import deposit from "./deposit";
+import mine from "./mine";
export default {
login,
deposit,
+ mine,
};
diff --git a/http/interface.js b/http/interface.js
index b1253b9..a09e736 100644
--- a/http/interface.js
+++ b/http/interface.js
@@ -4,7 +4,7 @@
*/
export default {
config: {
- baseUrl: "http://192.168.88.175:9021",
+ baseUrl: "http://172.16.100.93:8017", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",
header: {
"Content-Type": "application/json;charset=UTF-8",
// 'Content-Type':'application/x-www-form-urlencoded'
diff --git a/http/mine.js b/http/mine.js
new file mode 100644
index 0000000..7843878
--- /dev/null
+++ b/http/mine.js
@@ -0,0 +1,34 @@
+import http from "./interface";
+
+const infoOrders = () => {
+ return http.request({
+ url: "/api/warehouse/static/info",
+ method: "POST",
+ });
+};
+const info = () => {
+ return http.request({
+ url: "/api/wxuser/info",
+ method: "POST",
+ });
+};
+// 更新信息
+const update = (data) => {
+ return http.request({
+ url: "/api/wxuser/update",
+ method: "POST",
+ data,
+ });
+};
+const logout = () => {
+ return http.request({
+ url: "/api/wxuser/remove",
+ method: "POST",
+ });
+};
+export default {
+ infoOrders,
+ info,
+ update,
+ logout,
+};
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 2370efa..e46228c 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -83,7 +83,7 @@ export default {
display: flex;
flex-direction: column;
align-items: center;
- padding: 10rpx 30rpx 30rpx 30rpx;
+ padding: 0 30rpx;
.order {
width: 100%;
diff --git a/pages/login/login.vue b/pages/login/login.vue
index e34b4fd..ea62f6a 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -7,7 +7,8 @@
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
color="transparent"
- >点击登录
+ text="点击登录"
+ >
此实名仅用于注册该小程序
@@ -59,6 +59,17 @@
+
+ 法大大认证
+
+ 前往认证
+
+
+
+
@@ -90,12 +101,15 @@ export default {
};
},
onLoad(options) {
- this.video = options.tempVideoPath;
- this.isfinish = JSON.parse(options.isfinish)||false
- this.name = uni.getStorageSync("info").name
- this.num = uni.getStorageSync("info").num
- this.fileList = uni.getStorageSync("info").fileList
- this.fileList2 = uni.getStorageSync("info").fileList2
+ if(options.tempVideoPath){
+ this.isfinish = JSON.parse(options.isfinish)||false
+ this.video = options.tempVideoPath;
+ this.uploadFilePromise(options.tempVideoPath,'video')
+ }
+ this.name = uni.getStorageSync("info").name||''
+ this.num = uni.getStorageSync("info").num||''
+ this.fileList = uni.getStorageSync("info").fileList||[]
+ this.fileList2 = uni.getStorageSync("info").fileList2||[]
uni.removeStorageSync("info")
},
methods: {
@@ -142,7 +156,7 @@ export default {
realIDImgB: this.fileList2[0]?.url
}})
if (res.status === 0) {
- uni.navigateTo({
+ uni.switchTab({
url: '/pages/home/index'
});
}else{
@@ -203,15 +217,20 @@ export default {
fileListLen++
}
},
- uploadFilePromise(url) {
+ uploadFilePromise(url,type=null) {
+ console.log(url)
return new Promise((resolve) => {
uni.uploadFile({
url: http.baseUrl + "/api/wxuser/uploadpic",
filePath: url,
name: "file",
success: (res) => {
+ console.log(9999999999999999999,res)
res.data = JSON.parse(res.data);
resolve(res.data.data.path);
+ if(type ==='video'){
+ this.video = res.data.data.path
+ }
},
});
});