提交
This commit is contained in:
parent
417ba1454c
commit
ba1817583d
8
app.json
8
app.json
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/login/index",
|
||||
"pages/home/index",
|
||||
"pages/invoiceList/index",
|
||||
"pages/member/index",
|
||||
"pages/login/index",
|
||||
"pages/handleLogin/index",
|
||||
"pages/my/index",
|
||||
"pages/rechargeRecord/index",
|
||||
"pages/invoiceList/index",
|
||||
"pages/waitApprove/index",
|
||||
"pages/apply/index",
|
||||
"pages/member/index",
|
||||
"pages/handleLogin/index",
|
||||
"pages/qrCode/index",
|
||||
"pages/meterList/index",
|
||||
"pages/recharge/index",
|
||||
|
|
|
@ -71,7 +71,6 @@ Page({
|
|||
alertInfo("请输入你的昵称")
|
||||
return
|
||||
}
|
||||
let err = ""
|
||||
loadingFunc(async () => {
|
||||
const wxLoginCode = await wxLogin()
|
||||
const { code, message, data } = await userValidate({ park, tenement, phone, name, code: wxLoginCode })
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { getInvoiceInfoList } from "../../../../service/invoice"
|
||||
|
||||
// pages/invoiceList/components/info/index.js
|
||||
Component({
|
||||
|
||||
|
@ -7,7 +9,11 @@ Component({
|
|||
properties: {
|
||||
|
||||
},
|
||||
|
||||
lifetimes: {
|
||||
attached() {
|
||||
getInvoiceInfoList()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
|
|
|
@ -12,13 +12,24 @@ Component({
|
|||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
chooseList: []
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
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,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"van-checkbox": "@vant/weapp/checkbox/index"
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
@ -1 +1,37 @@
|
|||
/* 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)
|
||||
}
|
|
@ -40,8 +40,8 @@ Page({
|
|||
this.init();
|
||||
},
|
||||
async init() {
|
||||
const { data, code, message } = await getInvoiceInfoList()
|
||||
this.setData({ list: data })
|
||||
// const { data, code, message } = await getInvoiceInfoList()
|
||||
// this.setData({ list: data })
|
||||
},
|
||||
operate(e) {
|
||||
const { data } = e.currentTarget.dataset;
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
/* pages/invoiceList/index.wxss */
|
||||
.wrapper {
|
||||
margin-left: 24rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
page {
|
||||
background-color: rgb(228,240,236);
|
||||
}
|
|
@ -34,10 +34,10 @@ Component({
|
|||
async init() {
|
||||
const result = await getApproveList(1)
|
||||
const { code, message, data } = result;
|
||||
// if (code !== OK) {
|
||||
// alertInfo(message)
|
||||
// return;
|
||||
// }
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
list: data
|
||||
})
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { alertInfo } from "../../utils/index";
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import { getUserInfo } from "../../service/user";
|
||||
import { getDot } from "../../utils/system";
|
||||
import request from "../../utils/request"
|
||||
const { OK } = request;
|
||||
|
||||
|
@ -46,15 +47,15 @@ Page({
|
|||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
// const user = wx.getStorageSync('user');
|
||||
// if (!user || !user.id) {
|
||||
// wx.switchTab({
|
||||
// url: '/pages/home/index',
|
||||
// })
|
||||
// alertInfo("请先登录");
|
||||
// return false;
|
||||
// }
|
||||
// this.init()
|
||||
const user = wx.getStorageSync('user');
|
||||
if (!user || !user.id) {
|
||||
wx.switchTab({
|
||||
url: '/pages/home/index',
|
||||
})
|
||||
alertInfo("请先登录");
|
||||
return false;
|
||||
}
|
||||
this.init()
|
||||
getDot();
|
||||
},
|
||||
async init() {
|
||||
|
|
|
@ -4,11 +4,13 @@ const { OK } = request
|
|||
|
||||
|
||||
export const getDot = async () => {
|
||||
console.log("获取dot数")
|
||||
const user = wx.getStorageSync('user')
|
||||
if (!user || !user.id) {
|
||||
return;
|
||||
}
|
||||
const { code, message, data } = await getUnReadApproveNumber();
|
||||
console.log('data', data)
|
||||
if (data > 0) {
|
||||
wx.showTabBarRedDot({
|
||||
index: 1,
|
||||
|
|
Loading…
Reference in New Issue
Block a user