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
6d06c32b
Commit
6d06c32b
authored
Mar 11, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8029f398
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
719 additions
and
97 deletions
+719
-97
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
getCertificate.js
doc/getCertificate/getCertificate/getCertificate.js
+143
-0
getCertificate.json
doc/getCertificate/getCertificate/getCertificate.json
+5
-0
getCertificate.wxml
doc/getCertificate/getCertificate/getCertificate.wxml
+28
-0
getCertificate.wxss
doc/getCertificate/getCertificate/getCertificate.wxss
+84
-0
小程序文件命名以及接口调用说明.xlsx
doc/小程序文件命名以及接口调用说明.xlsx
+0
-0
接口文档 V1.0.xls
doc/接口文档 V1.0.xls
+0
-0
ajax_get_certificates.php
src/user/if/ajax_get_certificates.php
+12
-12
ajax_get_my_certificates.php
src/user/if/ajax_get_my_certificates.php
+1
-1
ajax_get_nearby_circle_list.php
src/user/if/ajax_get_nearby_circle_list.php
+1
-1
test.php
src/user/if/test.php
+17
-4
app.json
src/wx/app.json
+1
-0
app.wxss
src/wx/app.wxss
+27
-0
circle.js
src/wx/pages/circle/circle.js
+16
-11
circle.wxml
src/wx/pages/circle/circle.wxml
+6
-6
circleDetails.json
src/wx/pages/circleDetails/circleDetails.json
+3
-1
courseIndex.js
src/wx/pages/courseIndex/courseIndex.js
+7
-0
courseIndex.wxml
src/wx/pages/courseIndex/courseIndex.wxml
+4
-1
courseIndex.wxss
src/wx/pages/courseIndex/courseIndex.wxss
+3
-2
getCertificate.js
src/wx/pages/getCertificate/getCertificate.js
+160
-0
getCertificate.json
src/wx/pages/getCertificate/getCertificate.json
+5
-0
getCertificate.wxml
src/wx/pages/getCertificate/getCertificate.wxml
+29
-0
getCertificate.wxss
src/wx/pages/getCertificate/getCertificate.wxss
+84
-0
index.js
src/wx/pages/index/index.js
+7
-1
index.wxml
src/wx/pages/index/index.wxml
+1
-6
index.wxss
src/wx/pages/index/index.wxss
+0
-13
my.wxss
src/wx/pages/my/my.wxss
+1
-1
myCertificate.js
src/wx/pages/myCertificate/myCertificate.js
+39
-34
myCertificate.json
src/wx/pages/myCertificate/myCertificate.json
+3
-1
myCertificate.wxml
src/wx/pages/myCertificate/myCertificate.wxml
+7
-1
myCertificate.wxss
src/wx/pages/myCertificate/myCertificate.wxss
+25
-0
schoolDetails.js
src/wx/pages/schoolDetails/schoolDetails.js
+0
-1
wx.zip
src/wx/wx.zip
+0
-0
No files found.
doc/DB/compass_db_schema.xlsx
View file @
6d06c32b
No preview for this file type
doc/getCertificate/getCertificate/getCertificate.js
0 → 100644
View file @
6d06c32b
// pages/getCertificate/getCertificate.js
var
app
=
getApp
();
Page
({
/**
* 页面的初始数据
*/
data
:
{
certificateList
:[],
name
:
''
,
//收件人姓名
mobile
:
''
,
//收件人手机
address
:
''
,
//详细收件地址
inpShow
:
false
,
certificateId
:
''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
()
{
//获取全部的证书
this
.
getCertificateList
();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
},
//获取全部的证书
getCertificateList
()
{
var
that
=
this
;
//获取用户的证书
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_get_certificates.php'
,
data
:
{
unionId
:
config
.
unionId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
that
.
setData
({
certificateList
:
res
.
data
.
result
.
certificateList
})
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
//证书申领
applyCertificate
(
e
)
{
let
certificateId
=
e
.
currentTarget
.
dataset
[
'index'
];
this
.
setData
({
inpShow
:
true
,
certificateId
:
certificateId
})
},
// 输入姓名
changeName
(
event
){
this
.
setData
({
name
:
event
.
detail
.
value
})
},
// 输入手机号
changeMobile
(
event
)
{
this
.
setData
({
mobile
:
event
.
detail
.
value
})
},
// 输入详细地址
changeAddress
(
event
)
{
this
.
setData
({
address
:
event
.
detail
.
value
})
},
sureApplyCertificate
()
{
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_apply_certificate.php'
,
data
:
{
unionId
:
config
.
unionId
,
certificateId
:
that
.
data
.
certificateId
,
name
:
that
.
data
.
name
,
mobile
:
that
.
data
.
mobile
,
address
:
that
.
data
.
address
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
that
.
setData
({
inpShow
:
false
})
wx
.
showToast
({
title
:
res
.
data
.
result
.
message
,
icon
:
'success'
,
duration
:
2000
});
//跳转到我的证书
wx
.
navigateTo
({
url
:
'../myCertificate/myCertificate'
})
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
backApplyCertificate
(){
this
.
setData
({
inpShow
:
false
})
}
})
\ No newline at end of file
doc/getCertificate/getCertificate/getCertificate.json
0 → 100644
View file @
6d06c32b
{
"usingComponents"
:
{},
"navigationBarTitleText"
:
"证书申领"
}
\ No newline at end of file
doc/getCertificate/getCertificate/getCertificate.wxml
0 → 100644
View file @
6d06c32b
<!--pages/myCertificate/myCertificate.wxml-->
<view class='myCertificate'>
<view style='font-size:12px;color:#666;float:right;padding-right:15px;'>
</view>
<view class="certificateItem" wx:for="{{certificateList}}">
<image src='{{item.front_image}}'></image>
<view class="getRow">
<text>{{item.title}}</text>
<van-button type="default" size='mini' bindtap="applyCertificate" data-index='{{item.id}}'>申领</van-button>
</view>
</view>
</view>
<!--添加底部弹出对话框开始-->
<view class='bot_myCertificate' wx:if="{{inpShow==true}}">
<view class='con_bot_myCertificate'>
<input placeholder='请输入姓名' value='{{name}}' bindinput='changeName'></input>
<input placeholder='请输入手机号' value='{{mobile}}' bindinput='changeMobile'></input>
<input placeholder='请输入收件地址' value='{{address}}' bindinput='changeAddress'></input>
<view class='btnBot'>
<view bindtap='backApplyCertificate'>取消</view>
<view style='background:#00C56B;' bindtap='sureApplyCertificate'>确定</view>
</view>
</view>
</view>
<!--添加底部弹出对话框结束-->
\ No newline at end of file
doc/getCertificate/getCertificate/getCertificate.wxss
0 → 100644
View file @
6d06c32b
/* pages/myCertificate/myCertificate.wxss */
page{
width: 100%;
height: 100%;
}
.certificateItem{
margin-top: 10px;
width: 90%;
margin: 0 auto;
display: flex;
flex-direction:column;
justify-content : space-between;
align-items:center;
font-size: 14px;
border-bottom: 1px solid #F0F0F0;
}
.certificateItem>image{
width:100%;
}
.getRow{
margin-top: 10px;
width: 100%;
display: flex;
flex-direction:row;
justify-content : space-between;
align-items:center;
}
.getRow>text{
width:100%;
height:35px;
line-height: 35px;
text-align: left;
}
.bot_myCertificate{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5)
}
.con_bot_myCertificate{
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 80%;
height: 150px;
background: #fff;
border-radius: 15px 15px 0 0;
}
.con_bot_myCertificate>input{
width: 80%;
height: 25px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 10px auto;
font-size: 12px;
box-sizing: border-box;
padding-left: 15px;
}
.btnBot{
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 80%;
height: 25px;
display: flex;
justify-content: space-between;
}
.btnBot>view{
flex: 1;
height: 25px;
text-align: center;
line-height: 25px;
font-size: 12px;
}
\ No newline at end of file
doc/小程序文件命名以及接口调用说明.xlsx
View file @
6d06c32b
No preview for this file type
doc/接口文档 V1.0.xls
View file @
6d06c32b
No preview for this file type
src/user/if/ajax_get_certificates.php
View file @
6d06c32b
...
@@ -6,27 +6,27 @@ require_once ("../user_include.inc");
...
@@ -6,27 +6,27 @@ require_once ("../user_include.inc");
ErrorLogger
::
doOutput
(
"Compass...ajax_get_certificates.php....Start."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_certificates.php....Start."
,
0
);
//获取参数
//获取参数
$
page
=
ParamUtil
::
getRequestNumber
(
"page"
,
0
);
$
unionId
=
ParamUtil
::
getRequestString
(
"unionId"
);
//每页显示条数
//判断用户是否存在
$rowCount
=
10
;
$param
=
array
();
$param
[
'unionid'
]
=
$unionId
;
$param
[
'delete_flg'
]
=
false
;
$userList
=
UserMst
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
if
(
empty
(
$userList
))
{
$result
[
"message"
]
=
"用户不存在!"
;
responseNG
(
$result
);
}
$result
=
array
();
$result
=
array
();
$offset
=
$page
*
$rowCount
;
//检索数据库
//检索数据库
$param
=
array
();
$param
=
array
();
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$certificateList
=
CertificateMst
::
getList
(
$param
,
'display_order'
,
'desc'
,
$offset
,
$rowCount
);
$certificateList
=
CertificateMst
::
getList
(
$param
,
'display_order'
,
'desc'
);
$allCount
=
CertificateMst
::
getListCount
(
$param
);
//接口返回数据
//接口返回数据
$result
[
"allCount"
]
=
$allCount
;
$result
[
"certificateList"
]
=
$certificateList
;
$result
[
"page"
]
=
$page
;
$result
[
"rowCount"
]
=
$rowCount
;
$result
[
"list"
]
=
$certificateList
;
ErrorLogger
::
doOutput
(
"Compass...ajax_get_certificates.php....End."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_certificates.php....End."
,
0
);
...
...
src/user/if/ajax_get_my_certificates.php
View file @
6d06c32b
...
@@ -45,7 +45,7 @@ if(!empty($tmpList)) {
...
@@ -45,7 +45,7 @@ if(!empty($tmpList)) {
//接口返回数据
//接口返回数据
$result
[
"allCount"
]
=
$allCount
;
$result
[
"allCount"
]
=
$allCount
;
$result
[
"
l
ist"
]
=
$certificateList
;
$result
[
"
certificateL
ist"
]
=
$certificateList
;
ErrorLogger
::
doOutput
(
"Compass...ajax_get_my_certificates.php....End."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_my_certificates.php....End."
,
0
);
...
...
src/user/if/ajax_get_nearby_circle_list.php
View file @
6d06c32b
...
@@ -68,7 +68,7 @@ if(!empty($tmpCircleList)) {
...
@@ -68,7 +68,7 @@ if(!empty($tmpCircleList)) {
$jsonObj
=
json_decode
(
$distanceObj
);
//对JSON格式的字符串进行编码
$jsonObj
=
json_decode
(
$distanceObj
);
//对JSON格式的字符串进行编码
$distanceArray
=
get_object_vars
(
$jsonObj
);
//转换成数组
$distanceArray
=
get_object_vars
(
$jsonObj
);
//转换成数组
if
(
$distanceArray
[
'status'
]
==
"0"
&&
$distanceArray
[
'result'
]
->
elements
[
0
]
->
distance
<=
3000
)
{
if
(
$distanceArray
[
'status'
]
==
"0"
&&
$distanceArray
[
'result'
]
->
elements
[
0
]
->
distance
<=
3000
)
{
$circleList
[]
=
array
(
"circle_id"
=>
$tmp
->
id
,
"circle_title"
=>
$tmp
->
title
);
$circleList
[]
=
array
(
"circle_id"
=>
$tmp
->
id
,
"circle_title"
=>
$tmp
->
title
,
"member_count"
=>
$tmp
->
member_count
,
"front_image"
=>
$tmp
->
front_image
);
}
}
}
}
}
}
...
...
src/user/if/test.php
View file @
6d06c32b
...
@@ -6,16 +6,15 @@ require_once ("../user_include.inc");
...
@@ -6,16 +6,15 @@ require_once ("../user_include.inc");
ErrorLogger
::
doOutput
(
"Compass...test.php....Start."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...test.php....Start."
,
0
);
$userMst
=
UserMst
::
getById
(
31
);
$userMst
=
UserMst
::
getById
(
31
);
print_r
(
$userMst
);
//管辖区域
//管辖区域
$province
=
$userMst
->
province
;
$province
=
$userMst
->
province
;
$city
=
$userMst
->
city
;
$city
=
$userMst
->
city
;
$district
=
$userMst
->
district
;
$district
=
$userMst
->
district
;
//管辖区域内学校数量以及列表
/**
//todo:后面改成从别的系统获取
//每页显示条数
$page = 0;
$page = 0;
$rowCount = 20;
$rowCount = 20;
$offset = $page * $rowCount;
$offset = $page * $rowCount;
...
@@ -43,6 +42,20 @@ foreach($tmpList as $tmp) {
...
@@ -43,6 +42,20 @@ foreach($tmpList as $tmp) {
}
}
print_r($tmpList);
print_r($tmpList);
*/
$param
=
array
();
$param
[
'delete_flg'
]
=
false
;
$tmpList
=
CircleDat
::
getList
(
$param
,
'id'
,
'asc'
);
foreach
(
$tmpList
as
$tmp
)
{
$tmp
->
province
=
"江苏省"
;
$tmp
->
city
=
"南京市"
;
$tmp
->
district
=
"建邺区"
;
$tmp
->
save
();
}
print_r
(
$tmpList
);
ErrorLogger
::
doOutput
(
"Compass...test.php....End."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...test.php....End."
,
0
);
...
...
src/wx/app.json
View file @
6d06c32b
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
"pages/familyEventDetail/familyEventDetail"
,
"pages/familyEventDetail/familyEventDetail"
,
"pages/manual/manual"
,
"pages/manual/manual"
,
"pages/myCertificate/myCertificate"
,
"pages/myCertificate/myCertificate"
,
"pages/getCertificate/getCertificate"
,
"pages/myNews/myNews"
,
"pages/myNews/myNews"
,
"pages/socialEvent/socialEvent"
,
"pages/socialEvent/socialEvent"
,
"pages/joinFamilyEvent/joinFamilyEvent"
,
"pages/joinFamilyEvent/joinFamilyEvent"
,
...
...
src/wx/app.wxss
View file @
6d06c32b
...
@@ -111,6 +111,9 @@ video, live-player, live-pusher, open-data, web-view {
...
@@ -111,6 +111,9 @@ video, live-player, live-pusher, open-data, web-view {
box-sizing: border-box;
box-sizing: border-box;
padding-right: 5px;
padding-right: 5px;
}
}
.formtable>view>van-cell-group{
flex: 1
}
.formtable .van-cell{
.formtable .van-cell{
padding: 0;
padding: 0;
}
}
...
@@ -250,3 +253,26 @@ video, live-player, live-pusher, open-data, web-view {
...
@@ -250,3 +253,26 @@ video, live-player, live-pusher, open-data, web-view {
.right_listPublicWelfare>view .van-button__text{
.right_listPublicWelfare>view .van-button__text{
color: #666;
color: #666;
}
}
.conSwiper{
width: 90%;
height: 40px;
margin: 20px auto;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
background: #f6f6f6;
border-radius: 15px;
box-sizing: border-box;
padding: 0 10px;
}
.conSwiper>view{
width: 60px;
height: 25px;
background: #698FBB;
color: #fff;
font-size: 12px;
line-height: 25px;
text-align: center;
border-radius: 5px;
}
\ No newline at end of file
src/wx/pages/circle/circle.js
View file @
6d06c32b
...
@@ -9,7 +9,7 @@ Page({
...
@@ -9,7 +9,7 @@ Page({
data
:
{
data
:
{
keyword
:
''
,
keyword
:
''
,
active
:
1
,
active
:
1
,
show
:
0
,
show
NearCircles
:
0
,
userCircleList
:[],
userCircleList
:[],
circleList
:[]
circleList
:[]
},
},
...
@@ -68,7 +68,9 @@ Page({
...
@@ -68,7 +68,9 @@ Page({
})
})
}
}
},
},
newQuanzi
(){
//新建圈子
creatCircle
(){
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'../newCircle1/newCircle1'
,
url
:
'../newCircle1/newCircle1'
,
});
});
...
@@ -76,16 +78,18 @@ Page({
...
@@ -76,16 +78,18 @@ Page({
title
:
'我的圈子'
title
:
'我的圈子'
})
})
},
},
search
(
e
){
//查找附近的圈子
searchCircleNearby
(
e
){
var
that
=
this
;
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
var
config
=
wx
.
getStorageSync
(
'config'
);
var
jingweidu
=
wx
.
getStorageSync
(
'jingweidu
'
);
var
location
=
wx
.
getStorageSync
(
'location
'
);
wx
:
wx
.
request
({
wx
:
wx
.
request
({
url
:
app
.
url
+
'ajax_get_nearby_circle_list.php'
,
url
:
app
.
url
+
'ajax_get_nearby_circle_list.php'
,
data
:
{
data
:
{
unionId
:
config
.
unionId
,
unionId
:
config
.
unionId
,
latitude
:
jingweidu
.
latitude
,
latitude
:
location
.
latitude
,
longitude
:
jingweidu
.
longitude
longitude
:
location
.
longitude
},
},
header
:
{
'content-type'
:
'application/json'
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
method
:
'GET'
,
...
@@ -102,18 +106,19 @@ Page({
...
@@ -102,18 +106,19 @@ Page({
complete
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
})
this
.
setData
({
this
.
setData
({
show
:
1
show
NearCircles
:
1
})
})
},
},
//圈子详细
circleDetails
()
{
circleDetails
()
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'../circleDetails/circleDetails'
,
url
:
'../circleDetails/circleDetails'
,
});
});
wx
.
setNavigationBarTitle
({
title
:
'测试圈子'
})
},
},
jinquan
(){
//加入圈子
joinCircle
(){
var
that
=
this
;
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
var
config
=
wx
.
getStorageSync
(
'config'
);
// var location = wx.getStorageSync('location');
// var location = wx.getStorageSync('location');
...
...
src/wx/pages/circle/circle.wxml
View file @
6d06c32b
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<view bindtap='searchCircle'>搜索</view>
<view bindtap='searchCircle'>搜索</view>
</view>
</view>
<view class='newQuanzi'>
<view class='newQuanzi'>
<view class='btn_newQuanzi' bindtap='
newQuanzi
'>
<view class='btn_newQuanzi' bindtap='
creatCircle
'>
新建圈子<image src='../../img/jia.png'></image>
新建圈子<image src='../../img/jia.png'></image>
</view>
</view>
<view class='myQuanzi'>
<view class='myQuanzi'>
...
@@ -23,16 +23,16 @@
...
@@ -23,16 +23,16 @@
<view class='top_conQuanzi'>
<view class='top_conQuanzi'>
<image src='../../img/sanjiao.png'></image>附近志愿者圈子
<image src='../../img/sanjiao.png'></image>附近志愿者圈子
</view>
</view>
<view class='quanziSearch' wx:if="{{show==0}}">
<view class='quanziSearch' wx:if="{{show
NearCircles
==0}}">
<view class='con_quanziSearch' bindtap='search'>搜索</view>
<view class='con_quanziSearch' bindtap='search
CircleNearby
'>搜索</view>
</view>
</view>
<view class='con_conQuanzi' wx:if="{{show==1}}">
<view class='con_conQuanzi' wx:if="{{show
NearCircles
==1}}">
<view class='quanziList' wx:for="{{circleList}}" wx:key="{{index}}">
<view class='quanziList' wx:for="{{circleList}}" wx:key="{{index}}">
<view>
<view>
<text></text>{{item.circle_title}}
<text></text>{{item.circle_title}}
</view>
</view>
<text>(
80
人)</text>
<text>(
{{item.member_count}}
人)</text>
<van-button type="default" size='mini' bind:click="j
inquan
">进圈</van-button>
<van-button type="default" size='mini' bind:click="j
oinCircle
">进圈</van-button>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
src/wx/pages/circleDetails/circleDetails.json
View file @
6d06c32b
{
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"圈子详情"
}
}
\ No newline at end of file
src/wx/pages/courseIndex/courseIndex.js
View file @
6d06c32b
...
@@ -191,5 +191,11 @@ Page({
...
@@ -191,5 +191,11 @@ Page({
});
});
},
},
})
})
},
// 跳到会员
memberChange
()
{
wx
.
navigateTo
({
url
:
'../memberChange/memberChange'
,
})
}
}
})
})
\ No newline at end of file
src/wx/pages/courseIndex/courseIndex.wxml
View file @
6d06c32b
...
@@ -7,11 +7,14 @@
...
@@ -7,11 +7,14 @@
<text wx:for="{{subCategory1}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==0}}">{{item.title}}</text>
<text wx:for="{{subCategory1}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==0}}">{{item.title}}</text>
<text wx:for="{{subCategory2}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==1}}">{{item.title}}</text>
<text wx:for="{{subCategory2}}" bindtap='subTab' data-index='{{index}}' wx:key="{{index}}" wx:if="{{tabIndex==1}}">{{item.title}}</text>
</view>
</view>
<view class='conSwiper'>
购买中国志愿者会员,公益视频免费看!<view bindtap='memberChange'>详情</view>
</view>
<view class='lookHistory'>
<view class='lookHistory'>
<text bindtap='history'>历史观看</text>
<text bindtap='history'>历史观看</text>
</view>
</view>
<scroll-view scroll-y="true" style='height:
75
0rpx;bottom:10rpx;' class="listPublicWelfare" bindscrolltolower='loadMore'>
<scroll-view scroll-y="true" style='height:
66
0rpx;bottom:10rpx;' class="listPublicWelfare" bindscrolltolower='loadMore'>
<view class='activelist' bindtap='classDetails' wx:for="{{list}}" data-index="{{list[index].id}}">
<view class='activelist' bindtap='classDetails' wx:for="{{list}}" data-index="{{list[index].id}}">
<view class='left_listPublicWelfare'>
<view class='left_listPublicWelfare'>
<image src='{{item.front_image}}'></image>
<image src='{{item.front_image}}'></image>
...
...
src/wx/pages/courseIndex/courseIndex.wxss
View file @
6d06c32b
/* pages/gongyiClass/gongyiClass.wxss */
/* pages/gongyiClass/gongyiClass.wxss */
.top_gongyiClass{
.top_gongyiClass{
width: 100%;
width: 100%;
height: 1
5
0px;
height: 1
2
0px;
display: flex;
display: flex;
justify-content: space-around;
justify-content: space-around;
flex-wrap: wrap;
flex-wrap: wrap;
border-bottom: 1px solid #ccc;
}
}
.top_gongyiClass>view{
.top_gongyiClass>view{
width: 45%;
width: 45%;
...
@@ -22,9 +21,11 @@
...
@@ -22,9 +21,11 @@
height: 25px;
height: 25px;
line-height: 25px;
line-height: 25px;
border: 1px solid #ccc;
border: 1px solid #ccc;
margin-top: 20px;
}
}
.lookHistory{
.lookHistory{
width: 100%;
width: 100%;
border-top: 1px solid #ccc;
}
}
.lookHistory>text{
.lookHistory>text{
display: block;
display: block;
...
...
src/wx/pages/getCertificate/getCertificate.js
0 → 100644
View file @
6d06c32b
// pages/getCertificate/getCertificate.js
import
Notify
from
'../../dist/notify/notify'
;
var
app
=
getApp
();
Page
({
/**
* 页面的初始数据
*/
data
:
{
certificateList
:[],
name
:
''
,
//收件人姓名
mobile
:
''
,
//收件人手机
address
:
''
,
//详细收件地址
inpShow
:
false
,
certificateId
:
''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
()
{
//获取全部的证书
this
.
getCertificateList
();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
},
//获取全部的证书
getCertificateList
()
{
var
that
=
this
;
//获取用户的证书
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_get_certificates.php'
,
data
:
{
unionId
:
config
.
unionId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
that
.
setData
({
certificateList
:
res
.
data
.
result
.
certificateList
})
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
//证书申领
applyCertificate
(
e
)
{
let
certificateId
=
e
.
currentTarget
.
dataset
[
'index'
];
this
.
setData
({
inpShow
:
true
,
certificateId
:
certificateId
})
},
// 输入姓名
changeName
(
event
){
this
.
setData
({
name
:
event
.
detail
.
value
})
},
// 输入手机号
changeMobile
(
event
)
{
this
.
setData
({
mobile
:
event
.
detail
.
value
})
},
// 输入详细地址
changeAddress
(
event
)
{
this
.
setData
({
address
:
event
.
detail
.
value
})
},
//提交申请
sureApplyCertificate
()
{
var
that
=
this
;
if
(
that
.
data
.
name
==
null
||
that
.
data
.
name
.
trim
()
==
""
)
{
Notify
(
'请输入姓名'
)
return
}
if
(
that
.
data
.
mobile
==
null
||
that
.
data
.
name
.
mobile
()
==
""
)
{
Notify
(
'请输入手机号码'
)
return
}
if
(
that
.
address
.
mobile
==
null
||
that
.
data
.
address
.
mobile
()
==
""
)
{
Notify
(
'请输入收件地址'
)
return
}
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_apply_certificate.php'
,
data
:
{
unionId
:
config
.
unionId
,
certificateId
:
that
.
data
.
certificateId
,
name
:
that
.
data
.
name
,
mobile
:
that
.
data
.
mobile
,
address
:
that
.
data
.
address
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
that
.
setData
({
inpShow
:
false
})
wx
.
showToast
({
title
:
res
.
data
.
result
.
message
,
icon
:
'success'
,
duration
:
2000
});
//跳转到我的证书
wx
.
navigateTo
({
url
:
'../myCertificate/myCertificate'
})
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
backApplyCertificate
(){
this
.
setData
({
inpShow
:
false
})
}
})
\ No newline at end of file
src/wx/pages/getCertificate/getCertificate.json
0 → 100644
View file @
6d06c32b
{
"usingComponents"
:
{},
"navigationBarTitleText"
:
"证书申领"
}
\ No newline at end of file
src/wx/pages/getCertificate/getCertificate.wxml
0 → 100644
View file @
6d06c32b
<!--pages/myCertificate/myCertificate.wxml-->
<view class='myCertificate'>
<view style='font-size:12px;color:#666;float:right;padding-right:15px;'>
</view>
<view class="certificateItem" wx:for="{{certificateList}}">
<image src='{{item.front_image}}'></image>
<view class="getRow">
<text>{{item.title}}</text>
<van-button type="default" size='mini' bindtap="applyCertificate" data-index='{{item.id}}'>申领</van-button>
</view>
</view>
</view>
<!--添加底部弹出对话框开始-->
<view class='bot_myCertificate' wx:if="{{inpShow==true}}">
<view class='con_bot_myCertificate'>
<input placeholder='请输入姓名' value='{{name}}' bindinput='changeName'></input>
<input placeholder='请输入手机号' value='{{mobile}}' bindinput='changeMobile'></input>
<input placeholder='请输入收件地址' value='{{address}}' bindinput='changeAddress'></input>
<view class='btnBot'>
<view bindtap='backApplyCertificate'>取消</view>
<view style='background:#00C56B;' bindtap='sureApplyCertificate'>确定</view>
</view>
</view>
</view>
<!--添加底部弹出对话框结束-->
<van-notify id="van-notify" />
\ No newline at end of file
src/wx/pages/getCertificate/getCertificate.wxss
0 → 100644
View file @
6d06c32b
/* pages/myCertificate/myCertificate.wxss */
page{
width: 100%;
height: 100%;
}
.certificateItem{
margin-top: 10px;
width: 90%;
margin: 0 auto;
display: flex;
flex-direction:column;
justify-content : space-between;
align-items:center;
font-size: 14px;
border-bottom: 1px solid #F0F0F0;
}
.certificateItem>image{
width:100%;
}
.getRow{
margin-top: 10px;
width: 100%;
display: flex;
flex-direction:row;
justify-content : space-between;
align-items:center;
}
.getRow>text{
width:100%;
height:35px;
line-height: 35px;
text-align: left;
}
.bot_myCertificate{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5)
}
.con_bot_myCertificate{
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 80%;
height: 150px;
background: #fff;
border-radius: 15px 15px 0 0;
}
.con_bot_myCertificate>input{
width: 80%;
height: 25px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 10px auto;
font-size: 12px;
box-sizing: border-box;
padding-left: 15px;
}
.btnBot{
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 80%;
height: 25px;
display: flex;
justify-content: space-between;
}
.btnBot>view{
flex: 1;
height: 25px;
text-align: center;
line-height: 25px;
font-size: 12px;
}
\ No newline at end of file
src/wx/pages/index/index.js
View file @
6d06c32b
...
@@ -277,5 +277,10 @@ Page({
...
@@ -277,5 +277,10 @@ Page({
title
:
'公益课堂'
title
:
'公益课堂'
})
})
},
},
// 跳到会员
memberChange
(){
wx
.
navigateTo
({
url
:
'../memberChange/memberChange'
,
})
}
})
})
\ No newline at end of file
src/wx/pages/index/index.wxml
View file @
6d06c32b
...
@@ -19,12 +19,7 @@
...
@@ -19,12 +19,7 @@
<van-grid-item icon="../../img/4.png" text="区域管理" bindtap="area" wx:if="{{role==4}}" />
<van-grid-item icon="../../img/4.png" text="区域管理" bindtap="area" wx:if="{{role==4}}" />
</van-grid>
</van-grid>
<view class='conSwiper'>
<view class='conSwiper'>
<swiper indicator-dots="true"
购买中国志愿者会员,公益视频免费看!<view bindtap='memberChange'>详情</view>
autoplay="true" interval="3000" duration="500">
<swiper-item>
<image src='../../img/1.jpg'></image>
</swiper-item>
</swiper>
</view>
</view>
<view class='volunteers'>
<view class='volunteers'>
<view class='topTitle'>
<view class='topTitle'>
...
...
src/wx/pages/index/index.wxss
View file @
6d06c32b
...
@@ -23,19 +23,6 @@
...
@@ -23,19 +23,6 @@
width: 1.6em!important;
width: 1.6em!important;
height: 1.6em!important;
height: 1.6em!important;
}
}
.conSwiper{
width: 90%;
height: 60px;
margin: 20px auto;
}
.conSwiper>swiper{
width: 100%;
height: 100%;
}
.conSwiper>swiper image{
width: 100%;
height: 100%;
}
.topTitle{
.topTitle{
width: 100%;
width: 100%;
height: 30px;
height: 30px;
...
...
src/wx/pages/my/my.wxss
View file @
6d06c32b
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
}
}
.mineList{
.mineList{
width:100%;
width:100%;
margin-top:
5
0px;
margin-top:
3
0px;
}
}
.con_mineList{
.con_mineList{
width: 100%;
width: 100%;
...
...
src/wx/pages/myCertificate/myCertificate.js
View file @
6d06c32b
// pages/myCertificate/myCertificate.js
// pages/myCertificate/myCertificate.js
var
app
=
getApp
();
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
certificateList
:[]
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
()
{
wx
:
wx
.
request
({
//获取用户的证书
url
:
'http://compass.koala-online.cn/user/if/ajax_update_user_age.php'
,
this
.
getMyCertificateList
();
data
:
''
,
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
},
fail
:
function
(
res
)
{},
complete
:
function
(
res
)
{},
})
},
},
/**
/**
...
@@ -41,37 +33,49 @@ Page({
...
@@ -41,37 +33,49 @@ Page({
},
},
/**
/**
*
生命周期函数--监听页面隐藏
*
页面上拉触底事件的处理函数
*/
*/
on
Hide
:
function
()
{
on
ReachBottom
:
function
()
{
},
},
/**
/**
*
生命周期函数--监听页面卸载
*
用户点击右上角分享
*/
*/
onUnload
:
function
()
{
onShareAppMessage
:
function
()
{
},
},
/**
//获取用户的证书
* 页面相关事件处理函数--监听用户下拉动作
getMyCertificateList
()
{
*/
var
that
=
this
;
onPullDownRefresh
:
function
()
{
//获取用户的证书
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_get_my_certificates.php'
,
data
:
{
unionId
:
config
.
unionId
},
},
header
:
{
'content-type'
:
'application/json'
},
/**
method
:
'GET'
,
* 页面上拉触底事件的处理函数
dataType
:
'json'
,
*/
success
:
function
(
res
)
{
onReachBottom
:
function
()
{
that
.
setData
({
certificateList
:
res
.
data
.
result
.
certificateList
})
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
},
/**
//证书申领
* 用户点击右上角分享
getCertificate
()
{
*/
//获取用户的证书
onShareAppMessage
:
function
()
{
wx
.
navigateTo
({
url
:
'../getCertificate/getCertificate'
})
return
;
}
}
})
})
\ No newline at end of file
src/wx/pages/myCertificate/myCertificate.json
View file @
6d06c32b
{
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"我的证书"
}
}
\ No newline at end of file
src/wx/pages/myCertificate/myCertificate.wxml
View file @
6d06c32b
<!--pages/myCertificate/myCertificate.wxml-->
<!--pages/myCertificate/myCertificate.wxml-->
<view class='myCertificate'>
<view class='myCertificate'>
<view style='font-size:12px;color:#666;float:right;padding-right:15px;'>
<van-button type="default" size='normal' bindtap="getCertificate">申领证书</van-button>
</view>
<view class="certificateItem" wx:for="{{certificateList}}">
<image src='{{item.front_image}}'></image>
<text>{{item.title}}[{{item.status}}]</text>
</view>
</view>
</view>
src/wx/pages/myCertificate/myCertificate.wxss
View file @
6d06c32b
/* pages/myCertificate/myCertificate.wxss */
/* pages/myCertificate/myCertificate.wxss */
.certificateItem{
margin-top: 10px;
width: 90%;
margin: 0 auto;
display: flex;
flex-direction:column;
justify-content : space-between;
align-items:center;
text-align: center;
font-size: 14px;
border-bottom: 1px solid #F0F0F0;
}
.certificateItem>image{
width:100%;
}
.certificateItem>text{
width:100%;
height:35px;
line-height: 35px;
text-align: left;
}
\ No newline at end of file
src/wx/pages/schoolDetails/schoolDetails.js
View file @
6d06c32b
...
@@ -27,7 +27,6 @@ Page({
...
@@ -27,7 +27,6 @@ Page({
})
})
//检索学校详情
//检索学校详情
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
wx
.
request
({
url
:
app
.
url
+
'ajax_get_school_detail.php'
,
url
:
app
.
url
+
'ajax_get_school_detail.php'
,
data
:
{
data
:
{
...
...
src/wx/wx.zip
0 → 100644
View file @
6d06c32b
File added
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