Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Compass
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
zong
Compass
Commits
acdfbb75
Commit
acdfbb75
authored
4 years ago
by
tangjinlin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'znz_dev' into 'master'
0519 See merge request
!13
parents
54ace75f
ec3db08c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
59 deletions
+88
-59
app.js
src/wx/app.js
+1
-19
classDetails.js
src/wx/pages/classDetails/classDetails.js
+27
-27
classDetails.wxml
src/wx/pages/classDetails/classDetails.wxml
+7
-7
faq.wxml
src/wx/pages/faq/faq.wxml
+1
-1
index.js
src/wx/pages/index/index.js
+37
-0
otherActivity.js
src/wx/pages/otherActivity/otherActivity.js
+1
-1
otherActivity.wxml
src/wx/pages/otherActivity/otherActivity.wxml
+1
-1
volunteers.wxml
src/wx/pages/volunteers/volunteers.wxml
+2
-2
volunteersEventDetail.js
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
+10
-0
volunteersEventDetail.wxml
...wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
+1
-1
No files found.
src/wx/app.js
View file @
acdfbb75
...
...
@@ -37,11 +37,6 @@ App({
unionId
:
resp
.
data
.
result
.
unionId
,
registed
:
resp
.
data
.
result
.
registed
};
// wx.showToast({
// title: "unionId=" + res.data.result.unionId,
// icon: 'success',
// duration: 2000
// });
wx
.
setStorageSync
(
"config"
,
config
);
},
fail
(
resp
)
{
...
...
@@ -57,20 +52,7 @@ App({
}
})
//获取并保存用户的经纬度信息
wx
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
let
location
=
{
latitude
:
res
.
latitude
,
longitude
:
res
.
longitude
};
wx
.
setStorage
({
key
:
'location'
,
data
:
location
,
})
}
})
// 获取用户信息
wx
.
getSetting
({
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/classDetails/classDetails.js
View file @
acdfbb75
...
...
@@ -17,8 +17,9 @@ Page({
mediaCount
:
''
,
mediaList
:
[],
videoHeight
:
'150'
,
play
:
0
,
fufeiPage
:
0
,
showPay
:
0
,
showPlay
:
0
,
playUrl
:
''
,
detailComment
:
''
,
price
:
0
,
//购买价格,合集则为合集价格,单个视频则为单个视频的价格
...
...
@@ -95,7 +96,7 @@ Page({
//点击观看处理
learn
(
e
)
{
var
that
=
this
;
let
id
=
e
.
currentTarget
.
dataset
[
'id'
];
var
id
=
e
.
currentTarget
.
dataset
[
'id'
];
wx
.
getStorage
({
key
:
'config'
,
success
:
function
(
res
)
{
...
...
@@ -110,16 +111,18 @@ Page({
success
:
function
(
resp
)
{
console
.
log
(
resp
)
if
(
resp
.
data
.
status
==
'OK'
)
{
if
(
resp
.
data
.
result
.
courseMediaDat
.
haveBuy
&&
!
resp
.
data
.
result
.
courseMediaDat
.
is_free
||
resp
.
data
.
result
.
courseMediaDat
.
is_free
)
{
if
(
resp
.
data
.
result
.
courseMediaDat
.
haveBuy
)
{
//开始播放
that
.
setData
({
p
lay
:
1
,
showP
lay
:
1
,
playUrl
:
resp
.
data
.
result
.
courseMediaDat
.
media
,
detailComment
:
resp
.
data
.
result
.
courseMediaDat
.
comment
})
}
else
{
//显示购买对话框
that
.
setData
({
playUrl
:
resp
.
data
.
result
.
courseMediaDat
.
media
,
fufeiPage
:
1
,
showPay
:
1
,
price
:
resp
.
data
.
result
.
courseMediaDat
.
price
})
}
...
...
@@ -130,13 +133,6 @@ Page({
},
})
// console.log(index)
// var playUrl = this.data.mediaList[index].media;
// playUrl=playUrl.split('?')[0];
// this.setData({
// playUrl:playUrl,
// play:1
// })
},
// 查询课程详细
...
...
@@ -168,10 +164,12 @@ Page({
updateTime
:
res
.
data
.
result
.
updateTime
,
viewCount
:
res
.
data
.
result
.
viewCount
,
mediaList
:
res
.
data
.
result
.
mediaList
,
price
:
res
.
data
.
result
.
price
price
:
res
.
data
.
result
.
price
,
haveBuy
:
res
.
data
.
result
.
haveBuy
})
//判断为单个还是合集
if
(
res
.
data
.
result
.
courseId
==
0
)
{
//单个视频的情况下,支付价格重新赋值
that
.
setData
({
price
:
res
.
data
.
result
.
mediaList
[
0
].
price
})
...
...
@@ -187,12 +185,12 @@ Page({
videoplay
()
{
if
(
this
.
data
.
show1
)
{
this
.
setData
({
fufeiPage
:
1
showPay
:
1
})
this
.
fufeilook
()
}
else
{
this
.
setData
({
p
lay
:
1
showP
lay
:
1
})
this
.
classDerails
();
var
query
=
wx
.
createSelectorQuery
();
...
...
@@ -205,9 +203,11 @@ Page({
}).
exec
();
}
},
//播放返回
backplay
()
{
this
.
setData
({
p
lay
:
0
showP
lay
:
0
})
},
...
...
@@ -234,12 +234,16 @@ Page({
complete
:
function
(
res
)
{},
})
},
backfufei
()
{
//取消支付
cancelPay
()
{
this
.
setData
({
fufeiPage
:
0
showPay
:
0
})
},
surefufei
()
{
//确认支付
surePay
()
{
var
that
=
this
;
wx
.
getStorage
({
key
:
'config'
,
...
...
@@ -250,6 +254,7 @@ Page({
data
:
{
unionId
:
res
.
data
.
unionId
,
openId
:
res
.
data
.
openId
,
courseId
:
that
.
data
.
courseId
,
mediaId
:
that
.
data
.
mediaId
},
success
:
function
(
resp
)
{
...
...
@@ -264,8 +269,8 @@ Page({
paySign
:
result
.
paySign
,
success
(
res
)
{
that
.
setData
({
fufeiPage
:
0
,
p
lay
:
1
showPay
:
0
,
showP
lay
:
1
})
},
fail
(
res
)
{
...
...
@@ -278,9 +283,5 @@ Page({
}
},
})
// this.setData({
// fufeiPage: 0
// })
}
})
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/wx/pages/classDetails/classDetails.wxml
View file @
acdfbb75
...
...
@@ -47,8 +47,8 @@
<block wx:for="{{mediaList}}">
<view class="catalog">
<text bindtap='videoplay'>{{item.title}}</text>
<image src='/img/suo1.png' class='suo' wx:if="{{!haveBuy&&price>0}}"
bindtap=""
></image>
<image src='/img/sanjiao.png' class='suo' wx:if="{{haveBuy||price==0}}" bindtap="
playCourse
"></image>
<image src='/img/suo1.png' class='suo' wx:if="{{!haveBuy&&price>0}}" ></image>
<image src='/img/sanjiao.png' class='suo' wx:if="{{haveBuy||price==0}}" bindtap="
learn" data-id="{{item.id}}
"></image>
</view>
</block>
</view>
...
...
@@ -66,10 +66,10 @@
<!-- 合集课程 -->
<view class="buyBtn" wx:if="{{courseId>0 && haveBuy==false && price > 0}}" bindtap="learn" data-id="{{mediaId}}">课程金额:{{price}}</view>
<view class="buyBtn" wx:elif="{{courseId>0}}"
bindtap="learn" data-id="{{mediaId}}">
学习</view>
<view class="buyBtn" wx:elif="{{courseId>0}}"
>请点击目录
学习</view>
</view>
</view>
<view class='play' wx:if="{{
p
lay==1}}">
<view class='play' wx:if="{{
showP
lay==1}}">
<video class='video' src="{{playUrl}}"></video>
<view style='font-size:14px;padding-left:5px;margin-top:10px;'>
<image src='../../img/sanjiao.png'></image>课程简介
...
...
@@ -83,7 +83,7 @@
<van-button type="warning" bind:click="backplay" size='large'>返回</van-button>
</view>
</view>
<view class='fufeilook' wx:if="{{
fufeiPage
==1}}">
<view class='fufeilook' wx:if="{{
showPay
==1}}">
<view class='con_fufeilook'>
<image class="zfbg" src="/img/zhifubg.png" mode="widthFix"></image>
<image bindtap='backfufei' src="/img/close.png"></image>
...
...
@@ -93,8 +93,8 @@
<view style="margin: 10px 0 50px;font-size: 18px;"><text style="color:red;">¥{{price}}</text></view>
<view style="color: #898989;font-size: 12px">费用用途:所收金额全部用于公益用途</view>
<view class='fufeiBtn'>
<view style="background: linear-gradient(to right, #e85c6d, #fb689b);color:#fff" bindtap='sure
fufei
'>确认</view>
<view style="border: 1rpx solid #fd66a1" bindtap='
backfufei
'>取消</view>
<view style="background: linear-gradient(to right, #e85c6d, #fb689b);color:#fff" bindtap='sure
Pay
'>确认</view>
<view style="border: 1rpx solid #fd66a1" bindtap='
cancelPay
'>取消</view>
</view>
</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/faq/faq.wxml
View file @
acdfbb75
...
...
@@ -14,7 +14,7 @@
<view class='topTitle'>
<view class='leftTitle'>
<view class='leftLine'></view>
<text class="hot_title">热门
资讯
</text>
<text class="hot_title">热门
咨询
</text>
</view>
<view class='rightTitle' bindtap='myFaq'>
<text>我的咨询</text>
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/index/index.js
View file @
acdfbb75
...
...
@@ -38,6 +38,25 @@ Page({
var
location
=
wx
.
getStorageSync
(
'location'
);
var
latitude
=
location
.
latitude
;
var
longitude
=
location
.
longitude
;
//如果为空,再次调起获取位置
//获取并保存用户的经纬度信息
if
(
!
latitude
||
!
longitude
)
{
wx
.
getLocation
({
type
:
'wgs84'
,
success
:
function
(
res
)
{
let
location
=
{
latitude
:
res
.
latitude
,
longitude
:
res
.
longitude
};
//本地保存地理位置数据
wx
.
setStorage
({
key
:
'location'
,
data
:
location
,
})
latitude
=
location
.
latitude
longitude
=
location
.
longitude
//获取首页数据
if
(
config
.
unionId
!==
undefined
)
{
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
}
else
{
...
...
@@ -46,8 +65,24 @@ Page({
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
},
1000
);
}
}
})
}
else
{
//获取首页数据
if
(
config
.
unionId
!==
undefined
)
{
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
}
else
{
setTimeout
(
function
()
{
config
=
wx
.
getStorageSync
(
'config'
);
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
},
1000
);
}
}
},
//获取首页数据
getUserRole
(
unionId
,
latitude
,
longitude
)
{
var
that
=
this
;
var
location
=
wx
.
getStorageSync
(
'location'
);
...
...
@@ -68,12 +103,14 @@ Page({
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
var
role
=
res
.
data
.
result
.
role
;
/**
if ((role == 4 || role == 5 || role == 6) && res.data.result.childAge == 0) {
wx.navigateTo({
url: '/pages/ageChange/ageChange',
})
return;
}
*/
//保存用户当前的省市区县信息
location
.
province
=
res
.
data
.
result
.
province
location
.
city
=
res
.
data
.
result
.
city
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/otherActivity/otherActivity.js
View file @
acdfbb75
...
...
@@ -52,7 +52,7 @@ Page({
this
.
getList
();
}
else
{
wx
.
showToast
({
title
:
'没有更多
消息
啦。'
,
title
:
'没有更多
活动
啦。'
,
icon
:
'success'
,
duration
:
2000
});
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/otherActivity/otherActivity.wxml
View file @
acdfbb75
...
...
@@ -7,7 +7,7 @@
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<view>
<view>征集范围:{{item.scope}}</view>
<view>征集人数:{{item.max_member}}
人
</view>
<view>征集人数:{{item.max_member}}</view>
<view>发布单位:{{item.author}}</view>
<view>报名截止:{{item.enroll_time}}</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/volunteers/volunteers.wxml
View file @
acdfbb75
...
...
@@ -46,7 +46,7 @@
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<view>
<view>征集范围:{{item.scope}}</view>
<view>征集人数:{{item.max_member}}
人
</view>
<view>征集人数:{{item.max_member}}</view>
<view>发布单位:{{item.author}}</view>
<view>报名截止:{{item.enroll_time}}</view>
</view>
...
...
@@ -70,7 +70,7 @@
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<view>
<view>征集范围:{{item.scope}}</view>
<view>征集人数:{{item.max_member}}
人
</view>
<view>征集人数:{{item.max_member}}</view>
<view>发布单位:{{item.author}}</view>
<view>报名截止:{{item.enroll_time}}</view>
</view>
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
View file @
acdfbb75
...
...
@@ -19,6 +19,7 @@ Page({
isCircleOwner
:
false
,
isMember
:
false
,
isCircleOwner
:
false
,
maxMemberTitle
:
''
,
ownerCircleList
:[],
//圈主拥有的圈子列表
checkCircleIndex
:[],
//临时记录圈子选中状态
...
...
@@ -71,6 +72,15 @@ Page({
circleMemberList
:
res
.
data
.
result
.
circleMemberList
,
showOwnerDialog
:
false
})
if
(
res
.
data
.
result
.
volunteerEventDat
.
max_member
>
0
)
{
that
.
setData
({
maxMemberTitle
:
res
.
data
.
result
.
volunteerEventDat
.
max_member
+
"人"
})
}
else
{
that
.
setData
({
maxMemberTitle
:
"不限"
})
}
//设定选择的默认状态
if
(
res
.
data
.
result
.
isCircleOwner
)
{
var
tmp
=
[];
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
View file @
acdfbb75
...
...
@@ -23,7 +23,7 @@
<text class="titleText">征集范围:</text><text class="dataText">{{volunteerEventDat.scope}}\n</text>
</view>
<view class="row">
<text class="titleText">活动人数:</text><text class="dataText">{{
volunteerEventDat.max_member}}人
</text>
<text class="titleText">活动人数:</text><text class="dataText">{{
maxMemberTitle}}
</text>
</view>
<view class="row">
<text class="titleText">联系人:</text><text class="dataText">{{volunteerEventDat.leader_name}}</text>
...
...
This diff is collapsed.
Click to expand it.
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