|
@@ -11,7 +11,7 @@ Page({
|
|
|
frameStyle: { useTop: true, name: '信息管理', leftArrow: true, useBar: false },
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
- id:'',
|
|
|
+ id: '',
|
|
|
form: {},
|
|
|
// 弹框
|
|
|
dialog: { title: '添加商品', show: false, type: '1' },
|
|
@@ -90,12 +90,18 @@ Page({
|
|
|
this.setData({ 'twoorderForm.type_name': data.name })
|
|
|
},
|
|
|
// 上传图片
|
|
|
- afterRead: function (event) {
|
|
|
- console.log(event.detail);
|
|
|
+ imgUpl: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let data = that.data.img_url;
|
|
|
+ data.push(e.detail)
|
|
|
+ that.setData({ img_url: data })
|
|
|
},
|
|
|
// 删除图片
|
|
|
- uploadDelete: function (e) {
|
|
|
- console.log(e.detail);
|
|
|
+ imgDel: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let list = that.data.img_url;
|
|
|
+ let arr = list.filter((i, index) => index != e.detail.index)
|
|
|
+ that.setData({ img_url: arr })
|
|
|
},
|
|
|
twoorderSubmit: function (e) {
|
|
|
console.log(e.detail);
|