|
@@ -9,57 +9,82 @@ Page({
|
|
|
data: {
|
|
|
src: '/image/detail.jpg',
|
|
|
src1: '/image/head1.png',
|
|
|
+ fileList: '/image/head1.png',
|
|
|
frameStyle: { useTop: false, name: '参赛阵容', leftArrow: false, useBar: false },
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
lists: [
|
|
|
{
|
|
|
- id: '1',name:'老头1',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头1', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头2',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头2', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头3',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头3', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头4',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头4', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头5',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头5', head: '/image/tou.png'
|
|
|
}
|
|
|
],
|
|
|
list: [
|
|
|
{
|
|
|
- id: '1',name:'老头1',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头1', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头2',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头2', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头3',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头3', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头4',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头4', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头5',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头5', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头6',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头6', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头7',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头7', head: '/image/tou.png'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- id: '1',name:'老头8',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头8', head: '/image/tou.png'
|
|
|
},
|
|
|
{
|
|
|
- id: '1',name:'老头9',head:'/image/tou.png'
|
|
|
+ id: '1', name: '老头9', head: '/image/tou.png'
|
|
|
},
|
|
|
+ {
|
|
|
+ id: '1', name: '老头10', head: '/image/tou.png'
|
|
|
+ }
|
|
|
],
|
|
|
},
|
|
|
+ // 上传图片
|
|
|
+ afterRead: function (event) {
|
|
|
+ const { file } = event.detail;
|
|
|
+ // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
+ wx.uploadFile({
|
|
|
+ url: app.globalData.fileUrl + '/baoan/elimg/upload',
|
|
|
+ filePath: file.url,
|
|
|
+ name: 'file',
|
|
|
+ formData: {},
|
|
|
+ success: (res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.statusCode == '200') {
|
|
|
+ this.setData({ 'el_img': JSON.parse(res.data).uri })
|
|
|
+ let data = [{ name: JSON.parse(res.data).name, url: `${app.globalData.imageUrl}` + JSON.parse(res.data).uri }]
|
|
|
+ this.setData({ fileList: data })
|
|
|
+ } else {
|
|
|
+ wx.showToast({ title: `${res.data.errmsg}`, icon: 'fail', duration: 2000 })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
back: function () {
|
|
|
wx.navigateBack({ url: '/pages/home/index' })
|
|
|
},
|