riku
2022-08-11 5656daeb79c6d4d3f9fc78f981c7faf96582d2f1
登录注册模块、

1. 登录注册模块完成企业端注册部分80%;
已修改31个文件
已删除4个文件
已添加22个文件
1123 ■■■■ 文件已修改
app.json 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/cell/cell.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/inputcell/inputcell.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/sign/sign.js 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/sign/sign.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/sign/sign.wxml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/sign/sign.wxss 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/assessment/assessment.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetail/consultdetail.js 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetail/consultdetail.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultdetail/consultdetail.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.wxml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consulthome/consulthome.wxss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresult/consultresult.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresult/consultresult.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultresult/consultresult.wxss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_consult/consultsearch/consultsearch.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userlogin/userlogin.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userlogin/userlogin.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userlogin/userlogin.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userlogin/userlogin.wxss 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userloginpw/userloginpw.js 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userloginpw/userloginpw.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userloginpw/userloginpw.wxml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userloginpw/userloginpw.wxss 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.js 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.json 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.wxml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistercompany/userregistercompany.wxss 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistergov/userregistergov.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistergov/userregistergov.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistergov/userregistergov.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistergov/userregistergov.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistertype/userregistertype.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistertype/userregistertype.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistertype/userregistertype.wxml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/module_user/userregistertype/userregistertype.wxss 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promise/promise.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promise/promise.wxml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promise/promise.wxss 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promisefile/promisefile.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promisefile/promisefile.wxml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promiseinfo/promiseinfo.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promiseresult/promiseresult.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promisesign/promisesign.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promisesign/promisesign.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/promisesign/promisesign.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.private.config.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/re_company.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/re_manage.png 补丁 | 查看 | 原始文档 | blame | 历史
service/baserequest.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/consultservice.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/promiseservice.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.json
@@ -1,5 +1,6 @@
{
  "pages": [
    "pages/module_user/userlogin/userlogin",
    "pages/login/login",
    "pages/home/home",
    "pages/text/text",
@@ -21,7 +22,11 @@
    "pages/module_consult/consultresult/consultresult",
    "pages/module_consult/consultdetail/consultdetail",
    "pages/module_ledger/ledgerhome/ledgerhome",
    "pages/module_ledger/ledgerupload/ledgerupload"
    "pages/module_ledger/ledgerupload/ledgerupload",
    "pages/module_user/userloginpw/userloginpw",
    "pages/module_user/userregistertype/userregistertype",
    "pages/module_user/userregistergov/userregistergov",
    "pages/module_user/userregistercompany/userregistercompany"
  ],
  "window": {
    "backgroundTextStyle": "light",
app.wxss
@@ -71,6 +71,11 @@
  margin: 8px;
  color: white;
  padding: 8px;
  text-align: center;
}
.submit:active {
  background-color: var(--fyui-BG-COLOR-ACTIVE);
}
/********************************** é€šç”¨-end ***********************************/
@@ -250,7 +255,7 @@
  width: 100%;
  height: auto;
  border-radius: 0px;
  font-size: medium;
  font-size: large;
  font-weight: 600;
  /* background-color: greenyellow; */
}
@@ -268,7 +273,7 @@
.fyui-box__text .fyui-box__bd .fyui-box__content {
  color: var(--fyui-text-color_3);
  font-size: x-small;
  font-size: medium;
}
.fyui-box__text .fyui-box__bd .fyui-box__tag {
component/cell/cell.wxss
@@ -4,5 +4,5 @@
.weui-cell {
  padding: 10px 0px;
  font-size: 14px;
  font-size: 16px;
}
component/inputcell/inputcell.wxml
@@ -8,7 +8,7 @@
      <input wx:if="{{item.input}}" type="{{item.type?item.type:'text'}}"
        maxlength="{{item.maxLength?item.maxLength:'-1'}}" id="{{item.id?item.id:''}}"
        placeholder-style="color:{{item.noValue?'red':'#B2B2B2'}};" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}"
        bindinput="changeV" value="{{item.value}}" placeholder="请输入{{item.name}}" />
        bindinput="changeV" value="{{item.value}}" placeholder="{{item.placeholder ? item.placeholder : '请输入' + item.name}} " />
      <view wx:else="{{text}}" class="weui-up-input {{inputClass}} {{alignLeft?'':'input-right'}}">{{item.value}}</view>
      <view class="unit">{{item.unit}}</view>
    </view>
