From b6ca53f70e71e7d0ad9272b3b7f520ed7959c401 Mon Sep 17 00:00:00 2001
From: YuanHuakk <1751826683@qq.com>
Date: Wed, 6 Sep 2023 03:49:21 +0800
Subject: [PATCH] i
---
components.d.ts | 3 +
package.json | 1 +
pnpm-lock.yaml | 14 +-
src/api/goods.ts | 16 +-
src/api/order.ts | 6 +-
src/api/user.ts | 40 +-
src/app.config.ts | 30 +-
src/components/Pay.vue | 43 +-
src/components/Upload.vue | 62 +++
src/pages/admin/verify/index.vue | 5 +-
src/pages/category/index.vue | 46 +-
src/pages/game/gamedetail/index.vue | 13 +-
src/pages/game/gamehome/index.vue | 53 ++-
src/pages/game/gameview/index.config.ts | 3 +
src/pages/game/gameview/index.vue | 21 +-
src/pages/goods/goods_detail/index.vue | 87 ++--
src/pages/hotGoods/hot_list/index.config.ts | 4 +
src/pages/hotGoods/hot_list/index.vue | 376 ++++++++++++++++
src/pages/hotGoods/index/index.vue | 25 +-
.../hotGoods/static/user/order_list_top.png | Bin 0 -> 85322 bytes
src/pages/index/index.vue | 401 ++++++++---------
src/pages/user/index.vue | 226 ++++++----
src/pages/users/account/index.vue | 183 +++++++-
src/pages/users/distribution/index.config.ts | 3 +
src/pages/users/distribution/index.vue | 105 +++++
.../distribution/integral/index.config.ts | 3 +
.../users/distribution/integral/index.vue | 85 ++++
.../distribution/userlist/index.config.ts | 3 +
.../users/distribution/userlist/index.vue | 93 ++++
src/pages/users/order_list/index.js | 9 +
src/pages/users/order_list/index.vue | 61 ++-
src/pages/users/order_list_detail/index.vue | 56 ++-
src/pages/users/settled_mer/index.vue | 424 +++++++++++++-----
src/pages/users/user_setting/index.vue | 268 ++++++++---
src/static/user/1.png | Bin 0 -> 1437 bytes
src/static/user/2.png | Bin 0 -> 2185 bytes
src/static/user/3.png | Bin 0 -> 2041 bytes
src/static/user/4.png | Bin 0 -> 2147 bytes
src/utils/request.ts | 57 ++-
39 files changed, 2146 insertions(+), 679 deletions(-)
create mode 100644 src/components/Upload.vue
create mode 100644 src/pages/hotGoods/hot_list/index.config.ts
create mode 100644 src/pages/hotGoods/hot_list/index.vue
create mode 100644 src/pages/hotGoods/static/user/order_list_top.png
create mode 100644 src/pages/users/distribution/index.config.ts
create mode 100644 src/pages/users/distribution/index.vue
create mode 100644 src/pages/users/distribution/integral/index.config.ts
create mode 100644 src/pages/users/distribution/integral/index.vue
create mode 100644 src/pages/users/distribution/userlist/index.config.ts
create mode 100644 src/pages/users/distribution/userlist/index.vue
create mode 100644 src/pages/users/order_list/index.js
create mode 100644 src/static/user/1.png
create mode 100644 src/static/user/2.png
create mode 100644 src/static/user/3.png
create mode 100644 src/static/user/4.png
diff --git a/components.d.ts b/components.d.ts
index 6df8adc..8316022 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -23,6 +23,7 @@ declare module '@vue/runtime-core' {
NutInput: typeof import('@nutui/nutui-taro')['Input']
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']
+ NutPagination: typeof import('@nutui/nutui-taro')['Pagination']
NutPicker: typeof import('@nutui/nutui-taro')['Picker']
NutPopup: typeof import('@nutui/nutui-taro')['Popup']
NutPrice: typeof import('@nutui/nutui-taro')['Price']
@@ -33,6 +34,8 @@ declare module '@vue/runtime-core' {
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
NutTabs: typeof import('@nutui/nutui-taro')['Tabs']
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea']
+ NutUploader: typeof import('@nutui/nutui-taro')['Uploader']
Pay: typeof import('./src/components/Pay.vue')['default']
+ Upload: typeof import('./src/components/Upload.vue')['default']
}
}
diff --git a/package.json b/package.json
index dc66776..b53ff35 100644
--- a/package.json
+++ b/package.json
@@ -52,6 +52,7 @@
"@tarojs/runtime": "3.6.11",
"@tarojs/shared": "3.6.11",
"@tarojs/taro": "3.6.11",
+ "dayjs": "^1.11.9",
"pinia": "^2.1.6",
"vue": "^3.2.40"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f022802..2bbb069 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -56,12 +56,12 @@ dependencies:
'@tarojs/taro':
specifier: 3.6.11
version: 3.6.11(postcss@8.4.27)(vue@3.2.40)
+ dayjs:
+ specifier: ^1.11.9
+ version: 1.11.9
pinia:
specifier: ^2.1.6
version: 2.1.6(typescript@4.1.2)(vue@3.2.40)
- uqrcodejs:
- specifier: ^4.0.7
- version: 4.0.7
vue:
specifier: ^3.2.40
version: 3.2.40
@@ -6423,6 +6423,10 @@ packages:
whatwg-url: 12.0.1
dev: true
+ /dayjs@1.11.9:
+ resolution: {integrity: sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA==}
+ dev: false
+
/debug@2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
@@ -13809,10 +13813,6 @@ packages:
tslib: 2.6.1
dev: false
- /uqrcodejs@4.0.7:
- resolution: {integrity: sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA==}
- dev: false
-
/uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies:
diff --git a/src/api/goods.ts b/src/api/goods.ts
index 11214ea..de1ed3a 100644
--- a/src/api/goods.ts
+++ b/src/api/goods.ts
@@ -25,4 +25,18 @@ export const getActiveGoods = () => request('/goods', {}, 'POST')
export const getActiveGoodsDetail = (data: object) => request('/goods/details', data, 'POST')
// 活动商品下单
-export const createActiveOrder = (data: object) => request('/order/place', data, 'POST')
\ No newline at end of file
+export const createActiveOrder = (data: object) => request('/order/place', data, 'POST')
+
+// 活动订单列表
+export const getActiveOrderList = (data: object) => request('/user/order', data, 'POST')
+
+// 获取分类列表
+export const getCategoryList = () => request('/goods/class', {}, 'POST')
+
+
+// 活动订单删除
+export const deleteActiveOrder = (data: object) => request('/user/order/remove', data, 'POST')
+
+
+// 积分订单删除
+export const deleteJfOrder = (data: object) => request('/user/point/remove', data, 'POST')
\ No newline at end of file
diff --git a/src/api/order.ts b/src/api/order.ts
index 4b08776..14c7178 100644
--- a/src/api/order.ts
+++ b/src/api/order.ts
@@ -1,4 +1,8 @@
import request from '@/utils/request'
// 订单支付
-export const payOrder = (data: object) => request('/order/confirmOrder', data, 'POST')
\ No newline at end of file
+export const payOrder = (data: object) => request('/order/confirmOrder', data, 'POST')
+
+
+// 获取订单统计
+export const getOrderStatistics = (data: object) => request('/user/order/count', data, 'POST')
\ No newline at end of file
diff --git a/src/api/user.ts b/src/api/user.ts
index 985f7be..31a425e 100644
--- a/src/api/user.ts
+++ b/src/api/user.ts
@@ -4,16 +4,18 @@ import request from "@/utils/request";
export const login = (data: object) => request("/login", data, "POST");
// 获取用户信息
-export const getUserInfo = () => request("/user/detail", {}, "GET");
+// export const getUserInfo = () => request("/user/detail", {}, "GET");
// 获取短信验证码
-export const getVerifyCode = (data: object) => request("/getSmsCode", data, "POST");
+export const getVerifyCode = (data: object) =>
+ request("/getSmsCode", data, "POST");
// 商家入驻申请
-export const applyMer = (data: object) => request("/store/settle", data, "POST");
+export const applyMer = (data: object) =>
+ request("/store/settle", data, "POST");
// 获取商家类型列表
-export const getMerTypeList = () => request("/store/getOther", {},"POST");
+export const getMerTypeList = () => request("/store/getOther", {}, "POST");
// 获取个人信息
export const getPersonalInfo = () => request("/user/info", {}, "POST");
@@ -22,4 +24,32 @@ export const getPersonalInfo = () => request("/user/info", {}, "POST");
export const getBanner = () => request("/rotation", {}, "POST");
// 获取积分订单列表
-export const getIntegralOrderList = (data: object) => request("/user/pointOrder", data, "POST");
+export const getIntegralOrderList = (data: object) =>
+ request("/user/pointOrder", data, "POST");
+
+// 修改个人信息
+export const editPersonalInfo = (data: object) =>
+ request("/user/editInfo", data, "POST");
+
+// 积分明细
+export const getIntegralDetail = (data: object) =>
+ request("/user/pulseRecord", data, "POST");
+
+// 豆子明细
+export const getBeanDetail = (data: object) =>
+ request("/user/pointRecord", data, "POST");
+
+// 授权手机号
+export const getPhone = (data: object) =>
+ request("/user/getPhone", data, "POST");
+
+// 获取推广积分明细
+export const getTGIntegralDetail = (data: object) =>
+ request("/user/referee/point", data, "POST");
+
+// 获取推广用户列表
+export const getTGUserList = (data: object) =>
+ request("/user/referee/list", data, "POST");
+
+// 绑定上级
+export const bindParent = (data: object) => request("/user/bindCode", data, "POST");
diff --git a/src/app.config.ts b/src/app.config.ts
index 9658966..72c0bbb 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -15,6 +15,9 @@ export default defineAppConfig({
"settled_mer/index",
"order_list_detail/index",
"account/index",
+ "distribution/index",
+ "distribution/integral/index",
+ "distribution/userlist/index",
],
},
{
@@ -35,7 +38,7 @@ export default defineAppConfig({
},
{
root: "pages/hotGoods",
- pages: ["index/index"],
+ pages: ["index/index", "hot_list/index"],
},
],
window: {
@@ -56,18 +59,18 @@ export default defineAppConfig({
selectedIconPath: "static/tabbar/1-002.png",
text: "首页",
},
- {
- pagePath: "pages/category/index",
- iconPath: "static/tabbar/2-001.png",
- selectedIconPath: "static/tabbar/2-002.png",
- text: "分类",
- },
- {
- pagePath: "pages/cart/index",
- iconPath: "static/tabbar/3-001.png",
- selectedIconPath: "static/tabbar/3-002.png",
- text: "购物车",
- },
+ // {
+ // pagePath: "pages/category/index",
+ // iconPath: "static/tabbar/2-001.png",
+ // selectedIconPath: "static/tabbar/2-002.png",
+ // text: "分类",
+ // },
+ // {
+ // pagePath: "pages/cart/index",
+ // iconPath: "static/tabbar/3-001.png",
+ // selectedIconPath: "static/tabbar/3-002.png",
+ // text: "购物车",
+ // },
{
pagePath: "pages/user/index",
iconPath: "static/tabbar/4-001.png",
@@ -84,4 +87,5 @@ export default defineAppConfig({
requiredBackgroundModes: ["audio", "location"],
// @ts-ignore
requiredPrivateInfos: ["getLocation"],
+ lazyCodeLoading: "requiredComponents",
});
diff --git a/src/components/Pay.vue b/src/components/Pay.vue
index b17dce0..2df4ad7 100644
--- a/src/components/Pay.vue
+++ b/src/components/Pay.vue
@@ -29,7 +29,7 @@
@@ -46,10 +46,12 @@
+
+
diff --git a/src/pages/admin/verify/index.vue b/src/pages/admin/verify/index.vue
index 9251f1a..6f445ff 100644
--- a/src/pages/admin/verify/index.vue
+++ b/src/pages/admin/verify/index.vue
@@ -34,9 +34,9 @@ const scanCode = () => {
scanType: ["qrCode"],
success: async (res) => {
try {
- const user = JSON.parse(Taro.getStorageSync("userInfo"));
+ const mer_type = JSON.parse(Taro.getStorageSync("mer_type"));
let data;
- if (user.mer_type === 1) {
+ if (mer_type === 1) {
data = await activeOrderVerify({
oid: res.result,
});
@@ -44,6 +44,7 @@ const scanCode = () => {
data = await orderVerify({
oid: res.result,
});
+
}
Taro.showToast({
title: data.msg,
diff --git a/src/pages/category/index.vue b/src/pages/category/index.vue
index cb888d3..98df524 100644
--- a/src/pages/category/index.vue
+++ b/src/pages/category/index.vue
@@ -1,39 +1,43 @@
-
- Tab {{ item.name }}
+
+
+ Tab {{ item.name }}
-
+
diff --git a/src/pages/game/gamedetail/index.vue b/src/pages/game/gamedetail/index.vue
index fcb2ca7..b24f784 100644
--- a/src/pages/game/gamedetail/index.vue
+++ b/src/pages/game/gamedetail/index.vue
@@ -1,6 +1,11 @@
-
+
\ No newline at end of file
+
+.tabs-box {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-evenly;
+ align-items: center;
+ height: auto;
+ background-color: #fff;
+ padding: 0 20px;
+ text-align: center;
+
+ .text {
+ margin: 10px 20px;
+ align-items: center;
+ }
+
+ .line {
+ margin: 0 auto;
+ width: 50px;
+ height: 5px;
+ border-radius: 30px;
+ transition: all 0.3s ease-in-out;
+ }
+
+ .lineColor {
+ background-color: #ff0000;
+ }
+}
+.card-list {
+ margin: 10px 20px;
+ background-color: #fff;
+ display: flex;
+ border-radius: 10px;
+ padding: 20px;
+ justify-content: space-between;
+ align-items: center;
+}
+
diff --git a/src/pages/users/distribution/index.config.ts b/src/pages/users/distribution/index.config.ts
new file mode 100644
index 0000000..a3f7e34
--- /dev/null
+++ b/src/pages/users/distribution/index.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ navigationBarTitleText: "我的推广",
+});
diff --git a/src/pages/users/distribution/index.vue b/src/pages/users/distribution/index.vue
new file mode 100644
index 0000000..54a74bb
--- /dev/null
+++ b/src/pages/users/distribution/index.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/users/distribution/integral/index.config.ts b/src/pages/users/distribution/integral/index.config.ts
new file mode 100644
index 0000000..922df3a
--- /dev/null
+++ b/src/pages/users/distribution/integral/index.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ navigationBarTitleText: "积分明细",
+});
diff --git a/src/pages/users/distribution/integral/index.vue b/src/pages/users/distribution/integral/index.vue
new file mode 100644
index 0000000..9865572
--- /dev/null
+++ b/src/pages/users/distribution/integral/index.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+ 昵称:{{ item.nick_name }}
+ 购买商品:{{ item.goods_name }}
+ 支付时间:{{ item.add_time.slice(0, 10) }}
+
+
+ +{{ item.number }}积分
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/users/distribution/userlist/index.config.ts b/src/pages/users/distribution/userlist/index.config.ts
new file mode 100644
index 0000000..a8a7a0e
--- /dev/null
+++ b/src/pages/users/distribution/userlist/index.config.ts
@@ -0,0 +1,3 @@
+export default definePageConfig({
+ navigationBarTitleText: "推广人统计",
+});
diff --git a/src/pages/users/distribution/userlist/index.vue b/src/pages/users/distribution/userlist/index.vue
new file mode 100644
index 0000000..59501e9
--- /dev/null
+++ b/src/pages/users/distribution/userlist/index.vue
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+ {{ item.nickName }}
+ {{ item.phone }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/users/order_list/index.js b/src/pages/users/order_list/index.js
new file mode 100644
index 0000000..e8a1f12
--- /dev/null
+++ b/src/pages/users/order_list/index.js
@@ -0,0 +1,9 @@
+const obj = {
+ a: 1,
+ b: 3,
+ c: 10,
+};
+
+Object.keys(obj).forEach((item, index) => {
+ console.log(obj[item]);
+});
diff --git a/src/pages/users/order_list/index.vue b/src/pages/users/order_list/index.vue
index bce8f97..085ec9d 100644
--- a/src/pages/users/order_list/index.vue
+++ b/src/pages/users/order_list/index.vue
@@ -9,6 +9,8 @@ import {
} from "@tarojs/taro";
import Pay from "@/components/Pay.vue";
import { getIntegralOrderList } from "@/api/user";
+import { deleteJfOrder } from "@/api/goods";
+import { getOrderStatistics } from "@/api/order";
const tabValue = ref(0);
@@ -18,7 +20,7 @@ const tabsList = ref([
{
title: "全部",
value: 0,
- num: 3,
+ num: 0,
},
{
title: "待付款",
@@ -28,23 +30,24 @@ const tabsList = ref([
{
title: "待使用",
value: 2,
- num: 1,
+ num: 0,
},
{
title: "已使用",
value: 3,
- num: 1,
+ num: 0,
},
{
title: "已失效",
value: 4,
- num: 1,
+ num: 0,
},
]);
const jfInfo = ref({});
interface OrderList {
+ oid: string;
add_time: string;
status: number;
BindGoods: {
@@ -68,6 +71,7 @@ const getList = async () => {
const res = await getIntegralOrderList({
status: tabValue.value,
});
+
console.log(res);
orderList.value = res.data.data;
} catch (error) {
@@ -76,6 +80,7 @@ const getList = async () => {
icon: "none",
});
}
+ getTj();
};
const tabChange = (index: number) => {
@@ -88,9 +93,8 @@ useReachBottom(() => {
});
const openPay = (item: OrderList) => {
- console.log("openPay", item);
isShowPay.value = true;
- jfInfo.value = item;
+ jfInfo.value = [item];
};
const errPay = () => {
@@ -100,6 +104,7 @@ const errPay = () => {
icon: "none",
});
jfInfo.value = {};
+ getList();
};
const closePay = () => {
isShowPay.value = false;
@@ -108,6 +113,7 @@ const closePay = () => {
icon: "none",
});
jfInfo.value = {};
+ getList();
};
const toDetail = (item: any) => {
@@ -116,6 +122,40 @@ const toDetail = (item: any) => {
url: `/pages/users/order_list_detail/index?orderId=${item.oid}`,
});
};
+
+const delOrder = async (oid: string) => {
+ try {
+ const res = await deleteJfOrder({ oid });
+ console.log(res);
+ } catch (error) {
+ showToast({
+ title: error.msg,
+ icon: "none",
+ });
+ }
+ getList();
+};
+
+const countInfo = ref({});
+
+const getTj = async () => {
+ try {
+ const res = await getOrderStatistics({
+ type: 2,
+ });
+ countInfo.value = res.data.data;
+ tabsList.value[0].num = countInfo.value.A || 0;
+ tabsList.value[1].num = countInfo.value.B || 0;
+ tabsList.value[2].num = countInfo.value.C || 0;
+ tabsList.value[3].num = countInfo.value.D || 0;
+ tabsList.value[4].num = countInfo.value.F || 0;
+ } catch (error) {
+ showToast({
+ title: error.msg,
+ icon: "none",
+ });
+ }
+};
@@ -124,7 +164,7 @@ const toDetail = (item: any) => {
订单信息
消费订单:{{ 10 || 0 }} 总消费积分:{{ 12312 || 0 }}
+ >总消费积分:{{ countInfo.Total || 0 }}
@@ -167,17 +207,17 @@ const toDetail = (item: any) => {
{{ item.BindGoods.name }}
- {{ item.BindGoods.number }}
+ {{ item.number }}
x{{ item.count }}
-
共{{ item.count }}件商品,实付积分:
{{ item.number }}
-
+ -->
@@ -186,6 +226,7 @@ const toDetail = (item: any) => {
plain
size="small"
type="primary"
+ @click="delOrder(item.oid)"
>取消订单
{{ goodInfo.BindGoods.name }}
- {{ goodInfo.BindGoods.number }}
+ {{ goodInfo.number }}
x{{ goodInfo.count }}
@@ -59,6 +59,15 @@
title="下单时间:"
:desc="goodInfo.add_time.slice(0, 19)"
>
+
实付款(积分):
+ >实付款({{ type === "1" ? "元" : "积分" }}):
- 取消订单
-
+ -->
+
@@ -139,9 +155,11 @@ import {
getStorageSync,
makePhoneCall,
openLocation,
+ showToast,
} from "@tarojs/taro";
import { Service, Find } from "@nutui/icons-vue-taro";
import { ref } from "vue";
+import dayjs from "dayjs";
const goodInfo = ref({});
@@ -165,11 +183,15 @@ const statusList = ref([
]);
const isShowCode = ref(false);
+const isShowPay = ref(false);
+const jfInfo = ref({});
+
+const type = ref("");
const url = ref("");
useLoad((options) => {
- console.log("options", options);
+ type.value = options.type;
goodInfo.value = getStorageSync("item");
});
@@ -187,7 +209,27 @@ const toAdder = () => {
});
};
-const openPay = () => {};
+const openPay = () => {
+ isShowPay.value = true;
+ jfInfo.value = getStorageSync("item");
+};
+
+const errPay = () => {
+ isShowPay.value = false;
+ showToast({
+ title: "支付失败",
+ icon: "none",
+ });
+ jfInfo.value = {};
+};
+const closePay = () => {
+ isShowPay.value = false;
+ showToast({
+ title: "支付取消",
+ icon: "none",
+ });
+ jfInfo.value = {};
+};
const openCode = () => {
url.value = `https://api.pwmqr.com/qrcode/create?url=${goodInfo.value.oid}`;
diff --git a/src/pages/users/settled_mer/index.vue b/src/pages/users/settled_mer/index.vue
index 478016d..e639c32 100644
--- a/src/pages/users/settled_mer/index.vue
+++ b/src/pages/users/settled_mer/index.vue
@@ -1,213 +1,388 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
{{ smsStr }}
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 提交
+ 提交
-
{
page {
background-image: url("~@/static/merchantBg.jpg");
background-size: 100%;
- background-color: #E93423;
+ background-color: #e93423;
background-repeat: no-repeat;
}
-
.form {
position: relative;
- top: 300px;
+ top: 200px;
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-bottom: env(safe-area-inset-bottom);
.btn {
padding: 20px;
@@ -247,4 +423,4 @@ page {
justify-content: space-between;
align-items: center;
}
-
\ No newline at end of file
+
diff --git a/src/pages/users/user_setting/index.vue b/src/pages/users/user_setting/index.vue
index b7b5447..8cf5c95 100644
--- a/src/pages/users/user_setting/index.vue
+++ b/src/pages/users/user_setting/index.vue
@@ -1,94 +1,218 @@
-
-
- 管理我的账号
-
-
-
-
-
- 微信用户
-
-
-
-
-
-
-
-
-
-
-
- 退出登录
-
+
+
+ 管理我的账号
+
+
+
+
+
+
+
+
-
+ {{ userInfo.nickName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存信息
+
+
+ 退出登录
+
+
\ No newline at end of file
+.nut-input {
+ width: 400px !important;
+ padding: 0 !important;
+}
+
+.nut-cell {
+ display: flex;
+ align-items: center;
+}
+
+.phoneBtn {
+ padding: 0 !important;
+ margin: 0 !important;
+ border-radius: 0 !important;
+ background-color: transparent !important;
+ border: none !important;
+}
+
diff --git a/src/static/user/1.png b/src/static/user/1.png
new file mode 100644
index 0000000000000000000000000000000000000000..937278d6eb439fe402cf744cc0fc06235002f2b4
GIT binary patch
literal 1437
zcmV;O1!DS%P)Px#1am@3R0s$N2z&@+hyVZuM@d9MR9JAA0a;BJF?>MGHVl->hpb3aB!H9@;RzdZ
z$Q-`??WE&}hN=_2$}E2;>-5=Lw$iOdw{nn@lXsB;LxhY6Wa&%h@E=dRaOp%^&LZze^
zS`(LoxWxz;EnelcojfORRW)UK)%gT*R_RHz{
zxp9^I$)lPE>|oPkZXw*4HiIS;ar2*(?;y8Uh?yx1d>u_f)J=EKjmzA3+rM>rnxtXu
zv)%WIR{`Q8`0=~9E+pOe9dA|3_4mWIF@Z;G%|u-uS(zWn%C5JKoKK#xh1uF7?6;8J
zz1&a%c)V6O5gkxnUmTMk;YNYuSrEpt3Bbr)is*SvqYavj#@%!9%VM6Iur<(+-Xkhy
zvOmIXihroW3e_guG!SOul5$flJSpZDVBdx5+e_dbz|fC^q&HKD&4kd4oR2C((c1ro
zkajf>(T=TYS~inZ+gPEoi~P8fnK5>IHhAy4EB<_-xqJxhS%w!p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&tg6{M3d7pr{7&sA${#!3MD5L)avlf}yHl&tm00000
LNkvXXu0mjfi1`-A
literal 0
HcmV?d00001
diff --git a/src/static/user/3.png b/src/static/user/3.png
new file mode 100644
index 0000000000000000000000000000000000000000..e9c55a8dbaa50881e13ce35b393163a1615d4837
GIT binary patch
literal 2041
zcmVPx#1am@3R0s$N2z&@+hyVZwqe(T|B4n=4A%aE770H1*oPuPL#P-7QUp}@7($GnRCyanK_rR3gMko&tqiW-7qZ!
zV*nxm1h55|tJJCr43s5ci*SGL^cj@JUuebh68W?of&qlB~aTfWo0hvK+0Jd~L
zky72W1v*RadU^31Y+SyGc73+^y+QMzuPYra0b~$qmmD9!m6jQ>Rx<1Gwsi0UUUb}b
zu?%z;Pt%^G=Y1z=-Z}Lw)?V-sOa}j>0bh=QGOPQd4lZWH7AQM_Eg7BVY1;eQ^DBnt
zC$2t?HS0Dw*gS@%O4B;eYug4;4=A==fpr7-17l$6+qY@&+zkUm^B=BV#>mUCEaL%JWRs5y>)OX!s7kw|!f8O|KiB29W|bF+kpOdA&sHXG*h;?d74o
zwArL>GC)4^Y9loN@s~x^D3NMJ+xCD`Gl{C*EQfQI6q^qK7z%w$>dG0O-gG2_=08pT
z2*Yc#xFOZxN`XZpEh~2^rl9A5tN}V-Uz>b0-#t3vp}}KcxzX!Jl2^7`NhfG6O|+{`
zL+29#H1sL}xDrFdZs;aywBKUVo&+{t+#lRBz$E|%j(z0vzBuIkIT`ni3;^p)#8wP!
zW36Y|6#ziIbNkC!KY9lMpfy}QY*iDg%fy?y3D|a1e^@Qzvt{9#{}`Bg9XR&CYDHwX
zq|4H-S5WccWd|tA2MqGz-vCHfyyTT>X-}>k*fkd4j&A{O-w9lGTXXTKs?;Tb_#uPV
zQ06nz#+#t0Zd@sCN)X>(`Rll^)RyZ^+wy@oK!DS7d$OK?;%N8sgUG~I;P^-V%Mk!j
zOSuM4Qn^-xN+;ckqrkzv-8*TteXe&iu@yLWxCgDOL!|r}H^4H-uc@6twi>f{VBVTZ)a8{3i`m`-SzkurBw#zK1{%LDg%+!B8RnrVaH($x686+
z*zam^ZF?fZ@3R{w(&e{0n||$Y&Mb}}4(G%|PU2mpmDa&
zHpecB!4k$;+e*eZ1HaqtG_EHXvm3F+Y=bT+#v@oHZFa6cpKONfN<0R_M8LMu{IqM
zS`JYk0Qk@A)tqS1bZsmR5vTO}omc8+;jbl(rUO5;C)>4c!;djEe2s71dkG7FYStT^
z`H$TSw_y}mKU#815&qRCX#pC1C|J_umij%72&3cghH3z(r7PhRCni*sKCBj+P)xeA4K{yI~Ojios7
zNaS1<5K`$-Y*EANpn4;4CtR0G^Llk;>;uH*m7VL6wf>6|;mB_b_Y=*-gqbW7MNPX*
zPCc<@Q2N#D7_|o0*G?9&`Q&aut;hV}78ocbc
zJs=*X{U@IRMAHC(#R=H_tlun^Hij3o(W2p-P8{7}f!J2H4FgpuA@VYB(f(8Z+l=p(
z_RN2arL#{)zFA_)WvBUc(X^G6eA&_#OLgtaVkP$;m_zI%$Qb|+>x|l3%=d447kTS)
z?=hN8p_h4d(|Gzh!@E(n4=FnhbAxZE7f&7N2@L=|{nNw9@~y4}1^9u!YDpt%W1k)(
z(t|~$Z6$_(OD~*yDb4Qw&1L#0?;#udMeRWp-E8n4vdq^tR(E0G_%mIQGXUS2YPc`7
z1E2USV4eaQ8t7X~t%2kirKOv8nco8NFzr9pHG0!Gyu|m7ZvxZ5VQ9?Nkne{{yiYIP
z-FAHft8F{T0vJz=Tk9o*f3dx1dedaz0BYT6Tbh#^?X-*Ew4fWtCjx)
X(6^_{q_(6l00000NkvXXu0mjfF6QM}
literal 0
HcmV?d00001
diff --git a/src/static/user/4.png b/src/static/user/4.png
new file mode 100644
index 0000000000000000000000000000000000000000..cd4b0d943c2d6cd2847e9a1e0a1372e37d86e88f
GIT binary patch
literal 2147
zcmV-p2%PtcP)Px#1am@3R0s$N2z&@+hyVZx4M{{nR9JNHkU}H9nM>P?T&5WNTs{
z4AruK=t4=rrLakZyT3bgd^mU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zgz?41WhqWxai7@2+Gl?gE3{u90{fesXqgTJ<>u0(=`MfUY!_j`WVGCF8WY-?wKYFZ
zsU|DRJ~{;K23(Dg@FE_dOPg<~gH}-hfUo^rU(R#-n12Faj7h{-y>W{F74Xdg5Ln+s
zxcDa=lYpmR-<$m+fChla4ro@2f{Pj-&I$o)zQFOdZcO;jzn2zxw^Mck2Ke}~z4@2y
zQ*cHsSbf(TzqLL8a~dN97KNBlQIyYGp4){pfe8MI
zINIAw+p{cuRe6;z-XnHlK7jpOBcr-|uix<^KEaOM~dt)N%>ZhGeyU!m8;74`V
z6k}l-a|HfYtl_TE0PygO#S_aE{hCz$Zw`Ne2FDQ!5ed+!UGQ-r+jDF${j<}YUDH>d
z*Jo9RyX-Y^leXjYrC$e>e!LNuE)n?0)~$6)i@ti^{xj}hD9jl}*g({*`BaL1bH
zndtE58|vV`ebjJb4AV{Bmw);B;&CwjhzOq`!YV67plQ@iLSEt`5&jIuIFov#lNmIn
Z{{js-V6Y&YoP7WQ002ovPDHLkV1k(Y9T)%r
literal 0
HcmV?d00001
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 667d29e..9cd61bd 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -1,6 +1,9 @@
-import Taro from '@tarojs/taro'
+import Taro from "@tarojs/taro";
-const BASE_URL = process.env.NODE_ENV === 'development' ? 'http://192.168.2.3:9000' : 'https://www.wanzhuanyongcheng.cn'
+export const BASE_URL =
+ process.env.NODE_ENV === "development"
+ ? "http://192.168.2.3:9000/app"
+ : "https://www.wanzhuanyongcheng.cn/app";
interface Res {
code: number;
@@ -8,41 +11,47 @@ interface Res {
msg: string;
}
-type Method = 'GET' | 'POST' | 'PUT' | 'DELETE';
+type Method = "GET" | "POST" | "PUT" | "DELETE";
const request = (
url: string,
data: object = {},
- method: Method = 'GET'
+ method: Method = "GET"
): Promise> => {
return new Promise((resolve, reject) => {
Taro.showLoading({
- title: '加载中...',
- mask: true
- })
+ title: "加载中...",
+ mask: true,
+ });
Taro.request({
- url: BASE_URL + '/app' + url,
+ url: BASE_URL + url,
data: data,
method: method,
header: {
- 'content-type': 'application/json',
- token: Taro.getStorageSync('token')
+ "content-type": "application/json",
+ token: Taro.getStorageSync("token"),
},
- success: ({data}) => {
- Taro.hideLoading()
- if (data.code !== 200)
- return reject({code: 1, msg: data.msg})
- resolve(data)
+ success: ({ data }) => {
+ Taro.hideLoading();
+ if (data.code !== 200) {
+ Taro.showToast({
+ title: data.msg,
+ icon: "none",
+ });
+ reject(data);
+ return;
+ }
+ resolve(data);
},
fail: () => {
Taro.showToast({
- title: '服务器异常',
- icon: 'none'
- })
- reject({code: 1, msg: '服务器异常'})
- }
- })
- })
-}
+ title: "服务器异常",
+ icon: "none",
+ });
+ reject({ code: 1, msg: "服务器异常" });
+ },
+ });
+ });
+};
-export default request
\ No newline at end of file
+export default request;