武田小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.2 KiB

6 months ago
const _app = getApp<IAppOption>();
Page({
data: {
show1: false,
show2: false,
6 months ago
show3: false,
6 months ago
images: [] as any,
description: "",
audios: [] as any,
},
onLoad() {},
6 months ago
handleChooseFile() {
wx.chooseMessageFile({
count: 1,
success(res) {
6 months ago
console.log(res);
6 months ago
},
fail() {
wx.showToast({
6 months ago
icon: "none",
title: "取消选择",
});
6 months ago
},
6 months ago
});
6 months ago
},
handleSubmit() {
wx.navigateTo({
6 months ago
url: "/module1/pages/entryCasesResult/index",
});
},
handlePhoto(e) {
const detail = e.detail;
const images = this.data.images;
this.setData({
images: [
...images,
{
name: detail.name,
url: detail.fileUrl,
isRepeat: 2,
},
],
});
},
handleDelPhoto(e) {
const { index } = e.currentTarget.dataset;
this.setData({
images: this.data.images.filter((_, i) => i !== Number(index)),
});
},
handleAudio(e) {
this.setData({
audios: [
...this.data.audios,
{
name: e.detail.name,
url: e.detail.fileUrl,
duration: e.detail.duration,
isRepeat: 2,
},
],
});
6 months ago
},
6 months ago
});