1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- // components/parking-order.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- occupyOrder:{
- type: Array,
- value: []
- },
- showPopup:{
- type: Boolean,
- value: false
- }
- },
- lifetimes:{
- attached(){
- // this.loadOccupyOrder();
- // 页面加载时显示弹窗
- let isLogin = wx.getStorageSync('isLogin');
- if (isLogin) {
- this.loadOccupyOrder();
- }
- },
- },
- pageLifetimes:{
- // 组件所在页面的生命周期函数
- show: function () {
- // let isLogin = wx.getStorageSync('isLogin');
- // if (isLogin) {
- // this.loadOccupyOrder();
- // }
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- showPopup: false,
- occupyFeeOrderList:[]
- },
- /**
- * 组件的方法列表
- */
- methods: {
- loadOccupyOrder(){
- let that = this;
- wx.request({
- url: getApp().globalData.postHeadAgreement +'/restapi/wechat/queryOccupyFeeOrder',
- data: {
- userId: wx.getStorageSync('userInfo').userId,
- searchIndex: 2,
- pagenum: this.data.pagenum++,
- pagesize: 10,
- },
- method: 'POST',
- success(res) {
- console.log("占位费",res);
- // if (res.data.result.total > 0) {
- // that.setData({
- // showPopup:true
- // })
- // }
- if (res.data.result) {
- let {
- rows: occupyFeeOrderList,
- } = res.data.result;
- that.setData({
- occupyFeeOrderList: that.data.occupyFeeOrderList.concat(occupyFeeOrderList),
- });
- }
- }
- });
- },
- handleConfirm() {
- // 点击确认按钮
- this.setData({
- showPopup: false
- });
- },
-
- handleContact() {
- // 联系客服
- wx.makePhoneCall({
- phoneNumber: '18888888888' // 替换为实际的客服电话
- });
- },
- }
- })
|