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