Commit b355a0b1 by 李静静

微信低版本加提示信息

parent eba79bbc
...@@ -5,6 +5,7 @@ import {request} from "../../utils/request.js" ...@@ -5,6 +5,7 @@ import {request} from "../../utils/request.js"
Page({ Page({
data: { data: {
modal:false, modal:false,
isLowerVersion:false
// group_list:[] // group_list:[]
}, },
compareVersion(v1, v2) { compareVersion(v1, v2) {
...@@ -32,21 +33,24 @@ Page({ ...@@ -32,21 +33,24 @@ Page({
return 0 return 0
}, },
showVersion:function(){ calVersion:function(){
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
console.log(systemInfo) console.log(systemInfo)
const version = systemInfo.SDKVersion const version = systemInfo.version
const system = systemInfo.system.toLowerCase() const system = systemInfo.system.toLowerCase()
if(system.indexOf("ios")>-1){ if(system.indexOf("ios")>-1){
if(this.compareVersion(version, '2.18.0')<0){ if(this.compareVersion(version, '8.0.6')<0){
this.showServiceNoticMessage() // this.showServiceNoticMessage()
return true
} }
} }
if(system.indexOf("android")>-1){ if(system.indexOf("android")>-1){
if(this.compareVersion(version, '2.17.0')<0){ if(this.compareVersion(version, '8.0.3')<0){
this.showServiceNoticMessage() // this.showServiceNoticMessage()
return true
} }
} }
return false;
}, },
showServiceNoticMessage(){ showServiceNoticMessage(){
wx.showModal({ wx.showModal({
...@@ -56,7 +60,9 @@ Page({ ...@@ -56,7 +60,9 @@ Page({
}) })
}, },
onLoad: function() { onLoad: function() {
this.setData({
isLowerVersion:this.calVersion()
})
}, },
onShow:function(){ onShow:function(){
console.log(this) console.log(this)
...@@ -84,10 +90,16 @@ Page({ ...@@ -84,10 +90,16 @@ Page({
}) })
}, },
startmessage:function(res){ startmessage:function(res){
console.log(res) console.log("start",res)
}, },
completemessage:function(res){ completemessage:function(res){
console.log(res) console.log("complete",arguments,res.detail.notifytype)
if(res.detail&&Number(res.detail.notifytype)===0){
// this.showVersion()
if(!this.data.isLowerVersion){
this.showServiceNoticMessage()
}
}
}, },
modalClose:function(){ modalClose:function(){
this.setData({ this.setData({
......
...@@ -48,10 +48,15 @@ ...@@ -48,10 +48,15 @@
<view class="modal-content"> <view class="modal-content">
<view class="modal-close" bindtap="modalClose"></view> <view class="modal-close" bindtap="modalClose"></view>
<view class="modal-h4">请选择你的备考状态</view> <view class="modal-h4">请选择你的备考状态</view>
<view wx:if="{{isLowerVersion}}" class="modal-version-tips">
<view>检测到你的微信版本过低,可能造成无法加群,</view>
<view>建议升级微信最新版本</view>
</view>
<scroll-view class="modal-list" scroll-y="{{true}}" <scroll-view class="modal-list" scroll-y="{{true}}"
show-scrollbar="{{false}}" show-scrollbar="{{false}}"
> >
<view class="modal-item" wx:for="{{group_list}}" bindtap="showVersion"> <view class="modal-item" wx:for="{{group_list}}" >
<!-- bindtap="showVersion" -->
<view class="modal-item-title">{{item.name}}</view> <view class="modal-item-title">{{item.name}}</view>
<view class="modal-item-p">{{item.desc}}</view> <view class="modal-item-p">{{item.desc}}</view>
<view class="modal-item-after"></view> <view class="modal-item-after"></view>
......
...@@ -121,6 +121,15 @@ ...@@ -121,6 +121,15 @@
line-height: 144rpx; line-height: 144rpx;
font-weight: 600; font-weight: 600;
} }
.modal-version-tips{
margin-bottom: 32rpx;
padding-left: 72rpx;
line-height: 36rpx;
padding-top: 16rpx;
padding-bottom: 16rpx;
background: #FFCACA;
color: #E70000;
}
.modal-list{ .modal-list{
height: 728rpx; height: 728rpx;
margin:0 auto; margin:0 auto;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": false, "useMultiFrameRuntime": true,
"useApiHook": true, "useApiHook": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
...@@ -30,11 +30,13 @@ ...@@ -30,11 +30,13 @@
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"minifyWXSS": true "minifyWXSS": true,
"bundle": false,
"useApiHostProcess": true
}, },
"appid": "wxc2a5e8782fb56ad9", "appid": "wxc2a5e8782fb56ad9",
"projectname": "fk_xcx", "projectname": "fk_xcx",
"libVersion": "2.14.1", "libVersion": "2.19.4",
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment