|
@@ -5,9 +5,26 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
- frameStyle: { useTop: false, name: '首页', leftArrow: false, useBar: false },
|
|
|
+ frameStyle: { useTop: true, name: '系统首页', leftArrow: false, useBar: false },
|
|
|
// 主体高度
|
|
|
infoHeight: '',
|
|
|
+ // 上传图片
|
|
|
+ imgList: []
|
|
|
+ },
|
|
|
+
|
|
|
+ // 上傳圖片
|
|
|
+ imgUpl: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let data = that.data.imgList;
|
|
|
+ data.push(e.detail)
|
|
|
+ that.setData({ imgList: data })
|
|
|
+ },
|
|
|
+ // 删除图片
|
|
|
+ imgDel: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let list = that.data.imgList;
|
|
|
+ let arr = list.filter((i, index) => index != e.detail.index)
|
|
|
+ that.setData({ imgList: arr })
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
@@ -23,7 +40,7 @@ Page({
|
|
|
wx.getStorage({
|
|
|
key: 'token',
|
|
|
success: res => {
|
|
|
- if (res.data) wx.redirectTo({ url: '/pages/home/index', })
|
|
|
+ // if (res.data) wx.redirectTo({ url: '/pages/home/index', })
|
|
|
},
|
|
|
fail: res => {
|
|
|
wx.redirectTo({ url: '/pages/login/index', })
|