From ac41263c85bb295bd0dcb286173986bc88d7e4ae Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期三, 12 四月 2023 10:43:52 +0800
Subject: [PATCH] 修改禁言
---
miniprogram/pages/user/pubulicty/index.ts | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 103 insertions(+), 13 deletions(-)
diff --git a/miniprogram/pages/user/pubulicty/index.ts b/miniprogram/pages/user/pubulicty/index.ts
index 2b71296..b91ad15 100644
--- a/miniprogram/pages/user/pubulicty/index.ts
+++ b/miniprogram/pages/user/pubulicty/index.ts
@@ -3,23 +3,113 @@
const userCause = getApp()
Page({
- data: {
- causeList:[],
- isShow:false
- },
- // 浜嬩欢澶勭悊鍑芥暟
- onLoad() {
- wx.request(
+ data: {
+ autoplay:true,
+ cardFig:true,
+ swcurrent: 0,
+ causeList: [],
+ isShow: false
+ },
+ register(e){
+ console.log(e);
+
+ },
+ getMobile(){
+ // 鑾峰彇鎵嬫満鍙�
+ wx.request(
{
- url:userCause.globalData.url+"/publicity",
+ url:userCause.globalData.url+ "/wx/user/myself",
method:"GET",
+ data:{
+ id:wx.getStorageSync('id')
+ },
header:{'token':wx.getStorageSync('token')},
success:(res)=>{
- this.setData({
- causeList:res.data.data.records
- })
- console.log(this.data.causeList)
+ console.log(res)
+ if (res.data.data.userMobile) {
+ this.getUserRegister(res.data.data.userMobile)
+ }
}
})
- }
+
+ },
+ // 閫氳繃鎵嬫満鍙锋煡璇㈡槸鍚︽槸宸叉敞鍐岀敤鎴�
+ getUserRegister(phone){
+ wx.request(
+ {
+ url:userCause.globalData.url+ "/wx/isExist",
+ method:"GET",
+ data:{
+ phone:phone
+ },
+ header:{'token':wx.getStorageSync('token')},
+ success:(res)=>{
+ console.log(res)
+
+ }
+ })
+ },
+ // 浜嬩欢澶勭悊鍑芥暟
+ onLoad() {
+ if (wx.getStorageSync('token')) {
+ this.setData({
+ cardFig:false
+ })
+ }
+ // this.getMobile()
+ // let info=wx.getStorageSync('card')
+ // console.log(info);
+
+ // if (info) {
+ // this.setData({
+ // cardFig :false
+ // })
+ // }else{
+ // this.setData({
+ // cardFig :true
+ // })
+ // }
+ wx.request(
+ {
+ url: userCause.globalData.url + "/wx/publicity",
+ method: "GET",
+ // 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