|
@@ -25,19 +25,32 @@ Page({
|
|
|
},
|
|
|
|
|
|
|
|
|
- onLoad: function () {
|
|
|
- this.setData({
|
|
|
- openid: app.globalData.openid
|
|
|
- })
|
|
|
- wx.getStorage({
|
|
|
- key: 'uid',
|
|
|
- success: res => {
|
|
|
- if (res.data) {
|
|
|
- this.setData({ show: 0 ,uid:res.data})
|
|
|
- }
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- })
|
|
|
+ onShow: function () {
|
|
|
+ if (this.data.uid){
|
|
|
+ this.setData({
|
|
|
+ organizers: [],
|
|
|
+ subjects: [],
|
|
|
+ page_org: 1,
|
|
|
+ page_sub: 1,
|
|
|
+ total_org: 0,
|
|
|
+ total_sub: 0
|
|
|
+ })
|
|
|
+ this.getData();
|
|
|
+ }else{
|
|
|
+ this.setData({
|
|
|
+ openid: app.globalData.openid
|
|
|
+ })
|
|
|
+ wx.getStorage({
|
|
|
+ key: 'uid',
|
|
|
+ success: res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.setData({ show: 0, uid: res.data })
|
|
|
+ }
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
onGotUserInfo: function () {
|
|
@@ -145,6 +158,7 @@ Page({
|
|
|
},
|
|
|
//主办单位
|
|
|
getorg:function(){
|
|
|
+ console.log(this.data.page_org)
|
|
|
const organizers=this.data.organizers;
|
|
|
wx.request({
|
|
|
url: host + '/api/index/organizers',
|
|
@@ -317,6 +331,6 @@ Page({
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
onPullDownRefresh: function () {
|
|
|
-
|
|
|
+ wx.startPullDownRefresh()
|
|
|
},
|
|
|
})
|