12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- "use strict";
- const app = getApp()
- Component({
- properties: {
- list: {
- type: Array,
- value: []
- }
- },
- observers: {
- "list": function (cur) {
- let videoList = (cur|| []).reverse()
- videoList = videoList.map(v=>{
- v.videoImg = v.clips[0].snaps[0]
- return v
- })
- this.setData({
- videoList
- })
- }
- },
- data: {
- slideButtons: [
- {
- type: 'warn',
- text: '删除',
- data: {
- }
- }
- ],
- videoList: [
- {}
- ]
- },
- ready() {
- },
- methods: {
- slideButtonTap: function (e) {
- wx.navigateTo({
- url: "/pages/video/video?select=" + e.currentTarget.dataset.index
- });
- },
- slideBtn(e) {
- app.globalData.generate.splice(e.currentTarget.dataset.index, 1);
- wx.setStorageSync('generated', JSON.stringify(app.globalData.generate))
- this.setData({
- videoList: app.globalData.generate
- })
- }
- }
- });
|