Browse Source

版本1.4.19 锦水印象增加视频banner,个人中心增加积分规则党群1+1样式优化 签到样式优化

master tagv1.4.19
lihenian 5 years ago
parent
commit
2da26df214
  1. 1
      components/activity/activity.wxss
  2. BIN
      images/mine/signedup.png
  3. BIN
      images/mine/signup.png
  4. 5
      pages/heartNew/heartNew.wxss
  5. 9
      pages/mine/components/topicItemNew/topicItemNew.wxss
  6. 4
      pages/mine/mine.js
  7. 15
      pages/mine/mine.wxml
  8. 10
      pages/mine/mine.wxss
  9. 2
      pages/toRegister/toRegister.js
  10. 2
      project.config.json
  11. 13
      subpages/associationNew/components/communityList/communityList.wxss
  12. BIN
      subpages/associationNew/images/navbarbk.png
  13. 13
      subpages/associationNew/pages/associationlist/associationlist.js
  14. 2
      subpages/associationNew/pages/associationlist/associationlist.json
  15. 8
      subpages/associationNew/pages/associationlist/associationlist.wxml
  16. 45
      subpages/associationNew/pages/associationlist/associationlist.wxss
  17. 7
      subpages/associationNew/pages/eventlist/eventlist.wxss
  18. 5
      subpages/heart/pages/heartDetail/heartDetail.wxml
  19. 6
      subpages/heart/pages/heartDetail/heartDetail.wxss
  20. BIN
      subpages/integralCentre/images/note.png
  21. 6
      subpages/integralCentre/pages/index/index.js
  22. 1
      subpages/integralCentre/pages/index/index.wxml
  23. 14
      subpages/integralCentre/pages/index/index.wxss
  24. 9
      subpages/oneKeyService/pages/archives/archives.wxss
  25. 5
      subpages/oneKeyService/pages/directTo/directTo.wxss
  26. 1
      subpages/oneKeyService/pages/index/index.wxss
  27. 3
      subpages/oneKeyService/pages/policyList/policyList.wxss
  28. 1
      subpages/understandJs/pages/index/index.wxss
  29. 79
      subpages/understandJs/pages/noticeDetail/noticeDetail.js
  30. 4
      subpages/understandJs/pages/noticeDetail/noticeDetail.json
  31. 40
      subpages/understandJs/pages/noticeDetail/noticeDetail.wxml
  32. 128
      subpages/understandJs/pages/noticeDetail/noticeDetail.wxss
  33. 10
      utils/understandJs.js

1
components/activity/activity.wxss

