From 4139482e75000140f6e28a95c550e76620b88a60 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期三, 12 四月 2023 10:06:17 +0800
Subject: [PATCH] 首页修改
---
miniprogram/pages/user/pubulicty/index.ts | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/miniprogram/pages/user/pubulicty/index.ts b/miniprogram/pages/user/pubulicty/index.ts
index a3db613..b91ad15 100644
--- a/miniprogram/pages/user/pubulicty/index.ts
+++ b/miniprogram/pages/user/pubulicty/index.ts
@@ -4,6 +4,7 @@
Page({
data: {
+ autoplay:true,
cardFig:true,
swcurrent: 0,
causeList: [],
@@ -75,15 +76,40 @@
// header: { 'token': wx.getStorageSync('token') },
success: (res) => {
res.data.data.map(i => {
+ let imgarr=[]
if (i.photoStr != null) {
i.photoStr = i.photoStr.split(",").map(i => userCause.globalData.imageUrl + "/img/" + i),
this.data.images = i.photoStr
+ i.photoStr.map(j=>{
+ let type=j.substring(j.lastIndexOf(".")+1)
+
+
+ let obj={
+ url: j,
+ type:'png'
+ }
+ if (type=='mp4') {
+ obj.type = 'mp4'
+ }else{
+ obj.type = 'png'
+ }
+ imgarr.push(obj)
+ })
+ i.imagarr=imgarr
}
+ i.releaseTime = i.releaseTime.replace(/-/g,"/")
})
this.setData({
causeList: res.data.data
})
}
})
- }
+ },
+ videoplay(e){
+ console.log(e);
+
+ this.setData({
+ autoplay:false
+ })
+ },
})
--
Gitblit v1.8.0