From 60041324edffd7b2205055d74055aa5b219de0c7 Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Wed, 1 Nov 2023 14:54:12 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Popup.vue | 11 +++++++++++ src/pages/marketing/sign/index.config.ts | 0 src/pages/marketing/sign/index.vue | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/components/Popup.vue create mode 100644 src/pages/marketing/sign/index.config.ts create mode 100644 src/pages/marketing/sign/index.vue diff --git a/src/components/Popup.vue b/src/components/Popup.vue new file mode 100644 index 0000000..23c3bb1 --- /dev/null +++ b/src/components/Popup.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/src/pages/marketing/sign/index.config.ts b/src/pages/marketing/sign/index.config.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/marketing/sign/index.vue b/src/pages/marketing/sign/index.vue new file mode 100644 index 0000000..23c3bb1 --- /dev/null +++ b/src/pages/marketing/sign/index.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file From 76d57cea3728acd0922269d2f5af261f7ebab400 Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Wed, 1 Nov 2023 14:54:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 + src/api/user.ts | 11 ++++ src/app.config.ts | 4 ++ src/components/Popup.vue | 68 ++++++++++++++++++--- src/pages/index/index.vue | 5 +- src/pages/marketing/sign/index.config.ts | 3 + src/pages/marketing/sign/index.vue | 20 +++--- src/pages/users/account/index.vue | 74 ++++++++++++++++++++--- src/static/index/close.png | Bin 0 -> 1473 bytes src/static/index/poppBg.png | Bin 0 -> 70050 bytes 10 files changed, 155 insertions(+), 31 deletions(-) create mode 100644 src/static/index/close.png create mode 100644 src/static/index/poppBg.png diff --git a/components.d.ts b/components.d.ts index 2c19488..3ada26f 100644 --- a/components.d.ts +++ b/components.d.ts @@ -41,6 +41,7 @@ declare module '@vue/runtime-core' { NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'] NutUploader: typeof import('@nutui/nutui-taro')['Uploader'] Pay: typeof import('./src/components/Pay.vue')['default'] + Popup: typeof import('./src/components/Popup.vue')['default'] RichEditor: typeof import('./src/components/RichEditor.vue')['default'] Ucharts: typeof import('./src/components/Ucharts.vue')['default'] Upload: typeof import('./src/components/Upload.vue')['default'] diff --git a/src/api/user.ts b/src/api/user.ts index ee2a208..4236b35 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -63,3 +63,14 @@ export const getRefereeCode = () => request("/user/promotion", {}, "POST"); // 取消订单返回积分 export const qxOrder = (data: object) => request("/user/point/off", data, "POST"); + +// 用户签到 +export const userSign = () => + request("/sign/user", {}, "POST"); + +// 获取签到记录 +export const getSignRecord = () => + request("/sign/pulse/count", {}, "POST"); +// 获取赠送总记录 +export const getGiftRecord = (data: object) => + request("/user/giftPulseRecord", data, "POST"); diff --git a/src/app.config.ts b/src/app.config.ts index 68c8e75..5bba15c 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -57,6 +57,10 @@ export default defineAppConfig({ { root: 'pages/mer', pages: ['mer_detail/index'] + }, + { + root: 'pages/marketing', + pages: ['sign/index'] } ], window: { diff --git a/src/components/Popup.vue b/src/components/Popup.vue index 23c3bb1..e908835 100644 --- a/src/components/Popup.vue +++ b/src/components/Popup.vue @@ -1,11 +1,59 @@ - - - - - \ No newline at end of file diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 45bbe4f..f594391 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -32,7 +32,7 @@ @@ -53,6 +53,8 @@ + + @@ -62,6 +64,7 @@ import Taro from '@tarojs/taro' import {bindParent, getBanner} from '@/api/user' import {getMerList} from '@/api/goods' import {calculateDistance} from '@/utils' +import Popup from "@/components/Popup.vue"; const searchValue = ref('') diff --git a/src/pages/marketing/sign/index.config.ts b/src/pages/marketing/sign/index.config.ts index e69de29..e84943a 100644 --- a/src/pages/marketing/sign/index.config.ts +++ b/src/pages/marketing/sign/index.config.ts @@ -0,0 +1,3 @@ +export default definePageConfig({ + navigationBarTitleText: "每日签到", +}); diff --git a/src/pages/marketing/sign/index.vue b/src/pages/marketing/sign/index.vue index 23c3bb1..829087f 100644 --- a/src/pages/marketing/sign/index.vue +++ b/src/pages/marketing/sign/index.vue @@ -1,11 +1,11 @@ - - - - - \ No newline at end of file diff --git a/src/pages/users/account/index.vue b/src/pages/users/account/index.vue index be47547..6d24840 100644 --- a/src/pages/users/account/index.vue +++ b/src/pages/users/account/index.vue @@ -1,7 +1,7 @@ diff --git a/src/components/Pay.vue b/src/components/Pay.vue index 74af7db..b34ca66 100644 --- a/src/components/Pay.vue +++ b/src/components/Pay.vue @@ -1,181 +1,181 @@ diff --git a/src/components/Popup.vue b/src/components/Popup.vue index e908835..426b258 100644 --- a/src/components/Popup.vue +++ b/src/components/Popup.vue @@ -1,59 +1,63 @@ \ No newline at end of file + diff --git a/src/components/RichEditor.vue b/src/components/RichEditor.vue index f91a67f..dbb6836 100644 --- a/src/components/RichEditor.vue +++ b/src/components/RichEditor.vue @@ -3,81 +3,81 @@ @@ -85,37 +85,37 @@ @@ -124,116 +124,115 @@ @@ -246,7 +245,7 @@ function insertImage() { .editor-wrapper { height: calc( - 100vh - var(--window-top) - var(--status-bar-height) - 280px - 650px + 100vh - var(--window-top) - var(--status-bar-height) - 280px - 650px ); overflow: scroll; background: rgba(153, 153, 153, 0.05); @@ -283,4 +282,4 @@ function insertImage() { .ql-active { color: #f38e48; } - \ No newline at end of file + diff --git a/src/components/Ucharts.vue b/src/components/Ucharts.vue index a78cc05..c0836f4 100644 --- a/src/components/Ucharts.vue +++ b/src/components/Ucharts.vue @@ -1,22 +1,22 @@ diff --git a/src/components/Upload.vue b/src/components/Upload.vue index af28fec..05fbf38 100644 --- a/src/components/Upload.vue +++ b/src/components/Upload.vue @@ -1,64 +1,64 @@ diff --git a/src/components/UserModal.vue b/src/components/UserModal.vue index afece0f..8fae574 100644 --- a/src/components/UserModal.vue +++ b/src/components/UserModal.vue @@ -7,24 +7,24 @@ import { BASE_URL } from "@/utils/request"; import { getPhone, login } from "@/api/user"; const props = defineProps({ - isShow: { - type: Boolean, - default: false, - }, + isShow: { + type: Boolean, + default: false, + }, }); const emits = defineEmits(["closeEdit", "update:isShow"]); const userInfo = ref({ - nickname: "", - avatar: "", - phone: "", + nickname: "", + avatar: "", + phone: "", }); const show = computed({ - get: (): boolean => props.isShow, - set: (val) => { - emits("update:isShow", val); - }, + get: (): boolean => props.isShow, + set: (val) => { + emits("update:isShow", val); + }, }); const mp_is_new = ref(true); @@ -32,297 +32,288 @@ const mp_is_new = ref(true); const canvasStatus = ref(false); const closeAttr = () => { - emits("closeEdit"); + emits("closeEdit"); }; const onChooseAvatar = (e) => { - const { avatarUrl } = e.detail; - console.log(avatarUrl); - Taro.uploadFile({ - url: `${BASE_URL}/upload`, - filePath: avatarUrl, - name: "file", - success: function (res) { - const data = JSON.parse(res.data); - userInfo.value.avatar = data.data.data; - }, - }); + const { avatarUrl } = e.detail; + console.log(avatarUrl); + Taro.uploadFile({ + url: `${BASE_URL}/upload`, + filePath: avatarUrl, + name: "file", + success: function (res) { + const data = JSON.parse(res.data); + userInfo.value.avatar = data.data.data; + }, + }); }; const uploadPic = () => { - canvasStatus.value = true; + canvasStatus.value = true; }; const getPhoneNumber = async (e: any) => { - Taro.showLoading({ - title: "授权手机号中", - mask: true, - }); - const { code } = e.detail; - const res = await getPhone({ - code: code, - }); - userInfo.value.phone = res.data.phone; - Taro.hideLoading(); + Taro.showLoading({ + title: "授权手机号中", + mask: true, + }); + const { code } = e.detail; + const res = await getPhone({ + code: code, + }); + userInfo.value.phone = res.data.phone; + Taro.hideLoading(); }; const formSubmit = async (e: any) => { - if (!userInfo.value.avatar) - return Taro.showToast({ - title: "请上传头像", - icon: "none", - }); - userInfo.value.nickname = e.detail.value.nickname; - if (!userInfo.value.nickname) - return Taro.showToast({ - title: "请输入昵称", - icon: "none", - }); - if (!userInfo.value.phone) - return Taro.showToast({ - title: "请授权手机号码", - icon: "none", - }); - const res = await login({ - Code: Taro.getStorageSync("wx_code"), - NickName: userInfo.value.nickname, - AvatarUrl: userInfo.value.avatar, - Phone: userInfo.value.phone, - Referee: Taro.getStorageSync("bind_id") || "", + if (!userInfo.value.avatar) + return Taro.showToast({ + title: "请上传头像", + icon: "none", }); - emits("closeEdit"); - Taro.showToast({ - title: res.msg, - icon: "success", - duration: 2000, + userInfo.value.nickname = e.detail.value.nickname; + if (!userInfo.value.nickname) + return Taro.showToast({ + title: "请输入昵称", + icon: "none", }); - Taro.setStorageSync("token", res.data.token); - setTimeout(() => { - Taro.removeStorageSync("wx_code"); - Taro.removeStorageSync("bind_id"); - Taro.switchTab({ - url: "/pages/user/index", - }); - }, 2000); + if (!userInfo.value.phone) + return Taro.showToast({ + title: "请授权手机号码", + icon: "none", + }); + const res = await login({ + Code: Taro.getStorageSync("wx_code"), + NickName: userInfo.value.nickname, + AvatarUrl: userInfo.value.avatar, + Phone: userInfo.value.phone, + Referee: Taro.getStorageSync("bind_id") || "", + }); + emits("closeEdit"); + Taro.showToast({ + title: res.msg, + icon: "success", + duration: 2000, + }); + Taro.setStorageSync("token", res.data.token); + setTimeout(() => { + Taro.removeStorageSync("wx_code"); + Taro.removeStorageSync("bind_id"); + Taro.switchTab({ + url: "/pages/user/index", + }); + }, 2000); }; diff --git a/src/index.html b/src/index.html index 0dc60f3..ec3670f 100644 --- a/src/index.html +++ b/src/index.html @@ -1,17 +1,22 @@ - - - - - - - - - taroApp - - - -
- + + + + + + + + + taroApp + + + +
+ diff --git a/src/pages/admin/order_manage/detail/index.config.ts b/src/pages/admin/order_manage/detail/index.config.ts index bb7cb86..661c252 100644 --- a/src/pages/admin/order_manage/detail/index.config.ts +++ b/src/pages/admin/order_manage/detail/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '订单详情' - }) \ No newline at end of file + navigationBarTitleText: "订单详情", +}); diff --git a/src/pages/admin/order_manage/detail/index.vue b/src/pages/admin/order_manage/detail/index.vue index 1269042..1a18056 100644 --- a/src/pages/admin/order_manage/detail/index.vue +++ b/src/pages/admin/order_manage/detail/index.vue @@ -1,122 +1,116 @@ diff --git a/src/pages/admin/order_manage/index.config.ts b/src/pages/admin/order_manage/index.config.ts index f09d7b7..144c753 100644 --- a/src/pages/admin/order_manage/index.config.ts +++ b/src/pages/admin/order_manage/index.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '订单管理' - }) - \ No newline at end of file + navigationBarTitleText: "订单管理", +}); diff --git a/src/pages/admin/order_manage/index.vue b/src/pages/admin/order_manage/index.vue index 49fadf6..d770a2c 100644 --- a/src/pages/admin/order_manage/index.vue +++ b/src/pages/admin/order_manage/index.vue @@ -1,114 +1,104 @@ diff --git a/src/pages/admin/order_manage/list/index.config.ts b/src/pages/admin/order_manage/list/index.config.ts index aa65869..edc0008 100644 --- a/src/pages/admin/order_manage/list/index.config.ts +++ b/src/pages/admin/order_manage/list/index.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '订单列表' - }) - \ No newline at end of file + navigationBarTitleText: "订单列表", +}); diff --git a/src/pages/admin/order_manage/list/index.vue b/src/pages/admin/order_manage/list/index.vue index 1c1019b..aee49ca 100644 --- a/src/pages/admin/order_manage/list/index.vue +++ b/src/pages/admin/order_manage/list/index.vue @@ -1,35 +1,33 @@ diff --git a/src/pages/admin/statistics/index.config.ts b/src/pages/admin/statistics/index.config.ts index face3fe..ed5cb2c 100644 --- a/src/pages/admin/statistics/index.config.ts +++ b/src/pages/admin/statistics/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "订单数据统计", + navigationBarTitleText: "订单数据统计", }); diff --git a/src/pages/admin/statistics/index.vue b/src/pages/admin/statistics/index.vue index 6c72eb2..b12dada 100644 --- a/src/pages/admin/statistics/index.vue +++ b/src/pages/admin/statistics/index.vue @@ -1,121 +1,117 @@ diff --git a/src/pages/admin/verify/index.config.ts b/src/pages/admin/verify/index.config.ts index 2ff46c7..6f61cad 100644 --- a/src/pages/admin/verify/index.config.ts +++ b/src/pages/admin/verify/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "订单核销", + navigationBarTitleText: "订单核销", }); diff --git a/src/pages/admin/verify/index.vue b/src/pages/admin/verify/index.vue index c253a38..5cb54bc 100644 --- a/src/pages/admin/verify/index.vue +++ b/src/pages/admin/verify/index.vue @@ -1,11 +1,9 @@ diff --git a/src/pages/admin/verify/verify_list/index.config.ts b/src/pages/admin/verify/verify_list/index.config.ts index 9886107..b7baa1f 100644 --- a/src/pages/admin/verify/verify_list/index.config.ts +++ b/src/pages/admin/verify/verify_list/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "核销列表", -}); \ No newline at end of file + navigationBarTitleText: "核销列表", +}); diff --git a/src/pages/admin/verify/verify_list/index.vue b/src/pages/admin/verify/verify_list/index.vue index 10d9085..55b287b 100644 --- a/src/pages/admin/verify/verify_list/index.vue +++ b/src/pages/admin/verify/verify_list/index.vue @@ -1,146 +1,139 @@ diff --git a/src/pages/admin/withdrawal/index.config.ts b/src/pages/admin/withdrawal/index.config.ts index 9ea3eae..51e998d 100644 --- a/src/pages/admin/withdrawal/index.config.ts +++ b/src/pages/admin/withdrawal/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "收益提现", + navigationBarTitleText: "收益提现", }); diff --git a/src/pages/admin/withdrawal/index.vue b/src/pages/admin/withdrawal/index.vue index 5bb7d0b..7330511 100644 --- a/src/pages/admin/withdrawal/index.vue +++ b/src/pages/admin/withdrawal/index.vue @@ -1,65 +1,83 @@ \ No newline at end of file + diff --git a/src/pages/cart/index.config.ts b/src/pages/cart/index.config.ts index a517688..ab4c786 100644 --- a/src/pages/cart/index.config.ts +++ b/src/pages/cart/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '购物车' -}) + navigationBarTitleText: "购物车", +}); diff --git a/src/pages/cart/index.vue b/src/pages/cart/index.vue index e10370a..4dcf5c7 100644 --- a/src/pages/cart/index.vue +++ b/src/pages/cart/index.vue @@ -1,22 +1,36 @@ diff --git a/src/pages/category/index.config.ts b/src/pages/category/index.config.ts index f54b62b..5606907 100644 --- a/src/pages/category/index.config.ts +++ b/src/pages/category/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '分类' -}) + navigationBarTitleText: "分类", +}); diff --git a/src/pages/category/index.vue b/src/pages/category/index.vue index 974b4b1..4799e69 100644 --- a/src/pages/category/index.vue +++ b/src/pages/category/index.vue @@ -1,52 +1,48 @@ diff --git a/src/pages/game/gamedetail/index.config.ts b/src/pages/game/gamedetail/index.config.ts index 7cff30c..f296396 100644 --- a/src/pages/game/gamedetail/index.config.ts +++ b/src/pages/game/gamedetail/index.config.ts @@ -1,4 +1,4 @@ export default definePageConfig({ - navigationBarTitleText: "游戏详情", - navigationStyle: "custom", + navigationBarTitleText: "游戏详情", + navigationStyle: "custom", }); diff --git a/src/pages/game/gamedetail/index.vue b/src/pages/game/gamedetail/index.vue index b24f784..3f01899 100644 --- a/src/pages/game/gamedetail/index.vue +++ b/src/pages/game/gamedetail/index.vue @@ -1,65 +1,65 @@ diff --git a/src/pages/game/gamehome/index.config.ts b/src/pages/game/gamehome/index.config.ts index 58fc10b..f8ae8f1 100644 --- a/src/pages/game/gamehome/index.config.ts +++ b/src/pages/game/gamehome/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "活动游戏", + navigationBarTitleText: "活动游戏", }); diff --git a/src/pages/game/gamehome/index.vue b/src/pages/game/gamehome/index.vue index 78c0baa..2cbae66 100644 --- a/src/pages/game/gamehome/index.vue +++ b/src/pages/game/gamehome/index.vue @@ -1,7 +1,7 @@ diff --git a/src/pages/game/gameview/index.config.ts b/src/pages/game/gameview/index.config.ts index f2515b4..b0e5365 100644 --- a/src/pages/game/gameview/index.config.ts +++ b/src/pages/game/gameview/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "GameView", + navigationBarTitleText: "GameView", }); diff --git a/src/pages/game/gameview/index.vue b/src/pages/game/gameview/index.vue index 2a1b82d..11fd042 100644 --- a/src/pages/game/gameview/index.vue +++ b/src/pages/game/gameview/index.vue @@ -1,8 +1,8 @@ diff --git a/src/pages/goods/goods_detail/index.config.ts b/src/pages/goods/goods_detail/index.config.ts index 95ee953..ea1761b 100644 --- a/src/pages/goods/goods_detail/index.config.ts +++ b/src/pages/goods/goods_detail/index.config.ts @@ -1,4 +1,4 @@ export default definePageConfig({ - navigationBarTitleText: '商品详情', - navigationStyle: 'custom', - }) \ No newline at end of file + navigationBarTitleText: "商品详情", + navigationStyle: "custom", +}); diff --git a/src/pages/goods/goods_detail/index.vue b/src/pages/goods/goods_detail/index.vue index c4f51ee..c459d1e 100644 --- a/src/pages/goods/goods_detail/index.vue +++ b/src/pages/goods/goods_detail/index.vue @@ -1,111 +1,109 @@ diff --git a/src/pages/goods/order_create/index.config.ts b/src/pages/goods/order_create/index.config.ts index aa32ff5..aeeeafe 100644 --- a/src/pages/goods/order_create/index.config.ts +++ b/src/pages/goods/order_create/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "提交订单" + navigationBarTitleText: "提交订单", }); diff --git a/src/pages/goods/order_create/index.vue b/src/pages/goods/order_create/index.vue index 3a1086f..9a8e7c8 100644 --- a/src/pages/goods/order_create/index.vue +++ b/src/pages/goods/order_create/index.vue @@ -1,56 +1,53 @@ diff --git a/src/pages/goods/order_status/index.config.ts b/src/pages/goods/order_status/index.config.ts index e098552..0169d22 100644 --- a/src/pages/goods/order_status/index.config.ts +++ b/src/pages/goods/order_status/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "订单状态", + navigationBarTitleText: "订单状态", }); diff --git a/src/pages/goods/order_status/index.vue b/src/pages/goods/order_status/index.vue index a852c2a..845f596 100644 --- a/src/pages/goods/order_status/index.vue +++ b/src/pages/goods/order_status/index.vue @@ -1,30 +1,26 @@ diff --git a/src/pages/hotGoods/hot_list/index.config.ts b/src/pages/hotGoods/hot_list/index.config.ts index d760809..2dbea88 100644 --- a/src/pages/hotGoods/hot_list/index.config.ts +++ b/src/pages/hotGoods/hot_list/index.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '活动订单', - }) - \ No newline at end of file + navigationBarTitleText: "活动订单", +}); diff --git a/src/pages/hotGoods/hot_list/index.vue b/src/pages/hotGoods/hot_list/index.vue index 6d9e92e..e96d19d 100644 --- a/src/pages/hotGoods/hot_list/index.vue +++ b/src/pages/hotGoods/hot_list/index.vue @@ -1,11 +1,11 @@ diff --git a/src/pages/hotGoods/index/index.config.ts b/src/pages/hotGoods/index/index.config.ts index b22ea80..38becb0 100644 --- a/src/pages/hotGoods/index/index.config.ts +++ b/src/pages/hotGoods/index/index.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '活动商品', - }) - \ No newline at end of file + navigationBarTitleText: "活动商品", +}); diff --git a/src/pages/hotGoods/index/index.vue b/src/pages/hotGoods/index/index.vue index 3627bb8..cb0e511 100644 --- a/src/pages/hotGoods/index/index.vue +++ b/src/pages/hotGoods/index/index.vue @@ -1,26 +1,26 @@ diff --git a/src/pages/index/index.config.ts b/src/pages/index/index.config.ts index 87676bf..676da59 100644 --- a/src/pages/index/index.config.ts +++ b/src/pages/index/index.config.ts @@ -1,4 +1,4 @@ export default definePageConfig({ - navigationBarTitleText: '首页', - enableShareAppMessage: true -}) + navigationBarTitleText: "首页", + enableShareAppMessage: true, +}); diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f594391..29a5e8c 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,252 +1,251 @@ diff --git a/src/pages/marketing/sign/index.config.ts b/src/pages/marketing/sign/index.config.ts index e84943a..edbdd3d 100644 --- a/src/pages/marketing/sign/index.config.ts +++ b/src/pages/marketing/sign/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "每日签到", + navigationBarTitleText: "每日签到", }); diff --git a/src/pages/marketing/sign/index.vue b/src/pages/marketing/sign/index.vue index 829087f..b568517 100644 --- a/src/pages/marketing/sign/index.vue +++ b/src/pages/marketing/sign/index.vue @@ -1,11 +1,7 @@ - + - \ No newline at end of file + diff --git a/src/pages/mer/mer_detail/index.config.ts b/src/pages/mer/mer_detail/index.config.ts index 1d2fb94..68494b6 100644 --- a/src/pages/mer/mer_detail/index.config.ts +++ b/src/pages/mer/mer_detail/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "", + navigationBarTitleText: "", }); diff --git a/src/pages/mer/mer_detail/index.vue b/src/pages/mer/mer_detail/index.vue index aff8be9..4cec96b 100644 --- a/src/pages/mer/mer_detail/index.vue +++ b/src/pages/mer/mer_detail/index.vue @@ -1,327 +1,300 @@ diff --git a/src/pages/product/addGoods/index.config.ts b/src/pages/product/addGoods/index.config.ts index 334b398..d82f619 100644 --- a/src/pages/product/addGoods/index.config.ts +++ b/src/pages/product/addGoods/index.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '商品添加/编辑' -}) - \ No newline at end of file + navigationBarTitleText: "商品添加/编辑", +}); diff --git a/src/pages/product/addGoods/index.vue b/src/pages/product/addGoods/index.vue index d7c537c..11ab260 100644 --- a/src/pages/product/addGoods/index.vue +++ b/src/pages/product/addGoods/index.vue @@ -1,158 +1,199 @@ \ No newline at end of file + diff --git a/src/pages/product/list/index.config.ts b/src/pages/product/list/index.config.ts index d9b95e3..c32dfb2 100644 --- a/src/pages/product/list/index.config.ts +++ b/src/pages/product/list/index.config.ts @@ -1,4 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '商品管理' -}) - \ No newline at end of file + navigationBarTitleText: "商品管理", +}); diff --git a/src/pages/product/list/index.vue b/src/pages/product/list/index.vue index 02dc0f3..d5a57a7 100644 --- a/src/pages/product/list/index.vue +++ b/src/pages/product/list/index.vue @@ -1,11 +1,11 @@ diff --git a/src/pages/users/bindPhone/index.config.ts b/src/pages/users/bindPhone/index.config.ts index 82a263a..9ddadf8 100644 --- a/src/pages/users/bindPhone/index.config.ts +++ b/src/pages/users/bindPhone/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '手机号登录' -}) + navigationBarTitleText: "手机号登录", +}); diff --git a/src/pages/users/bindPhone/index.vue b/src/pages/users/bindPhone/index.vue index 46ff716..46c809e 100644 --- a/src/pages/users/bindPhone/index.vue +++ b/src/pages/users/bindPhone/index.vue @@ -5,12 +5,12 @@ import { getVerifyCode, phoneLogin } from "@/api/user"; import logoImg from "../../../static/logo.jpg"; Taro.useLoad((options) => { - console.log(options); + console.log(options); }); const basicData = ref({ - phone: "", - code: "", + phone: "", + code: "", }); const smsDisabled = ref(false); @@ -19,148 +19,146 @@ const smsStr = ref("获取验证码"); // 获取验证码 const getSmsCode = async () => { - if ( - !/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test( - basicData.value.phone - ) + if ( + !/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test( + basicData.value.phone ) - return Taro.showToast({ - title: "请输入正确的手机号码", - icon: "none", - }); - await getVerifyCode({ - phone: basicData.value.phone.toString(), + ) + return Taro.showToast({ + title: "请输入正确的手机号码", + icon: "none", }); - smsDisabled.value = true; - let time = 60; - const timer = setInterval(() => { - time--; - smsStr.value = `${time}s`; - if (time === 0) { - clearInterval(timer); - smsDisabled.value = false; - smsStr.value = "获取验证码"; - } - }, 1000); + await getVerifyCode({ + phone: basicData.value.phone.toString(), + }); + smsDisabled.value = true; + let time = 60; + const timer = setInterval(() => { + time--; + smsStr.value = `${time}s`; + if (time === 0) { + clearInterval(timer); + smsDisabled.value = false; + smsStr.value = "获取验证码"; + } + }, 1000); }; const login = async () => { - if ( - !/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test( - basicData.value.phone - ) + if ( + !/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test( + basicData.value.phone ) - return Taro.showToast({ - title: "请输入正确的手机号码", - icon: "none", - }); - if (!basicData.value.code) - return Taro.showToast({ - title: "请输入验证码", - icon: "none", - }); + ) + return Taro.showToast({ + title: "请输入正确的手机号码", + icon: "none", + }); + if (!basicData.value.code) + return Taro.showToast({ + title: "请输入验证码", + icon: "none", + }); - const res = await phoneLogin({ - Phone: basicData.value.phone, - Code: basicData.value.code, - Referee: Taro.getStorageSync("bind_id") || "", + const res = await phoneLogin({ + Phone: basicData.value.phone, + Code: basicData.value.code, + Referee: Taro.getStorageSync("bind_id") || "", + }); + Taro.showToast({ + title: res.msg, + icon: "success", + duration: 2000, + }); + Taro.setStorageSync("token", res.data.token); + setTimeout(() => { + Taro.removeStorageSync("bind_id"); + Taro.switchTab({ + url: "/pages/user/index", }); - Taro.showToast({ - title: res.msg, - icon: "success", - duration: 2000, - }); - Taro.setStorageSync("token", res.data.token); - setTimeout(() => { - Taro.removeStorageSync("bind_id"); - Taro.switchTab({ - url: "/pages/user/index", - }); - }, 2000); + }, 2000); }; diff --git a/src/pages/users/distribution/index.config.ts b/src/pages/users/distribution/index.config.ts index a3f7e34..e74fb60 100644 --- a/src/pages/users/distribution/index.config.ts +++ b/src/pages/users/distribution/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "我的推广", + navigationBarTitleText: "我的推广", }); diff --git a/src/pages/users/distribution/index.vue b/src/pages/users/distribution/index.vue index 0987640..798aab4 100644 --- a/src/pages/users/distribution/index.vue +++ b/src/pages/users/distribution/index.vue @@ -1,27 +1,27 @@ diff --git a/src/pages/users/distribution/integral/index.config.ts b/src/pages/users/distribution/integral/index.config.ts index 922df3a..c3f80b1 100644 --- a/src/pages/users/distribution/integral/index.config.ts +++ b/src/pages/users/distribution/integral/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "积分明细", + navigationBarTitleText: "积分明细", }); diff --git a/src/pages/users/distribution/integral/index.vue b/src/pages/users/distribution/integral/index.vue index f7ecd53..0caec9c 100644 --- a/src/pages/users/distribution/integral/index.vue +++ b/src/pages/users/distribution/integral/index.vue @@ -1,38 +1,38 @@ diff --git a/src/pages/users/distribution/userlist/index.config.ts b/src/pages/users/distribution/userlist/index.config.ts index a8a7a0e..aed95a7 100644 --- a/src/pages/users/distribution/userlist/index.config.ts +++ b/src/pages/users/distribution/userlist/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: "推广人统计", + navigationBarTitleText: "推广人统计", }); diff --git a/src/pages/users/distribution/userlist/index.vue b/src/pages/users/distribution/userlist/index.vue index 59501e9..83f3386 100644 --- a/src/pages/users/distribution/userlist/index.vue +++ b/src/pages/users/distribution/userlist/index.vue @@ -1,32 +1,31 @@ diff --git a/src/pages/users/login/index.config.ts b/src/pages/users/login/index.config.ts index 6b01bfe..f8f4f8a 100644 --- a/src/pages/users/login/index.config.ts +++ b/src/pages/users/login/index.config.ts @@ -1,4 +1,4 @@ export default definePageConfig({ - navigationBarTitleText: '登录', - navigationStyle: 'custom' -}) + navigationBarTitleText: "登录", + navigationStyle: "custom", +}); diff --git a/src/pages/users/login/index.vue b/src/pages/users/login/index.vue index 9401bbb..5d54666 100644 --- a/src/pages/users/login/index.vue +++ b/src/pages/users/login/index.vue @@ -7,83 +7,83 @@ import logoImg from "../../../static/logo.jpg"; const isShow = ref(false); const getCode = () => { - Taro.showLoading({ - title: "授权中...", - mask: true, - }); - Taro.login({ - success: (res) => { - console.log(res); - Taro.setStorageSync("wx_code", res.code); - isShow.value = true; - }, - complete: () => { - Taro.hideLoading(); - }, - }); + Taro.showLoading({ + title: "授权中...", + mask: true, + }); + Taro.login({ + success: (res) => { + console.log(res); + Taro.setStorageSync("wx_code", res.code); + isShow.value = true; + }, + complete: () => { + Taro.hideLoading(); + }, + }); }; const toPage = () => { - Taro.navigateTo({ - url: "/pages/users/bindPhone/index?type=1", - }); + Taro.navigateTo({ + url: "/pages/users/bindPhone/index?type=1", + }); }; diff --git a/src/pages/users/order_list/index.config.ts b/src/pages/users/order_list/index.config.ts index a17a39d..70c8660 100644 --- a/src/pages/users/order_list/index.config.ts +++ b/src/pages/users/order_list/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '我的订单' -}) \ No newline at end of file + navigationBarTitleText: "我的订单", +}); diff --git a/src/pages/users/order_list/index.vue b/src/pages/users/order_list/index.vue index c1b5896..f575103 100644 --- a/src/pages/users/order_list/index.vue +++ b/src/pages/users/order_list/index.vue @@ -1,12 +1,12 @@ diff --git a/src/pages/users/order_list_detail/index.config.ts b/src/pages/users/order_list_detail/index.config.ts index a27df08..661c252 100644 --- a/src/pages/users/order_list_detail/index.config.ts +++ b/src/pages/users/order_list_detail/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '订单详情' -}) \ No newline at end of file + navigationBarTitleText: "订单详情", +}); diff --git a/src/pages/users/order_list_detail/index.vue b/src/pages/users/order_list_detail/index.vue index f419b6e..9a74514 100644 --- a/src/pages/users/order_list_detail/index.vue +++ b/src/pages/users/order_list_detail/index.vue @@ -1,433 +1,429 @@ diff --git a/src/pages/users/setting/index.config.ts b/src/pages/users/setting/index.config.ts index 78fb3ec..41c66ae 100644 --- a/src/pages/users/setting/index.config.ts +++ b/src/pages/users/setting/index.config.ts @@ -1,3 +1,3 @@ export default definePageConfig({ - navigationBarTitleText: '个人设置' -}) \ No newline at end of file + navigationBarTitleText: "个人设置", +}); diff --git a/src/pages/users/setting/index.vue b/src/pages/users/setting/index.vue index 8ddb18c..3dcb161 100644 --- a/src/pages/users/setting/index.vue +++ b/src/pages/users/setting/index.vue @@ -1,18 +1,22 @@