修改分页组件在部分场景中存在缓存问题导致部分数据无法查看的问题

This commit is contained in:
2024-08-08 10:30:55 +08:00
parent cf7756dd5c
commit b9e1b06d29
33 changed files with 56 additions and 886 deletions

View File

@@ -1,8 +1,8 @@
// pages/invoiceList/components/already/index.js
import { getAlreadyInvoiceList } from "../../../../service/invoice"
import { alertInfo, loadingFunc } from "../../../../utils/index";
import request from '../../../../utils/request'
const { OK } = request;
// pages/invoiceList/components/already/index.js
Component({
/**

View File

@@ -1,10 +1,10 @@
// pages/invoiceList/components/info/index.js
import { getInvoiceInfo, updateInvoiceInfo } from "../../../../service/invoice"
import { getUserInfo } from "../../../../service/user";
import { alertInfo, alertSuccess, isValidPhoneNumber } from "../../../../utils/index";
import request from '../../../../utils/request'
const { OK } = request
// pages/invoiceList/components/info/index.js
Component({
/**
@@ -89,10 +89,6 @@ Component({
alertInfo("请输入发票税号")
return;
}
// if (!address) {
// alertInfo("请输入地址")
// return;
// }
if (phone && !isValidPhoneNumber(phone)) {
alertInfo("手机号格式不正确")
return

View File

@@ -17,7 +17,6 @@
label="发票类型"
readonly="{{true}}"
autosize="{{true}}"
custom-style="padding-left: 0; padding-right: 0;"
title-width="132rpx"
border="{{ false }}"
@@ -28,7 +27,6 @@
label="发票类型"
readonly="{{true}}"
autosize="{{true}}"
custom-style="padding-left: 0; padding-right: 0;"
title-width="132rpx"
border="{{ false }}"
@@ -39,7 +37,6 @@
label="发票类型"
readonly="{{true}}"
autosize="{{true}}"
custom-style="padding-left: 0; padding-right: 0;"
title-width="132rpx"
border="{{ false }}"
@@ -50,7 +47,6 @@
label="抬头类型"
readonly="{{true}}"
autosize="{{true}}"
custom-style="padding-left: 0; padding-right: 0;"
title-width="132rpx"
border="{{ false }}"
@@ -70,7 +66,6 @@
label="抬头类型"
readonly="{{true}}"
autosize="{{true}}"
custom-style="padding-left: 0; padding-right: 0;"
title-width="132rpx"
border="{{ false }}"
@@ -81,7 +76,6 @@
label="抬头类型"
readonly="{{true}}"
autosize="{{true}}"
custom-style="padding-left: 0; padding-right: 0;"
title-width="132rpx"
border="{{ false }}"
@@ -95,7 +89,6 @@
custom-style="padding-left: 0; padding-right: 0;"
readonly="{{true}}"
autosize="{{true}}"
title-width="132rpx"
border="{{ false }}"
>
@@ -107,7 +100,6 @@
custom-style="padding-left: 0; padding-right: 0;"
readonly="{{editType === 'detail'}}"
autosize="{{true}}"
title-width="132rpx"
border="{{ editType === 'detail' ? false : true }}"
>
@@ -119,7 +111,6 @@
custom-style="padding-left: 0; padding-right: 0;"
readonly="{{editType === 'detail'}}"
autosize="{{true}}"
title-width="132rpx"
border="{{ editType === 'detail' ? false : true }}"
>
@@ -132,7 +123,6 @@
custom-style="padding-left: 0; padding-right: 0;"
readonly="{{editType === 'detail'}}"
autosize="{{true}}"
title-width="132rpx"
border="{{ editType === 'detail' ? false : true }}"
bind:change="onChangeText"
@@ -146,7 +136,6 @@
custom-style="padding-left: 0; padding-right: 0; height: auto;"
readonly="{{editType === 'detail'}}"
autosize="{{true}}"
title-width="132rpx"
border="{{ editType === 'detail' ? false : true }}"
bind:change="onChangeText"
@@ -161,16 +150,12 @@
custom-style="padding-left: 0; padding-right: 0;"
readonly="{{editType === 'detail'}}"
autosize="{{true}}"
title-width="132rpx"
border="{{ editType === 'detail' ? false : true }}"
bind:change="onChangeText"
data-name="remark"
value="{{detail.remark || '-'}}"
>
<!-- <view slot="input" style="margin-top: -10rpx;">
<view> {{detail.remark || '-'}} </view>
</view> -->
</van-field>
</view>
<view wx:else>
@@ -303,7 +288,6 @@
data-name="phone"
value="{{detail.phone || '-'}}"
>
</van-field>
</view>
<view wx:else>

View File

@@ -46,15 +46,12 @@ Component({
},
onChange(e) {
const { id, index } = e.currentTarget.dataset;
// let newList = this.data.chooseList;
const { list } = this.data;
const newSelectList = this.data.selectList;
if (e.detail) {
newSelectList[index] = true;
// newList = [...new Set([...newList, id])]
} else {
newSelectList[index] = false;
// newList = newList.filter(item => item !== id);
}
let selectCount = 0;
let selectMoney = 0;
@@ -66,7 +63,6 @@ Component({
}
}
this.setData({
// chooseList: newList,
selectList: newSelectList,
allChecked: selectCount === list.length,
selectCount,

View File

@@ -1,8 +1,8 @@
import { deleteInvoiceInfo, getInvoiceInfoList } from "../../service/invoice";
// pages/invoiceList/index.js
import { deleteInvoiceInfo } from "../../service/invoice";
import { alertInfo, alertSuccess, wxModal } from "../../utils/index";
import request from '../../utils/request'
const { OK } = request
// pages/invoiceList/index.js
Page({
/**
@@ -32,24 +32,6 @@ Page({
active: Number(tab)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.init();
},
async init() {
// const { data, code, message } = await getInvoiceInfoList()
// this.setData({ list: data })
},
operate(e) {
const { data } = e.currentTarget.dataset;
this.setData({
@@ -94,38 +76,4 @@ Page({
url: '/pages/editInvoice/index?id=-1',
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})