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
ec3db08c
Commit
ec3db08c
authored
May 19, 2020
by
tangjinlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0519
parent
43add255
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 @
ec3db08c
...
@@ -37,11 +37,6 @@ App({
...
@@ -37,11 +37,6 @@ App({
unionId
:
resp
.
data
.
result
.
unionId
,
unionId
:
resp
.
data
.
result
.
unionId
,
registed
:
resp
.
data
.
result
.
registed
registed
:
resp
.
data
.
result
.
registed
};
};
// wx.showToast({
// title: "unionId=" + res.data.result.unionId,
// icon: 'success',
// duration: 2000
// });
wx
.
setStorageSync
(
"config"
,
config
);
wx
.
setStorageSync
(
"config"
,
config
);
},
},
fail
(
resp
)
{
fail
(
resp
)
{
...
@@ -57,20 +52,7 @@ App({
...
@@ -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
({
wx
.
getSetting
({
...
...
src/wx/pages/classDetails/classDetails.js
View file @
ec3db08c
...
@@ -17,8 +17,9 @@ Page({
...
@@ -17,8 +17,9 @@ Page({
mediaCount
:
''
,
mediaCount
:
''
,
mediaList
:
[],
mediaList
:
[],
videoHeight
:
'150'
,
videoHeight
:
'150'
,
play
:
0
,
fufeiPage
:
0
,
showPay
:
0
,
showPlay
:
0
,
playUrl
:
''
,
playUrl
:
''
,
detailComment
:
''
,
detailComment
:
''
,
price
:
0
,
//购买价格,合集则为合集价格,单个视频则为单个视频的价格
price
:
0
,
//购买价格,合集则为合集价格,单个视频则为单个视频的价格
...
@@ -95,7 +96,7 @@ Page({
...
@@ -95,7 +96,7 @@ Page({
//点击观看处理
//点击观看处理
learn
(
e
)
{
learn
(
e
)
{
var
that
=
this
;
var
that
=
this
;
let
id
=
e
.
currentTarget
.
dataset
[
'id'
];
var
id
=
e
.
currentTarget
.
dataset
[
'id'
];
wx
.
getStorage
({
wx
.
getStorage
({
key
:
'config'
,
key
:
'config'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
...
@@ -110,16 +111,18 @@ Page({
...
@@ -110,16 +111,18 @@ Page({
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
console
.
log
(
resp
)
console
.
log
(
resp
)
if
(
resp
.
data
.
status
==
'OK'
)
{
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
({
that
.
setData
({
p
lay
:
1
,
showP
lay
:
1
,
playUrl
:
resp
.
data
.
result
.
courseMediaDat
.
media
,
playUrl
:
resp
.
data
.
result
.
courseMediaDat
.
media
,
detailComment
:
resp
.
data
.
result
.
courseMediaDat
.
comment
detailComment
:
resp
.
data
.
result
.
courseMediaDat
.
comment
})
})
}
else
{
}
else
{
//显示购买对话框
that
.
setData
({
that
.
setData
({
playUrl
:
resp
.
data
.
result
.
courseMediaDat
.
media
,
playUrl
:
resp
.
data
.
result
.
courseMediaDat
.
media
,
fufeiPage
:
1
,
showPay
:
1
,
price
:
resp
.
data
.
result
.
courseMediaDat
.
price
price
:
resp
.
data
.
result
.
courseMediaDat
.
price
})
})
}
}
...
@@ -130,13 +133,6 @@ Page({
...
@@ -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({
...
@@ -168,10 +164,12 @@ Page({
updateTime
:
res
.
data
.
result
.
updateTime
,
updateTime
:
res
.
data
.
result
.
updateTime
,
viewCount
:
res
.
data
.
result
.
viewCount
,
viewCount
:
res
.
data
.
result
.
viewCount
,
mediaList
:
res
.
data
.
result
.
mediaList
,
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
)
{
if
(
res
.
data
.
result
.
courseId
==
0
)
{
//单个视频的情况下,支付价格重新赋值
that
.
setData
({
that
.
setData
({
price
:
res
.
data
.
result
.
mediaList
[
0
].
price
price
:
res
.
data
.
result
.
mediaList
[
0
].
price
})
})
...
@@ -187,12 +185,12 @@ Page({
...
@@ -187,12 +185,12 @@ Page({
videoplay
()
{
videoplay
()
{
if
(
this
.
data
.
show1
)
{
if
(
this
.
data
.
show1
)
{
this
.
setData
({
this
.
setData
({
fufeiPage
:
1
showPay
:
1
})
})
this
.
fufeilook
()
this
.
fufeilook
()
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
p
lay
:
1
showP
lay
:
1
})
})
this
.
classDerails
();
this
.
classDerails
();
var
query
=
wx
.
createSelectorQuery
();
var
query
=
wx
.
createSelectorQuery
();
...
@@ -205,9 +203,11 @@ Page({
...
@@ -205,9 +203,11 @@ Page({
}).
exec
();
}).
exec
();
}
}
},
},
//播放返回
backplay
()
{
backplay
()
{
this
.
setData
({
this
.
setData
({
p
lay
:
0
showP
lay
:
0
})
})
},
},
...
@@ -234,12 +234,16 @@ Page({
...
@@ -234,12 +234,16 @@ Page({
complete
:
function
(
res
)
{},
complete
:
function
(
res
)
{},
})
})
},
},
backfufei
()
{
//取消支付
cancelPay
()
{
this
.
setData
({
this
.
setData
({
fufeiPage
:
0
showPay
:
0
})
})
},
},
surefufei
()
{
//确认支付
surePay
()
{
var
that
=
this
;
var
that
=
this
;
wx
.
getStorage
({
wx
.
getStorage
({
key
:
'config'
,
key
:
'config'
,
...
@@ -250,6 +254,7 @@ Page({
...
@@ -250,6 +254,7 @@ Page({
data
:
{
data
:
{
unionId
:
res
.
data
.
unionId
,
unionId
:
res
.
data
.
unionId
,
openId
:
res
.
data
.
openId
,
openId
:
res
.
data
.
openId
,
courseId
:
that
.
data
.
courseId
,
mediaId
:
that
.
data
.
mediaId
mediaId
:
that
.
data
.
mediaId
},
},
success
:
function
(
resp
)
{
success
:
function
(
resp
)
{
...
@@ -264,8 +269,8 @@ Page({
...
@@ -264,8 +269,8 @@ Page({
paySign
:
result
.
paySign
,
paySign
:
result
.
paySign
,
success
(
res
)
{
success
(
res
)
{
that
.
setData
({
that
.
setData
({
fufeiPage
:
0
,
showPay
:
0
,
p
lay
:
1
showP
lay
:
1
})
})
},
},
fail
(
res
)
{
fail
(
res
)
{
...
@@ -278,9 +283,5 @@ Page({
...
@@ -278,9 +283,5 @@ Page({
}
}
},
},
})
})
// this.setData({
// fufeiPage: 0
// })
}
}
})
})
\ No newline at end of file
src/wx/pages/classDetails/classDetails.wxml
View file @
ec3db08c
...
@@ -47,8 +47,8 @@
...
@@ -47,8 +47,8 @@
<block wx:for="{{mediaList}}">
<block wx:for="{{mediaList}}">
<view class="catalog">
<view class="catalog">
<text bindtap='videoplay'>{{item.title}}</text>
<text bindtap='videoplay'>{{item.title}}</text>
<image src='/img/suo1.png' class='suo' wx:if="{{!haveBuy&&price>0}}"
bindtap=""
></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="
playCourse
"></image>
<image src='/img/sanjiao.png' class='suo' wx:if="{{haveBuy||price==0}}" bindtap="
learn" data-id="{{item.id}}
"></image>
</view>
</view>
</block>
</block>
</view>
</view>
...
@@ -66,10 +66,10 @@
...
@@ -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: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>
</view>
<view class='play' wx:if="{{
p
lay==1}}">
<view class='play' wx:if="{{
showP
lay==1}}">
<video class='video' src="{{playUrl}}"></video>
<video class='video' src="{{playUrl}}"></video>
<view style='font-size:14px;padding-left:5px;margin-top:10px;'>
<view style='font-size:14px;padding-left:5px;margin-top:10px;'>
<image src='../../img/sanjiao.png'></image>课程简介
<image src='../../img/sanjiao.png'></image>课程简介
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<van-button type="warning" bind:click="backplay" size='large'>返回</van-button>
<van-button type="warning" bind:click="backplay" size='large'>返回</van-button>
</view>
</view>
</view>
</view>
<view class='fufeilook' wx:if="{{
fufeiPage
==1}}">
<view class='fufeilook' wx:if="{{
showPay
==1}}">
<view class='con_fufeilook'>
<view class='con_fufeilook'>
<image class="zfbg" src="/img/zhifubg.png" mode="widthFix"></image>
<image class="zfbg" src="/img/zhifubg.png" mode="widthFix"></image>
<image bindtap='backfufei' src="/img/close.png"></image>
<image bindtap='backfufei' src="/img/close.png"></image>
...
@@ -93,8 +93,8 @@
...
@@ -93,8 +93,8 @@
<view style="margin: 10px 0 50px;font-size: 18px;"><text style="color:red;">¥{{price}}</text></view>
<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 style="color: #898989;font-size: 12px">费用用途:所收金额全部用于公益用途</view>
<view class='fufeiBtn'>
<view class='fufeiBtn'>
<view style="background: linear-gradient(to right, #e85c6d, #fb689b);color:#fff" bindtap='sure
fufei
'>确认</view>
<view style="background: linear-gradient(to right, #e85c6d, #fb689b);color:#fff" bindtap='sure
Pay
'>确认</view>
<view style="border: 1rpx solid #fd66a1" bindtap='
backfufei
'>取消</view>
<view style="border: 1rpx solid #fd66a1" bindtap='
cancelPay
'>取消</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
src/wx/pages/faq/faq.wxml
View file @
ec3db08c
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<view class='topTitle'>
<view class='topTitle'>
<view class='leftTitle'>
<view class='leftTitle'>
<view class='leftLine'></view>
<view class='leftLine'></view>
<text class="hot_title">热门
资讯
</text>
<text class="hot_title">热门
咨询
</text>
</view>
</view>
<view class='rightTitle' bindtap='myFaq'>
<view class='rightTitle' bindtap='myFaq'>
<text>我的咨询</text>
<text>我的咨询</text>
...
...
src/wx/pages/index/index.js
View file @
ec3db08c
...
@@ -38,6 +38,25 @@ Page({
...
@@ -38,6 +38,25 @@ Page({
var
location
=
wx
.
getStorageSync
(
'location'
);
var
location
=
wx
.
getStorageSync
(
'location'
);
var
latitude
=
location
.
latitude
;
var
latitude
=
location
.
latitude
;
var
longitude
=
location
.
longitude
;
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
)
{
if
(
config
.
unionId
!==
undefined
)
{
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
}
else
{
}
else
{
...
@@ -46,8 +65,24 @@ Page({
...
@@ -46,8 +65,24 @@ Page({
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
that
.
getUserRole
(
config
.
unionId
,
latitude
,
longitude
);
},
1000
);
},
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
)
{
getUserRole
(
unionId
,
latitude
,
longitude
)
{
var
that
=
this
;
var
that
=
this
;
var
location
=
wx
.
getStorageSync
(
'location'
);
var
location
=
wx
.
getStorageSync
(
'location'
);
...
@@ -68,12 +103,14 @@ Page({
...
@@ -68,12 +103,14 @@ Page({
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
statusCode
==
200
)
{
var
role
=
res
.
data
.
result
.
role
;
var
role
=
res
.
data
.
result
.
role
;
/**
if ((role == 4 || role == 5 || role == 6) && res.data.result.childAge == 0) {
if ((role == 4 || role == 5 || role == 6) && res.data.result.childAge == 0) {
wx.navigateTo({
wx.navigateTo({
url: '/pages/ageChange/ageChange',
url: '/pages/ageChange/ageChange',
})
})
return;
return;
}
}
*/
//保存用户当前的省市区县信息
//保存用户当前的省市区县信息
location
.
province
=
res
.
data
.
result
.
province
location
.
province
=
res
.
data
.
result
.
province
location
.
city
=
res
.
data
.
result
.
city
location
.
city
=
res
.
data
.
result
.
city
...
...
src/wx/pages/otherActivity/otherActivity.js
View file @
ec3db08c
...
@@ -52,7 +52,7 @@ Page({
...
@@ -52,7 +52,7 @@ Page({
this
.
getList
();
this
.
getList
();
}
else
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'没有更多
消息
啦。'
,
title
:
'没有更多
活动
啦。'
,
icon
:
'success'
,
icon
:
'success'
,
duration
:
2000
duration
:
2000
});
});
...
...
src/wx/pages/otherActivity/otherActivity.wxml
View file @
ec3db08c
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<view>
<view>
<view>征集范围:{{item.scope}}</view>
<view>征集范围:{{item.scope}}</view>
<view>征集人数:{{item.max_member}}
人
</view>
<view>征集人数:{{item.max_member}}</view>
<view>发布单位:{{item.author}}</view>
<view>发布单位:{{item.author}}</view>
<view>报名截止:{{item.enroll_time}}</view>
<view>报名截止:{{item.enroll_time}}</view>
</view>
</view>
...
...
src/wx/pages/volunteers/volunteers.wxml
View file @
ec3db08c
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<view>
<view>
<view>征集范围:{{item.scope}}</view>
<view>征集范围:{{item.scope}}</view>
<view>征集人数:{{item.max_member}}
人
</view>
<view>征集人数:{{item.max_member}}</view>
<view>发布单位:{{item.author}}</view>
<view>发布单位:{{item.author}}</view>
<view>报名截止:{{item.enroll_time}}</view>
<view>报名截止:{{item.enroll_time}}</view>
</view>
</view>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<text style="background:#{{item.status_title=='征集中'?'c1527e':'0a9a7b'}}">{{item.status_title}}</text>
<view>
<view>
<view>征集范围:{{item.scope}}</view>
<view>征集范围:{{item.scope}}</view>
<view>征集人数:{{item.max_member}}
人
</view>
<view>征集人数:{{item.max_member}}</view>
<view>发布单位:{{item.author}}</view>
<view>发布单位:{{item.author}}</view>
<view>报名截止:{{item.enroll_time}}</view>
<view>报名截止:{{item.enroll_time}}</view>
</view>
</view>
...
...
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
View file @
ec3db08c
...
@@ -19,6 +19,7 @@ Page({
...
@@ -19,6 +19,7 @@ Page({
isCircleOwner
:
false
,
isCircleOwner
:
false
,
isMember
:
false
,
isMember
:
false
,
isCircleOwner
:
false
,
isCircleOwner
:
false
,
maxMemberTitle
:
''
,
ownerCircleList
:[],
//圈主拥有的圈子列表
ownerCircleList
:[],
//圈主拥有的圈子列表
checkCircleIndex
:[],
//临时记录圈子选中状态
checkCircleIndex
:[],
//临时记录圈子选中状态
...
@@ -71,6 +72,15 @@ Page({
...
@@ -71,6 +72,15 @@ Page({
circleMemberList
:
res
.
data
.
result
.
circleMemberList
,
circleMemberList
:
res
.
data
.
result
.
circleMemberList
,
showOwnerDialog
:
false
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
)
{
if
(
res
.
data
.
result
.
isCircleOwner
)
{
var
tmp
=
[];
var
tmp
=
[];
...
...
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
View file @
ec3db08c
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<text class="titleText">征集范围:</text><text class="dataText">{{volunteerEventDat.scope}}\n</text>
<text class="titleText">征集范围:</text><text class="dataText">{{volunteerEventDat.scope}}\n</text>
</view>
</view>
<view class="row">
<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>
<view class="row">
<view class="row">
<text class="titleText">联系人:</text><text class="dataText">{{volunteerEventDat.leader_name}}</text>
<text class="titleText">联系人:</text><text class="dataText">{{volunteerEventDat.leader_name}}</text>
...
...
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