| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- const {
- postApi
- } = require("../../../apis/api")
- // pages/voyageManage/myDaily/myDaily.js
- const app = getApp()
- Page({
- data: {
- medias: [],
- voyageId: 0,
- trans: '',
- currentIndex: -1
- },
- check(e) {
- this.setData({
- currentIndex: e.currentTarget.dataset.index,
- })
- },
- async getMedias() {
- let res = await postApi("/dayReport/getMedia", {
- loginAccountId: wx.getStorageSync('loginAccountId'),
- voyageId: this.data.voyageId
- })
- this.setData({
- medias: res.data.result
- })
- },
- onLoad(options) {
- this.setData({
- voyageId: options.id,
- trans: options.trans
- })
- this.getMedias()
- },
- examineMedia() {
- if (this.data.currentIndex == -1) {
- wx.showToast({
- title: '请选择一张图片',
- icon: "error"
- })
- return
- }
- app.globalData.currentExamineMedia = this.data.medias[this.data.currentIndex]
- wx.navigateTo({
- url: `/pages/voyageManage/myDaily/examine/examine?id=${this.data.voyageId}&trans=${this.data.trans}`,
- })
- },
- onShareAppMessage() {
- }
- })
|