HuaJingwen 7 years ago
parent
commit
823e17ed69

+ 50 - 0
pages/application/application.js

@@ -0,0 +1,50 @@
1
+//index.js
2
+var app = getApp();
3
+var utils = require('../../utils/util.js');
4
+Page({
5
+  data: {
6
+    page: 0,
7
+    dataList: []
8
+  },
9
+  onLoad: function () {
10
+    this.initApplication();
11
+  },
12
+  initApplication () {
13
+      var that = this, token = wx.getStorageSync('token');
14
+      wx.request({
15
+        url: app.globalData.HOST + '/user/wx/myapply',
16
+        method: "POST",
17
+        data: {token: token, pageId: ++that.data.page},
18
+        success: function (res) {
19
+          var data = res.data;
20
+            // console.log(data);
21
+          if (data.errno == '0') {
22
+            /*that.setData({
23
+              jobArr: data.userlist,
24
+              moneyArr: data.list,
25
+              timeArr: data.month
26
+            })*/
27
+          }else if(data.errno == '90001'){
28
+            console.log('go');
29
+            wx.navigateTo({
30
+              // url: '/pages/'
31
+            })
32
+          }
33
+        },
34
+        complete: function () {
35
+          that.setData({ hidden:true});//加载成功
36
+          wx.stopPullDownRefresh() //停止下拉刷新
37
+        }
38
+      });
39
+  },
40
+  onPullDownRefresh: function () {
41
+    //下拉
42
+    var that = this, obj = { amount: 0, is_hot: 1, is_new: 0, search: 0, term: 0, user_title: "不限" };
43
+    utils.initList(that, obj, 'top', ++that.data.page);
44
+  },
45
+  onReachBottom: function () {
46
+    //上拉
47
+    var that = this, obj = { amount: 0, is_hot: 1, is_new: 0, search: 0, term: 0, user_title: "不限" };
48
+    utils.initList(that, obj, 'bottom', ++that.data.page);
49
+  }
50
+})

+ 16 - 0
pages/application/application.wxml

@@ -0,0 +1,16 @@
1
+<import src="../template/template.wxml" />
2
+<view class="content-wrapper">
3
+  <block wx:for="{{dataList}}" wx:key="void">
4
+     <!-- 使用热门推荐模板,传入当前循环对象item  -->
5
+    <template is="jiefItem1" data="{{...item}}"/>
6
+  </block>
7
+</view>
8
+<view class="body-view">
9
+  <loading hidden="{{hidden}}" bindchange="loadingChange">
10
+    加载中...
11
+  </loading>
12
+</view>
13
+
14
+
15
+
16
+

+ 45 - 0
pages/application/application.wxss

@@ -0,0 +1,45 @@
1
+/**index.wxss**/
2
+@import "../template/template.wxss";
3
+
4
+.weui-flex{
5
+  font-size: 14px; 
6
+  text-align: center;
7
+  border-bottom: 1rpx solid #d9d9d9; 
8
+}
9
+.weui-flex__item{
10
+  padding: 12px 0 8px;
11
+}
12
+.weui-flex .icon{
13
+  display: block;
14
+  width:30px;
15
+  height: 30px;
16
+  margin: 0 auto;
17
+  margin-bottom: 3px;
18
+}
19
+.weui-flex .icon .img{
20
+  width:30px;
21
+  height: 30px;
22
+}
23
+.textContainer{
24
+  height: 30px;
25
+  border-bottom: 1rpx solid #d9d9d9;
26
+  background-color: #f5f4f9;
27
+  font-size: 12px;
28
+  line-height: 30px;
29
+}
30
+.textContainer .swiper_container{display: inline-block;width:80vw; height:30px;}   
31
+.textContainer .swiper_item { font-size: 25rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;z-index: -1;}
32
+.textContainer .icon-horn{
33
+  width: 18px;
34
+  height: 18px;
35
+  vertical-align:top;
36
+  margin:0 10px;
37
+}
38
+.textContainer .icon-horn .img{
39
+  width: 18px;
40
+  height: 18px;
41
+}
42
+.content-wrapper .textContainer{
43
+  border-bottom: 0 none;
44
+  font-size: 14px;
45
+}