修改二维码

This commit is contained in:
2024-04-25 08:51:18 +08:00
parent ff36356543
commit 994d6155a2
7 changed files with 87 additions and 30 deletions

View File

@@ -11,16 +11,19 @@ Page({
* 页面的初始数据
*/
data: {
list: [],
urls: [],
indexs: [],
// list: [],
// urls: [],
// indexs: [],
url: "",
tenement: wx.getStorageSync('tenement')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList()
// this.getList()
this.getCode()
},
async getList() {
const { code, message, data } = await getOwnTenementList()
@@ -38,20 +41,24 @@ Page({
})
},
async getCode(e, that) {
const { index, id } = e.currentTarget.dataset;
const { code, message, data } = await getWxCode(id)
// const { index, id } = e.currentTarget.dataset;
const tenement = this.data.tenement;
const { code, message, data } = await getWxCode(tenement.id)
if (code !== OK) {
alertInfo(message)
return;
}
const newUrls = that.data.urls;
newUrls[index] = data;
const newIndexs = that.data.indexs;
newIndexs[index] = true;
that.setData({
urls: newUrls,
indexs: newIndexs,
this.setData({
url: data
})
// const newUrls = that.data.urls;
// newUrls[index] = data;
// const newIndexs = that.data.indexs;
// newIndexs[index] = true;
// that.setData({
// urls: newUrls,
// indexs: newIndexs,
// })
},
look(e) {
const that = this;