Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fk_xcx
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李静静
fk_xcx
Commits
b355a0b1
Commit
b355a0b1
authored
Sep 29, 2021
by
李静静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信低版本加提示信息
parent
eba79bbc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
13 deletions
+41
-13
index.js
pages/freeCourse/index.js
+21
-9
index.wxml
pages/freeCourse/index.wxml
+6
-1
index.wxss
pages/freeCourse/index.wxss
+9
-0
project.config.json
project.config.json
+5
-3
No files found.
pages/freeCourse/index.js
View file @
b355a0b1
...
@@ -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
},
},
show
Version
:
function
(){
cal
Version
:
function
(){
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
console
.
log
(
systemInfo
)
console
.
log
(
systemInfo
)
const
version
=
systemInfo
.
SDKV
ersion
const
version
=
systemInfo
.
v
ersion
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
({
...
...
pages/freeCourse/index.wxml
View file @
b355a0b1
...
@@ -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>
...
...
pages/freeCourse/index.wxss
View file @
b355a0b1
...
@@ -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;
...
...
project.config.json
View file @
b355a0b1
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"checkSiteMap"
:
true
,
"checkSiteMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"uploadWithSourceMap"
:
true
,
"compileHotReLoad"
:
false
,
"compileHotReLoad"
:
false
,
"useMultiFrameRuntime"
:
fals
e
,
"useMultiFrameRuntime"
:
tru
e
,
"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.1
4.1
"
,
"libVersion"
:
"2.1
9.4
"
,
"simulatorType"
:
"wechat"
,
"simulatorType"
:
"wechat"
,
"simulatorPluginLibVersion"
:
{},
"simulatorPluginLibVersion"
:
{},
"condition"
:
{
"condition"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment