修改二维码
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user