component/sign/sign.js
ÎļþÒÑɾ³ý
component/sign/sign.json
ÎļþÒÑɾ³ý
component/sign/sign.wxml
ÎļþÒÑɾ³ý
component/sign/sign.wxss
ÎļþÒÑɾ³ý
pages/assessment/assessment.js
@@ -46,8 +46,8 @@
    grid: {
      x: 30,
      y: 30,
      x2: 35,
      y2: 53
      x2: 37,
      y2: 60
    },
    series: [{
pages/home/home.js
@@ -154,11 +154,15 @@
        // url = "/pages/text/text"
        let bodyUrl = e.currentTarget.dataset.url
        let fileType = e.currentTarget.dataset.filetype
        wx.showLoading({
          title: ' æ–‡ä»¶ä¸‹è½½ä¸­',
          mask: true,
        })
        wx.downloadFile({
          url: bodyUrl,
          success: function (res) {
            wx.hideLoading()
            const filePath = res.tempFilePath
            var t = filePath.split('.')[filePath.split('.').length - 1]
            wx.openDocument({
              filePath: filePath,
              success: function (res) {
pages/module_consult/consultdetail/consultdetail.js
@@ -18,14 +18,14 @@
   */
  onLoad(options) {
    var that = this
    // this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
    //   that.setData({
    //     fileId: data.fileId
    //   })
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      that.setData({
        fileId: data.fileId
      })
    //   that.getFile()
    // })
    that.getFile()
    })
    // that.getFile()
  },
  /**
@@ -75,5 +75,39 @@
    } else {
      return undefined
    }
  },
  openFile () {
    let content = this.data.content
    if (content.mfFileUrl == undefined || content.mfFileUrl == null || content.mfFileUrl.length == 0) {
      wx.showToast({
        title: '文件暂时无法访问',
        duration: 1000,
        icon: 'none',
        mask: true,
      })
      return
    }
    console.log(content.mfFileUrl);
    wx.showLoading({
      title: ' æ–‡ä»¶ä¸‹è½½ä¸­',
      mask: true,
    })
    wx.downloadFile({
      url: content.mfFileUrl,
      success: function (res) {
        wx.hideLoading()
        const filePath = res.tempFilePath
        wx.openDocument({
          filePath: filePath,
          success: function (res) {
            console.log('打开文档成功')
          },
          fail (error) {
            console.log(error);
          }
        })
      }
    })
  }
})
pages/module_consult/consultdetail/consultdetail.wxml
@@ -23,12 +23,13 @@
    </view>
    <view class="fyui-panel">
      <view>文件类别:{{content.mfFileType}}</view>
      <view>文件下载</view>
      <!-- <view>文件下载</view> -->
    </view>
    <view class="fyui-panel">
      <view>关键词:{{content.mfKeywordLv1}}</view>
    </view>
  </view>
  <view class="page__ft">
    <view class="submit" bindtap="openFile">查看文件</view>
  </view>
</view>
pages/module_consult/consultdetail/consultdetail.wxss
@@ -13,6 +13,7 @@
  font-size: 12px;
  color: var(--fyui-text-color_2);
  text-align: end;
  margin-bottom: 16px;
}
.f-summary {
pages/module_consult/consulthome/consulthome.js
@@ -42,6 +42,12 @@
  },
  gotoSearch () {
    wx.navigateTo({
      url: "/pages/module_consult/consultsearch/consultsearch"
    })
  },
  goto (e) {
    var url = ""
    var index = e.currentTarget.dataset.index
pages/module_consult/consulthome/consulthome.wxml
@@ -1,7 +1,7 @@
<!--pages/module_consult/consulthome/consulthome.wxml-->
<view class="page">
  <view class="page__hd">
    <view class="search-bar" bindtap="search">
    <view class="search-bar" bindtap="gotoSearch">
      <mp-icon icon="search" size="15" color="black"></mp-icon>
      <text>{{searchTips}}</text>
    </view>
@@ -55,11 +55,13 @@
        </view>
        <view class="fyui-box__bd">
          <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view>
          <view class="fyui-box__content">{{item.des}}</view>
          <view class="fyui-box__content des">{{item.des}}</view>
        </view>
        <view class="fyui-box__ft">
          <text class="keyword">关键词:</text>
          <view class="keyword-item"><text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i" >{{word}}</text></view>
          <view class="keyword-item">
            <text wx:for="{{item.keywords}}" wx:for-index="i" wx:for-item="word" wx:key="i">{{word}}</text>
          </view>
        </view>
      </view>
    </view>
pages/module_consult/consulthome/consulthome.wxss
@@ -62,6 +62,7 @@
  white-space: nowrap;
}
.keyword-item {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
}
@@ -73,6 +74,15 @@
  color: #2c7064;
}
.des {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  width: 100%;
  overflow: hidden;
  /* text-overflow: ellipsis; */
}
.tag {
  margin-bottom: 8px;
}
pages/module_consult/consultresult/consultresult.js
@@ -9,25 +9,7 @@
   */
  data: {
    keyword: 'asdad',
    result: [{
      id: '',
      name: '法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规',
      des: '法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规',
      fileIndustry: '生态环境',
      itemType: '大气',
      fileUrl: '',
      keywords: ['生态环境', '大气', '生态环境', '大气大', '大气', '大气', '大气大气大气大气大气大气'],
      time: ''
    },{
      id: '',
      name: '法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规',
      des: '法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规法律法规',
      fileIndustry: '生态环境',
      itemType: '大气',
      fileUrl: '',
      keywords: ['生态环境', '大气', '生态环境', '大气大', '大气', '大气', '大气大气大气大气大气大气'],
      time: ''
    }]
    result: []
  },
  /**
pages/module_consult/consultresult/consultresult.wxml
@@ -12,7 +12,7 @@
        </view>
        <view class="fyui-box__bd">
          <view class="fyui-box__content tag">相关行业 -> {{item.fileIndustry}}</view>
          <view class="fyui-box__content">{{item.des}}</view>
          <view class="fyui-box__content des">{{item.des}}</view>
        </view>
        <view class="fyui-box__ft">
          <text class="keyword">关键词:</text>
pages/module_consult/consultresult/consultresult.wxss
@@ -3,6 +3,7 @@
  white-space: nowrap;
}
.keyword-item {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
}
@@ -14,6 +15,15 @@
  color: #2c7064;
}
.des {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  width: 100%;
  overflow: hidden;
  /* text-overflow: ellipsis; */
}
.tag {
  margin-bottom: 8px;
}
pages/module_consult/consultsearch/consultsearch.js
@@ -11,15 +11,9 @@
    placeholder: '搜索',
    value: '',
    history: ['a', 'b'],
    history: [],
    hotTopic: [{
      name: '热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门热门'
    },{
      name: 't2'
    },{
      name: 't3'
    }],
    hotTopic: [],
  },
  /**
pages/module_user/userlogin/userlogin.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
// pages/module_user/userlogin/userlogin.js
const $f = require("../../../service//baserequest")
const userservice = require("../../../service/userservice")
const app = getApp()
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    bgPath: $f.baseIconUrl + 'userlogin-1.png'
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad: function (options) {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady: function () {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow: function () {
  },
  loginWx() {
  },
  gotoLogin() {
    wx.navigateTo({
      url: '/pages/module_user/userloginpw/userloginpw',
      success: (result) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  }
})
pages/module_user/userlogin/userlogin.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
{
  "usingComponents": {}
}
pages/module_user/userlogin/userlogin.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<!--pages/module_user/userlogin/userlogin.wxml-->
<view>
  <image class="banner-bg" src="{{bgPath}}"></image>
  <view class="login-btn">
    <view class="submit" bindtap="loginWx">微信用户一键登录</view>
    <view class="login-btn_text" bindtap="gotoLogin">账号密码登录/注册</view>
  </view>
</view>
pages/module_user/userlogin/userlogin.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
/* pages/module_user/userlogin/userlogin.wxss */
.banner-bg {
  z-index: -1;
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  /* background-color: aqua; */
}
.login-btn {
  margin-top: 50vh;
  text-align: center;
}
.login-btn_text {
  color: #2F655B;
}
.login-btn_text:active {
  color: #2f655b71;
}
pages/module_user/userloginpw/userloginpw.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,125 @@
// pages/module_user/userloginpw/userloginpw.js
const userservice = require("../../../service/userservice")
const app = getApp()
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    userName: "",
    password: "",
    loading: false
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  },
  onReady() {
    var that = this
    //获取缓存的用户账户密码
    wx.getStorage({
      key: 'accessToken',
      success(res) {
        app.globalData.accessToken = res.data
        that.setData({
          userName: res.data.userName,
          password: res.data.password
        })
      },
    })
  },
  inputUserName (e) {
    this.setData({
      userName: e.detail.value
    });
  },
  inputPassword (e) {
    this.setData({
      password: e.detail.value
    });
  },
  login() {
    if (this.data.userName == '') {
      wx.showToast({
        title: '请输入账户',
        icon: 'none'
      })
      return
    }
    if (this.data.password == '') {
      wx.showToast({
        title: '请输入密码',
        icon: 'none'
      })
      return
    }
    var that = this
    this.setData({
      loading: true
    })
    userservice.login(this.data.userName, this.data.password, {
      success (data) {
        if (data.success) {
          app.globalData.accessToken = {
            userName: that.data.userName,
            password: that.data.password,
            userId: data.userId,
            suserId: data.suserId,
          }
          wx.setStorage({
            key: 'accessToken',
            data: app.globalData.accessToken,
          })
          that.getUserInfo()
        } else {
          wx.showToast({
            title: '账户或密码错误',
            duration: 1000,
            icon: 'none',
          })
        }
      },
      complete () {
        that.setData({
          loading: false
        })
      }
    })
  },
  getUserInfo() {
    var that = this
    userservice.getUserInfo(app.globalData.accessToken.userId, {
      success(data) {
        app.globalData.userInfo = data
        wx.setStorage({
          key: 'userInfo',
          data: data,
          success: (result) => {
            wx.switchTab({
              url: '/pages/home/home',
            })
          }
        })
      }
    })
  },
  gotoRegister() {
    wx.navigateTo({
      url: '/pages/module_user/userregistertype/userregistertype',
      success: (result) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  }
})
pages/module_user/userloginpw/userloginpw.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "登录",
  "usingComponents": {}
}
pages/module_user/userloginpw/userloginpw.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
<!--pages/module_user/userloginpw/userloginpw.wxml-->
<view class="page">
  <view class="login-container">
    <view class="user-info">
      <view class="user-info_item">
        <text>账号:</text>
        <input type="text" placeholder="请输入账号" value="{{userName}}" bindinput="inputUserName" />
      </view>
      <view class="user-info_item">
        <text>密码:</text>
        <input type="password" placeholder="请输入密码" value="{{password}}" bindinput="inputPassword" />
      </view>
    </view>
    <button class="bottom-btn {{password.length > 0 ? 'bottom-btn_active' : ''}}" bindtap="login" loading="{{loading}}" disabled="{{password.length == 0}}">
      ç™»å½•
    </button>
    <view class="login-btn_text" bindtap="gotoRegister">去注册</view>
    <!-- <view>
      <label class="weui-agree" bindtap="checkboxChange">
        <checkbox class="weui-agree__checkbox-check" value="agree" checked="{{agree}}"/>
        <span class="weui-agree__checkbox"></span>
        <span class="weui-agree__text">阅读并同意以下说明</span>
      </label>
    </view>
    <view>
      <view class="agree-text">本小程序用于企业污水抽运记录上报,请用户知悉</view>
    </view> -->
  </view>
</view>
pages/module_user/userloginpw/userloginpw.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
/* pages/module_user/userloginpw/userloginpw.wxss */
.login-container{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100vh;
  z-index: 1;
  background-color: white;
}
.bottom-btn{
  width: 90% !important;
  color: #828282;
  background-color: #EEEEEE;
  margin-top: 80px;
}
.bottom-btn_active {
  color: white;
  background: linear-gradient(to right, #6DF1A9, #62EBCF);
}
.agree-text {
  width: 70vw;
  text-align: center;
  font-size: 12px;
  color: #b8b8b8;
  margin-top: 12rpx;
}
.user-info {
  font-size: 20px;
  width: 100%;
  /* background-color: burlywood; */
  margin-top: 30px;
}
.user-info_item {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 8px 30px;
}
.user-info_item>text{
  color: var(--fyui-text-color_1);
  line-height: 30px;
  white-space: nowrap;
  font-weight: 600;
}
.user-info_item>input{
  height: 30px;
  line-height: 30px;
  width: 100%;
  border-bottom: #929292 1px solid;
  background-color: white;
  font-size: medium;
}
.login-btn_text {
  margin-top: 24px;
  color: #2F655B;
}
.login-btn_text:active {
  color: #2f655b71;
}
pages/module_user/userregistercompany/userregistercompany.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,150 @@
// pages/module_user/userregistercompany/userregistercompany.js
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    sceneTypes: [
      {value: '1', name: '餐饮'},
      {value: '2', name: '工地'},
      {value: '3', name: '码头'},
      {value: '4', name: '堆场'},
      {value: '5', name: '搅拌站' },
      {value: '6', name: '工业企业' },
      {value: '7', name: '汽修'},
    ],
    sceneTypeIndex: 0,
    imgFiles: [],
    msg: [{
        name: "账号",
        id: "username",
        input: true,
        value: "",
        noValue: false
      },
      {
        name: "密码",
        id: "password",
        input: true,
        type: 'password',
        placeholder: '请输入密码(最多20位)',
        maxLength: 20,
        value: "",
        noValue: false
      },
      {
        name: "确认密码",
        id: "number",
        input: true,
        type: 'password',
        placeholder: '请再次确认密码',
        maxLength: 20,
        value: "",
        noValue: false,
      },
      {
        name: "公司名称",
        id: "department",
        input: true,
        value: '',
        noValue: false,
        required: false
      },
      {
        name: "信用代码",
        id: "code",
        input: true,
        value: "",
        noValue: false,
        required: false
      },
    ],
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  },
  changeSceneType(e) {
    let i = e.detail.value
    this.setData({
      sceneTypeIndex: i
    })
  },
  changeMsg(e) {
    let id = e.detail.params.id
    let value = e.detail.params.value
    let msg = this.data.msg
    let msgLength = msg.length
    for (let i = 0; i < msgLength; i++) {
      if (msg[i].id === id) {
        let path = "msg[" + i + "].value"
        let nPath = "msg[" + i + "].noValue"
        this.setData({
          [path]: value,
          [nPath]: false
        })
      }
    }
  },
  uploadFile(file) {
    let data = file.detail.newFiles
    data.forEach(element => {
      element.loading = false
    });
    this.setData({
      imgFiles: data
    })
  },
  onSubmit: function () {
    if (!this.submitCheck()) return
  },
  /**
   * ä¿¡æ¯å®Œæ•´åº¦æ£€æŸ¥
   */
  submitCheck() {
    let msg = this.data.msg
    let msgLength = msg.length
    //确认信息完整度
    for (let i = 0; i < msgLength; i++) {
      if (msg[i].required != false && msg[i].value === "") {
        let error = msg[i].name + "不可为空"
        let path = "msg[" + i + "].noValue"
        this.setData({
          errorMsg: error,
          [path]: true
        })
        wx.pageScrollTo({
          duration: 300,
          scrollTop: 0,
          // selector:"#" + msg[i].id,
        })
        return false
      }
    }
    //密码一致性确认
    if (msg[1].value != msg[2].value) {
      let error = "两次输入的密码不一致"
      this.setData({
        errorMsg: error,
      })
      return false
    }
    return true
  }
})
pages/module_user/userregistercompany/userregistercompany.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
{
  "navigationBarTitleText": "企业账户注册",
  "usingComponents": {
    "mp-cells":"/component/cells/cells",
    "mp-cell":"/component/cell/cell",
    "input-cell":"/component/inputcell/inputcell",
    "mp-toptips":"/component/toptips/toptips",
    "mp-icon": "/component/icon/icon",
    "mp-upload":"/component/uploader/uploader"
  }
}
pages/module_user/userregistercompany/userregistercompany.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
<!--pages/module_user/userregistercompany/userregistercompany.wxml-->
<view class="page">
  <mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips>
  <view class="page__bd">
    <view class="top-card">
      <view class="tag">企业类型</view>
      <picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value">
        <view>{{sceneTypes[sceneTypeIndex].name}}</view>
      </picker>
      <mp-icon icon="arrow" color="#7F7F7F" size="{{10}}"></mp-icon>
    </view>
    <view class="items">
      <mp-cells>
        <input-cell wx:for="{{msg}}" wx:key="id" item="{{item}}" bindpassValue="changeMsg"></input-cell>
      </mp-cells>
    </view>
    <view class="weui-upload-view">
      <mp-upload title="上传营业执照" titleClass="upload-title-class" max-count="1" files="{{imgFiles}}" binduploadImg="uploadFile" binddelete="delImg"></mp-upload>
    </view>
  </view>
  <view class="page__ft">
    <view class="submit" bindtap="onSubmit">提交</view>
  </view>
