日照项目的居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

62 lines
1.2 KiB

import request from "@config/rerquest";
import { wxRequestPost,wxNavigateTo } from "@utils/promise-wx-api";
const app = getApp();
Component({
properties: {
},
data: {
msgNum: 0,
},
pageLifetimes: {
//页面被naviback时不走attached,添加show方法以修复已读返回后不刷新状态
async show() {
console.log("reload");
await this.getMyMessage();
},
},
lifetimes: {
async attached() {
await this.getMyMessage();
},
detached: function () {},
},
methods: {
async getMyMessage() {
let {msgNum} = this.data
const url = "resi/partymember/icPartyMember/partyinfo"
let params = {}
const {
data: {
data: { code, data },
},
msg,
} = await wxRequestPost(url, params)
if (msg === "success" && code === 0) {
msgNum = data.count
}
this.setData({
msgNum,
});
},
//点击弹出
btntap() {
wxNavigateTo("/subpages/partyHelper/pages/index/index", {});
},
},
});