Browse Source

Merge branch 'release'

master tagv1.4.21
lihenian 5 years ago
parent
commit
f47b8e9007
  1. BIN
      images/home/signin.png
  2. BIN
      images/home/signined.png
  3. 52
      pages/indexNew/indexNew.js
  4. 3
      pages/indexNew/indexNew.json
  5. 9
      pages/indexNew/indexNew.wxml
  6. 24
      pages/indexNew/indexNew.wxss
  7. 58
      pages/mine/mine.js
  8. 4
      pages/mine/mine.wxml
  9. 2
      pages/toRegister/toRegister.js
  10. 8
      subpages/oneKeyService/pages/index/index.js
  11. 10
      subpages/oneKeyService/pages/noticeDetail/noticeDetail.js
  12. 44
      subpages/oneKeyService/pages/warning/warning.js
  13. 5
      subpages/oneKeyService/pages/warning/warning.wxml
  14. 4
      subpages/oneKeyService/pages/warning/warning.wxss
  15. 14
      subpages/understandJs/pages/noticeDetail/noticeDetail.js
  16. 17
      subpages/understandJs/pages/noticeDetail/noticeDetail.wxml

BIN
images/home/signin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
images/home/signined.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

52
pages/indexNew/indexNew.js

@ -75,11 +75,16 @@ Page({
workGridId:'', //工作网格7.08 workGridId:'', //工作网格7.08
completeInfoDialogVisible: false, //完善信息 completeInfoDialogVisible: false, //完善信息
homePagePhone: {}, homePagePhone: {},
fromprogram: '' //来自工作端=work 或者 数据分析端=leader 的跳转 fromprogram: '', //来自工作端=work 或者 数据分析端=leader 的跳转,
visible: false,
signMsg: '',
signCode: 0,
isSignUp: 0
}, },
onShow: function () { onShow: function () {
if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) { if (wx.getStorageSync("token") != "" && wx.getStorageSync("token") != undefined && wx.getStorageSync("token") != null) {
if (!this.data.first) { if (!this.data.first) {
this.getUserInfo()
this.loadGridList() this.loadGridList()
this.getBannerList() this.getBannerList()
this.getFirstInfo() this.getFirstInfo()
@ -361,6 +366,7 @@ Page({
} }
that.getResidentConfig() that.getResidentConfig()
that.getHomePhone() that.getHomePhone()
that.getUserInfo()
that.loadGridList() that.loadGridList()
that.getBannerList() that.getBannerList()
that.getFirstInfo() that.getFirstInfo()
@ -630,5 +636,49 @@ Page({
} else { } else {
return false return false
} }
},
// 获取用户信息
getUserInfo () {
api.getUserInfo().then(res => {
console.log("用户信息", res)
this.setData({
isSignUp: res.data.isSignUp
})
}).catch(err => {
this.setData({
isSignUp: 0
})
console.log(err)
})
},
//签到 2020.07.31
toSignIn () {
if (this.data.isSignUp == 1) {
return
}
api.userInfoSignUp().then(res => {
console.log(res.data)
if (res.code === 0) {
// 显示提醒
this.setData({
signCode: res.code,
signMsg: res.data,
visible: true
});
} else {
this.setData({
signCode: res.code,
signMsg: res.msg,
visible: true
});
}
})
},
// 关闭签到提醒
onClose() {
this.getUserInfo()
this.setData({
visible: false
});
} }
}) })

3
pages/indexNew/indexNew.json

@ -5,6 +5,7 @@
"usingComponents": { "usingComponents": {
"nav-bar": "/components/navbar/index", "nav-bar": "/components/navbar/index",
"load-more": "../../components/loadMore/loadMore", "load-more": "../../components/loadMore/loadMore",
"complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog" "complete-info-dialog": "../../components/completeInfoDialog/completeInfoDialog",
"wux-popup": "../../dist/popup/index"
} }
} }

