From fe5648367bbbbb21aaca3154c26775f16233c5f3 Mon Sep 17 00:00:00 2001
From: dong_bo0602 <358256383@qq.com>
Date: Fri, 26 Jun 2020 15:19:04 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E5=A4=B4=E5=83=8F1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.js | 2 +-
pages/center/center.js | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/app.js b/app.js
index 78f7845..3d3a4cd 100644
--- a/app.js
+++ b/app.js
@@ -3,7 +3,7 @@ var restAjax = require('utils/restAjax.js');
var dialog = require('utils/dialog.js');
App({
loginUrl: 'http://192.168.0.113:7001/usercenter',
- usercenterUrl: 'http://192.168.0.113:7001/usesrcenter',
+ usercenterUrl: 'http://192.168.0.113:7001/usercenter',
newsUrl: 'http://192.168.0.113:8082/news',
libraryUrl: 'http://192.168.0.113:8081/library',
activityUrl: 'http://192.168.0.111:8080/culturalactivity/',
diff --git a/pages/center/center.js b/pages/center/center.js
index 9d572b2..d9e589a 100644
--- a/pages/center/center.js
+++ b/pages/center/center.js
@@ -33,9 +33,7 @@ Page({
success: function (res) {
var avatar = res.tempFilePaths[0];
console.log(avatar)
- app.restAjax.post(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), {
- image: avatar
- }, {
+ app.restAjax.post(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
headers: {
token: self.data.token
}
@@ -62,8 +60,6 @@ Page({
},
})
},
-<<<<<<< HEAD
-=======
/**
* 跳转到我的志愿团队页面
*/
@@ -81,7 +77,6 @@ Page({
})
},
->>>>>>> 8efd16995df21586c7ff79678f34b0547afeb3e4
/**
* 生命周期函数--监听页面加载
*/
From 29c66900800597c123ce5b796782bff207d296cf Mon Sep 17 00:00:00 2001
From: wans <747101512@qq.com>
Date: Fri, 26 Jun 2020 15:28:31 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?=
=?UTF-8?q?=E6=96=B9=E6=B3=95,=20app.json=E6=B7=BB=E5=8A=A0=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E5=AE=9A=E4=BD=8D=E6=97=B6=E7=9A=84=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.js | 2 +-
app.json | 5 +++
pages/venue/venue.js | 38 ++++++++++-----------
pages/venue/venue.wxml | 8 ++---
pages/venueDetail/venueDetail.js | 54 +++++++++++++++---------------
pages/venueDetail/venueDetail.wxml | 6 ++--
6 files changed, 59 insertions(+), 54 deletions(-)
diff --git a/app.js b/app.js
index c6ba268..d3f420c 100644
--- a/app.js
+++ b/app.js
@@ -7,7 +7,7 @@ App({
newsUrl: 'http://192.168.0.113:8082/news',
libraryUrl: 'http://192.168.0.113:8081/library',
activityUrl: '',
- venueUrl: '',
+ venueUrl: 'http://192.168.0.109:8082/venuebooking',
restAjax: restAjax,
dialog: dialog,
onLaunch: function () {
diff --git a/app.json b/app.json
index 6788cc1..77edd74 100644
--- a/app.json
+++ b/app.json
@@ -64,6 +64,11 @@
}
]
},
+ "permission": {
+ "scope.userLocation": {
+ "desc": "你的位置信息将用于您当前所在位置"
+ }
+ },
"style": "v2",
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
diff --git a/pages/venue/venue.js b/pages/venue/venue.js
index 20fdd62..77839f1 100644
--- a/pages/venue/venue.js
+++ b/pages/venue/venue.js
@@ -1,3 +1,4 @@
+var app = getApp();
// pages/venue/venue.js
Page({
@@ -5,8 +6,8 @@ Page({
* 页面的初始数据
*/
data: {
- baseUrl : 'http://192.168.0.109:8082/venuebooking/',
- imgRoute : 'route/file/downloadfile/true/',
+ venueUrl : app.venueUrl,
+ imgRoute : '/route/file/downloadfile/true/',
venueTypeParentId : 'df8b758c-f6d8-465a-9aa8-c451fde47076',
page : '1',
rows : '10',
@@ -38,23 +39,23 @@ Page({
//获取场馆分类
listVenueType : function(){
var self = this;
- wx.request({
- url: self.data.baseUrl + 'app/venuedictionary/listvenuedictionarybyparentidrelease/' + self.data.venueTypeParentId,
- success : function(res){
- var data = res.data;
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuedictionary/listvenuedictionarybyparentidrelease/{venueTypeParentId}',
+ [app.venueUrl, self.data.venueTypeParentId]), {}, null,
+ function(code,data){
self.setData({
- venueTypeList : data.data
- })
+ venueTypeList: data.data
+ });
+ },function(code, data){
+ app.dialog.msg(data.msg);
}
- })
+ );
},
//获取场馆列表
listPageVenuesInfo : function(){
var self = this;
- wx.request({
- url: self.data.baseUrl + 'app/venuesinfo/listpagevenuesinforelease',
- data : {
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease', [app.venueUrl]),
+ {
page : self.data.page,
rows : self.data.rows,
orderKey : self.data.orderKey,
@@ -62,9 +63,8 @@ Page({
latitude: self.data.latitude,
longitude: self.data.longitude,
selfLocation: 'TX',
- },
- success : function(res){
- var data = res.data;
+ }, null,
+ function(code, data){
data.rows.forEach(element => {
element.venuePanorama = element.venuePanorama.split(',')[0];
if(element.apart >= 1000){
@@ -76,10 +76,11 @@ Page({
self.setData({
venuesList : data.rows,
page : data.page
- })
-
+ });
+ }, function(code,data){
+ app.dialog.msg(data.msg);
}
- })
+ );
},
//切换场馆类型
@@ -97,7 +98,6 @@ Page({
//切换场馆排序
changeVenuesOrderBy: function(options){
var beCheck = options.currentTarget.dataset.becheck;
- console.log(options);
this.setData({
orderKey : beCheck
})
diff --git a/pages/venue/venue.wxml b/pages/venue/venue.wxml
index 2a510c2..25a3eeb 100644
--- a/pages/venue/venue.wxml
+++ b/pages/venue/venue.wxml
@@ -1,7 +1,7 @@
-
-
+
+
{{item.dictionaryName}}
@@ -18,9 +18,9 @@
-
+
-
+
diff --git a/pages/venueDetail/venueDetail.js b/pages/venueDetail/venueDetail.js
index 5db2e05..a0d2ebb 100644
--- a/pages/venueDetail/venueDetail.js
+++ b/pages/venueDetail/venueDetail.js
@@ -1,15 +1,14 @@
+var app = getApp();
// pages/venueDetail/venueDetail.js
Page({
-
/**
* 页面的初始数据
*/
data: {
- baseUrl: 'http://192.168.0.109:8082/venuebooking/',
- imgRoute : 'route/file/downloadfile/true/',
+ venueUrl: app.venueUrl,
+ imgRoute : '/route/file/downloadfile/true/',
indicatorDots: true,
autoplay: true,
-
venuesInfoId: '',
venuesDetail:{},
venuesProjectList: [],
@@ -22,37 +21,35 @@ Page({
//场馆详情接口
getVenuesDetail: function(){
var self = this;
- wx.request({
- url: self.data.baseUrl + 'app/venuesinfo/getvenuesinfobyidrelease/' + self.data.venuesInfoId,
- data: {
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/getvenuesinfobyidrelease/{venuesInfoId}',[app.venueUrl, self.data.venuesInfoId]),
+ {
resultLocation: 'TX'
- },
- success:(res) => {
- var swiperImg = res.data.venuePanorama.split(',');
+ }, null, function(code, data){
+ var swiperImg = data.venuePanorama.split(',');
if(swiperImg.length <= 1){
self.setData({
indicatorDots: false,
autoplay: false
})
- }
+ };
self.setData({
- venuesDetail: res.data,
+ venuesDetail: data,
swiperImg: swiperImg,
- venueCharge: res.data.venueCharge
+ venueCharge: data.venueCharge
});
- console.log(self.data.venuesDetail);
+ }, function(code,data){
+ app.dialog.msg(data.msg);
}
- })
+ );
},
//获取项目列表
listVenuesProject: function(){
var self = this;
- wx.request({
- url: self.data.baseUrl + 'app/venuesproject/listprojectinforelease/' + self.data.venuesInfoId,
- success: (res) => {
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesproject/listprojectinforelease/{venuesInfoId}', [app.venueUrl, self.data.venuesInfoId]), {}, null ,
+ function(code,data){
self.setData({
- venuesProjectList: res.data
+ venuesProjectList: data
});
if(self.data.venuesProjectList.length > 0){
self.setData({
@@ -60,8 +57,10 @@ Page({
});
self.getVenuesProjectDetail();
};
+ }, function(code, data){
+ app.dialog.msg(data.msg);
}
- })
+ );
},
//切换当前选择项目
@@ -79,21 +78,22 @@ Page({
//获取项目详情信息
getVenuesProjectDetail: function(){
var self = this;
- wx.request({
- url: self.data.baseUrl + 'app/venuesproject/getvenuesprojectdetailrelease/' + self.data.selectVenuesProject,
- success: function(res){
+ app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesproject/getvenuesprojectdetailrelease/{selectVenuesProject}',
+ [app.venueUrl, self.data.selectVenuesProject]), {}, null,
+ function(code,data){
+ console.log(data);
self.setData({
- selectVenuesProjectDetail: res.data.data
+ selectVenuesProjectDetail: data.data
});
+ }, function(code,data){
+ app.dialog.msg(data.msg);
}
- });
+ );
},
//场馆地图导航
showMap: function(options){
- console.log(options);
var dataObj = options.currentTarget.dataset
- console.log(dataObj.latitude + 0)
wx.openLocation({//使用微信内置地图查看位置。
latitude: Number(dataObj.latitude),//要去的纬度-地址
longitude: Number(dataObj.longitude),//要去的经度-地址
diff --git a/pages/venueDetail/venueDetail.wxml b/pages/venueDetail/venueDetail.wxml
index b9a2b07..9972306 100644
--- a/pages/venueDetail/venueDetail.wxml
+++ b/pages/venueDetail/venueDetail.wxml
@@ -1,7 +1,7 @@
-
-
+
+
@@ -28,7 +28,7 @@
{{item.projectName}}
+ wx:for="{{venuesProjectList}}" wx:key="index" bindtap="changeVenuesProject" data-id="{{item.venuesProjectId}}">{{item.projectName}}
From e49c9055e9ae0cf08f4d93228097a6434504e5b7 Mon Sep 17 00:00:00 2001
From: wenc000 <450292408@qq.com>
Date: Fri, 26 Jun 2020 15:29:45 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/center/center.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pages/center/center.js b/pages/center/center.js
index d9e589a..343da48 100644
--- a/pages/center/center.js
+++ b/pages/center/center.js
@@ -33,7 +33,7 @@ Page({
success: function (res) {
var avatar = res.tempFilePaths[0];
console.log(avatar)
- app.restAjax.post(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
+ app.restAjax.file(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
headers: {
token: self.data.token
}
From 4fddb0da7d8f3c6e730f5ede547c0bbb0bf0365a Mon Sep 17 00:00:00 2001
From: wans <747101512@qq.com>
Date: Fri, 26 Jun 2020 16:00:22 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?=
=?UTF-8?q?=E5=85=B3=E9=97=AD=E5=8A=A8=E7=94=BB=E6=95=88=E6=9E=9C=E8=B0=83?=
=?UTF-8?q?=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/venue/venue.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pages/venue/venue.js b/pages/venue/venue.js
index 77839f1..edfb9a3 100644
--- a/pages/venue/venue.js
+++ b/pages/venue/venue.js
@@ -79,6 +79,9 @@ Page({
});
}, function(code,data){
app.dialog.msg(data.msg);
+ },function(){
+ wx.hideNavigationBarLoading();
+ wx.stopPullDownRefresh();
}
);
},
@@ -158,10 +161,6 @@ Page({
orderKey: '',
})
this.onLoad();
- setTimeout(() => {
- wx.hideNavigationBarLoading()
- wx.stopPullDownRefresh()
- }, 500);
},
/**
From 7269c492541605c099bb31f2d168b080d558bd1c Mon Sep 17 00:00:00 2001
From: dong_bo0602 <358256383@qq.com>
Date: Fri, 26 Jun 2020 18:43:33 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E6=88=91=E7=9A=84=E3=80=81=E6=B4=BB?=
=?UTF-8?q?=E5=8A=A8=E6=97=A5=E5=BF=97=E3=80=81=E5=9B=A2=E9=98=9F=E8=AF=A6?=
=?UTF-8?q?=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 4 +-
images/delete.png | Bin 0 -> 497 bytes
pages/activityDialog/activityDialog.js | 66 +++++++++
pages/activityDialog/activityDialog.json | 3 +
pages/activityDialog/activityDialog.wxml | 32 +++++
pages/activityDialog/activityDialog.wxss | 42 ++++++
pages/center/center.js | 169 ++++++++++++++++++++++-
pages/center/center.wxml | 23 ++-
pages/center/center.wxss | 79 +++++++++++
pages/teamDetail/teamDetail.js | 66 +++++++++
pages/teamDetail/teamDetail.json | 3 +
pages/teamDetail/teamDetail.wxml | 68 +++++++++
pages/teamDetail/teamDetail.wxss | 83 +++++++++++
pages/venue/venue.wxss | 1 +
14 files changed, 630 insertions(+), 9 deletions(-)
create mode 100644 images/delete.png
create mode 100644 pages/activityDialog/activityDialog.js
create mode 100644 pages/activityDialog/activityDialog.json
create mode 100644 pages/activityDialog/activityDialog.wxml
create mode 100644 pages/activityDialog/activityDialog.wxss
create mode 100644 pages/teamDetail/teamDetail.js
create mode 100644 pages/teamDetail/teamDetail.json
create mode 100644 pages/teamDetail/teamDetail.wxml
create mode 100644 pages/teamDetail/teamDetail.wxss
diff --git a/app.json b/app.json
index 0b259bb..0a0e48a 100644
--- a/app.json
+++ b/app.json
@@ -1,7 +1,9 @@
{
"pages": [
- "pages/center/center",
"pages/index/index",
+ "pages/activityDialog/activityDialog",
+ "pages/teamDetail/teamDetail",
+ "pages/center/center",
"pages/volunteerRegister/volunteerRegister",
"pages/volunteer/volunteer",
"pages/heritage/heritage",
diff --git a/images/delete.png b/images/delete.png
new file mode 100644
index 0000000000000000000000000000000000000000..63f7d52fb780a5dc4d6f6c67001def6fa56be7ed
GIT binary patch
literal 497
zcmV>Odp4-Gj!Vgpnvl^lR&BAV_6O+=RfZjCWd
zagvJ#P%f9p(&_XafSEW>0lb7^IG@kwUw!tm0D>S`QPoo-IuFC}u$R+RDz&AmPAOxI
z>1pfyd;^F`R#hjuIL{H$o~rHxsCu&U+BO=ETA@&=MFH*s%=skyqxBjyPelQa08F+8
za82hPU&cPBPJSMkdG`lE)QgCy`=+W3*4lv}+{qy#*Suinj{VlP2@`;*0`4d_o6V7W
zy?#+F7T=w$BC?^XZ`Rs#_g*TMMl+errm8+O^VOf0Ktx$Q#8$cPrBQwu-^3io73WC6m*TLsl
z=EiI9j2{V*C8Cwq+()!#j5+BG;B(+O2CzCv_HBD^n0c|A5ATnOh%6D&x~h)%2~tzl
nGi&X2uYF#CK7;mcK6HQ&BAh}$?W7?700000NkvXXu0mjf)oa@2
literal 0
HcmV?d00001
diff --git a/pages/activityDialog/activityDialog.js b/pages/activityDialog/activityDialog.js
new file mode 100644
index 0000000..3c20d34
--- /dev/null
+++ b/pages/activityDialog/activityDialog.js
@@ -0,0 +1,66 @@
+// pages/activityDialog/activityDialog.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/activityDialog/activityDialog.json b/pages/activityDialog/activityDialog.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/activityDialog/activityDialog.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/activityDialog/activityDialog.wxml b/pages/activityDialog/activityDialog.wxml
new file mode 100644
index 0000000..57a02dd
--- /dev/null
+++ b/pages/activityDialog/activityDialog.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ 姓名
+ 哈哈哈哈哈
+
+ 2020-02-02 00:00:00
+
+
+
+
+
+
+
+
+
+
+
+ 姓名
+ 哈哈哈哈哈
+
+ 2020-02-02 00:00:00
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/activityDialog/activityDialog.wxss b/pages/activityDialog/activityDialog.wxss
new file mode 100644
index 0000000..b01a43d
--- /dev/null
+++ b/pages/activityDialog/activityDialog.wxss
@@ -0,0 +1,42 @@
+.dialog{
+ padding: 30rpx;
+}
+.dialog-box{
+ margin-bottom: 15rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.avatar{
+ width: 15%;
+}
+.avatar image{
+ width: 100%;
+ height: 90rpx;
+}
+.user-info{
+ width: 83%;
+ border-bottom: 1px solid #DEDEDE;
+ padding-bottom: 10rpx;
+}
+.name{
+ font-size: 34rpx;
+ color: #949494;
+ margin: 15rpx 0;
+}
+.content{
+ font-size: 30rpx;
+ color: #000;
+ margin-bottom: 15rpx;
+}
+.public-time{
+ display: flex;
+ justify-content: space-between;
+}
+.time{
+ font-size: 28rpx;
+ color: #949494;
+}
+.delete, .delete image{
+ width: 40rpx;
+ height: 40rpx;
+}
\ No newline at end of file
diff --git a/pages/center/center.js b/pages/center/center.js
index 343da48..3f7528a 100644
--- a/pages/center/center.js
+++ b/pages/center/center.js
@@ -7,8 +7,19 @@ Page({
*/
data: {
userAvatar: '',
- token: ''
+ token: '',
+ userInfo: {},
+ usercenterUrl: app.usercenterUrl,
+ sourcePath: '/route/file/downloadfile/true/',
+ randomName: '',
+ showPhone: true,
+ phone: '',
+ code: '',
+ gotCode: false,
+ restTime: 120,
+ timer: ''
},
+ // 选择头像来源
changeAvatar: function () {
var self = this
wx.showActionSheet({
@@ -24,6 +35,7 @@ Page({
}
})
},
+ // 选择图片
chooseAvatar: function (type) {
var self = this
wx.chooseImage({
@@ -32,14 +44,13 @@ Page({
sourceType: [type],
success: function (res) {
var avatar = res.tempFilePaths[0];
- console.log(avatar)
app.restAjax.file(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
headers: {
token: self.data.token
}
}, function (code, data) {
- console.log(data);
-
+ var id = JSON.parse(data).data
+ self.uploadAvatar(id)
}, function (code, data) {
console.log(data)
})
@@ -49,6 +60,38 @@ Page({
}
})
},
+ // 上传
+ uploadAvatar: function (avatarId) {
+ var self = this
+ app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateuseravatar', [app.usercenterUrl]), {
+ avatar: avatarId
+ }, {
+ headers: {
+ token: self.data.token
+ }
+ }, function (code, data) {
+ wx.setStorageSync('token', data.data);
+ self.getUserInfo()
+ }, function (code, data) {
+ console.log(data)
+ })
+ },
+ // 获取用户信息
+ getUserInfo: function () {
+ var self = this
+ app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, {
+ headers: {
+ token: self.data.token
+ }
+ }, function (code, data) {
+ self.setData({
+ userInfo: data
+ })
+ }, function (code, data) {
+ console.log(data)
+ })
+ },
+ // 获取token
getToken: function () {
var self = this
wx.getStorage({
@@ -57,6 +100,7 @@ Page({
self.setData({
token: res.data
})
+ self.getUserInfo()
},
})
},
@@ -76,11 +120,126 @@ Page({
url: '../myVolunteerActivity/myVolunteerActivity',
})
},
-
+ // 判断用户是否为随机名称
+ isRandomName: function () {
+ var self = this
+ wx.getStorage({
+ key: 'isRandomUsername',
+ success: function (res) {
+ if (res.data == 1) {
+ wx.hideTabBar()
+ self.setData({
+ randomName: true
+ })
+ }
+ }
+ })
+ },
+ // 取消绑定手机
+ cancelPhone: function () {
+ this.setData({
+ showPhone: false
+ })
+ wx.showTabBar()
+ },
+ // 获取输入的手机号
+ phoneNum: function (res) {
+ this.setData({
+ phone: res.detail.value
+ })
+ console.log(this.data.phone)
+ },
+ // 校验手机号
+ testPhone: function () {
+ var self = this
+ if (self.data.phone) {
+ if (!/^1(3|4|5|6|7|8|9)\d{9}$/.test(self.data.phone)) {
+ wx.showToast({
+ title: '请输入正确的手机号',
+ icon: 'none',
+ duration: 1500
+ })
+ } else {
+ self.getCode()
+ }
+ } else {
+ wx.showToast({
+ title: '手机号不能为空',
+ icon: 'none',
+ duration: 1500
+ })
+ }
+ },
+ // 获取验证码
+ getCode: function () {
+ var self = this
+ app.restAjax.get(app.restAjax.path('{usercenterUrl}/api/sms/getverificationcode/' + self.data.phone, [app.usercenterUrl]), {}, null,
+ function (code, data) {
+ if (code == 200) {
+ console.log(data)
+ self.setData({
+ gotCode: true
+ })
+ self.data.timer = setInterval(function () {
+ var cur = self.data.restTime - 1
+ console.log(cur)
+ if (cur == 0) {
+ clearInterval(self.data.timer)
+ self.setData({
+ restTime: 120,
+ gotCode: false
+ })
+ }
+ self.setData({
+ restTime: cur
+ })
+ }, 1000)
+ }
+ },
+ function (code, data) {
+ console.log(data)
+ wx.showToast({
+ title: data.msg,
+ icon: 'none',
+ duration: 1500
+ })
+ } )
+ },
+ // 提交绑定手机
+ submitPhone: function () {
+ var self = this
+ app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateminiappdefaultusername', [app.usercenterUrl]), {
+ phone: self.data.phone,
+ verificationCode: self.data.code
+ }, {
+ headers: {
+ token: self.data.token
+ }
+ }, function (code, data) {
+ console.log(data)
+ wx.setStorageSync('token', data.data);
+ wx.setStorageSync('isRandomUsername', 0)
+ clearInterval(self.data.timer)
+ self.setData({
+ showPhone: false,
+ restTime: 120
+ })
+ self.getUserInfo()
+ }, function (code, data) {
+ console.log(data)
+ })
+ },
+ // 验证码
+ inputCode: function (e) {
+ this.setData({
+ code: e.detail.value
+ })
+ },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ this.isRandomName()
this.getToken()
},
diff --git a/pages/center/center.wxml b/pages/center/center.wxml
index 82ae944..22f06d1 100644
--- a/pages/center/center.wxml
+++ b/pages/center/center.wxml
@@ -3,10 +3,10 @@
-
-
+
+
- 杜若无心
+ {{userInfo.name}}
常用功能
@@ -41,4 +41,21 @@
+
+
+
+ 您还没有绑定手机号,请先绑定手机号
+
+
+
+
+
+ 获取验证码
+ {{restTime}}
+
+
+ 确认
+ 取消
+
+
\ No newline at end of file
diff --git a/pages/center/center.wxss b/pages/center/center.wxss
index 6307e32..c4d5a4a 100644
--- a/pages/center/center.wxss
+++ b/pages/center/center.wxss
@@ -63,4 +63,83 @@
.title{
font-size: 28rpx;
color: #242424;
+}
+.set-phone{
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, .6);
+ z-index: 100;
+}
+.set-phone-box{
+ width: 96%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ background: #fff;
+ border-radius: 10rpx;
+ padding: 30rpx;
+ box-sizing: border-box;
+}
+.tips{
+ font-size: 28rpx;
+ color: #000;
+}
+.phone-input{
+ margin: 25rpx 0;
+}
+.code-input{
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 25rpx;
+}
+.code-input input{
+ width: 70%;
+ height: 55rpx;
+ border: 1px solid #dedede;
+ border-radius: 10rpx;
+ padding: 0 10rpx;
+ box-sizing: border-box;
+ font-size: 28rpx;
+}
+.phone-input input{
+ width: 100%;
+ height: 55rpx;
+ border: 1px solid #dedede;
+ border-radius: 10rpx;
+ padding: 0 10rpx;
+ box-sizing: border-box;
+ font-size: 28rpx;
+}
+.get-code, .got-code{
+ font-size: 28rpx;
+ background: rgba(159,21,18,.1);
+ color: #9F1512;
+ width: 28%;
+ line-height: 55rpx;
+ text-align: center;
+ border-radius: 10rpx;
+}
+.got-code{
+ background: #fff;
+ color: #4a4d52;
+ border: 1px solid #eaeaea;
+}
+.set-phone-btn-box{
+ display: flex;
+ justify-content: space-between;
+}
+.set-phone-btn{
+ width: 49%;
+ height: 65rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 28rpx;
+ color: #fff;
+ background: #9F1512;
+ border-radius: 10rpx;
}
\ No newline at end of file
diff --git a/pages/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js
new file mode 100644
index 0000000..aaf2ecc
--- /dev/null
+++ b/pages/teamDetail/teamDetail.js
@@ -0,0 +1,66 @@
+// pages/teamDetail/teamDetail.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/teamDetail/teamDetail.json b/pages/teamDetail/teamDetail.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/teamDetail/teamDetail.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/teamDetail/teamDetail.wxml b/pages/teamDetail/teamDetail.wxml
new file mode 100644
index 0000000..7f28701
--- /dev/null
+++ b/pages/teamDetail/teamDetail.wxml
@@ -0,0 +1,68 @@
+
+
+
+ 团队名称:
+ 团队名称
+
+
+ 团队人数:
+ 1
+
+
+ 所属区域:
+ 所属区域
+
+
+ 团队介绍:
+ 团队介绍
+
+
+
+ 团队成员
+
+
+
+
+
+ 名字队长
+ 加入时间:2020-02-02
+
+
+
+
+
+
+
+ 名字队长
+ 加入时间:2020-02-02
+
+
+
+
+
+
+
+ 名字队长
+ 加入时间:2020-02-02
+
+
+
+
+ 申请人员
+
+
+
+
+
+
+ 名字
+
+ 通过
+ 拒绝
+
+
+ 加入时间:2020-02-02
+
+
+
+
\ No newline at end of file
diff --git a/pages/teamDetail/teamDetail.wxss b/pages/teamDetail/teamDetail.wxss
new file mode 100644
index 0000000..0443cd1
--- /dev/null
+++ b/pages/teamDetail/teamDetail.wxss
@@ -0,0 +1,83 @@
+.team{
+ padding: 30rpx;
+}
+.team-info{
+ margin-bottom: 20rpx;
+}
+.row{
+ display: flex;
+ justify-content: space-between;
+}
+.title{
+ width: 23%;
+ font-size: 28rpx;
+ line-height: 65rpx;
+}
+.content{
+ width: 75%;
+ line-height: 65rpx;
+ font-size: 28rpx;
+ border-bottom: 1px solid #DEDEDE;
+}
+.intro{
+ min-height: 200rpx;
+}
+.team-member{
+ margin-top: 20rpx;
+}
+.member-title{
+ font-size: 30rpx;
+ color: #000;
+ padding-left: 25rpx;
+ border-left: 10rpx solid #9F1512;
+ margin-bottom: 20rpx;
+}
+.member-box{
+ display: flex;
+ justify-content: space-between;
+ padding: 10rpx 0;
+ border-bottom: 1px solid #DEDEDE;
+}
+.member-avatar{
+ width: 15%;
+}
+.member-avatar image{
+ width: 100%;
+ height: 90rpx;
+}
+.member-info{
+ width: 83%;
+}
+.name{
+ font-size: 30rpx;
+ margin: 20rpx 0;
+}
+.post{
+ display: inline-block;
+ background: rgba(159,21,18,.1);
+ color: #9F1512;
+ padding: 0 10rpx;
+ margin-left: 15rpx;
+}
+.join-time{
+ font-size: 28rpx;
+ color: #949494;
+}
+.apply-member, .btn{
+ display: flex;
+ justify-content: space-between;
+}
+.agree, .refuse{
+ padding: 0 10rpx;
+ background: rgba(159,21,18,.1);
+ color: #9F1512;
+}
+.refuse{
+ margin-left: 15rpx;
+}
+.name-box{
+ width: 60%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
\ No newline at end of file
diff --git a/pages/venue/venue.wxss b/pages/venue/venue.wxss
index d692850..aa6ecd2 100644
--- a/pages/venue/venue.wxss
+++ b/pages/venue/venue.wxss
@@ -4,6 +4,7 @@
left: 0;
right: 0;
padding: 0 30rpx;
+ background: #fff;
}
.fixed-tab{
padding: 30rpx 0;