From 74bf1bbdcc099280b53e900adf67670ed7e3dd8f Mon Sep 17 00:00:00 2001
From: 安瑾然 <m17681517455@outlook.com>
Date: 星期五, 03 三月 2023 17:18:12 +0800
Subject: [PATCH] 修改首页公共宣传页面进入列表会被图片隐藏的bug
---
miniprogram/pages/user/group/index.ts | 6 -
miniprogram/app.ts | 4
miniprogram/pages/user/pubulicty/index.wxss | 53 ++++++++++-------
miniprogram/pages/user/pubulicty/index.ts | 37 ++++++------
miniprogram/pages/user/index.ts | 59 +++++++++----------
miniprogram/pages/user/pubulicty/index.wxml | 19 +++--
6 files changed, 92 insertions(+), 86 deletions(-)
diff --git a/miniprogram/app.ts b/miniprogram/app.ts
index 5a08d9e..69a1079 100644
--- a/miniprogram/app.ts
+++ b/miniprogram/app.ts
@@ -1,8 +1,8 @@
// app.ts
App({
globalData: {
- // url:'https://qyqgawx.cdqingyang.gov.cn/qyjz',
- url:'https://qyqjzdd.cdqingyang.gov.cn/qyjz',
+ // url:'https://qyqjzdd.cdqingyang.gov.cn/qyjz',
+ url:'http://192.168.3.220:8080',
// url:'http://221.237.182.28:8443/api',
imageUrl:'http://qyqjzdd.cdqingyang.gov.cn/minio'
},
diff --git a/miniprogram/pages/user/group/index.ts b/miniprogram/pages/user/group/index.ts
index 3048236..5165c9e 100644
--- a/miniprogram/pages/user/group/index.ts
+++ b/miniprogram/pages/user/group/index.ts
@@ -6,11 +6,10 @@
data: {
groupList: []
},
- toHome(){
+ toHome() {
wx.navigateBack()
},
openGroup(e) {
- console.log(e)
wx.navigateTo({
url: "../../user/group/message/index?id=" + e.currentTarget.id + "&&ban=" + e.currentTarget.dataset.ban + "&&reportId=" + e.currentTarget.dataset.rptid
})
@@ -39,8 +38,6 @@
secends = "0" + secends
}
time = date.getFullYear() + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + secends
- console.log(time)
- console.log("lastDate", wx.getStorageSync('time'))
var lastTime = wx.getStorageSync('time')
wx.request(
{
@@ -58,7 +55,6 @@
groupList: res.data.data
})
}
-
})
}
})
diff --git a/miniprogram/pages/user/index.ts b/miniprogram/pages/user/index.ts
index 6707ce4..e33d4a3 100644
--- a/miniprogram/pages/user/index.ts
+++ b/miniprogram/pages/user/index.ts
@@ -6,7 +6,7 @@
data: {
isShow: false,
userInfo: {},
- causeList:[]
+ causeList: []
},
// 浜嬩欢澶勭悊鍑芥暟
bindViewTap() {
@@ -17,59 +17,58 @@
onLoad() {
- if( wx.getStorageSync('info')==''){
+ if (wx.getStorageSync('info') == '') {
wx.redirectTo({
url: '../user/loginInfo/index'
})
}
- wx.request(
+ wx.request(
{
- url:user.globalData.url+"/wx/publicity?size="+"4",
- method:"GET",
- header:{'token':wx.getStorageSync('token')},
- success:(res)=>{
- console.log(res)
- this.setData({
- causeList:res.data.data
- })
-
- }
- })
+ url: user.globalData.url + "/wx/publicity?size=" + "4",
+ method: "GET",
+ header: { 'token': wx.getStorageSync('token') },
+ success: (res) => {
+ console.log(res)
+ this.setData({
+ causeList: res.data.data
+ })
+ }
+ })
},
getReport() {
console.log("xxx")
wx.navigateTo({
url: '../user/report/index'
})
- }
- ,getPublicty(){
+ },
+ getPublicty() {
console.log("publicty")
wx.navigateTo({
- url:'../user/pubulicty/index'
+ url: '../user/pubulicty/index'
})
-
- }
- ,getGroup(){
+ },
+ getGroup() {
console.log("group")
wx.navigateTo({
- url:'../user/group/index'
- })}
- ,getCause(){
+ url: '../user/group/index'
+ })
+ },
+ getCause() {
console.log("cause")
wx.navigateTo({
- url:'../manager/cause/index'
+ url: '../manager/cause/index'
})
- }
- ,getAudi(){
+ },
+ getAudi() {
console.log("myself")
wx.navigateTo({
- url:'../user/myself/index'
+ url: '../user/myself/index'
})
- }
- ,more(){
+ },
+ more() {
console.log("myself")
wx.navigateTo({
- url:'../user/pubulicty/index'
+ url: '../user/pubulicty/index'
})
}
})
diff --git a/miniprogram/pages/user/pubulicty/index.ts b/miniprogram/pages/user/pubulicty/index.ts
index 691b34d..7f880b5 100644
--- a/miniprogram/pages/user/pubulicty/index.ts
+++ b/miniprogram/pages/user/pubulicty/index.ts
@@ -3,24 +3,23 @@
const userCause = getApp()
Page({
- data: {
- causeList:[],
- isShow:false
- },
- // 浜嬩欢澶勭悊鍑芥暟
- onLoad() {
- wx.request(
- {
- url:userCause.globalData.url+"/wx/publicity",
- method:"GET",
- header:{'token':wx.getStorageSync('token')},
- success:(res)=>{
- console.log(res)
- this.setData({
- causeList:res.data.data
- })
-
- }
- })
+ data: {
+ causeList: [],
+ isShow: false
+ },
+ // 浜嬩欢澶勭悊鍑芥暟
+ onLoad() {
+ wx.request(
+ {
+ url: userCause.globalData.url + "/wx/publicity",
+ method: "GET",
+ header: { 'token': wx.getStorageSync('token') },
+ success: (res) => {
+ console.log(res)
+ this.setData({
+ causeList: res.data.data
+ })
+ }
+ })
}
})
diff --git a/miniprogram/pages/user/pubulicty/index.wxml b/miniprogram/pages/user/pubulicty/index.wxml
index 66e7718..ab54d16 100644
--- a/miniprogram/pages/user/pubulicty/index.wxml
+++ b/miniprogram/pages/user/pubulicty/index.wxml
@@ -1,13 +1,16 @@
<!--index.wxml-->
<view class="container">
- <view class="imageView">
- <image style="width:100%;" class="indexImage" src="../../../image/5f9c1ee836fbee333ca3a0088e53d2f.png"></image>
+ <view class="imageView">
+ <image style="width:100%;" class="indexImage" src="../../../image/test3.jpg"></image>
+ <!-- <text class="font-name">闈掗槼缁忎睛</text> -->
</view>
-</view>
-<view class="content">
- <view class="lists" wx:for="{{causeList}}" wx:key="id">
- <view class="item2">{{item.releaseTime}}</view>
- <view class="item">{{item.publicityTitle}}</view>
- <view class="item3">{{item.text}}</view>
+ <view class="content" style="width:100%;">
+ <view class="lists" wx:for="{{causeList}}" wx:key="id">
+ <view class="lists-top">
+ <view class="lists-top-title">{{item.publicityTitle}}</view>
+ <view class="lists-top-time">{{item.releaseTime}}</view>
+ </view>
+ <view class="lists-content">{{item.text}}</view>
</view>
+ </view>
</view>
\ No newline at end of file
diff --git a/miniprogram/pages/user/pubulicty/index.wxss b/miniprogram/pages/user/pubulicty/index.wxss
index 2d4fd71..c968cfe 100644
--- a/miniprogram/pages/user/pubulicty/index.wxss
+++ b/miniprogram/pages/user/pubulicty/index.wxss
@@ -1,33 +1,42 @@
+.imageView {
+ width: 100%;
+}
-.imageView{
- position:absolute;
- top: 0;
- left: 0;
- right: 0;
-}
-.container{
+.container {
width: 100%;
}
-.content{
- margin-top: 12%;
+
+.content {
+ margin-top: 1rem;
}
-.lists{
- /* margin-top: 50% ; */
- border-bottom: 1px solid rgba(0,0,0,0.1);
+
+.lists {
+ margin-top: 0.5rem;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
width: 100%;
- margin-left: 2%;
}
-.item{
- font-size: 14px;
- margin-bottom: 1%;
+
+.lists .lists-top {
+ display: flex;
+ justify-content: space-between;
}
-.item2{
+
+.lists .lists-top .lists-top-time {
font-size: 12px;
- float: right;
- margin-right: 40%;
- color:rgba(0,0,0,0.5);
+ margin-bottom: 1%;
+ color: rgba(0, 0, 0, 0.5);
+ margin-right: 0.5rem;
}
-.item3{
+
+.lists .lists-top .lists-top-title {
+ font-size: 14px;
+ margin-right: 40%;
+ font-weight: bold;
+ margin-left: 0.5rem;
+}
+
+.lists .lists-content {
font-size: 11px;
- margin-bottom: 2%;
+ margin: 0.5rem;
+ margin-bottom: 0.5rem;
}
--
Gitblit v1.8.0