From 3f6a12ee67cf1e966cd40e69212893f98e86f277 Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Thu, 12 Sep 2024 14:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=95=B0=E6=8D=AE=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=8A=A0=E8=BD=BD=E7=9A=84bug=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=93=E5=8C=BA=E6=A0=B7=E5=BC=8F=EF=BC=8C=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=85=85=E5=80=BC=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/encyclopedia/index.js | 1 - pages/home/index.js | 11 ++++++++++- pages/invoiceDetail/index.js | 1 - pages/questions/index.js | 2 +- pages/questions/index.wxml | 2 +- pages/rechargeDetail/index.js | 6 +++++- pages/rechargeDetail/index.wxml | 10 ++++++++++ pages/rechargeRecord/index.js | 9 +++++++++ pages/rechargeRecord/index.json | 4 +++- pages/rechargeRecord/index.wxml | 10 +++++++++- pages/rechargeRecord/index.wxss | 6 +++--- pages/special/index.js | 4 ++++ pages/special/index.wxss | 5 +++++ project.config.json | 7 ++----- service/tenement.js | 5 +++++ 15 files changed, 67 insertions(+), 16 deletions(-) diff --git a/pages/encyclopedia/index.js b/pages/encyclopedia/index.js index 772df41..8dcfe8c 100644 --- a/pages/encyclopedia/index.js +++ b/pages/encyclopedia/index.js @@ -31,7 +31,6 @@ Page({ }) }, onChange(e) { - console.log('e', e) this.setData({ active: e.detail.index, }) diff --git a/pages/home/index.js b/pages/home/index.js index c5c6793..dff0f20 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -1,6 +1,6 @@ // pages/home/index.js import { getMeterDetail, getMeterList, getTenementMeterList } from "../../service/meter"; -import { getOwnTenementList } from "../../service/tenement"; +import { getOwnTenementList, getTenementExceptionalCase } from "../../service/tenement"; import { alertInfo, alertSuccess } from "../../utils/index"; import request from '../../utils/request'; import { getDot } from "../../utils/system"; @@ -125,6 +125,15 @@ Page({ }, async recharge() { const { user, money, meter, tenement, park } = this.data; + const { code, message, data } = await getTenementExceptionalCase(park?.id, tenement?.id); + if (code !== OK) { + alertInfo(message) + return; + } + if (data === 1) { + alertInfo("账号存在异常,无法进行充值,请联系客服处理") + return; + } const that = this; if (!user || !user.id) { alertInfo("请先登录") diff --git a/pages/invoiceDetail/index.js b/pages/invoiceDetail/index.js index 40963fc..7aa75fd 100644 --- a/pages/invoiceDetail/index.js +++ b/pages/invoiceDetail/index.js @@ -78,7 +78,6 @@ Page({ alertError("没有开票信息") return; } - console.log('res.tempFilePath', res.tempFilePath, sheetRes.tapIndex) wx.openDocument({ filePath: res.tempFilePath, // fileType: sheetRes.tapIndex === 0 ? 'xml' : "pdf", // 3. 这个必须写合法类型,不然下载不了 !!! diff --git a/pages/questions/index.js b/pages/questions/index.js index 516da03..74f6159 100644 --- a/pages/questions/index.js +++ b/pages/questions/index.js @@ -27,7 +27,7 @@ Page({ return; } let next = true; - if (total <= page * 20) { + if (total <= page / 20) { next = false; } this.setData({ diff --git a/pages/questions/index.wxml b/pages/questions/index.wxml index f801ce0..1e7a67e 100644 --- a/pages/questions/index.wxml +++ b/pages/questions/index.wxml @@ -8,6 +8,6 @@ {{ item.content }} - + \ No newline at end of file diff --git a/pages/rechargeDetail/index.js b/pages/rechargeDetail/index.js index 1b5df17..08b4f67 100644 --- a/pages/rechargeDetail/index.js +++ b/pages/rechargeDetail/index.js @@ -69,10 +69,14 @@ Page({ success: (res) => { if (res.statusCode === 200) { if (!res.tempFilePath) { - alertError("获取文件失败") + alertInfo("获取文件失败") rej() return; } + if (res.tempFilePath.endsWith(".json")) { + alertInfo("下载文件失败") + return; + } wx.openDocument({ filePath: res.tempFilePath, fileType: [ "pdf"], // 3. 这个必须写合法类型,不然下载不了 !!! diff --git a/pages/rechargeDetail/index.wxml b/pages/rechargeDetail/index.wxml index e7abfc0..f640c5a 100644 --- a/pages/rechargeDetail/index.wxml +++ b/pages/rechargeDetail/index.wxml @@ -97,6 +97,7 @@ border="{{ false }}" wx:elif="{{detail.orderStatus === 2}}" /> + + diff --git a/pages/rechargeRecord/index.js b/pages/rechargeRecord/index.js index a087b2e..09f0e75 100644 --- a/pages/rechargeRecord/index.js +++ b/pages/rechargeRecord/index.js @@ -3,6 +3,7 @@ import { getRechargeList } from "../../service/recharge"; import { getTenementMeterList } from "../../service/meter"; import { getYears, alertInfo, loadingFunc } from "../../utils/index"; import request from "../../utils/request"; +import Dialog from '@vant/weapp/dialog/dialog'; const { OK } = request; Page({ @@ -79,6 +80,14 @@ Page({ }) this.init(currentYear, codeId, pay) }, + showAnswer() { + Dialog.alert({ + title: '提示', + message: '只统计已完成充值的数据,处理中和已退回不计入总额内', + }).then(() => { + // on close + }); + }, onChangeMeter(e) { const { id, code, } = e; const { year, pay } = this.data; diff --git a/pages/rechargeRecord/index.json b/pages/rechargeRecord/index.json index 06d330b..f9a35f8 100644 --- a/pages/rechargeRecord/index.json +++ b/pages/rechargeRecord/index.json @@ -5,7 +5,9 @@ "van-icon": "@vant/weapp/icon/index", "custom-status-bar": "/components/customStatusBar/index", "custom-picker": "/components/picker/index", - "empty": "/components/empty/index" + "empty": "/components/empty/index", + "van-dialog": "@vant/weapp/dialog/index", + "van-divider": "@vant/weapp/divider/index" }, "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/rechargeRecord/index.wxml b/pages/rechargeRecord/index.wxml index 04c07f1..324a9ca 100644 --- a/pages/rechargeRecord/index.wxml +++ b/pages/rechargeRecord/index.wxml @@ -34,6 +34,13 @@ 已退回 充值成功 + 总计:{{amount}} + + 没有更多了 + + @@ -47,4 +54,5 @@ bind:ok="onOk" bind:cancel="onCancel" type="{{type}}" -/> \ No newline at end of file +/> + diff --git a/pages/rechargeRecord/index.wxss b/pages/rechargeRecord/index.wxss index 0d22da1..d55613b 100644 --- a/pages/rechargeRecord/index.wxss +++ b/pages/rechargeRecord/index.wxss @@ -69,10 +69,10 @@ } .allMoney { - flex: 1; + font-size: 34rpx; + margin-top: 24rpx; + margin-bottom: 20rpx; text-align: right; - color: #fff; - font-size: 32rpx; } .type { diff --git a/pages/special/index.js b/pages/special/index.js index 35069e2..d9d170a 100644 --- a/pages/special/index.js +++ b/pages/special/index.js @@ -30,6 +30,10 @@ Page({ clickService(e) { console.log('e', e) const { type, value } = e.currentTarget.dataset.data; + if (!value) { + alertInfo("暂未开通") + return; + } switch(type) { case 0: const [appId, path] = value.split(",") diff --git a/pages/special/index.wxss b/pages/special/index.wxss index 4245294..73a9d03 100644 --- a/pages/special/index.wxss +++ b/pages/special/index.wxss @@ -3,4 +3,9 @@ width: 100%; height: auto; padding: 40rpx; +} + +.servicesWrapper { + min-height: 80vh; + background: linear-gradient(to bottom, var(--middle-green), #fff ); } \ No newline at end of file diff --git a/project.config.json b/project.config.json index e87cb07..cafe0d2 100644 --- a/project.config.json +++ b/project.config.json @@ -19,8 +19,6 @@ "uploadWithSourceMap": true, "compileHotReLoad": false, "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, "babelSetting": { "ignore": [], "disablePlugins": [], @@ -45,11 +43,10 @@ "tabIndent": "insertSpaces", "tabSize": 2 }, + "condition": {}, "packOptions": { "ignore": [], "include": [] }, - "appid": "wxb34b4e70f8a5c6f1", - "projectname": "elec", - "condition": {} + "appid": "wxb34b4e70f8a5c6f1" } \ No newline at end of file diff --git a/service/tenement.js b/service/tenement.js index 0d502a5..dbdfa46 100644 --- a/service/tenement.js +++ b/service/tenement.js @@ -14,4 +14,9 @@ export const getOwnTenementList = async function() { // 获取商户详情 export const getTenementDetail = async function(id) { return await GET(`/wx/getTenementDetail/${id}`); +} + +// 获取商户是否限电 +export const getTenementExceptionalCase = async function(pid, tid) { + return await GET(`/wx/exceptionalCase/${pid}/${tid}`); } \ No newline at end of file