Commit b355a0b1 by 李静静

微信低版本加提示信息

parent eba79bbc
......@@ -5,6 +5,7 @@ import {request} from "../../utils/request.js"
Page({
data: {
modal:false,
isLowerVersion:false
// group_list:[]
},
compareVersion(v1, v2) {
......@@ -32,21 +33,24 @@ Page({
return 0
},
showVersion:function(){
calVersion:function(){
const systemInfo = wx.getSystemInfoSync()
console.log(systemInfo)
const version = systemInfo.SDKVersion
const version = systemInfo.version
const system = systemInfo.system.toLowerCase()
if(system.indexOf("ios")>-1){
if(this.compareVersion(version, '2.18.0')<0){
this.showServiceNoticMessage()
if(this.compareVersion(version, '8.0.6')<0){
// this.showServiceNoticMessage()
return true
}
}
if(system.indexOf("android")>-1){
if(this.compareVersion(version, '2.17.0')<0){
this.showServiceNoticMessage()
if(this.compareVersion(version, '8.0.3')<0){
// this.showServiceNoticMessage()
return true
}
}
return false;
},
showServiceNoticMessage(){
wx.showModal({
......@@ -56,7 +60,9 @@ Page({
})
},
onLoad: function() {
this.setData({
isLowerVersion:this.calVersion()
})
},
onShow:function(){
console.log(this)
......@@ -84,10 +90,16 @@ Page({
})
},
startmessage:function(res){
console.log(res)
console.log("start",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(){
this.setData({
......
......@@ -48,10 +48,15 @@
<view class="modal-content">
<view class="modal-close" bindtap="modalClose"></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}}"
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-p">{{item.desc}}</view>
<view class="modal-item-after"></view>
......
......@@ -121,6 +121,15 @@
line-height: 144rpx;
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{
height: 728rpx;
margin:0 auto;
......
......@@ -17,7 +17,7 @@
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"babelSetting": {
"ignore": [],
......@@ -30,11 +30,13 @@
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
"minifyWXSS": true,
"bundle": false,
"useApiHostProcess": true
},
"appid": "wxc2a5e8782fb56ad9",
"projectname": "fk_xcx",
"libVersion": "2.14.1",
"libVersion": "2.19.4",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"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