</view>
pages/module_user/userregistercompany/userregistercompany.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
/* pages/module_user/userregistercompany/userregistercompany.wxss */
.top-card {
  /* position: relative; */
  display: flex;
  flex-direction: row;
  background-color: white;
  border-radius: 4px;
  /* margin: 0px 8px 8px 8px; */
  margin-top: 8px;
  padding: 8px;
  font-size: 16px;
}
.items {
  padding: 0 8px;
  background-color: white;
}
.top-card .tag {
  /* display: inline-block; */
  width: 105px;
  white-space: nowrap;
}
.top-card .value {
  flex-grow: 1;
}
.top-card .value view {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.weui-upload-view {
  background-color: white;
  padding: 8px;
}
.page__ft {
  background-color: white;
}
pages/module_user/userregistergov/userregistergov.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
// pages/module_user/userregistergov/userregistergov.js
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload() {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage() {
  }
})
pages/module_user/userregistergov/userregistergov.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
{
  "usingComponents": {}
}
pages/module_user/userregistergov/userregistergov.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,2 @@
<!--pages/module_user/userregistergov/userregistergov.wxml-->
<text>pages/module_user/userregistergov/userregistergov.wxml</text>
pages/module_user/userregistergov/userregistergov.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1 @@
/* pages/module_user/userregistergov/userregistergov.wxss */
pages/module_user/userregistertype/userregistertype.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
// pages/module_user/userregistertype/userregistertype.js
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  },
  gotoRegisterInfo(e) {
    let index = e.currentTarget.dataset.index
    let url = ""
    switch(index) {
      case "0":
        url = `/pages/module_user/userregistercompany/userregistercompany`
        break;
      case "1":
        url = `/pages/module_user/userregistergov/userregistergov`
        break;
    }
    if (url != "") {
      wx.navigateTo({
        url: url
      })
    }
  }
})
pages/module_user/userregistertype/userregistertype.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "选择注册类型",
  "usingComponents": {}
}
pages/module_user/userregistertype/userregistertype.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<!--pages/module_user/userregistertype/userregistertype.wxml-->
<view>
  <view class="text-1">您要注册?</view>
  <view class="re-type" bindtap="gotoRegisterInfo" data-index="0">
    <image src="/res/icons/re_company.png"></image>
    <view>企业账户</view>
  </view>
  <view class="divider"></view>
  <view class="re-type" bindtap="gotoRegisterInfo" data-index="0">
    <image src="/res/icons/re_manage.png"></image>
    <view>管理账户</view>
  </view>
