From 567133455c8bf1d737c762b33e26913b06a0466d Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Fri, 29 Mar 2024 10:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E5=8A=A8=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E7=BB=93=E6=9E=84=EF=BC=8C=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9C=80=E6=96=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 ++- components/select/index.wxml | 2 +- pages/handleLogin/index.js | 6 ++++++ pages/handleLogin/index.json | 3 ++- pages/handleLogin/index.wxml | 12 ++++++++++-- pages/handleLogin/index.wxss | 18 +++++++++++++++++- pages/home/index.wxss | 7 ++++++- pages/member/components/memberManage/index.js | 5 +---- pages/my/index.js | 14 +++++++++++++- project.private.config.json | 2 +- service/user.js | 5 +++++ 11 files changed, 64 insertions(+), 13 deletions(-) diff --git a/app.json b/app.json index 154051b..ca7f6a6 100644 --- a/app.json +++ b/app.json @@ -40,5 +40,6 @@ }, "sitemapLocation": "sitemap.json", "rendererOptions": {}, - "navigationStyle": "custom" + "navigationStyle": "custom", + "lazyCodeLoading": "requiredComponents" } \ No newline at end of file diff --git a/components/select/index.wxml b/components/select/index.wxml index 2bc4cb5..49d12ee 100644 --- a/components/select/index.wxml +++ b/components/select/index.wxml @@ -3,7 +3,7 @@ 提交 + + + 不知道预留的手机号?可联系后台管理员查询! + + + 13266911877 + + \ No newline at end of file diff --git a/pages/handleLogin/index.wxss b/pages/handleLogin/index.wxss index 494f347..263ba06 100644 --- a/pages/handleLogin/index.wxss +++ b/pages/handleLogin/index.wxss @@ -1,5 +1,21 @@ /* pages/handleLogin/index.wxss */ + +@import "/app.wxss"; + .submit { - margin-top: 40rpx; + margin-top: 60rpx; padding: 0 32rpx; +} + +.way { + margin-top: 60rpx; + margin-left: 32rpx; + margin-right: 32rpx; + font-size: 34rpx; +} + +.phone { + margin-top: 30rpx; + color: var(--middle-green); + display: inline-block; } \ No newline at end of file diff --git a/pages/home/index.wxss b/pages/home/index.wxss index 23d059d..2596dae 100644 --- a/pages/home/index.wxss +++ b/pages/home/index.wxss @@ -20,7 +20,7 @@ } .park { - margin-left: 30rpx; + margin-left: 20rpx; } .parkContent { @@ -123,4 +123,9 @@ align-items: center; border: 1rpx solid #ccc; margin-right: 30rpx; +} + +.moneyInput { + margin-top: 30rpx; + margin-bottom: 30rpx; } \ No newline at end of file diff --git a/pages/member/components/memberManage/index.js b/pages/member/components/memberManage/index.js index 152d960..3374801 100644 --- a/pages/member/components/memberManage/index.js +++ b/pages/member/components/memberManage/index.js @@ -1,4 +1,4 @@ -import { approveUser, getApproveList, removeUser } from "../../../../service/user" +import { approveUser, getApproveList, getUserInfo, removeUser } from "../../../../service/user" import { alertInfo, alertSuccess, wxModal } from "../../../../utils/index"; import request from "../../../../utils/request" @@ -46,9 +46,6 @@ Component({ return; } - const newUser = wx.getStorageSync('user') - newUser.isAdmin = false; - wx.setStorageSync('user', newUser) wx.switchTab({ url: '/pages/home/index', }) diff --git a/pages/my/index.js b/pages/my/index.js index df112af..d46bcd6 100644 --- a/pages/my/index.js +++ b/pages/my/index.js @@ -1,5 +1,9 @@ import { alertInfo } from "../../utils/index"; import Dialog from '@vant/weapp/dialog/dialog'; +import { getUserInfo } from "../../service/user"; +import request from "../../utils/request" +const { OK } = request; + // pages/my/index.js Page({ @@ -50,7 +54,15 @@ Page({ alertInfo("请先登录"); return false; } - this.setData({ user }) + this.init() + }, + async init() { + const result = await getUserInfo(); + if (result.code !== OK) { + alertInfo(result.message) + return; + } + wx.setStorageSync('user', result.data) }, connect() { Dialog.alert({ diff --git a/project.private.config.json b/project.private.config.json index 064c7f3..efba64d 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -2,7 +2,7 @@ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "electricity_bill_calc_wx", "setting": { - "compileHotReLoad": false, + "compileHotReLoad": true, "urlCheck": false, "skylineRenderEnable": true }, diff --git a/service/user.js b/service/user.js index efa63e4..8edabb7 100644 --- a/service/user.js +++ b/service/user.js @@ -44,4 +44,9 @@ export const reApprove = async function() { // 非管理员扫码 export const userApply = async function(data) { return await POST('/wx/apply', data); +} + +// 获取所有的园区和商户 +export const getUserParksAndTenementsList = async function() { + return await GET('/wx/getUserParksAndTenementsList'); } \ No newline at end of file