Prechádzať zdrojové kódy

Merge branch 'master' of http://git.cc-lotus.info/financial_platform/web-financial

wq 5 rokov pred
rodič
commit
c94cb5b715

+ 3 - 2
app.json

@@ -1,10 +1,11 @@
 {
   "pages": [
+    "pages/policy/index",
+    "pages/policyDetail/index",
+    "pages/unscrambleDetail/index",
     "pages/home/index",
     "pages/bank/index",
     "pages/market/index",
-    "pages/policy/index",
-    "pages/policyDetail/index",
     "pages/my/index",
     "pages/attestation/index",
     "pages/updatePassword/index",

+ 43 - 156
pages/policy/index.js

@@ -1,4 +1,4 @@
-// pages/policy/index.js
+// pages/policyDetail/index.js
 const app = getApp()
 Page({
 
@@ -13,21 +13,7 @@ Page({
       // 此页面 页面内容距最顶部的距离
       height: app.globalData.height * 2 + 20,
     },
-    active: 3,
-    icon: {
-      normal: '/pages/images/home.png',
-      active: '/pages/images/home_fill.png',
-      bankNormal: '/pages/images/duijie.png',
-      bankActive: '/pages/images/duijie_fill.png',
-      marketNormal: '/pages/images/recharge.png',
-      marketActive: '/pages/images/recharge_fill.png',
-      policyNormal: '/pages/images/news_hot.png',
-      policyActive: '/pages/images/news_hot_fill.png',
-      myNormal: '/pages/images/people.png',
-      myActive: '/pages/images/people_fill.png'
-    },
     currentTab: 0,
-    // 政策公文
     policyList: [{
         "pic": "/pages/images/test.jpg",
         "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
@@ -36,60 +22,11 @@ Page({
       },
       {
         "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "水电费地方",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "水电费地方",
+        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
         "zhuti": "疫情",
         "dengji": "吉林省"
       },
     ],
-    // 政策解读
     unscrambleList: [{
         "pic": "/pages/images/test.jpg",
         "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
@@ -102,91 +39,29 @@ Page({
         "zhuti": "疫情",
         "dengji": "吉林省"
       },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》中国银保监会就《商业银行小微企业金融服务监管评价暂行办法(试行)》",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
-      {
-        "pic": "/pages/images/test.jpg",
-        "title": "sfdf",
-        "zhuti": "疫情",
-        "dengji": "吉林省"
-      },
     ],
-    widHeight: '0'
+    active: 3,
+    icon: {
+      normal: '/pages/images/home.png',
+      active: '/pages/images/home_fill.png',
+      bankNormal: '/pages/images/duijie.png',
+      bankActive: '/pages/images/duijie_fill.png',
+      marketNormal: '/pages/images/recharge.png',
+      marketActive: '/pages/images/recharge_fill.png',
+      policyNormal: '/pages/images/news_hot.png',
+      policyActive: '/pages/images/news_hot_fill.png',
+      myNormal: '/pages/images/people.png',
+      myActive: '/pages/images/people_fill.png'
+    },
   },
-  //滑动切换
+  //滑动切换nihao
   swiperTab: function (e) {
     var that = this;
-    // 获取单个轮播循环的高度
-    var heights = this.data.height;
-    // 获取一级成员的数组个数
-    var policyList = this.data.policyList.length
-    // 获取二级成员的数组个数
-    var unscrambleList = this.data.unscrambleList.length
     that.setData({
       currentTab: e.detail.current
     });
-    if (this.data.currentTab == 0) {
-      that.setData({
-        widHeight: heights * policyList + 92 + "px"
-      });
-    } else {
-      that.setData({
-        widHeight: heights * unscrambleList + 92 + "px"
-      });
-    }
   },
-  //点击切换
-  clickTab: function (e) {
-    var that = this;
-    if (this.data.currentTab === e.target.dataset.current) {
-      return false;
-    } else {
-      that.setData({
-        currentTab: e.target.dataset.current
-      })
-    }
-  },
-  // 政策解读页面详情跳转
+  // 政策发布页面详情跳转
   // 判断id
   policyListDetail: function (e) {
     console.log(e.currentTarget.id)
@@ -200,9 +75,33 @@ Page({
       url: '/pages/policyDetail/index'
     })
   },
+  // 政策解读页面详情跳转
+
+  // 判断id
+  unscrambleListDetail: function (e) {
+    wx.navigateTo({
+      url: '/pages/unscrambleDetail/index?id=' + e.currentTarget.id // 希望跳转过去的页面    
+    })
+  },
+  // 无id,模拟数据跳转
+  unscrambleListDetail: function () {
+    wx.navigateTo({
+      url: '/pages/unscrambleDetail/index'
+    })
+  },
+  //点击切换
+  clickTab: function (e) {
+    var that = this;
+    if (this.data.currentTab === e.target.dataset.current) {
+      return false;
+    } else {
+      that.setData({
+        currentTab: e.target.dataset.current
+      })
+    }
+  },
   // 切换菜单
   onChange(event) {
-    console.log(event.detail)
     this.setData({
       active: event.detail
     });
@@ -232,19 +131,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    var query = wx.createSelectorQuery();
-    var that = this;
-    /**
-     * 获取系统信息
-     */
-    var policyList = this.data.policyList.length;
-    query.select('.list').boundingClientRect(function (rect) {
-      that.setData({
-        // 获取要循环标签的高度
-        height: rect.height,
-        widHeight: rect.height * policyList + 92 + "px"
-      })
-    }).exec();
+
   },
 
   /**

+ 1 - 0
pages/policy/index.json

@@ -1,4 +1,5 @@
 {
+  "component": true,
   "usingComponents": {
     "nav-bar": "/commpents/navbar/navbar"
   }

+ 3 - 3
pages/policy/index.wxml

@@ -5,10 +5,10 @@
 			<view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">政策发布</view>
 			<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">政策解读</view>
 		</view>
-		<swiper current="{{currentTab}}" bindchange="swiperTab" style='height:{{widHeight}}'>
+		<swiper current="{{currentTab}}" bindchange="swiperTab">
 			<swiper-item>
 				<view class="policyLeft">
-					<view class="list" wx:key="unique" wx:for="{{unscrambleList}}" wx:for-item="item">
+					<view class="list" wx:key="unique" wx:for="{{policyList}}" wx:for-item="item">
 						<view bindtap="policyListDetail" id="{{list._id}}">
 							<image src="{{item.pic}}"></image>
 							<view class="info">
@@ -25,7 +25,7 @@
 			<swiper-item>
 				<view class="policyLeft policyRight">
 					<view class="list" wx:key="unique" wx:for="{{unscrambleList}}" wx:for-item="item">
-						<view bindtap="policyListDetail" id="{{list._id}}">
+						<view bindtap="unscrambleListDetail" id="{{list._id}}">
 							<image src="{{item.pic}}"></image>
 							<view class="info">
 								<p>{{item.title}}</p>

+ 6 - 14
pages/policy/index.wxss

@@ -1,7 +1,12 @@
 .main {
   float: left;
   width: 100%;
-  height: 100%;
+}
+
+.main swiper {
+  height: 100vh;
+  float: left;
+  width: 100%;
 }
 
 .swiper-tab {
@@ -29,13 +34,6 @@
   border-bottom: 4rpx solid #E9021D;
 }
 
-.main swiper {
-  height: 100%;
-  float: left;
-  width: 100%;
-
-}
-
 .policyLeft {
   float: left;
   width: 92%;
@@ -102,10 +100,4 @@
 
 .policyLeft .info p:last-child span:last-child {
   margin: 0;
-}
-
-.policyRight {
-  float: left;
-  width: 92%;
-  margin: 0 30rpx;
 }

+ 1 - 1
pages/policyDetail/index.js

@@ -9,7 +9,7 @@ Page({
     nvabarData: {
       showCapsule: 0, //是否显示左上角图标,消息中心   1表示显示    0表示不显示
       showBack: 1, //返回
-      title: '政策信息', //导航栏 中间的标题
+      title: '政策发布', //导航栏 中间的标题
       // 此页面 页面内容距最顶部的距离
       height: app.globalData.height * 2 + 20,
     },

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 83 - 0
pages/unscrambleDetail/index.js


+ 5 - 0
pages/unscrambleDetail/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "nav-bar": "/commpents/navbar/navbar"
+  }
+}

+ 15 - 0
pages/unscrambleDetail/index.wxml

@@ -0,0 +1,15 @@
+<nav-bar navbar-data='{{nvabarData}}'></nav-bar>
+<view class="home">
+	<view class="main">
+		<text class="title">{{policyDetail.title}}</text>
+		<text class="jiguan">发文机关:{{policyDetail.jiguan}}</text>
+		<text class="zihao">发文字号:{{policyDetail.zihao}}</text>
+		<p class="zhuti">
+		<span>主题词:{{policyDetail.zhuti}}</span>
+		<span>政策等级:{{policyDetail.dengji}}</span>
+		<span>{{policyDetail.date}}</span>
+		</p>
+		<image src="{{policyDetail.pic}}" class="image"></image>
+		<text class="content">{{policyDetail.content}}</text>
+	</view>
+</view>

+ 73 - 0
pages/unscrambleDetail/index.wxss

@@ -0,0 +1,73 @@
+/* pages/policyDetail/index.wxss */
+.main {
+  float: left;
+  width: 93%;
+  height: 100%;
+  margin: 0 30rpx;
+}
+
+.main .title {
+  float: left;
+  width: 100%;
+  text-align: center;
+  font-size: 30rpx;
+  font-family: Source Han Sans SC;
+  font-weight: bold;
+  color: rgba(40, 40, 40, 1);
+  margin: 0 0 25rpx 0;
+}
+
+.main .jiguan {
+  float: left;
+  width: 100%;
+  text-align: center;
+  font-size: 22rpx;
+  font-family: Source Han Sans SC;
+  font-weight: 400;
+  color: rgba(136, 136, 136, 1);
+  margin: 0 0 10rpx 0;
+}
+
+.main .zihao {
+  float: left;
+  width: 100%;
+  text-align: center;
+  font-size: 22rpx;
+  font-family: Source Han Sans SC;
+  font-weight: 400;
+  color: rgba(136, 136, 136, 1);
+  margin: 0 0 10rpx 0;
+}
+
+.main .zhuti {
+  float: left;
+  width: 100%;
+  text-align: center;
+  font-size: 22rpx;
+  font-family: Source Han Sans SC;
+  font-weight: 400;
+  color: rgba(136, 136, 136, 1);
+  margin: 0 0 30rpx 0;
+}
+
+.main .zhuti span {
+  margin: 0 10rpx 0 0;
+}
+
+.main .image {
+  float: left;
+  width: 100%;
+  height: 298rpx;
+  text-align: center;
+  margin: 0 0 30rpx 0;
+}
+
+.main .content {
+  float: left;
+  width: 100%;
+  font-size: 26rpx;
+  font-family: Source Han Sans SC;
+  font-weight: 400;
+  color: rgba(40, 40, 40, 1);
+  margin: 0 0 30rpx 0;
+}