充值记录查看凭证,检查二维码和上传凭证问题,首页获取商户列表更改

This commit is contained in:
qiaomu 2024-10-29 15:25:42 +08:00
parent e94051f7c9
commit 1bb3d6dddb
10 changed files with 59 additions and 12 deletions

View File

@ -20,7 +20,9 @@ Page({
*/
onLoad(options) {
const querys = decodeURIComponent(options.scene)
console.log('querys', querys)
const id = querys.slice(querys.indexOf("=") + 1)
console.log("id", id)
this.getInfo(id);
},
async getInfo(id) {

View File

@ -97,6 +97,7 @@ Page({
wx.scanCode({
scanType: "qrCode",
success: ({ path }) => {
console.log('path', path)
wx.navigateTo({
url: '/' + path,
})

View File

@ -193,7 +193,7 @@ Page({
// const oldValue = value;
wx.setStorageSync('tenement', newVal)
that.getMeters(newVal);
that.setUser();
that.setUser(newVal.id);
value = newVal;
}
});
@ -260,8 +260,8 @@ Page({
url: '/childPackage/pages/electricQuery/index',
})
},
async setUser() {
const result = await getUserInfo();
async setUser(id) {
const result = await getUserInfo(id);
if (result.code !== OK) {
const user = wx.getStorageSync('user')
this.setData({ user: user })
@ -292,14 +292,26 @@ Page({
const updateDatas = {}
if (!park || !park.id) {
const storagePark = wx.getStorageSync('park')
updateDatas.park = storagePark || firstPark
if (data.find(item => item.id !== storagePark.id)) {
updateDatas.park = firstPark
} else {
updateDatas.park = storagePark
}
}
if (!tenement || !tenement.id) {
const storageTenement = wx.getStorageSync('tenement')
if (!park || !park.id) {
updateDatas.tenement = storageTenement || firstPark.tenements?.[0]
if (firstPark.tenements?.find(item => item.id !== storageTenement.id)) {
updateDatas.tenement = firstPark.tenements?.[0]
} else {
updateDatas.tenement = storageTenement
}
} else {
updateDatas.tenement = storageTenement || park.tenements?.[0];
if (park.tenements?.find(item => item.id !== storageTenement.id)) {
updateDatas.tenement = park.tenements?.[0]
} else {
updateDatas.tenement = storageTenement
}
}
}
updateDatas.all = data;

View File

@ -41,6 +41,7 @@ Page({
async upload(res) {
const result = await uploadPublicFile(res.tempFiles[0]?.tempFilePath)
console.log('upload result', result)
if (result.statusCode !== 200) {
alertInfo("上传失败")
return;

View File

@ -28,8 +28,10 @@
<view style="margin: 30rpx;">
<view style="display: flex; justify-content: space-between;margin-bottom: 30rpx;">
请使用对公账号向以下账号汇款
<view class="primaryTextBtn" bind:tap="copy"> 复制 </view>
<view style="flex: 1;">
请使用对公账号向以下账号汇款,并将付款成功截图上传至充值凭证。
</view>
<view class="primaryTextBtn" bind:tap="copy" style="width: 100rpx;"> 复制 </view>
</view>
<view> 河北华昌宝能售电有限公司 </view>
<view> 建行新石北路支行 </view>

View File

@ -40,6 +40,7 @@ Page({
},
async getCode() {
const tenement = wx.getStorageSync('tenement');
console.log("tenement", tenement)
const { code, message, data } = await getWxCode(tenement.id)
if (code !== OK) {
alertInfo(message)

View File

@ -1,6 +1,6 @@
// pages/rechargeDetail/index.js
import { getRechargeDetail } from "../../service/recharge";
import { alertError, alertInfo, loadingFunc } from "../../utils/index";
import { alertError, alertInfo, loadingFunc, getFileName } from "../../utils/index";
import { getRechargeOperateType, getRechargeOperateWay } from "../../utils/data";
import request from "../../utils/request"
const { OK } = request
@ -29,7 +29,14 @@ Page({
return;
}
this.setData({
detail: { ...data, way: getRechargeOperateWay(data.way), type: getRechargeOperateType(data.type) }
detail: {
...data,
way: getRechargeOperateWay(data.way),
type: getRechargeOperateType(data.type),
fileList: data?.images ? [{
url: data.images, name: getFileName(data.images)
}] : []
}
})
},
record() {

View File

@ -2,6 +2,7 @@
"usingComponents": {
"navigator": "/components/navigator/index",
"van-field": "@vant/weapp/field/index",
"van-uploader": "@vant/weapp/uploader/index",
"van-button": "@vant/weapp/button/index"
},
"navigationStyle": "custom"

View File

@ -114,6 +114,25 @@
border="{{ false }}"
wx:if="{{detail.orderStatus === 2}}"
/>
<van-field
use-input-slot
label="凭证"
readonly
border="{{ false }}"
wx:if="{{detail.images}}"
>
</van-field>
<view slot="input" style="margin-top: 20rpx; margin-left: 30rpx;">
<van-uploader
file-list="{{ detail.fileList }}"
show-upload="{{false}}"
disabled="{{true}}"
readonly="{{true}}"
deletable="{{false}}"
/>
</view>
</van-cell-group>
<view class="operate">

View File

@ -13,6 +13,7 @@ export const userValidate = async function(data) {
// 获取用户邀请二维码
export const getWxCode = async function(id) {
console.log("id", id)
return await GET(`/wx/getWxCode?id=${id}`);
}
@ -32,8 +33,8 @@ export const removeUser = async function(uid, tid) {
}
// 获取用户最新信息
export const getUserInfo = async function() {
return await GET('/wx/getUserInfo');
export const getUserInfo = async function(id) {
return await GET('/wx/getUserInfo?tenement=' + id);
}
// 非管理员重新提交申请