9
pages/indexNew/indexNew.wxml

@ -15,6 +15,10 @@
<view class="grid-name">{{departmentName}}</view> <view class="grid-name">{{departmentName}}</view>
<image class="more-grid" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/05/rBAB716nk3uAAMMcAAADckZSIh0279.png" /> <image class="more-grid" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/05/rBAB716nk3uAAMMcAAADckZSIh0279.png" />
</view> </view>
<view class="signin-btn" bindtap="toSignIn">
<image src="../../images/home/signin.png" wx:if="{{isSignUp == 0}}" />
<image src="../../images/home/signined.png" wx:else />
</view>
<view class="my-and-news"> <view class="my-and-news">
<image wx:if="{{infoObj.title == ''}}" bindtap="noMore" class="news" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/05/rBAB716nk4yASWCrAAAKA-kIkt0142.png" /> <image wx:if="{{infoObj.title == ''}}" bindtap="noMore" class="news" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/05/rBAB716nk4yASWCrAAAKA-kIkt0142.png" />
<image wx:else bindtap="toInfoList" class="news" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/07/rBAB7161EWKAIXwXAAAD4DwRkd4543.png" /> <image wx:else bindtap="toInfoList" class="news" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/07/rBAB7161EWKAIXwXAAAD4DwRkd4543.png" />
@ -170,3 +174,8 @@
</view> </view>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog> <complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<!-- 签到后提醒 -->
<wux-popup visible="{{visible}}" title="{{signCode === 0 ? '签到成功' : '签到失败'}}" content="{{signMsg}}" bind:close="onClose">
<view slot="footer" class="popup__button" bindtap="onClose">确定</view>
</wux-popup>

24
pages/indexNew/indexNew.wxss

@ -60,9 +60,22 @@ page {
z-index: 10; z-index: 10;
} }
.belong-grid .newbelong-grid .signin-btn {
width: 140rpx;
height: 44rpx;
position: absolute;
z-index: 99;
right: 80rpx;
}
.belong-grid .newbelong-grid .signin-btn image {
width: 100%;
height: 100%;
}
.belong-grid .newbelong-grid .grid { .belong-grid .newbelong-grid .grid {
/* width: 90%; */ /* width: 90%; */
width: calc(100% - 129rpx); width: calc(100% - 240rpx);
height: 34rpx; height: 34rpx;
position: relative; position: relative;
z-index: 100; z-index: 100;
@ -89,7 +102,7 @@ page {
} }
.belong-grid .newbelong-grid .my-and-news { .belong-grid .newbelong-grid .my-and-news {
width: 129rpx; width: 80rpx;
height: 34rpx; height: 34rpx;
position: relative; position: relative;
z-index: 100; z-index: 100;
@ -631,3 +644,10 @@ page {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.popup__button {
width: 100%;
text-align: center;
font-size: 36rpx;
color: #04BCA0;
}

58
pages/mine/mine.js

@ -336,33 +336,33 @@ Page({
}, },
// 签到 2020.07.24 // 签到 2020.07.24
toSignUp () { // toSignUp () {
if (this.data.userInfo.isSignUp == 1) { // if (this.data.userInfo.isSignUp == 1) {
return // 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) {
// 显示提醒 // // 显示提醒
this.setData({ // this.setData({
signCode: res.code, // signCode: res.code,
signMsg: res.data, // signMsg: res.data,
visible: true // visible: true
}); // });
} else { // } else {
this.setData({ // this.setData({
signCode: res.code, // signCode: res.code,
signMsg: res.msg, // signMsg: res.msg,
visible: true // visible: true
}); // });
} // }
}) // })
}, // },
// 关闭签到提醒 // // 关闭签到提醒
onClose() { // onClose() {
this.getUserInfo() // this.getUserInfo()
this.setData({ // this.setData({
visible: false // visible: false
}); // });
} // }
}) })

4
pages/mine/mine.wxml

