forked from nsjcy/frontEnd/nsjcy

liuwh
2020-05-09 6a970b8ec74fed89f94e24bef45fbeb7d23c9260
风险防控
4 files added
3 files modified
167 ■■■■■ changed files
SunshineLnsMinApp/app.json 1 ●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/dxalInfo/dxalInfo.json 2 ●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fxfk/fxfk.js 104 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fxfk/fxfk.json 9 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fxfk/fxfk.wxml 13 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/fxfk/fxfk.wxss 36 ●●●●● patch | view | raw | blame | history
SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.wxml 2 ●●● patch | view | raw | blame | history
SunshineLnsMinApp/app.json
@@ -16,6 +16,7 @@
    "pages/zhdt/zhdt",
    "pages/zhdtInfo/zhdtInfo",
    "pages/dxalInfo/dxalInfo",
    "pages/fxfk/fxfk",
    "pages/me/me",
    "pages/wdjb/wdjb",
    "pages/wdjbInfo/wdjbInfo",
SunshineLnsMinApp/pages/dxalInfo/dxalInfo.json
@@ -1,5 +1,5 @@
{
  "navigationBarTitleText": "典型案例详情",
  "navigationBarTitleText": "详情",
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTextStyle": "black"
SunshineLnsMinApp/pages/fxfk/fxfk.js
New file
@@ -0,0 +1,104 @@
// pages/dxal/dxal.js
var app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    dongtai1_1: app.globalData.imgUrl + '/image/dongtai1-1.jpg',
    dongtai2_1: app.globalData.imgUrl + '/image/dongtai2-1.jpg',
    dongtai3_1: app.globalData.imgUrl + '/image/dongtai3-1.jpg',
    inputShowed: false,
    inputVal: "",
    page: 1,
    content: '------加载中------',
    items: [],
    count: 0,
    scrollTop: 0,
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    var that = this;
    wx.showLoading();
    wx.request({
      url: app.globalData.url + '/api/article/publicMsgQuery',
      data: {
        page: that.data.page,
        size: 10,
        flag: '风险防控',
      },
      success: function(res) {
        wx.hideLoading();
        console.log('res', res);
        if (res.data.code == 0) {
          let content = res.data.data.result.content.map(({
            createTime,
            ...i
          }) => ({
            ...i,
            createTime: app.formatDate(createTime),
          }));
          console.log(content)
          if (content.length < 10) {
            that.setData({
              items: [...that.data.items, ...content],
              hasMoreData: false,
              content: '------我是有底线的------'
            })
          } else {
            that.setData({
              items: [...that.data.items, ...content],
              hasMoreData: true,
              content: '------加载更多------',
              page: that.data.page + 1
            })
          }
        } else {
          wx.showToast({
            title: res.data.msg,
          })
        }
      }
    })
  },
  getList: (count = 10, step = 0) => [...new Array(count)].map((n, i) => ({
    title: `Pull down ${i + step}`,
    content: 'Wux Weapp'
  })),
  linkFunction: function(event) {
    var str = event.currentTarget.dataset['str'];
    var id = event.currentTarget.dataset['id'];
    wx.navigateTo({
      url: '../' + str + '/' + str + '?id=' + id
    })
  },
  showInput: function() {
    this.setData({
      inputShowed: true
    });
  },
  hideInput: function() {
    this.setData({
      inputVal: "",
      inputShowed: false
    });
  },
  clearInput: function() {
    this.setData({
      inputVal: ""
    }, () => {});
  },
})
SunshineLnsMinApp/pages/fxfk/fxfk.json
New file
@@ -0,0 +1,9 @@
{
  "navigationBarTitleText": "风险防控",
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTextStyle": "black",
  "usingComponents": {
    "wux-refresher": "../../templeteDist/wuxDist/refresher/index"
  }
}
SunshineLnsMinApp/pages/fxfk/fxfk.wxml
New file
@@ -0,0 +1,13 @@
<view class="zhwj-b">
  <view class="zhwj-b-main" wx:for="{{ items }}" data-str="dxalInfo" data-Id="{{item.id}}" bindtap='linkFunction'>
    <view class="zhwj-b-head-l">
      <view class="zhwj-b-head-l-title text-black">{{item.title}}</view>
      <view class="text-grey">{{item.createTime}}
        <text decode="{{true}}" space="{{true}}">&nbsp;&nbsp;&nbsp;&nbsp;</text>{{item.readCount}}阅读</view>
    </view>
    <!-- <view class="zhwj-b-head-r">
      <image mode='widthFix' src="{{item.attList[0].path}}"></image>
    </view> -->
  </view>
  <div class="businessSchedule-load">------{{content}}------</div>
</view>
SunshineLnsMinApp/pages/fxfk/fxfk.wxss
New file
@@ -0,0 +1,36 @@
/* pages/fxfk/fxfk.wxss */
@import '../../weui.wxss';
.zhwj-b-main {
  display: flex;
  border-bottom: 1px solid #ebf2fa;
}
.zhwj-b-head-l {
  margin: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}
.businessSchedule-load {
  display: flex;
  justify-content: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 4vh;
}
.zhwj-b-head-r {
  margin: 6px;
}
.zhwj-b-head-r image {
  width: 108px;
  height: 80px;
}
.zhwj-b {
  background-color: #fff;
}
SunshineLnsMinApp/pages/yshjqyfw/yshjqyfw.wxml
@@ -50,7 +50,7 @@
  </view>
  <view class="zhwj-list-flex">
    <view class="zhwj-list-flex-l" data-str="createSubList" bindtap='linkFunction'>
    <view class="zhwj-list-flex-l" data-str="fxfk" bindtap='linkFunction'>
      <view class="cu-avatar round margin-left zhwj-list-flex-l-img" style="background-image: url('https://xnwj.gznsjc.gov.cn/nsjc-charge/image/zuj5.png');"></view>
      <view class="zhwj-list-flex-l-text">
        <view class="text-black text-bold text-lg">风险防控</view>