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

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) { onLoad(options) {
const querys = decodeURIComponent(options.scene) const querys = decodeURIComponent(options.scene)
console.log('querys', querys)
const id = querys.slice(querys.indexOf("=") + 1) const id = querys.slice(querys.indexOf("=") + 1)
console.log("id", id)
this.getInfo(id); this.getInfo(id);
}, },
async getInfo(id) { async getInfo(id) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
// pages/rechargeDetail/index.js // pages/rechargeDetail/index.js
import { getRechargeDetail } from "../../service/recharge"; 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 { getRechargeOperateType, getRechargeOperateWay } from "../../utils/data";
import request from "../../utils/request" import request from "../../utils/request"
const { OK } = request const { OK } = request
@ -29,7 +29,14 @@ Page({
return; return;
} }
this.setData({ 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() { record() {

View File

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

View File

@ -114,6 +114,25 @@
border="{{ false }}" border="{{ false }}"
wx:if="{{detail.orderStatus === 2}}" 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> </van-cell-group>
<view class="operate"> <view class="operate">

View File

@ -13,6 +13,7 @@ export const userValidate = async function(data) {
// 获取用户邀请二维码 // 获取用户邀请二维码
export const getWxCode = async function(id) { export const getWxCode = async function(id) {
console.log("id", id)
return await GET(`/wx/getWxCode?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() { export const getUserInfo = async function(id) {
return await GET('/wx/getUserInfo'); return await GET('/wx/getUserInfo?tenement=' + id);
} }
// 非管理员重新提交申请 // 非管理员重新提交申请