@ -26,14 +26,14 @@
<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" bindtap="toSignUp"> <!-- <view class="complete-info" bindtap="toSignUp">
<image class="complete-image" src="../../images/mine/signup.png"/> <image class="complete-image" src="../../images/mine/signup.png"/>
<view class="complete-content"> <view class="complete-content">
<view wx:if="{{userInfo.isSignUp == 0}}" class="tip">签 到</view> <view wx:if="{{userInfo.isSignUp == 0}}" class="tip">签 到</view>
<view wx:else class="tip" style="color:rgba(255,255,255,0.5);">已签到</view> <view wx:else class="tip" style="color:rgba(255,255,255,0.5);">已签到</view>
<image class="rightsword" style="{{userInfo.isSignUp == 1 ? 'opacity:0.5;' : ''}}" src="../../images/mine/mine-rightsword.png" /> <image class="rightsword" style="{{userInfo.isSignUp == 1 ? 'opacity:0.5;' : ''}}" src="../../images/mine/mine-rightsword.png" />
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// } // }
// }) // })
let that = this let that = this
const versionNum = "1.4.20" const versionNum = "1.4.21"
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

8
subpages/oneKeyService/pages/index/index.js

@ -59,6 +59,14 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: `../directTo/directTo?modulecode=${e.currentTarget.dataset.modulecode}` url: `../directTo/directTo?modulecode=${e.currentTarget.dataset.modulecode}`
}) })
} else if (e.currentTarget.dataset.modulecode == 'notice_zcwsc') {
wx.navigateTo({
url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}`
})
} else if (e.currentTarget.dataset.modulecode == 'notice_aq') {
wx.navigateTo({
url: `../warning/warning?modulecode=${e.currentTarget.dataset.modulecode}`
})
} }
} }
}) })

10
subpages/oneKeyService/pages/noticeDetail/noticeDetail.js

@ -26,6 +26,16 @@ Page({
title: '锦水警事' title: '锦水警事'
}) })
this.noticeDetail(options.id) this.noticeDetail(options.id)
} else if(options.modulecode == 'notice_zcwsc'){
wx.setNavigationBarTitle({
title: '众创卫生城'
})
this.noticeDetail(options.id)
} else if(options.modulecode == 'notice_aq'){
wx.setNavigationBarTitle({
title: '安全360'
})
this.noticeDetail(options.id)
} }
}, },

44
subpages/oneKeyService/pages/warning/warning.js

@ -18,7 +18,7 @@ Page({
indicatorDots: false, //指示点 indicatorDots: false, //指示点
autoplay: true, //true,//自动播放 autoplay: true, //true,//自动播放
circular: true, //衔接滑动 circular: true, //衔接滑动
interval: 3000, //自动播放间隔时长(ms) interval: 5000, //自动播放间隔时长(ms)
duration: 500, //幻灯片切换时长(ms) duration: 500, //幻灯片切换时长(ms)
currentSwiper: 0, currentSwiper: 0,
}, },
@ -34,14 +34,24 @@ Page({
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '锦水印象' title: '锦水印象'
}) })
}else if(options.modulecode == 'notice_zcwsc'){
this.getBannerList('4')
wx.setNavigationBarTitle({
title: '众创卫生城'
})
}else if(options.modulecode == 'notice_aq'){
this.getBannerList('5')
wx.setNavigationBarTitle({
title: '安全360'
})
}else{ }else{
this.getBannerList('2')
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '锦水警事' title: '锦水警事'
}) })
} }
this.noticelist() this.noticelist()
this.getBannerList()
}, },
/** /**
@ -105,9 +115,9 @@ Page({
}) })
}, },
getBannerList: function() { getBannerList: function(bannerNum) {
let that = this let that = this
api.bannerList('2').then(function(res) { api.bannerList(bannerNum).then(function(res) {
// console.log('res==', res.data) // console.log('res==', res.data)
that.setData({ that.setData({
swiperBannerList: res.data swiperBannerList: res.data
@ -115,8 +125,32 @@ Page({
}) })
}, },
swiperChange: function(e) { swiperChange: function(e) {
wx.createVideoContext('video'+this.data.currentSwiper).pause()
this.setData({
currentSwiper: e.detail.current,
autoplay: true
})
},
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({ this.setData({
currentSwiper: e.detail.current autoplay: true
}) })
}, },
// swiperChange2: function(e) { // swiperChange2: function(e) {

5
subpages/oneKeyService/pages/warning/warning.wxml

@ -1,5 +1,5 @@
<!-- banner swiperBannerList --> <!-- banner swiperBannerList -->
<view class="banner"> <view class="banner" wx:if="{{swiperBannerList.length>0}}">
<view class="page-section page-section-spacing swiper"> <view class="page-section page-section-spacing swiper">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange"> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" circular="{{circular}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange">
<block wx:for="{{swiperBannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index"> <block wx:for="{{swiperBannerList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
@ -9,7 +9,8 @@
<!-- <view class="altitle"> <!-- <view class="altitle">
<view class="altitle-name">{{item.title}}</view> <view class="altitle-name">{{item.title}}</view>
</view> --> </view> -->
<image class="banner" src='{{item.imgUrl}}' mode="aspectFill" /> <image wx:if="{{item.imgUrl!=''}}" class="banner" src='{{item.imgUrl}}' mode="aspectFill" />
<video wx:elif="{{item.videoUrl!=''}}" id="video{{index}}" class="banner" src="{{item.videoUrl}}" bindplay='bindplay' bindended='bindended'/>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>

4
subpages/oneKeyService/pages/warning/warning.wxss

@ -164,6 +164,10 @@ page {
swiper { swiper {
height: 300rpx; height: 300rpx;
box-shadow: 0px 4px 29px 0px rgba(63, 63, 63, 0.1); 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 */ /* 轮播图end */

14
subpages/understandJs/pages/noticeDetail/noticeDetail.js

@ -65,8 +65,10 @@ Page({
}, },
swiperChange: function(e) { swiperChange: function(e) {
wx.createVideoContext('video'+this.data.currentSwiper).pause()
this.setData({ this.setData({
currentSwiper: e.detail.current currentSwiper: e.detail.current,
autoplay: true
}) })
}, },
bindplay() { bindplay() {
@ -91,16 +93,6 @@ Page({
autoplay: true autoplay: true
}) })
}, },
bindVideoEnterPictureInPicture() {
console.log('进入小窗模式')
},
bindVideoLeavePictureInPicture() {
console.log('退出小窗模式')
},
videoErrorCallback(e) {
console.log('视频错误信息:')
console.log(e.detail.errMsg)
},
videoBannerList () { videoBannerList () {
api.videoBannerList('3').then( res => { api.videoBannerList('3').then( res => {
this.setData({ this.setData({

17
subpages/understandJs/pages/noticeDetail/noticeDetail.wxml

@ -9,20 +9,9 @@
<view class="swiper-item" data-id="{{item.id}}"> <view class="swiper-item" data-id="{{item.id}}">
<!-- <view class="altitle"> <!-- <view class="altitle">
<view class="altitle-name">{{item.title}}</view> <view class="altitle-name">{{item.title}}</view>
</view> </view> -->
<image class="banner" src='{{item.imgUrl}}' mode="aspectFill" />--> <image wx:if="{{item.imgUrl!=''}}" class="banner" src='{{item.imgUrl}}' mode="aspectFill" />
<video <video wx:elif="{{item.videoUrl!=''}}" id="video{{index}}" src="{{item.videoUrl}}" show-center-play-btn='{{true}}' bindplay='bindplay' bindended='bindended'></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>
</view> </view>
</swiper-item> </swiper-item>

Loading…
Cancel
Save