武田小程序
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.

76 lines
1.4 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,
6 months ago
files: [] as any,
},
onLoad() {},
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
handleDelAudio(e) {
const { index } = e.currentTarget.dataset;
this.setData({
audios: this.data.audios.filter((_, i) => i !== Number(index)),
});
},
handleFile(e) {
this.setData({
files: [
...this.data.files,
{
fileType: 99,
name: e.detail.name,
url: e.detail.fileUrl,
size: e.detail.size,
isRepeat: 2,
},
],
});
},
6 months ago
});
6 months ago
export {};