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.
|
|
|
const _app = getApp<IAppOption>();
|
|
|
|
|
|
|
|
Page({
|
|
|
|
data: {
|
|
|
|
show1: false,
|
|
|
|
show2: false,
|
|
|
|
show3: false,
|
|
|
|
|
|
|
|
images: [] as any,
|
|
|
|
description: "",
|
|
|
|
audios: [] as any,
|
|
|
|
files: [] as any,
|
|
|
|
},
|
|
|
|
onLoad() {},
|
|
|
|
handleSubmit() {
|
|
|
|
wx.navigateTo({
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|
|
|
|
},
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export {};
|