fix openLocation fail
This commit is contained in:
@ -198,8 +198,7 @@ Page({
|
||||
});
|
||||
},
|
||||
preview(e: WechatMiniprogram.BaseEvent) {
|
||||
const journalIndex = e.target.dataset.journalIndex;
|
||||
const itemIndex = e.target.dataset.itemIndex;
|
||||
const { journalIndex, itemIndex } = e.currentTarget.dataset;
|
||||
const items = this.data.list[journalIndex].items;
|
||||
const total = items.length;
|
||||
|
||||
@ -219,7 +218,7 @@ Page({
|
||||
})
|
||||
},
|
||||
openLocation(e: WechatMiniprogram.BaseEvent) {
|
||||
const journalIndex = e.target.dataset.journalIndex;
|
||||
const { journalIndex } = e.currentTarget.dataset;
|
||||
const journal = this.data.list[journalIndex] as Journal;
|
||||
if (journal.lat && journal.lng) {
|
||||
wx.openLocation({
|
||||
|
||||
@ -125,8 +125,7 @@ Page({
|
||||
});
|
||||
},
|
||||
preview(e: WechatMiniprogram.BaseEvent) {
|
||||
const journalIndex = e.target.dataset.journalIndex;
|
||||
const itemIndex = e.target.dataset.itemIndex;
|
||||
const { journalIndex, itemIndex } = e.currentTarget.dataset;
|
||||
const items = this.data.list[journalIndex].items;
|
||||
const total = items.length;
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ Page({
|
||||
});
|
||||
},
|
||||
toLuggageList(e: WechatMiniprogram.BaseEvent) {
|
||||
const name = e.target.dataset.name;
|
||||
const { name } = e.currentTarget.dataset;
|
||||
wx.setStorageSync("luggage", {
|
||||
name,
|
||||
luggage: this.data.luggage
|
||||
@ -91,8 +91,7 @@ Page({
|
||||
})
|
||||
},
|
||||
preview(e: WechatMiniprogram.BaseEvent) {
|
||||
const index = e.target.dataset.index;
|
||||
const imageIndex = e.target.dataset.imageIndex;
|
||||
const { index, imageIndex } = e.currentTarget.dataset;
|
||||
const images = this.data.guides[index].images;
|
||||
wx.previewMedia({
|
||||
current: imageIndex,
|
||||
|
||||
Reference in New Issue
Block a user