master
Tuisku 3 years ago
parent 03783e4661
commit fa7a2559cf

@ -75,7 +75,9 @@
"l-arc-popup": "/miniprogram_npm/lin-ui/arc-popup/index",
"l-dialog": "/miniprogram_npm/lin-ui/dialog/index",
"l-collapse": "/miniprogram_npm/lin-ui/collapse/index",
"l-collapse-item": "/miniprogram_npm/lin-ui/collapse-item/index"
"l-collapse-item": "/miniprogram_npm/lin-ui/collapse-item/index",
"pic-show":"/components/picshow/picshow"
},
"style": "v2",
"sitemapLocation": "sitemap.json"

@ -0,0 +1,123 @@
// components/picshow/picshow.js
import {lookup} from '../../utils/util'
Component({
/**
* 组件的属性列表
*/
properties: {
tempPics: {
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
columnsHeight: [0, 0],
isLoading: true,
columns: [
[],
[]
],
cdn: getApp().globalData.cdn,
},
/**
* 组件的方法列表
*/
methods: {
//获取图片尺寸数据
loadPic(e) {
console.log(1)
var that = this,
data = that.data,
tempPics = data.tempPics,
index = e.currentTarget.dataset.index
if (tempPics[index]) {
//以750为宽度算出相对应的高度
tempPics[index].height = e.detail.height * 750 / e.detail.width
tempPics[index].isLoad = true
}
that.setData({
tempPics: tempPics
}, function() {
that.finLoadPic()
})
},
//图片加载错误处理
loadPicError: function(e) {
var that = this,
data = that.data,
tempPics = data.tempPics,
index = e.currentTarget.dataset.index
if (tempPics[index]) {
//图片加载错误时高度固定750展示为正方形
tempPics[index].height = 750
tempPics[index].isLoad = true
}
that.setData({
tempPics: tempPics
}, function() {
that.finLoadPic()
})
},
//判断图片是否加载完成
finLoadPic: function() {
var that = this,
data = that.data,
tempPics = data.tempPics,
length = tempPics.length,
fin = true
for (var i = 0; i < length; i++) {
if (!tempPics[i].isLoad) {
fin = false
break
}
}
if (fin) {
// wx.hideLoading()
if (that.data.isLoading) {
that.data.isLoading = false
that.renderPage()
}
}
},
//渲染到瀑布流
renderPage: function() {
var that = this,
data = that.data,
columns = data.columns,
tempPics = data.tempPics,
length = tempPics.length,
columnsHeight = that.data.columnsHeight,
index = 0
for (var i = 0; i < length; i++) {
index = columnsHeight[1] < columnsHeight[0] ? 1 : 0
columns[index].push(tempPics[i])
columnsHeight[index] += tempPics[i].height
}
that.setData({
columns: columns,
tempPics: []
})
that.data.columnsHeight = columnsHeight
},
//加载数据
loadData: function() {
var that = this
if (!that.data.isLoading) {
wx.showLoading()
this.setData({
isLoading: true
})
console.log(this.data.tempPics)
}
},
//跳转详情
to(e) {
lookup(e.currentTarget.dataset.item)
},
}
})

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

@ -0,0 +1,14 @@
<!--components/picshow/picshow.wxml-->
<view class="main">
<view wx:for="{{columns}}" wx:key="index" class="column">
<view wx:for="{{item}}" wx:key="index" class="column_item" wx:for-item="pics">
<!-- 收藏标志 -->
<image class="shouca" src="/images/ic_shouc@2x.png" wx:if="{{pics.isCollected}}"></image>
<image class="shouca" src="" wx:else="{{true}}"></image>
<image src="{{pics.type===1?cdn+pics.coverUrl:cdn+pics.fileUrl}}" class="column_pic" mode="widthFix" data-item="{{pics}}" bindtap="to" />
</view>
</view>
</view>
<view class="hide">
<image wx:for="{{tempPics}}" wx:key="index" src="{{item.type===1?cdn+item.coverUrl:cdn+item.fileUrl}}" bindload="loadPic" binderror="loadPicError" data-index="{{index}}" />
</view>

@ -0,0 +1,39 @@
/* components/picshow/picshow.wxss */
.main {
display: flex;
align-items: flex-start;
}
.column {
/* width: 50%; */
margin-top: -32rpx;
}
.column_item {
width: 333rpx;
/* background: #fff; */
/* margin: 30rpx auto; */
/* box-shadow: 5rpx 5rpx 10rpx 0 rgba(0, 0, 0, 0.3); */
margin-right: 20rpx;
overflow: hidden;
margin-bottom: -12rpx;
}
.column_pic {
display: block;
width: 333rpx;
height: 350rpx;
border-radius: 16rpx;
}
.hide {
display: none;
}
.shouca {
width: 32rpx;
height: 32rpx;
position: relative;
top: 50rpx;
left: 290rpx;
}

@ -50,7 +50,7 @@ Page({
})
this.getbrandlist()
},
to (e) {
to(e) {
wx.navigateTo({
url: e.currentTarget.dataset.url + '?id=' + e.currentTarget.dataset.id + '&name=' + e.currentTarget.dataset.name,
})
@ -60,7 +60,6 @@ Page({
console.log(res)
this.setData({
demo: res.data.records,
})
wx.lin.renderWaterFlow(this.data.demo)
})

@ -10,7 +10,7 @@
</view>
<!-- 瀑布卡片 -->
<view class="flow">
<l-water-flow generic:l-water-flow-item="s-spu-preview"></l-water-flow>
</view>
<l-water-flow generic:l-water-flow-item="s-spu-preview"></l-water-flow>
</view>
</view>
<!-- “s-spu-preview”为自定义组件的名称与在app.json导入的一致 -->

@ -234,12 +234,10 @@ Page({
duration: 2000,
mask: true,
});
let fileMgr = wx.getFileSystemManager();
fileMgr.unlink({
filePath: wx.env.USER_DATA_PATH + '/' + fileName + '.mp4',
success: function (r) {
},
})
},

@ -5,12 +5,12 @@
</video>
</view>
<view class="video" wx:if="{{infoObject.type===2}}">
<image mode="widthFix" src="{{cdn+(infoObject.cover)}}" style="width: 100%;">
<image mode="widthFix" src="{{cdn+(infoObject.content)}}" style="width: 100%;">
<!-- <l-icon name="left" color="black" size="48" class="back" bindtap="back" /> -->
</image>
</view>
<view class="video" wx:if="{{infoObject.type===3}}">
<image src="{{cdn+(infoObject.cover)}}" style="width: 100%;height: 100%;">
<image src="{{cdn+(infoObject.content)}}" style="width: 100%;height: 100%;">
<!-- <l-icon name="left" color="black" size="48" class="back" bindtap="back" /> -->
</image>
</view>

@ -123,6 +123,7 @@
.count {
position: absolute;
margin-left: 646rpx;
text-align: right;
}
.rank_num {

@ -65,7 +65,8 @@ Page({
brandIdList: [],
keyword: '',
cdn: getApp().globalData.cdn,
searchid: ''
searchid: '',
flag: true
},
/**
* 生命周期函数--监听页面加载
@ -113,16 +114,19 @@ Page({
brandIdList: [this.data.searchid],
keyword: this.data.keyword
}).then(res => {
let arr = res.data.records
for (let index = 0; index < arr.length; index++) {
arr[index].all = false
arr[index].referenceList.forEach(el=>{
el.choose = false
el.father = index
let arr = []
res.data.records.forEach(el => {
el.referenceList.forEach(e => {
arr.push(e)
})
}
})
this.setData({
flag: false
})
this.setData({
listdata: arr
listdata: arr,
max: res.data.pages,
flag: true
})
})
},

@ -20,49 +20,7 @@
<view class="{{showOrHide?'shadow':''}}" bind:tap="closeMask" />
<!-- 素材展示 -->
<view class="mat">
<view class="mat_card" wx:for="{{listdata}}" wx:key="index" data-day="{{index}}">
<view class="card_top">
{{item.dat}}
<button class="allin" wx:if="{{choose}}" data-index="{{index}}" bindtap="chooseall">{{item.all?'全不选':'全选'}}</button>
</view>
<view class="cards">
<!-- 单张素材 -->
<view class="card" wx:for="{{item.referenceList}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" data-url="/pages/lookup/loockvideo/video" bindtap="to" capture-bind:longtap="tochoose">
<!-- <view class="card" wx:for="{{item.refrence}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" bindtap="to"> -->
<!-- 封面图片 -->
<image mode="aspectFill" style="width: 144rpx;height: 144rpx;border-radius: 8rpx;" src="{{item.type===1?cdn+item.coverUrl:cdn+item.fileUrl}}"></image>
<!-- 左下角播放时长 -->
<!-- <view class="time">
<image style="width: 16rpx;height: 18rpx;margin-right: 5rpx;" src="/images/img_bofang@2x.png"></image>03:32
</view> -->
<!-- 收藏标志 -->
<image class="shouca" src="/images/ic_shouc@2x.png" wx:if="{{item.isCollected}}"></image>
<image class="shouca" src="" wx:else="{{true}}"></image>
<!-- 多选 -->
<view wx:if="{{choose}}" wx:key="index" class="choose {{item.choose?'active':'non'}}" data-data="{{item}}" data-index="{{index}}" catchtap="choose"></view>
</view>
</view>
</view>
<!-- 加载更多 -->
<button style="color: #D0D0D0;" bindtap="getmore">加载更多</button>
<pic-show wx:if="{{flag}}" tempPics="{{listdata}}" id="pic"></pic-show>
<button style="color: #D0D0D0;margin-top: 20rpx;" bindtap="getmore">加载更多</button>
</view>
<!-- 批量操作 -->
<view class="operation" wx:if="{{choose}}">
<button class="one" plain="{{true}}" bindtap="tochoose">
<l-icon name="error" style="width: 48rpx;height: 34rpx;margin-top: 16rpx;" size="40" color="#006BFF"></l-icon>
退出多选
</button>
<button class="one" plain="{{true}}" bindtap="add">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_shoucang@3x.png"></image>
收藏
</button>
<button class="one" plain="{{true}}" bindtap="del">
<image style="width: 48rpx;height: 48rpx;" src="/images/ic_shouc@2x.png"></image>
取消收藏
</button>
<button class="one" plain="{{true}}" data-url="{{cdn+data.fileUrl}}" bindtap="batchdown">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_baocun@3x.png"></image>
保存
</button>
</view>
</view>

@ -239,4 +239,30 @@
border: none!important;
margin: 0rpx!important;
/* padding: 0rpx!important; */
}
.main {
display: flex;
align-items: flex-start;
}
.column {
/* width: 50%; */
}
.column_item {
width: 334rpx;
background: #fff;
margin: 30rpx auto;
box-shadow: 5rpx 5rpx 10rpx 0 rgba(0, 0, 0, 0.3);
}
.column_pic {
display: block;
width: 334rpx;
height: 350rpx;
}
.hide {
display: none;
}

@ -65,7 +65,8 @@ Page({
brandIdList: [],
keyword: '',
cdn: getApp().globalData.cdn,
tagid: ''
tagid: '',
flag:true
},
/**
* 生命周期函数--监听页面加载
@ -112,16 +113,19 @@ Page({
brandIdList: this.data.brandIdList[0]?this.data.brandIdList:[],
keyword: this.data.keyword
}).then(res => {
let arr = res.data.records
for (let index = 0; index < arr.length; index++) {
arr[index].all = false
arr[index].referenceList.forEach(el=>{
el.choose = false
el.father = index
let arr = []
res.data.records.forEach(el => {
el.referenceList.forEach(e => {
arr.push(e)
})
}
})
this.setData({
flag: false
})
this.setData({
listdata: arr
listdata: arr,
max: res.data.pages,
flag: true
})
})
},

@ -20,49 +20,7 @@
<view class="{{showOrHide?'shadow':''}}" bind:tap="closeMask" />
<!-- 素材展示 -->
<view class="mat">
<view class="mat_card" wx:for="{{listdata}}" wx:key="index" data-day="{{index}}">
<view class="card_top">
{{item.dat}}
<button class="allin" wx:if="{{choose}}" data-index="{{index}}" bindtap="chooseall">{{item.all?'全不选':'全选'}}</button>
</view>
<view class="cards">
<!-- 单张素材 -->
<view class="card" wx:for="{{item.referenceList}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" data-url="/pages/lookup/loockvideo/video" bindtap="to" capture-bind:longtap="tochoose">
<!-- <view class="card" wx:for="{{item.refrence}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" bindtap="to"> -->
<!-- 封面图片 -->
<image mode="aspectFill" style="width: 144rpx;height: 144rpx;border-radius: 8rpx;" src="{{item.type===1?cdn+item.coverUrl:cdn+item.fileUrl}}"></image>
<!-- 左下角播放时长 -->
<!-- <view class="time">
<image style="width: 16rpx;height: 18rpx;margin-right: 5rpx;" src="/images/img_bofang@2x.png"></image>03:32
</view> -->
<!-- 收藏标志 -->
<image class="shouca" src="/images/ic_shouc@2x.png" wx:if="{{item.isCollected}}"></image>
<image class="shouca" src="" wx:else="{{true}}"></image>
<!-- 多选 -->
<view wx:if="{{choose}}" wx:key="index" class="choose {{item.choose?'active':'non'}}" data-data="{{item}}" data-index="{{index}}" catchtap="choose"></view>
</view>
</view>
</view>
<!-- 加载更多 -->
<button style="color: #D0D0D0;" bindtap="getmore">加载更多</button>
<pic-show wx:if="{{flag}}" tempPics="{{listdata}}" id="pic"></pic-show>
<button style="color: #D0D0D0;margin-top: 20rpx;" bindtap="getmore">加载更多</button>
</view>
<!-- 批量操作 -->
<view class="operation" wx:if="{{choose}}">
<button class="one" plain="{{true}}" bindtap="tochoose">
<l-icon name="error" style="width: 48rpx;height: 34rpx;margin-top: 16rpx;" size="40" color="#006BFF"></l-icon>
退出多选
</button>
<button class="one" plain="{{true}}" bindtap="add">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_shoucang@3x.png"></image>
收藏
</button>
<button class="one" plain="{{true}}" bindtap="del">
<image style="width: 48rpx;height: 48rpx;" src="/images/ic_shouc@2x.png"></image>
取消收藏
</button>
<button class="one" plain="{{true}}" data-url="{{cdn+data.fileUrl}}" bindtap="batchdown">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_baocun@3x.png"></image>
保存
</button>
</view>
</view>

@ -239,4 +239,30 @@
border: none!important;
margin: 0rpx!important;
/* padding: 0rpx!important; */
}
.main {
display: flex;
align-items: flex-start;
}
.column {
/* width: 50%; */
}
.column_item {
width: 334rpx;
background: #fff;
margin: 30rpx auto;
box-shadow: 5rpx 5rpx 10rpx 0 rgba(0, 0, 0, 0.3);
}
.column_pic {
display: block;
width: 334rpx;
height: 350rpx;
}
.hide {
display: none;
}

@ -28,8 +28,9 @@
}
.card {
width: 144rpx;
/* width: 144rpx; */
height: 56rpx;
padding: 0rpx 10rpx;
border-radius: 4rpx;
border: 1px solid #FFB17C;
font-size: 24rpx;

@ -1,7 +1,7 @@
<!--pages/lookup/lookimg/img.wxml-->
<!--utils/video/video.wxml-->
<view class="main">
<image mode="widthFix" style="width: 750rpx;" src="{{data.fileUrl?cdn+data.fileUrl:cdn+data.teachRefeFileUrl}}"></image>
<image mode="widthFix" style="width: 750rpx;background-color: black;" src="{{data.fileUrl?cdn+data.fileUrl:cdn+data.teachRefeFileUrl}}"></image>
<view class="bottom">
<view class="title">{{data.title}}</view>
<view class="cards">

@ -29,8 +29,9 @@
}
.card {
width: 144rpx;
/* width: 144rpx; */
height: 56rpx;
padding: 0rpx 10rpx;
border-radius: 4rpx;
border: 1px solid #FFB17C;
font-size: 24rpx;

@ -5,7 +5,6 @@ import {
lookup
} from '../../../../utils/util'
Page({
/**
* 页面的初始数据
*/
@ -34,23 +33,23 @@ Page({
rank: [{
name: '全部日期',
is: true,
month:''
month: ''
}, {
name: '一个月内',
is: false,
month:1
month: 1
}, {
name: '三个月内',
is: false,
month:3
month: 3
}, {
name: '半年内',
is: false,
month:6
month: 6
}, {
name: '一年内',
is: false,
month:12
month: 12
}]
}, {
id: 2,
@ -69,13 +68,14 @@ Page({
id: null,
listdata: [],
cdn: getApp().globalData.cdn,
max: 1,
max: 0,
page: 1,
month: '',
tagIdList: [],
brandIdList: [],
keyword: '',
cdn: getApp().globalData.cdn
cdn: getApp().globalData.cdn,
flag: true
},
/**
* 生命周期函数--监听页面加载
@ -130,32 +130,27 @@ Page({
groupId: Number(this.data.id),
pageNum: this.data.page,
month: this.data.month,
tagIdList: this.data.tagIdList[0]?this.data.tagIdList:[],
brandIdList: this.data.brandIdList[0]?this.data.brandIdList:[],
keyword: this.data.keyword
tagIdList: this.data.tagIdList[0] ? this.data.tagIdList : [],
brandIdList: this.data.brandIdList[0] ? this.data.brandIdList : [],
keyword: this.data.keyword,
}).then(res => {
let arr = res.data.records
for (let index = 0; index < arr.length; index++) {
arr[index].all = false
arr[index].referenceList.forEach(el=>{
el.choose = false
el.father = index
let arr = []
res.data.records.forEach(el => {
el.referenceList.forEach(e => {
arr.push(e)
})
}
})
this.setData({
flag: false
})
this.setData({
listdata: arr
listdata: arr,
max: res.data.pages,
flag: true
})
// this.selectComponent("#pic").loadData()
})
},
to(e) {
if (this.data.choose) {} else {
// wx.navigateTo({
// url: e.currentTarget.dataset.url,
// })
lookup(e.currentTarget.dataset.item)
}
// lookup(e.currentTarget.dataset.item)
},
// 点击菜单栏触发的事件函数
handleClick: function (e) {
const index = e.currentTarget.dataset.id;
@ -228,25 +223,25 @@ Page({
navItem,
selectedItem
})
this.data.selectItem[1].rank.forEach(el=>{
this.data.selectItem[1].rank.forEach(el => {
// console.log(el)
if(el.is){
if (el.is) {
this.setData({
month: el.month
})
}
})
this.data.selectItem[0].rank.forEach(el=>{
this.data.selectItem[0].rank.forEach(el => {
// console.log(el)
if(el.is){
if (el.is) {
this.setData({
'tagIdList[0]': el.id
})
}
})
this.data.selectItem[2].rank.forEach(el=>{
this.data.selectItem[2].rank.forEach(el => {
// console.log(el)
if(el.is){
if (el.is) {
this.setData({
'brandIdList[0]': el.id
})
@ -259,13 +254,13 @@ Page({
})
this.getdata()
},
handleSearch(e){
handleSearch(e) {
console.log(e)
this.setData({
keyword: e.detail,
listdata: [],
max:1,
page:1
max: 1,
page: 1
})
this.getdata()
},
@ -280,13 +275,12 @@ Page({
let c = 'listdata[' + a + '].referenceList[' + b + '].choose'
// console.log(e.currentTarget.dataset.data)
this.setData({
[c] : !this.data.listdata[a].referenceList[b].choose
[c]: !this.data.listdata[a].referenceList[b].choose
})
let flag = true
for (let i = 0; i < this.data.listdata[a].referenceList.length; i++) {
if (this.data.listdata[a].referenceList[i].choose) {
} else {
if (this.data.listdata[a].referenceList[i].choose) {} else {
flag = false
}
}
@ -318,19 +312,19 @@ Page({
batch() {
let arr = []
this.data.listdata.forEach(el => {
el.referenceList.forEach(e=> {
el.referenceList.forEach(e => {
// console.log(e.choose)
if(e.choose){
if (e.choose) {
arr.push(e)
}
})
})
return arr
},
add () {
add() {
let arr = this.batch()
let b = []
arr.forEach(el=>{
arr.forEach(el => {
b.push(el.id)
})
if (b.length === 0) {
@ -338,8 +332,8 @@ Page({
title: '请选择',
icon: 'none',
duration: 1000
})
return 0
})
return 0
}
http("/userReference/addGroup", "post", {
referenceIdList: b
@ -349,7 +343,7 @@ Page({
icon: 'none',
duration: 2000
}).then(res => {
if (re.code === 200){
if (re.code === 200) {
this.setData({
listdata: [],
page: 1
@ -359,10 +353,10 @@ Page({
})
})
},
del () {
del() {
let arr = this.batch()
let b = []
arr.forEach(el=>{
arr.forEach(el => {
b.push(el.id)
})
if (b.length === 0) {
@ -370,8 +364,8 @@ Page({
title: '请选择',
icon: 'none',
duration: 1000
})
return 0
})
return 0
}
http("/userReference/delGroup", "post", {
referenceIdList: b
@ -381,7 +375,7 @@ Page({
icon: 'none',
duration: 2000
}).then(res => {
if (re.code === 200){
if (re.code === 200) {
this.setData({
listdata: [],
page: 1
@ -391,10 +385,10 @@ Page({
})
})
},
batchdown(){
batchdown() {
let arr = this.batch()
let b = []
arr.forEach(el=>{
arr.forEach(el => {
b.push(el.fileUrl)
})
if (b.length === 0) {
@ -402,14 +396,14 @@ Page({
title: '请选择',
icon: 'none',
duration: 1000
})
return 0
})
return 0
}
b.forEach(el=>{
b.forEach(el => {
this.downloadfile(el)
})
},
downloadfile(url){
downloadfile(url) {
wx.showLoading({
title: '正在下载',
mask: true
@ -417,7 +411,7 @@ Page({
console.log(this.data.cdn + url)
//下载文件,生成临时地址
wx.downloadFile({
url: this.data.cdn + url,
url: this.data.cdn + url,
success(res) {
console.log(res)
//保存到本地
@ -425,12 +419,12 @@ Page({
tempFilePath: res.tempFilePath,
success: function (res) {
console.log(res)
console.log('保存到本地',res)
console.log('保存到本地', res)
wx.saveImageToPhotosAlbum({
filePath: res.savedFilePath,
complete(res){
complete(res) {
wx.hideLoading();
console.log('保存到相册',res)
console.log('保存到相册', res)
}
})
},
@ -438,7 +432,7 @@ Page({
wx.hideLoading();
console.log('保存失败:', err)
},
complete(res){
complete(res) {
wx.hideLoading();
console.log(res)
}
@ -459,7 +453,7 @@ Page({
onShow() {
this.setData({
listdata: [],
page: 1
page: 1,
})
this.getdata()
},
@ -489,7 +483,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
this.getdata()
this.getmore()
},
/**

@ -20,49 +20,7 @@
<view class="{{showOrHide?'shadow':''}}" bind:tap="closeMask" />
<!-- 素材展示 -->
<view class="mat">
<view class="mat_card" wx:for="{{listdata}}" wx:key="index" data-day="{{index}}">
<view class="card_top">
{{item.dat}}
<button class="allin" wx:if="{{choose}}" data-index="{{index}}" bindtap="chooseall">{{item.all?'全不选':'全选'}}</button>
</view>
<view class="cards">
<!-- 单张素材 -->
<view class="card" wx:for="{{item.referenceList}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" data-url="/pages/lookup/loockvideo/video" bindtap="to" capture-bind:longtap="tochoose">
<!-- <view class="card" wx:for="{{item.refrence}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" bindtap="to"> -->
<!-- 封面图片 -->
<image mode="aspectFill" style="width: 144rpx;height: 144rpx;border-radius: 8rpx;" src="{{item.type===1?cdn+item.coverUrl:cdn+item.fileUrl}}"></image>
<!-- 左下角播放时长 -->
<!-- <view class="time">
<image style="width: 16rpx;height: 18rpx;margin-right: 5rpx;" src="/images/img_bofang@2x.png"></image>03:32
</view> -->
<!-- 收藏标志 -->
<image class="shouca" src="/images/ic_shouc@2x.png" wx:if="{{item.isCollected}}"></image>
<image class="shouca" src="" wx:else="{{true}}"></image>
<!-- 多选 -->
<view wx:if="{{choose}}" wx:key="index" class="choose {{item.choose?'active':'non'}}" data-data="{{item}}" data-index="{{index}}" catchtap="choose"></view>
</view>
</view>
</view>
<!-- 加载更多 -->
<button style="color: #D0D0D0;" bindtap="getmore">加载更多</button>
<pic-show wx:if="{{flag}}" tempPics="{{listdata}}" id="pic"></pic-show>
<button style="color: #D0D0D0;margin-top: 20rpx;" bindtap="getmore">加载更多</button>
</view>
<!-- 批量操作 -->
<view class="operation" wx:if="{{choose}}">
<button class="one" plain="{{true}}" bindtap="tochoose">
<l-icon name="error" style="width: 48rpx;height: 34rpx;margin-top: 16rpx;" size="40" color="#006BFF"></l-icon>
退出多选
</button>
<button class="one" plain="{{true}}" bindtap="add">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_shoucang@3x.png"></image>
收藏
</button>
<button class="one" plain="{{true}}" bindtap="del">
<image style="width: 48rpx;height: 48rpx;" src="/images/ic_shouc@2x.png"></image>
取消收藏
</button>
<button class="one" plain="{{true}}" data-url="{{cdn+data.fileUrl}}" bindtap="batchdown">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_baocun@3x.png"></image>
保存
</button>
</view>
</view>

@ -239,4 +239,34 @@
border: none!important;
margin: 0rpx!important;
/* padding: 0rpx!important; */
}
.main {
display: flex;
align-items: flex-start;
}
.column {
/* width: 50%; */
}
.column_item {
width: 334rpx;
background: #fff;
margin: 30rpx auto;
box-shadow: 5rpx 5rpx 10rpx 0 rgba(0, 0, 0, 0.3);
}
.column_pic {
display: block;
width: 334rpx;
height: 350rpx;
}
.hide {
display: none;
}
.getmore{
margin: 20rpx;
}

@ -33,6 +33,7 @@
background: #F9F9F9;
border-radius: 8rpx;
font-size: 28rpx;
line-height: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
/* color: #999999; */

@ -74,7 +74,8 @@ Page({
tagIdList: [],
brandIdList: [],
keyword: '',
cdn: getApp().globalData.cdn
cdn: getApp().globalData.cdn,
flag: true
},
/**
* 生命周期函数--监听页面加载
@ -129,16 +130,20 @@ Page({
brandIdList: this.data.brandIdList[0]?this.data.brandIdList:[],
keyword: this.data.keyword
}).then(res => {
let arr = res.data.records
for (let index = 0; index < arr.length; index++) {
arr[index].all = false
arr[index].referenceList.forEach(el=>{
el.choose = false
el.father = index
let arr = []
res.data.records.forEach(el => {
el.referenceList.forEach(e => {
e.isCollected=true
arr.push(e)
})
}
})
this.setData({
flag: false
})
this.setData({
listdata: arr
listdata: arr,
max: res.data.pages,
flag: true
})
})
},

@ -20,48 +20,7 @@
<view class="{{showOrHide?'shadow':''}}" bind:tap="closeMask" />
<!-- 素材展示 -->
<view class="mat">
<view class="mat_card" wx:for="{{listdata}}" wx:key="index" data-day="{{index}}">
<view class="card_top">
{{item.dat}}
<button class="allin" wx:if="{{choose}}" data-index="{{index}}" bindtap="chooseall">{{item.all?'全不选':'全选'}}</button>
</view>
<view class="cards">
<!-- 单张素材 -->
<view class="card" wx:for="{{item.referenceList}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" data-url="/pages/lookup/loockvideo/video" bindtap="to" capture-bind:longtap="tochoose">
<!-- <view class="card" wx:for="{{item.refrence}}" wx:key="index" data-item="{{item}}" data-in="{{index}}" bindtap="to"> -->
<!-- 封面图片 -->
<image mode="aspectFill" style="width: 144rpx;height: 144rpx;border-radius: 8rpx;" src="{{item.type===1?cdn+item.coverUrl:cdn+item.fileUrl}}"></image>
<!-- 左下角播放时长 -->
<!-- <view class="time">
<image style="width: 16rpx;height: 18rpx;margin-right: 5rpx;" src="/images/img_bofang@2x.png"></image>03:32
</view> -->
<!-- 收藏标志 -->
<image class="shouca" src="/images/ic_shouc@2x.png"></image>
<!-- 多选 -->
<view wx:if="{{choose}}" wx:key="index" class="choose {{item.choose?'active':'non'}}" data-data="{{item}}" data-index="{{index}}" catchtap="choose"></view>
</view>
</view>
</view>
<!-- 加载更多 -->
<button style="color: #D0D0D0;" bindtap="getmore">加载更多</button>
<pic-show wx:if="{{flag}}" tempPics="{{listdata}}" id="pic"></pic-show>
<button style="color: #D0D0D0;margin-top: 20rpx;" bindtap="getmore">加载更多</button>
</view>
<!-- 批量操作 -->
<view class="operation" wx:if="{{choose}}">
<button class="one" plain="{{true}}" bindtap="tochoose">
<l-icon name="error" style="width: 48rpx;height: 34rpx;margin-top: 16rpx;" size="40" color="#006BFF"></l-icon>
退出多选
</button>
<button class="one" plain="{{true}}" bindtap="add">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_shoucang@3x.png"></image>
收藏
</button>
<button class="one" plain="{{true}}" bindtap="del">
<image style="width: 48rpx;height: 48rpx;" src="/images/ic_shouc@2x.png"></image>
取消收藏
</button>
<button class="one" plain="{{true}}" data-url="{{cdn+data.fileUrl}}" bindtap="batchdown">
<image style="width: 48rpx;height: 48rpx;" src="/pages/index/subpage/brand/brandDetails/images/ic_baocun@3x.png"></image>
保存
</button>
</view>
</view>

@ -239,4 +239,34 @@
border: none!important;
margin: 0rpx!important;
/* padding: 0rpx!important; */
}
.main {
display: flex;
align-items: flex-start;
}
.column {
/* width: 50%; */
}
.column_item {
width: 334rpx;
background: #fff;
margin: 30rpx auto;
box-shadow: 5rpx 5rpx 10rpx 0 rgba(0, 0, 0, 0.3);
}
.column_pic {
display: block;
width: 334rpx;
height: 350rpx;
}
.hide {
display: none;
}
.getmore{
margin: 20rpx;
}
Loading…
Cancel
Save