This commit is contained in:
qiaomu 2024-04-09 10:43:58 +08:00
parent 417ba1454c
commit ba1817583d
12 changed files with 109 additions and 41 deletions

View File

@ -1,14 +1,14 @@
{ {
"pages": [ "pages": [
"pages/login/index",
"pages/home/index", "pages/home/index",
"pages/invoiceList/index",
"pages/member/index",
"pages/login/index",
"pages/handleLogin/index",
"pages/my/index", "pages/my/index",
"pages/rechargeRecord/index", "pages/rechargeRecord/index",
"pages/invoiceList/index",
"pages/waitApprove/index", "pages/waitApprove/index",
"pages/apply/index", "pages/apply/index",
"pages/member/index",
"pages/handleLogin/index",
"pages/qrCode/index", "pages/qrCode/index",
"pages/meterList/index", "pages/meterList/index",
"pages/recharge/index", "pages/recharge/index",

View File

@ -71,7 +71,6 @@ Page({
alertInfo("请输入你的昵称") alertInfo("请输入你的昵称")
return return
} }
let err = ""
loadingFunc(async () => { loadingFunc(async () => {
const wxLoginCode = await wxLogin() const wxLoginCode = await wxLogin()
const { code, message, data } = await userValidate({ park, tenement, phone, name, code: wxLoginCode }) const { code, message, data } = await userValidate({ park, tenement, phone, name, code: wxLoginCode })

View File

@ -1,3 +1,5 @@
import { getInvoiceInfoList } from "../../../../service/invoice"
// pages/invoiceList/components/info/index.js // pages/invoiceList/components/info/index.js
Component({ Component({
@ -7,7 +9,11 @@ Component({
properties: { properties: {
}, },
lifetimes: {
attached() {
getInvoiceInfoList()
}
},
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */

View File

@ -12,13 +12,24 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
chooseList: []
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onChange(e) {
const { id } = e.currentTarget.dataset;
let newList = this.data.chooseList;
if (e.detail) {
newList = [...new Set([...newList, id])]
} else {
newList = newList.filter(item => item !== id);
}
this.setData({
chooseList: newList,
})
}
} }
}) })

View File

@ -1,4 +1,6 @@
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {
"van-checkbox": "@vant/weapp/checkbox/index"
}
} }

View File

@ -1,2 +1,25 @@
<!--pages/invoiceList/components/notyet/index.wxml-->
<text>pages/invoiceList/components/notyet/index.wxml</text> <van-checkbox-group value="{{ chooseList }}" bind:change="onChange" max="{{ 2 }}">
<view class="cardWrapper">
<view class="content">
<view class="left">
<view class="top">
<van-checkbox name="{{12}}" shape="square" bind:change="onChange" data-id="12" />
<view class="month">1月份</view>
<view class="address"> 软C306 </view>
</view>
<view class="middle">
河北创新风华科技有限公司
</view>
<view class="bottom">
2024年1月1日-2024年1月31日
</view>
</view>
<view class="right">
待开票
</view>
</view>
</view>
</van-checkbox-group>

View File

@ -1 +1,37 @@
/* pages/invoiceList/components/notyet/index.wxss */ /* pages/invoiceList/components/notyet/index.wxss */
.cardWrapper {
margin: 30rpx 32rpx 30rpx;
position: relative;
padding: 30rpx 40rpx;
background-color: #fff;
border-radius: 20rpx;
}
.top {
display: flex;
}
.top .address {
margin-left: 36rpx;
}
.middle {
margin-top: 26rpx;
font-size: 32rpx;
}
.bottom {
margin-top: 24rpx;
font-size: 32rpx;
}
.right {
position: absolute;
top: 0;
right: 0;
font-size: 30rpx;
background-color: rgb(239,227,227);
padding: 14rpx 24rpx;
border-radius: 18rpx;
color: rgb(224, 106, 106)
}

View File

@ -40,8 +40,8 @@ Page({
this.init(); this.init();
}, },
async init() { async init() {
const { data, code, message } = await getInvoiceInfoList() // const { data, code, message } = await getInvoiceInfoList()
this.setData({ list: data }) // this.setData({ list: data })
}, },
operate(e) { operate(e) {
const { data } = e.currentTarget.dataset; const { data } = e.currentTarget.dataset;

View File

@ -1,15 +1,3 @@
/* pages/invoiceList/index.wxss */ page {
.wrapper { background-color: rgb(228,240,236);
margin-left: 24rpx;
margin-right: 24rpx;
}
.item {
display: flex;
align-items: center;
margin: 10rpx 0;
}
.operate {
display: flex;
} }

View File

@ -34,10 +34,10 @@ Component({
async init() { async init() {
const result = await getApproveList(1) const result = await getApproveList(1)
const { code, message, data } = result; const { code, message, data } = result;
// if (code !== OK) { if (code !== OK) {
// alertInfo(message) alertInfo(message)
// return; return;
// } }
this.setData({ this.setData({
list: data list: data
}) })

View File

@ -1,6 +1,7 @@
import { alertInfo } from "../../utils/index"; import { alertInfo } from "../../utils/index";
import Dialog from '@vant/weapp/dialog/dialog'; import Dialog from '@vant/weapp/dialog/dialog';
import { getUserInfo } from "../../service/user"; import { getUserInfo } from "../../service/user";
import { getDot } from "../../utils/system";
import request from "../../utils/request" import request from "../../utils/request"
const { OK } = request; const { OK } = request;
@ -46,15 +47,15 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
// const user = wx.getStorageSync('user'); const user = wx.getStorageSync('user');
// if (!user || !user.id) { if (!user || !user.id) {
// wx.switchTab({ wx.switchTab({
// url: '/pages/home/index', url: '/pages/home/index',
// }) })
// alertInfo("请先登录"); alertInfo("请先登录");
// return false; return false;
// } }
// this.init() this.init()
getDot(); getDot();
}, },
async init() { async init() {

View File

@ -4,11 +4,13 @@ const { OK } = request
export const getDot = async () => { export const getDot = async () => {
console.log("获取dot数")
const user = wx.getStorageSync('user') const user = wx.getStorageSync('user')
if (!user || !user.id) { if (!user || !user.id) {
return; return;
} }
const { code, message, data } = await getUnReadApproveNumber(); const { code, message, data } = await getUnReadApproveNumber();
console.log('data', data)
if (data > 0) { if (data > 0) {
wx.showTabBarRedDot({ wx.showTabBarRedDot({
index: 1, index: 1,