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
a09ab2cb
Commit
a09ab2cb
authored
Apr 07, 2022
by
李静静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页换成webview里面放
/h5/app3/product/common?id=163链接
parent
c5f7ebdc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
225 deletions
+50
-225
index.js
pages/freeCourse/index.js
+48
-121
index.wxml
pages/freeCourse/index.wxml
+1
-103
request.js
utils/request.js
+1
-1
No files found.
pages/freeCourse/index.js
View file @
a09ab2cb
//
index
.js
//
pages/a/index.wxm
.js
const
app
=
getApp
()
const
app
=
getApp
()
import
{
request
}
from
"../../utils/request.js"
import
{
host
}
from
"../../utils/request.js"
Page
({
Page
({
/**
* 页面的初始数据
*/
data
:
{
data
:
{
modal
:
false
,
url
:
host
+
'/h5/app3/product/common?id='
+
163
isLowerVersion
:
false
// group_list:[]
},
},
compareVersion
(
v1
,
v2
)
{
v1
=
v1
.
split
(
'.'
)
v2
=
v2
.
split
(
'.'
)
const
len
=
Math
.
max
(
v1
.
length
,
v2
.
length
)
while
(
v1
.
length
<
len
)
{
v1
.
push
(
'0'
)
}
while
(
v2
.
length
<
len
)
{
v2
.
push
(
'0'
)
}
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
/**
const
num1
=
parseInt
(
v1
[
i
])
* 生命周期函数--监听页面加载
const
num2
=
parseInt
(
v2
[
i
])
*/
onLoad
:
function
(
options
)
{
},
if
(
num1
>
num2
)
{
/**
return
1
* 生命周期函数--监听页面初次渲染完成
}
else
if
(
num1
<
num2
)
{
*/
return
-
1
onReady
:
function
()
{
}
}
return
0
},
calVersion
:
function
(){
const
systemInfo
=
wx
.
getSystemInfoSync
()
console
.
log
(
systemInfo
)
const
version
=
systemInfo
.
version
const
system
=
systemInfo
.
system
.
toLowerCase
()
if
(
system
.
indexOf
(
"ios"
)
>-
1
){
if
(
this
.
compareVersion
(
version
,
'8.0.6'
)
<
0
){
// this.showServiceNoticMessage()
return
true
}
}
if
(
system
.
indexOf
(
"android"
)
>-
1
){
if
(
this
.
compareVersion
(
version
,
'8.0.3'
)
<
0
){
// this.showServiceNoticMessage()
return
true
}
}
return
false
;
},
showServiceNoticMessage
(
content
){
wx
.
showModal
({
title
:
''
,
content
,
showCancel
:
false
})
},
},
onLoad
:
function
()
{
this
.
setData
({
/**
isLowerVersion
:
this
.
calVersion
()
* 生命周期函数--监听页面显示
})
*/
},
onShow
:
function
()
{
onShow
:
function
(){
console
.
log
(
this
)
this
.
getGroupList
()
},
showModal
:
function
(){
this
.
setData
({
modal
:
true
})
},
},
getGroupList
:
function
(){
console
.
log
(
request
)
request
({
url
:
"/h5/api/group/free_group_list"
,
success
:(
res
)
=>
{
console
.
log
(
res
.
data
)
if
(
res
.
data
&&
res
.
data
.
code
===
0
){
console
.
log
(
res
.
data
.
data
.
list
)
this
.
setData
({
group_list
:
res
.
data
.
data
.
list
,
picture_list
:
res
.
data
.
data
.
picture_list
,
text
:
res
.
data
.
data
.
text
,
btn_pic
:
res
.
data
.
data
.
btn_pic
,
})
}
}
})
},
startmessage
:
function
(
res
){
console
.
log
(
"start"
,
res
)
},
wxShowModal
:
function
(
obj
){
wx
.
showModal
(
obj
)
},
chatGroupComplete
:
function
(
res
){
this
.
completemessage
(
res
,
'入群方式已经通过“服务通知”的形式下发到你的微信'
)
},
contactComplete
:
function
(
res
){
this
.
completemessage
(
res
,
'深蓝小助名片已通过“服务通知”形式下发你的微信'
)
},
completemessage
:
function
(
res
,
message
){
console
.
log
(
"complete"
,
arguments
,
res
.
detail
)
if
(
Number
(
res
.
detail
.
errcode
)
===-
3004
){
wxShowModal
({
title
:
'用户信息授权失败'
,
})
return
}
if
(
res
.
detail
&&
Number
(
res
.
detail
.
notifytype
)
===
0
){
/**
// this.showVersion()
* 生命周期函数--监听页面隐藏
if
(
!
this
.
data
.
isLowerVersion
){
*/
this
.
showServiceNoticMessage
(
message
)
onHide
:
function
()
{
}
}
},
},
modalClose
:
function
(){
this
.
setData
({
/**
modal
:
false
* 生命周期函数--监听页面卸载
})
*/
onUnload
:
function
()
{
},
},
noop
:
function
(
e
){
//console.log(e)
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
},
gotoweiban
:
function
(
e
){
console
.
log
(
e
.
target
.
id
)
/**
wx
.
navigateTo
({
* 页面上拉触底事件的处理函数
url
:
'/pages/weibanzhushou/index?id='
+
e
.
target
.
id
,
*/
})
onReachBottom
:
function
()
{
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
},
},
onShareTimeline
:
function
()
{
onShareTimeline
:
function
()
{
...
...
pages/freeCourse/index.wxml
View file @
a09ab2cb
<!--index.wxml-->
<!--index.wxml-->
<view class="container">
<view class="container">
<web-view src="{{url}}"></web-view>
<!-- <view class="header">
<image src="../../images/logo.png" class="logo"/>
</view> -->
<!-- <view class="content">
<view class="content-h3">在专属社群你可以获得:</view>
<view class="content-item">
<image src="../../images/content-img-1.png" class="content-img" />
<view class="content-text-container">
<text class="content-item-h4">海量免费资料</text>
<text class="content-p">大量、系统、全阶段的法考资料免费送。</text>
</view>
</view>
<view class="content-item">
<image src="../../images/content-img-2.png" class="content-img" />
<view class="content-text-container">
<text class="content-item-h4">每日学习计划</text>
<text class="content-p">精准把握学习进度,稳扎稳打,逐步提升。</text>
</view>
</view>
<view class="content-item">
<image src="../../images/content-img-3.png" class="content-img" />
<view class="content-text-container">
<text class="content-item-h4">浓厚学习氛围</text>
<text class="content-p">群内特设每日一题,相互讨论,共同进步。</text>
</view>
</view>
<view class="content-item">
<image src="../../images/content-img-4.png" class="content-img" />
<view class="content-text-container">
<text class="content-item-h4">班主任强督导</text>
<text class="content-p">群内特设每日一题,相互讨论,共同进步。</text>
</view>
</view>
</view> -->
<view class="img_list">
<image
wx:for="{{picture_list}}"
src="{{item.url}}"
class="img_item"
style="height:{{item.height}}rpx"
></image>
</view>
<view wx:if="{{btn_pic}}" class="join-btn" bindtap="showModal">
<image src="{{btn_pic.url}}" class="join-btn-bg" />
<!-- <view class="join-btn-text" >加入专属备考群</view> -->
</view>
<view wx:if="{{modal}}" class="modal"
catch:touchmove="noop"
>
<view class="modal-content">
<view class="modal-close" bindtap="modalClose"></view>
<view class="modal-h4">{{text}}</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-title">{{item.name}}</view>
<view class="modal-item-p">{{item.desc}}</view>
<view class="modal-item-after"></view>
<view class="modal-item-join">
<!-- url='https://work.weixin.qq.com/gm/24e84fe11d990cd99fa67ccd99f1aa4b'
url='https://work.weixin.qq.com/gm/{{item.uniq_code}}'
-->
<chatGroupCell
paddingStyle="80"
wx:if="{{item.type===1}}"
url='{{item.uniq_code}}'
bind:startmessage="startmessage"
bind:completemessage="chatGroupComplete"
/>
<contactCell
styleType="3"
paddingStyle="30"
isMask="{{1}}"
wx:if="{{item.type===2}}"
plugid='{{item.uniq_code}}'
bind:completemessage="contactComplete"
class="contact-cell"
/>
<view
wx:if="{{item.type===3}}"
class="weibanzhushou"
bindtap="gotoweiban"
id="{{item.id}}"
></view>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
utils/request.js
View file @
a09ab2cb
//const host='http://ljj.dev.neoteched.com' //开发
//const host='http://ljj.dev.neoteched.com' //开发
//const host='http://lxlsk.dev.neoteched.com' //开发
//const host='http://lxlsk.dev.neoteched.com' //开发
//const host='https://winterfell-alpha.neoteched.com' //测试
//const host='https://winterfell-alpha.neoteched.com' //测试
const
host
=
'https://sk2.shenlancity.com'
//线上
export
const
host
=
'https://sk2.shenlancity.com'
//线上
export
const
request
=
({
url
,
data
,
method
,
header
,
success
,
fail
})
=>
{
export
const
request
=
({
url
,
data
,
method
,
header
,
success
,
fail
})
=>
{
if
(
!
url
){
if
(
!
url
){
...
...
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