@ -1,5 +1,6 @@
.layout { .layout {
display: table; display: table;
width: 100%;
/* width: calc(100% - 40rpx); */ /* width: calc(100% - 40rpx); */
height: 276rpx; height: 276rpx;
/* border-radius: 10rpx; */ /* border-radius: 10rpx; */

BIN
images/mine/signedup.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

BIN
images/mine/signup.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 758 B

5
pages/heartNew/heartNew.wxss

@ -35,11 +35,12 @@ page {
} }
.header .navigation .goback { .header .navigation .goback {
width: 16rpx; width: 40rpx;
margin-left: 30rpx; padding-left: 14rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 100%;
} }
.header .navigation .goback image { .header .navigation .goback image {

9
pages/mine/components/topicItemNew/topicItemNew.wxss

@ -2,7 +2,7 @@
/* width: calc(100% - 40rpx); */ /* width: calc(100% - 40rpx); */
padding: 40rpx 29rpx 20rpx 29rpx; padding: 40rpx 29rpx 20rpx 29rpx;
background: #fff; background: #fff;
margin-top: 20rpx; margin-bottom: 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
} }
@ -44,6 +44,7 @@
font-weight: 500; font-weight: 500;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
line-height: 54rpx; line-height: 54rpx;
margin-top: 10rpx;
} }
.image-list { .image-list {
@ -66,7 +67,7 @@
margin-top: 21rpx; margin-top: 21rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-around;
/* justify-content: center; */ /* justify-content: center; */
height: 28rpx; height: 28rpx;
padding: 0 50rpx; padding: 0 50rpx;
@ -96,7 +97,7 @@
.comment { .comment {
/* width: calc(100% - 98rpx); */ /* width: calc(100% - 98rpx); */
padding: 26rpx 20rpx; padding: 16rpx 20rpx 26rpx;
background: #F2F2F2; background: #F2F2F2;
border-radius: 8rpx; border-radius: 8rpx;
margin-top: 25rpx; margin-top: 25rpx;
@ -104,7 +105,7 @@
.comment .comment-list { .comment .comment-list {
width: 100%; width: 100%;
margin-top: 11rpx; margin-top: 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
} }

4
pages/mine/mine.js

@ -248,6 +248,7 @@ Page({
faceImg: "", faceImg: "",
nickname: "", nickname: "",
partyFlag: "0", partyFlag: "0",
isSignUp: 0,
points: 0, points: 0,
grade: 0 grade: 0
} }
@ -336,6 +337,9 @@ Page({
//签到 2020.07.24 //签到 2020.07.24
toSignUp () { toSignUp () {
if (this.data.userInfo.isSignUp == 1) {
return
}
api.userInfoSignUp().then(res => { api.userInfoSignUp().then(res => {
console.log(res.data) console.log(res.data)
if (res.code === 0) { if (res.code === 0) {

15
pages/mine/mine.wxml

@ -26,14 +26,13 @@
<image class="rightsword" src="../../images/mine/mine-rightsword.png" /> <image class="rightsword" src="../../images/mine/mine-rightsword.png" />
</view> </view>
</view> </view>
<view class="complete-info"> <view class="complete-info" bindtap="toSignUp">
<image class="complete-image" src="../../images/mine/signup.png" wx:if="{{userInfo.isSignUp == 0}}" bindtap="toSignUp"/> <image class="complete-image" src="../../images/mine/signup.png"/>
<image class="complete-image" src="../../images/mine/signedup.png" wx:else/> <view class="complete-content">
<!-- <view class="complete-content"> <view wx:if="{{userInfo.isSignUp == 0}}" class="tip">签 到</view>
<view wx:if="{{changeName}}" class="tip">完善信息</view> <view wx:else class="tip" style="color:rgba(255,255,255,0.5);">已签到</view>
<view wx:else class="tip">更改信息</view> <image class="rightsword" style="{{userInfo.isSignUp == 1 ? 'opacity:0.5;' : ''}}" src="../../images/mine/mine-rightsword.png" />
<image class="rightsword" src="../../images/mine/mine-rightsword.png" /> </view>
</view> -->
</view> </view>
</view> </view>
</view> </view>

10
pages/mine/mine.wxss

@ -46,7 +46,7 @@ page {
} }
.personal-info .box .content .bottom text{ .personal-info .box .content .bottom text{
color: #fff; color: #fff;
font-size: 30rpx; font-size: 28rpx;
line-height: 30rpx; line-height: 30rpx;
flex: 1; flex: 1;
text-align: center; text-align: center;
@ -119,7 +119,7 @@ page {
width: 142rpx; width: 142rpx;
height: 46rpx; height: 46rpx;
position: relative; position: relative;
margin-right: 14rpx; margin-right: 16rpx;
margin-top: 22rpx; margin-top: 22rpx;
} }
.personal-info .box .content .top .complete-info .complete-image { .personal-info .box .content .top .complete-info .complete-image {
@ -144,12 +144,16 @@ page {
height: 46rpx; height: 46rpx;
line-height: 46rpx; line-height: 46rpx;
margin-left: 10rpx; margin-left: 10rpx;
width: 88rpx;
text-align: center;
} }
.personal-info .box .content .top .complete-info .complete-content .rightsword { .personal-info .box .content .top .complete-info .complete-content .rightsword {
width: 14rpx; width: 14rpx;
height: 18rpx; height: 18rpx;
object-fit: cover; object-fit: cover;
margin-left: 8rpx; /* margin-left: 8rpx; */
position: absolute;
right: 4rpx;
} }
.personal-info .box .content .bottom .operation { .personal-info .box .content .bottom .operation {
flex: 1; flex: 1;

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// } // }
// }) // })
let that = this let that = this
const versionNum = "1.4.18" const versionNum = "1.4.19"
api.getScanSwitch(versionNum).then(function (res) { api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data) console.log(res.data)
let state = res.data.scanFlag let state = res.data.scanFlag

2
project.config.json

@ -30,7 +30,7 @@
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
"appid": "wx6dcf544cdae7d4ec", "appid": "wx6dcf544cdae7d4ec",
"projectname": "%E7%B2%BE%E8%87%B4%E9%94%A6%E6%B0%B4-%E5%B1%85%E6%B0%91%E7%AB%AF", "projectname": "%E7%B2%BE%E8%87%B4%E9%94%A6%E6%B0%B4-%E5%B1%85%E6%B0%9 1%E7%AB%AF",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
}, },

13
subpages/associationNew/components/communityList/communityList.wxss

@ -1,6 +1,10 @@
.hover-btn { .hover-btn {
box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1); box-shadow: 0 0 10rpx rgba(63, 63, 63, 0.1);
} }
.community-list {
position: relative;
top: -50rpx;
}
.community-item{ .community-item{
width: 690rpx; width: 690rpx;
height: 300rpx; height: 300rpx;
@ -8,6 +12,7 @@
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
margin-top: 28rpx; margin-top: 28rpx;
box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(5, 5, 5, 0.4);
} }
.community-item image{ .community-item image{
width: 100%; width: 100%;
@ -19,7 +24,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.2);
border-radius: 10rpx; border-radius: 10rpx;
text-align: center; text-align: center;
display: flex; display: flex;
@ -32,11 +37,13 @@
line-height: 70rpx; line-height: 70rpx;
display: inline-block; display: inline-block;
height: 70rpx; height: 70rpx;
background: rgba(0, 0,0,0.3); /* background: rgba(0, 0,0,0.3); */
border-radius: 5rpx; border-radius: 5rpx;
overflow: hidden; overflow: hidden;
color: white; color: white;
text-shadow: 2rpx 2rpx 0rpx #999; text-shadow: 2rpx 2rpx 4rpx #666;
font-weight: 800;
letter-spacing: 8rpx;
} }
.btn-container { .btn-container {
width: 100%; width: 100%;

BIN
subpages/associationNew/images/navbarbk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

13
subpages/associationNew/pages/associationlist/associationlist.js

@ -4,6 +4,7 @@ import {
getJoinGroup, getJoinGroup,
getImageUrl2 getImageUrl2
} from "../../utils/api" } from "../../utils/api"
const app = getApp()
Page({ Page({
data: { data: {
associationList: [], associationList: [],
@ -11,10 +12,16 @@ Page({
loadMoreType: "none", loadMoreType: "none",
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
imageUrlList: [], imageUrlList: [],
statusHeight: 0, // 自定义头部状态栏高度
navigationHeight: 0, // 自定义头部导航栏高度
}, },
onLoad: function () { onLoad: function () {
// this.getPartyGroupList(); // this.getPartyGroupList();
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
})
getImageUrl2().then(res => { getImageUrl2().then(res => {
this.setData({ this.setData({
imageUrlList: [...res.data] imageUrlList: [...res.data]
@ -38,7 +45,9 @@ Page({
this.getPartyGroupList() this.getPartyGroupList()
} }
}, },
_backhome () {
wx.navigateBack()
},
//获取党群列表 //获取党群列表
getPartyGroupList () { getPartyGroupList () {
getPartyGroupList().then(res => { getPartyGroupList().then(res => {

2
subpages/associationNew/pages/associationlist/associationlist.json

@ -1,4 +1,6 @@
{ {
"navigationStyle": "custom",
"navigationBarTextStyle":"white",
"usingComponents": { "usingComponents": {
"load-more": "../../../../components/loadMore/loadMore", "load-more": "../../../../components/loadMore/loadMore",
"community-list": "../../components/communityList/communityList" "community-list": "../../components/communityList/communityList"

8
subpages/associationNew/pages/associationlist/associationlist.wxml

@ -1,6 +1,12 @@
<!--subpages/associationNew/pages/associationlist/associationlist.wxml--> <!--subpages/associationNew/pages/associationlist/associationlist.wxml-->
<view class="title_bg"> <view class="header" style="height: {{statusHeight + navigationHeight}}px;">
<image class="header-bg" src="../../images/navbarbk.png" />
<view class="backhome" hover-class="none" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;" bindtap="_backhome"><image src="/images/goback.png"/></view>
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">党群列表</view>
</view>
<view class="title_bg" style="margin-top: {{statusHeight + navigationHeight}}px">
<image src="{{imageUrlList[0].imgUrl}}"></image> <image src="{{imageUrlList[0].imgUrl}}"></image>
<!-- <image src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/21/rBAB718fd8CAB37nAAMW696Q3e4345.png" /> -->
</view> </view>
<view class="association-list"> <view class="association-list">
<community-list <community-list

45
subpages/associationNew/pages/associationlist/associationlist.wxss

@ -13,4 +13,49 @@ page {
.title_bg image{ .title_bg image{
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
}
.header {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 1000;
}
.header .header-bg {
width: 100%;
height: 100%;
position: absolute;
z-index: 10;
left: 0;
top: 0;
}
.header .navigation {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.9);
font-size: 32rpx;
position: relative;
z-index: 100;
letter-spacing: 2rpx;
}
.backhome {
width: 80rpx;
position: absolute;
z-index: 9999;
display: flex;
align-items: center;
}
.backhome-hover{
cursor: pointer;
}
.backhome image {
width: 20rpx;
height: 30rpx;
margin-left: 20rpx;
} }

7
subpages/associationNew/pages/eventlist/eventlist.wxss

@ -56,6 +56,7 @@ page {
font-size: 32rpx; font-size: 32rpx;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
word-break: break-all; word-break: break-all;
margin-top: 10rpx;
} }
.image-list { .image-list {
@ -117,8 +118,8 @@ page {
margin-right: 10rpx; margin-right: 10rpx;
} }
.attitude .all .give-data-s { .attitude .all .give-data-s {
width: 200rpx; width: 190rpx;
height: 55rpx; height: 50rpx;
background: linear-gradient(to right, #f2511b, #ee7a20); background: linear-gradient(to right, #f2511b, #ee7a20);
border-radius: 27rpx; border-radius: 27rpx;
overflow: hidden; overflow: hidden;
@ -137,7 +138,7 @@ page {
.likes { .likes {
/* width: calc(100% - 98rpx); */ /* width: calc(100% - 98rpx); */
padding: 24rpx 20rpx 12rpx 20rpx; padding: 18rpx 20rpx 18rpx 20rpx;
background: #F2F2F2; background: #F2F2F2;
border-radius: 8rpx; border-radius: 8rpx;
margin-top: 25rpx; margin-top: 25rpx;

5
subpages/heart/pages/heartDetail/heartDetail.wxml

@ -4,9 +4,10 @@
<view class="top-bg"> <view class="top-bg">
<image src="../../images/heartDetail-bg.png" /> <image src="../../images/heartDetail-bg.png" />
</view> </view>
<view class="top-font">{{detail.title}}</view> <view class="top-font"><text >{{detail.title}}</text></view>
<view class="{{detail.title.length < 32 ? 'position-absolute-top1' : 'position-absolute-top2'}} position-absolute"> <view class="position-absolute-top1 position-absolute">
<!-- <view class="{{detail.title.length < 32 ? 'position-absolute-top1' : 'position-absolute-top2'}} position-absolute"> -->
<!-- 点击进入活动页面详情只显示志愿者打卡内容,志愿者打卡以上的内容去掉,用新闻稿替代。 --> <!-- 点击进入活动页面详情只显示志愿者打卡内容,志愿者打卡以上的内容去掉,用新闻稿替代。 -->
<block wx:if="{{selectedTab != 'tab2'}}"> <block wx:if="{{selectedTab != 'tab2'}}">
<!-- 详细内容 --> <!-- 详细内容 -->

6
subpages/heart/pages/heartDetail/heartDetail.wxss

@ -17,12 +17,14 @@ page{
.top-font { .top-font {
color: #fff; color: #fff;
display: block; display: flex;
position: absolute; position: absolute;
top: 67rpx; top: 0rpx;
left: 20rpx; left: 20rpx;
right: 20rpx; right: 20rpx;
font-size: 44rpx; font-size: 44rpx;
height: 188rpx;
align-items: center;
} }
.position-absolute { .position-absolute {

BIN
subpages/integralCentre/images/note.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

6
subpages/integralCentre/pages/index/index.js

@ -264,6 +264,12 @@ Page({
console.log(err) console.log(err)
}) })
}, },
bindtapIntegralRule () {
console.log('获取积分规则')
wx.navigateTo({
url: `/subpages/understandJs/pages/noticeDetail/noticeDetail?modulecode=notice_points_rule`
})
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */

1
subpages/integralCentre/pages/index/index.wxml

@ -2,6 +2,7 @@
<view class='title'> <view class='title'>
<text class="number">{{points}}</text> <text class="number">{{points}}</text>
<text class="name">积分</text> <text class="name">积分</text>
<view class="rule" bindtap="bindtapIntegralRule">积分规则<image src="../../images/note.png" /></view>
</view> </view>
<!-- tabbar --> <!-- tabbar -->
<view class="tab-bar"> <view class="tab-bar">

14
subpages/integralCentre/pages/index/index.wxss

@ -34,6 +34,20 @@ page {
margin-top: 29rpx; margin-top: 29rpx;
} }
.title .rule {
color: white;
position: absolute;
display: flex;
align-items: center;
left: 570rpx;
top: 40rpx;
font-size: 28rpx;
}
.title .rule image{
width: 30rpx;
height: 30rpx;
margin-left: 10rpx;
}
.tab-bar { .tab-bar {
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;

9
subpages/oneKeyService/pages/archives/archives.wxss

@ -90,13 +90,12 @@ button::after {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
place-items: center; place-items: center;
gap: 30rpx 0; gap: 20rpx 0;
width: 690rpx; width: 690rpx;
padding: 20rpx 0; padding: 20rpx 0;
margin: 296rpx auto 0rpx; margin: 180rpx auto 0rpx;
/* position: absolute; position: relative;
top: 296rpx; z-index: 999;
left: 30rpx; */
} }
.list-item { .list-item {
width: 100%; width: 100%;

5
subpages/oneKeyService/pages/directTo/directTo.wxss

@ -8,10 +8,11 @@ page {
height: 196rpx; height: 196rpx;
width: 100%; width: 100%;
padding: 0 30rpx; padding: 0 30rpx;
box-sizing: border-box;
} }
.list-item .top { .list-item .top {
width: calc(100% - 60rpx); width: 100%;
height: 90rpx; height: 90rpx;
border-bottom: 1rpx solid #f7f7f7; border-bottom: 1rpx solid #f7f7f7;
font-size: 34rpx; font-size: 34rpx;
@ -21,7 +22,7 @@ page {
} }
.list-item .bottom { .list-item .bottom {
width: calc(100% - 60rpx); width: 100%;
height: 106rpx; height: 106rpx;
display: flex; display: flex;
align-items: center; align-items: center;

1
subpages/oneKeyService/pages/index/index.wxss

@ -8,6 +8,7 @@
margin-bottom: 28rpx; margin-bottom: 28rpx;
padding: 0; padding: 0;
background: #fff; background: #fff;
box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(5, 5, 5, 0.4);
} }
button::after { button::after {

3
subpages/oneKeyService/pages/policyList/policyList.wxss

@ -57,10 +57,11 @@ page {
background: #fff; background: #fff;
padding: 38rpx 30rpx; padding: 38rpx 30rpx;
margin-top: 16rpx; margin-top: 16rpx;
box-sizing: border-box;
} }
.list-li .item-name { .list-li .item-name {
width: calc(100% - 60rpx); width: 100%;
font-size: 34rpx; font-size: 34rpx;
font-weight: 500; font-weight: 500;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);

1
subpages/understandJs/pages/index/index.wxss

@ -8,6 +8,7 @@
margin-bottom: 28rpx; margin-bottom: 28rpx;
padding: 0; padding: 0;
background: #fff; background: #fff;
box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(5, 5, 5, 0.4);
} }
button::after { button::after {

79
subpages/understandJs/pages/noticeDetail/noticeDetail.js

@ -11,7 +11,16 @@ Page({
pageIndex:1, pageIndex:1,
pageSize:10, pageSize:10,
noticeCategory:'', noticeCategory:'',
preloadVisible: true preloadVisible: true,
isNeedBanner: false,
bannerList: [],
indicatorDots: false, //指示点
autoplay: true, //true,//自动播放
circular: true, //衔接滑动
interval: 5000, //自动播放间隔时长(ms)
duration: 500, //幻灯片切换时长(ms)
currentSwiper: 0,
nodata: false
}, },
/** /**
@ -30,6 +39,12 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: "锦水印象" title: "锦水印象"
}) })
this.setData({
isNeedBanner: true
})
if (this.data.isNeedBanner) {
this.videoBannerList()
}
this.noticelist() this.noticelist()
} else if(options.modulecode == 'notice_yh'){ } else if(options.modulecode == 'notice_yh'){
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
@ -41,9 +56,60 @@ Page({
title: "锦水警事" title: "锦水警事"
}) })
this.noticeDetail(options.id) this.noticeDetail(options.id)
} else if(options.modulecode == 'notice_points_rule'){
wx.setNavigationBarTitle({
title: '积分规则'
})
this.noticelist()
} }
}, },
swiperChange: function(e) {
this.setData({
currentSwiper: e.detail.current
})
},
bindplay() {
this.setData({
autoplay: false
})
wx.getNetworkType({
success (res) {
const networkType = res.networkType
if (res.networkType != 'wifi') {
wx.showToast({
title: '当前为非WI-FI环境,请注意流量消耗',
icon: 'none',
duration: 3000
})
}
}
})
},
bindended() {
this.setData({
autoplay: true
})
},
bindVideoEnterPictureInPicture() {
console.log('进入小窗模式')
},
bindVideoLeavePictureInPicture() {
console.log('退出小窗模式')
},
videoErrorCallback(e) {
console.log('视频错误信息:')
console.log(e.detail.errMsg)
},
videoBannerList () {
api.videoBannerList('3').then( res => {
this.setData({
bannerList: res.data
})
}).catch(err => {
console.log(err)
})
},
noticelist () { noticelist () {
let that = this; let that = this;
let params = { let params = {
@ -52,7 +118,16 @@ Page({
noticeCategory: that.data.noticeCategory noticeCategory: that.data.noticeCategory
} }
api.noticelist(params).then(function (res) { api.noticelist(params).then(function (res) {
that.noticeDetail(res.data[0].id) if (res.data.length == 0) {
that.setData({
nodata: true
})
} else {
that.setData({
nodata: false
})
that.noticeDetail(res.data[0].id)
}
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })

4
subpages/understandJs/pages/noticeDetail/noticeDetail.json

@ -1,4 +1,6 @@
{ {
"usingComponents": {}, "usingComponents": {
"no-data": "../../../../components/nodata/nodata"
},
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }

40
subpages/understandJs/pages/noticeDetail/noticeDetail.wxml

@ -1,5 +1,41 @@
<wxs module="filter" src="../../../../utils/filter.wxs"></wxs> <wxs module="filter" src="../../../../utils/filter.wxs"></wxs>
<view class="notice-detail"> <view class="notice-detail" hidden="{{nodata}}">
<view class="banner" wx:if="{{isNeedBanner && bannerList.length>0}}">
<view class="page-section page-section-spacing swiper">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange">
<block wx:for="{{bannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<swiper-item>
<view data-banner="{{item}}">
<view class="swiper-item" data-id="{{item.id}}">
<!-- <view class="altitle">
<view class="altitle-name">{{item.title}}</view>
</view>
<image class="banner" src='{{item.imgUrl}}' mode="aspectFill" />-->
<video
id="myVideo"
src="{{item.videoUrl}}"
binderror="videoErrorCallback"
show-center-play-btn='{{true}}'
show-play-btn="{{true}}"
picture-in-picture-mode="{{['push', 'pop']}}"
bindplay='bindplay'
bindended='bindended'
bindenterpictureinpicture='bindVideoEnterPictureInPicture'
bindleavepictureinpicture='bindVideoLeavePictureInPicture'
></video>
</view>
</view>
</swiper-item>
</block>
</swiper>
<!-- 重置小圆点的样式 -->
<view class="dots">
<block wx:for="{{ bannerList }}" wx:key="index">
<view class="dot {{index == currentSwiper ? ' active' : '' }}"></view>
</block>
</view>
</view>
</view>
<view class="selfContent" wx:if="{{!preloadVisible}}"> <view class="selfContent" wx:if="{{!preloadVisible}}">
<view class="detail-title">{{noticeObj.noticeTitle}}</view> <view class="detail-title">{{noticeObj.noticeTitle}}</view>
<view class="detail-subtitle"> <view class="detail-subtitle">
@ -23,3 +59,5 @@
<view class="preload-content"></view> <view class="preload-content"></view>
</view> </view>
</view> </view>
<no-data isShow="{{nodata}}"></no-data>

128
subpages/understandJs/pages/noticeDetail/noticeDetail.wxss

@ -127,4 +127,130 @@ page{
background-position: 0 50% background-position: 0 50%
} }
} }
/* preload end */ /* preload end */
/* 轮播图start */
.altitle {
position: absolute;
width: 100%;
height: 66rpx;
background-color: black;
margin-top: 237rpx;
border-bottom-right-radius: 16rpx;
border-bottom-left-radius: 16rpx;
opacity: 0.5;
font-size: 22rpx;
font-weight: 500;
color: rgba(255, 255, 255, 1);
}
.altitle-name {
margin: 10rpx 20rpx;
}
.container {
width: 100vw;
}
.page-body {
padding-top: 30rpx;
background: #fff;
height: 340rpx;
}
.page-section {
width: 100%;
margin-bottom: 60rpx;
}
.page-section_center {
display: flex;
flex-direction: column;
align-items: center;
}
.page-section:last-child {
margin-bottom: 0;
}
.page-section-gap {
box-sizing: border-box;
padding: 0 30rpx;
}
.page-section-spacing {
box-sizing: border-box;
height: 340rpx;
background-color: #fff;
}
.page-section-title {
font-size: 28rpx;
color: #999;
margin-bottom: 10rpx;
padding-left: 30rpx;
padding-right: 30rpx;
}
.page-section-gap .page-section-title {
padding-left: 0;
padding-right: 0;
}
.swiper-item {
display: block;
height: 340rpx;
}
.swiper-item video {
height: 340rpx;
width: 100%;
}
.notice-detail .banner {
overflow: hidden;
height: 340rpx !important;
display: flex;
width: 100%;
border-radius: 16rpx !important;
margin: 0rpx 0rpx 20rpx 0rpx;
}
.dots {
display: flex;
justify-content: center;
margin-top: -16rpx;
z-index: 999;
position: relative;
}
.dots .dot {
width: 8rpx;
height: 8rpx;
border-radius: 8rpx;
margin-left: 10rpx;
background: #d2d5da;
transition: all 0.3s;
}
.dots .dot.active {
width: 24rpx;
background: #fff;
}
.page-section-title {
margin-top: 60rpx;
position: relative;
}
swiper {
height: 340rpx;
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1);
border-radius: 16rpx;
overflow: hidden;
-webkit-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
}
/* 轮播图end */

10
utils/understandJs.js

@ -7,7 +7,8 @@ module.exports = {
archivedepts:archivedepts, archivedepts:archivedepts,
archivelist:archivelist, archivelist:archivelist,
archiveDetail:archiveDetail, archiveDetail:archiveDetail,
bannerList:bannerList bannerList:bannerList,
videoBannerList:videoBannerList
} }
// 了解锦水-模块管理接口 // 了解锦水-模块管理接口
function modulelist(moduleCategory='') { function modulelist(moduleCategory='') {
@ -43,4 +44,11 @@ function bannerList(position) {
return fly.get('news/banner/list', { return fly.get('news/banner/list', {
position position
}) })
}
//获取锦水印象-详情-视频banner列表
function videoBannerList(position) {
return fly.get('news/banner/list', {
position
})
} }
Loading…
Cancel
Save