</view>
pages/module_user/userregistertype/userregistertype.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
/* pages/module_user/userregistertype/userregistertype.wxss */
.text-1 {
  text-align: center;
  color: var(--fyui-text-color_1);
  font-weight: 600;
  font-size: 18px;
}
.re-type {
  text-align: center;
  margin: 60px;
}
.re-type:active {
  color: var(--fyui-text-color_3);
}
.re-type>image {
  width: 120px;
  height: 120px;
}
.divider {
  margin: 20px;
  width: auto;
  height: 1px;
  background-color: var(--fyui-BG_1);
}
pages/promise/promise.js
@@ -29,13 +29,14 @@
   */
  onLoad: function (options) {
    this._initPlanYear()
    // this.getCommitment()
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow: function () {
    console.log("promise: onshow");
    this.getCommitment()
  },
pages/promise/promise.wxml
@@ -6,9 +6,12 @@
    <view>
      <view class="title">{{text1}}</view>
      <view class="tag">{{deadline}}</view>
    </view>
    <view class="btn" bindtap="gotoPromise" data-status="{{status}}">{{text3}}</view>
  </view>
    <view wx:if="{{status == 1}}" bindtap="gotoPromise" data-status="{{status}}">
      <image class="file" src="{{promise[0].picPath}}"></image>
    </view>
  </view>
  <view class="page__bd">
    <view class="fyui-cell fyui-cell_select title">
      <view class="fyui-cell__bd">历史承诺</view>
pages/promise/promise.wxss
@@ -8,6 +8,8 @@
.page__hd {
  background: linear-gradient(to bottom, #57E4CB, #bbf3eb);
  height: 30vh;
  display: flex;
  justify-content: space-between;
}
.page__hd .title {
@@ -33,6 +35,11 @@
  margin-top: 50px;
}
.page__hd .file {
  width: 40vw;
  margin-bottom: 2px;
}
.p-cell{
  position: relative;
  padding: 8px;
pages/promisefile/promisefile.json
@@ -1,7 +1,6 @@
{
  "usingComponents": {
    "mp-upload":"/component/uploader/uploader",
    "sign-dialog": "/component/sign/sign",
    "mp-icon": "/component/icon/icon",
    "c-dialog": "/component/commondialog/commondialog"
  },
pages/promisefile/promisefile.wxml
@@ -22,7 +22,7 @@
            <view wx:if="{{imgFiles.length == 0}}" class="">
              <view class="top-right" bindtap="startSign">
                <view class="sign-btn">
                  <mp-icon bindtap="startSign" type="field" icon="add" color="gray" size="{{60}}"></mp-icon>
                  <mp-icon type="field" icon="add" color="gray" size="{{60}}"></mp-icon>
                </view>
              </view>
            </view>
@@ -42,7 +42,4 @@
  <view class="page__ft">
    <view class="submit" bindtap="onSubmit">确认承诺</view>
  </view>
  <!-- <sign-dialog id="sign-dialog" show="{{showDialog}}" bindconfirm="signOver"></sign-dialog>
  <c-dialog show="{{showDialog2}}" yes="查看报告" bindconfirm="gotoReport" bindclose="goBack" no="返回" showBtn="{{!startCalculate}}">
  </c-dialog> -->
</view>
pages/promiseinfo/promiseinfo.wxss
@@ -1,6 +1,6 @@
/* pages/promiseinfo/promiseinfo.wxss */
.page__bd {
  font-size: 14px;
  font-size: 16px;
}
.banner-bg {
  position: fixed;
pages/promiseresult/promiseresult.js
@@ -20,8 +20,8 @@
    var that = this
    this.getOpenerEventChannel().on('acceptDataFromOpenerPage', function (data) {
      console.log(data);
      data.promise.picPath = $f.basePicUrl + data.promise.picPath
      data.promise.pdfPath = $f.basePicUrl + data.promise.pdfPath
      // data.promise.picPath = $f.basePicUrl + data.promise.picPath
      // data.promise.pdfPath = $f.basePicUrl + data.promise.pdfPath
      that.setData({
        promise: data.promise
      })
pages/promisesign/promisesign.js
@@ -6,6 +6,9 @@
   */
  data: {
    isDrawed: false,
    width: '1px',
    height: '1px'
  },
  //决定是否绘制的最小像素距离
@@ -166,6 +169,10 @@
        //this.ctxH -->所绘制canvas的height
        rotateCanvas.width = that.canvas.height;
        rotateCanvas.height = that.canvas.width;
        that.setData({
          width: rotateCanvas.width,
          height: rotateCanvas.height,
        })
        wx.canvasToTempFilePath({
          canvas: that.canvas,
          success(res) {
pages/promisesign/promisesign.wxml
@@ -2,13 +2,12 @@
<view class="page">
        <view class="canvas">
                <canvas id="signCanvas" type="2d" class="sign-canvas" bindtouchstart="touchStart"
                        bindtouchmove="touchMove" bindtouchend="touchEnd"></canvas>
                        bindtouchmove="touchMove" bindtouchend="touchEnd" disable-scroll="true"></canvas>
                <view class="tips">请旋转屏幕至此方向签名</view>
        </view>
        <view class="btn-group">
                <view class="cancel" bindtap="onCancel">取消</view>
                <view class="submit" bindtap="onSubmit">确认</view>
        </view>
        <canvas id="handWriting2" type="2d" style="display: none;width:100%;height:100%;" bindtouchstart="touchStart"
                        bindtouchmove="touchMove" bindtouchend="touchEnd"></canvas>
        <canvas id="handWriting2" type="2d" style="position: absolute; z-index: -1; width:{{width}};height:{{height}};"></canvas>
</view>
pages/promisesign/promisesign.wxss
@@ -1,4 +1,8 @@
/* pages/test2/test2.wxss */
.page {
  overflow: hidden;
}
.canvas {
  display: flex;
  margin-top: 4px;
project.config.json
@@ -22,7 +22,7 @@
    "checkSiteMap": true,
    "uploadWithSourceMap": true,
    "compileHotReLoad": false,
    "useMultiFrameRuntime": false,
    "useMultiFrameRuntime": true,
    "useApiHook": true,
    "babelSetting": {
      "ignore": [],
@@ -44,10 +44,11 @@
    "showES6CompileOption": false,
    "useCompilerPlugins": false,
    "ignoreUploadUnusedFiles": true,
    "useStaticServer": true
    "useStaticServer": true,
    "minifyWXML": true
  },
  "compileType": "miniprogram",
  "libVersion": "2.21.3",
  "libVersion": "2.25.2",
  "appid": "wxffd1438dd373fcf6",
  "projectname": "ep-law-abiding",
  "editorSetting": {
project.private.config.json
@@ -3,5 +3,6 @@
    "urlCheck": false,
    "compileHotReLoad": true
  },
  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json ä¸­çš„相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json ä¸­çš„相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
  "projectname": "ep-law-abiding"
}
res/icons/re_company.png
res/icons/re_manage.png
service/baserequest.js
@@ -11,10 +11,11 @@
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://127.0.0.1:8080"
const baseUrl = "http://192.168.0.117:8080"
// const baseUrl = "https://fyami.com.cn:447"
// const baseUrl = "http://192.168.0.117:8080"
const baseUrl = "https://fyami.com.cn:447"
// const basePicUrl = baseUrl + "/images/"
const basePicUrl = "https://fyami.com.cn:447/images/"
const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
const baseFileUrl = baseUrl + "/meeting/file/"
function request(fun) { 
@@ -76,5 +77,6 @@
  },
  basePicUrl:basePicUrl,
  baseUrl:baseUrl,
  baseFileUrl:baseFileUrl
  baseFileUrl:baseFileUrl,
  baseIconUrl: baseIconUrl
}
service/consultservice.js
@@ -1,4 +1,5 @@
const $f = require('./baserequest')
const util = require('../utils/util')
module.exports = {
  //根据关键字搜索法律法规
@@ -36,6 +37,13 @@
      },
    }
    Object.assign(cb, fun)
    $f.get(cb)
    let fun1 = util.deepCopy(cb)
    fun1.success = function (res) {
      res.mfFileUrl = $f.baseFileUrl + res.mfFileUrl
      cb.success(res)
    }
    $f.get(fun1)
  },
}
service/promiseservice.js
@@ -1,4 +1,5 @@
const $f = require("./baserequest")
const util = require('../utils/util')
module.exports = {
  //生成承诺书
@@ -12,7 +13,13 @@
        userId: userId,
        coVo: JSON.stringify(commitmentVo)
      },
      success: (result) => {fun.success(JSON.parse(result.data))},
      success: (result) => {
        let res = JSON.parse(result.data)
        res.data = res.data.map((value, index) => {
          return $f.basePicUrl + value
        })
        fun.success(res)
      },
      fail: (res) => {fun.fail(res)},
      complete: (res) => {fun.complete(res)},
    })
@@ -29,6 +36,16 @@
      },
    }
    Object.assign(cb, fun)
    $f.get(cb)
    let fun1 = util.deepCopy(cb)
    fun1.success = function (res) {
      res.forEach(r => {
        r.cmUrl = $f.basePicUrl + r.cmUrl
        r.cmPdfUrl = $f.basePicUrl + r.cmPdfUrl
      });
      cb.success(res)
    }
    $f.get(fun1)
  }
}