riku
2022-10-17 eb7366f400867d3f401fe60f06d848d6d1448457
2022.10.17
已修改36个文件
已添加17个文件
已重命名1个文件
1095 ■■■■■ 文件已修改
app.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.json 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base/behaviors/b_inputCheck.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base/behaviors/b_loadingStatus.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base/behaviors/b_loadingToast.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
base/behaviors/b_upload.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/gallery/gallery.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/uploader/uploader.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
component/uploader/uploader.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/sceneInfo.js 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_learn/learn/learn.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_ledger/behaviors/b_uploadLedger.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_ledger/ledgerupload/ledgerupload.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_promise/promiseinfo/promiseinfo.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/base_c/c_company-info/c_company-info.js 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/base_c/c_company-info/c_company-info.wxml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/base_c/c_scene-info/c_scene-info.js 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/base_c/c_scene-info/c_scene-info.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/behaviors/b_login.js 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/companyauthentication/companyauthentication.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/companyauthentication/companyauthentication.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/companyauthentication/companyauthentication.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.wxml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/mine/mine.wxss 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_about/p_about.js 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_about/p_about.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_about/p_about.wxml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_about/p_about.wxss 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_changepw/p_changepw.js 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_changepw/p_changepw.json 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_changepw/p_changepw.wxml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/p_changepw/p_changepw.wxss 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/personalauthentication/personalauthentication.js 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/personalauthentication/personalauthentication.json 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/personalauthentication/personalauthentication.wxml 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/personalauthentication/personalauthentication.wxss 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/sceneauthentication/sceneauthentication.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/sceneauthentication/sceneauthentication.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/userlogin/userlogin.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/userlogin/userlogin.wxml 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/m_user/userlogin/userlogin.wxss 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/app_icon.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/icon3.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/icon6.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/personal.png 补丁 | 查看 | 原始文档 | blame | 历史
res/icons/scene_info.png 补丁 | 查看 | 原始文档 | blame | 历史
service/authservice.js 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/baserequest.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/ledgerservice.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/userservice.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app.js
@@ -1,5 +1,6 @@
// app.js
import moment from './utils/moment.min'
import $f from "./service/baserequest"
App({
  onLaunch() {
@@ -20,7 +21,9 @@
    perPage: 5,
    userInfo: null,
    accessToken: null,
    isLogin: false
    isLogin: false,
    version: '体验版 1.0.0',
    agreement: $f.baseFileUrl + '/agreement/中小微企业生态环境守法智能服务微信小程序服务协议.docx'
  },
  // æ™ºèƒ½å’¨è¯¢ç»“果类型文本转换
  cosultTypeName: (typeId) => {
app.json
@@ -45,7 +45,10 @@
    "pages/m_user/companyregister/companyregister",
    "pages/m_user/companyauthentication/companyauthentication",
    "pages/m_user/base_c/c_company-info/c_company-info",
    "pages/m_user/sceneauthentication/sceneauthentication"
    "pages/m_user/sceneauthentication/sceneauthentication",
    "pages/m_user/personalauthentication/personalauthentication",
    "pages/m_user/p_about/p_about",
    "pages/m_user/p_changepw/p_changepw"
  ],
  "window": {
    "backgroundTextStyle": "light",
app.wxss
@@ -3,8 +3,8 @@
page {
  --fyui-primary-color: #59D5B3;
  --fyui-text-color_1: #191919;
  --fyui-text-color_2: #7F7F7F;
  --fyui-text-color_1: #3a3a3a;
  --fyui-text-color_2: #666666;
  --fyui-text-color_3: #B2B2B2;
  --fyui-BG_1: #F5F5F5;
  --fyui-BG-COLOR-ACTIVE: #ececec5d;
base/behaviors/b_inputCheck.js
ÎļþÃû´Ó pages/m_user/behaviors/b_inputCheck.js ÐÞ¸Ä
@@ -26,12 +26,13 @@
        index,
        mode
      } = e.currentTarget.dataset
      let i = e.detail.value.concat(e.detail.code)
      if (mode == 'region') {
        const i = e.detail.value.concat(e.detail.code)
        this.setData({
          [`msg[${index}].value`]: i
        })
      } else if (mode == 'selector') {
        const i = e.detail.value
        this.setData({
          [`msg[${index}].selectIndex`]: i,
          [`msg[${index}].value`]: this.data.msg[index].options[i].value
@@ -177,13 +178,13 @@
      let msg = this.data.msg
      if (msg) {
        let info = {}
        const info = this.data.info
        msg.forEach(m => {
          info[m.id] = m.value
        });
        this.setData({info})
        this.triggerEvent('onSubmit', info)
        this.submit()
        if (typeof this._submit === 'function') this._submit()
      }
    },
  }
base/behaviors/b_loadingStatus.js
@@ -9,17 +9,29 @@
    perPage: 10,
    totalCount: 0,
    loading: false,
    needLoadMore: false
    needLoadMore: false,
    timeout: false
  },
  timeoutId: '',
  lastLoading: false,
  observers: {
    'loading': function (loading) {
      if (this.lastLoading == loading) return
      if (loading) {
        clearTimeout(this.timeoutId)
        this._loadStart()
        this._loading()
        setTimeout(() => { this.setData({loading: false}) }, 20000);
        this.timeoutId = setTimeout(() => {
          this.setData({
            loading: false,
            timeout: true
          })
        }, 10000);
      } else {
        clearTimeout(this.timeoutId)
        this._loadComplete()
      }
      this.lastLoading = loading
    },
    'cPage, tPage': function (cPage, tPage) {
      this.setData({
base/behaviors/b_loadingToast.js
@@ -1,5 +1,3 @@
const { clearTimeout } = require("timers");
/**
 * æ•°æ®åŠ è½½å¼¹çª—
 * æ ¹æ®åŠ è½½çŠ¶æ€ï¼Œå±•ç¤ºå¯¹åº”çš„å¼¹çª—
@@ -8,20 +6,16 @@
module.exports = Behavior({
  data: {
    loadingText: '加载中',
    loadCompleteText: '加载完成'
    loadCompleteText: '加载完成',
    timeoutText: '加载超时'
  },
  timeoutId: '',
  methods: {
    // åŠ è½½å¼€å§‹toast
    loadStart() {
      clearTimeout(this.timeoutId)
      wx.showLoading({
        title: this.data.loadingText,
        mask: true,
      })
      this.timeoutId = setTimeout(() => {
        wx.hideLoading()
      }, 20000);
    },
    // åŠ è½½ä¸­toast
    loading() {
@@ -29,13 +23,12 @@
    },
    // åŠ è½½å®Œæˆtoast
    loadComplete() {
      clearTimeout(this.timeoutId)
      wx.hideLoading({
        success: (res) => {
          wx.showToast({
            title: this.data.loadCompleteText,
            title: this.data.timeout ? this.data.timeoutText : this.data.loadCompleteText,
            duration: 1000,
            icon: 'success',
            icon: this.data.timeout ? 'error' : 'success',
            mask: true,
          })
        },
base/behaviors/b_upload.js
@@ -18,7 +18,6 @@
      this.setData({
        imgFiles: data
      })
      console.log(imgFiles);
    },
    /**
     * ç›‘听图片删除动作
component/gallery/gallery.wxml
@@ -8,6 +8,6 @@
    </block>
  </swiper>
  <view class="weui-gallery__opr" wx:if="{{showDelete}}">
    <navigator bindtap="deleteImg" class="weui-gallery__del">删除</navigator>
    <view bindtap="deleteImg" class="weui-gallery__del">删除</view>
  </view>
</view>
component/uploader/uploader.js
@@ -327,7 +327,7 @@
                  src:files[0].url,
                  quality:20,
                  success(data){
                    console.log(data)
                    console.log('compressImage', data)
                  },
                  fail(){
component/uploader/uploader.wxml
@@ -25,7 +25,7 @@
                    </view>
                </view>
                <view wx:else class="weui-uploader__file" data-index="{{index}}" bindtap="previewImage">
                    <image class="weui-uploader__img" src="{{item.url}}" mode="aspectFit" />
                    <image class="weui-uploader__img" src="{{item.url}}" mode="aspectFill" />
                </view>
            </block>
        </view>
data/sceneInfo.js
@@ -15,6 +15,7 @@
      input: true,
      value: '',
      noValue: false,
      required: false
    },
    {
      name: "经营菜系",
@@ -102,7 +103,7 @@
    },
    {
      name: "联系人",
      id: "biContract",
      id: "biContact",
      input: true,
      value: '',
      noValue: false,
@@ -391,4 +392,60 @@
  return map
}
export default sceneInfo
/**
 * åœºæ™¯æ³¨å†Œæ—¶ï¼Œéœ€è¦æäº¤çš„台账类型
 * åŽç»­éœ€è¦è°ƒæ•´ä¸ºæŽ¥å£èŽ·å–åŠ¨æ€ä¿¡æ¯
 */
const sceneLedger = {
  '1': {
    ledgerSubTypeId: 2101,
    ledgerName: '食品经营许可证',
    sceneType: 1
  }
}
/**
 * ä¼ä¸šæ³¨å†Œæ—¶ï¼Œéœ€è¦æäº¤çš„台账类型
 * åŽç»­éœ€è¦è°ƒæ•´ä¸ºæŽ¥å£èŽ·å–åŠ¨æ€ä¿¡æ¯
 */
const companyLedger = {
  '1': {
    ledgerSubTypeId: 2100,
    ledgerName: '营业执照',
    sceneType: 1
  },
  '2': {
    ledgerSubTypeId: 500,
    ledgerName: '企业信息',
    sceneType: 2
  },
  '3': {
    ledgerSubTypeId: 900,
    ledgerName: '企业信息',
    sceneType: 3
  },
  '4': {
    ledgerSubTypeId: 1300,
    ledgerName: '企业信息',
    sceneType: 4
  },
  '5': {
    ledgerSubTypeId: 1700,
    ledgerName: '企业信息',
    sceneType: 5
  },
  '6': {
    ledgerSubTypeId: 100,
    ledgerName: '企业信息',
    sceneType: 6
  },
  '7': {
    ledgerSubTypeId: 2500,
    ledgerName: '营业执照',
    sceneType: 7
  },
}
module.exports =  {
  sceneInfo, sceneLedger, companyLedger
}
pages/home/home.js
@@ -55,6 +55,13 @@
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad: function (options) {
    //判断用户是否为首次登录,决定是否强制修改默认密码
    if (app.globalData.userInfo.remark == null || app.globalData.userInfo.remark == '') {
      wx.navigateTo({
        url: '/pages/m_user/p_changepw/p_changepw',
      })
    }
    wx.getStorage({
      key: 'accessToken',
      success: (result) => {
pages/m_learn/learn/learn.wxml
@@ -36,7 +36,7 @@
        <image src="/res/icons/learn_1.png" class="image-btn__2" mode="aspectFit" />
        <view class="image-btn_title">
          <view class="image-btn_title_t">守法视频</view>
          <view>守法培训材料</view>
          <view>守法培训视频</view>
          <mp-icon class="image-btn_goto" icon="arrow" color="#7F7F7F" size="8" type="filled"></mp-icon>
        </view>
@@ -45,8 +45,8 @@
        <view class="image-btn" style="background-color: #F4EED3;" bindtap="goto" data-index="1">
          <image src="/res/icons/learn_2.png" class="image-btn__2" mode="aspectFit" />
          <view class="image-btn_title">
            <view class="image-btn_title_t">执法案例</view>
            <view>执法督察案例</view>
            <view class="image-btn_title_t">违法案例</view>
            <view>典型违法案例</view>
            <mp-icon class="image-btn_goto" icon="arrow" color="#7F7F7F" size="8" type="filled"></mp-icon>
          </view>
        </view>
pages/m_ledger/behaviors/b_uploadLedger.js
@@ -28,7 +28,7 @@
      this.setData({loading: true})
      ledgerservice.uploadLedger(app.globalData.accessToken.userId, ledger, path, {
        success (res) {
          this.setData({loading: false})
          that.setData({loading: false})
          if (typeof that._success === 'function') {
            that._success(res)
          }
pages/m_ledger/ledgerupload/ledgerupload.js
@@ -84,6 +84,7 @@
    }
  },
  //提交台账
  submitLedger() {
    this.setData({
      showDialog: false,
@@ -91,6 +92,7 @@
    this._uploadLedger()
  },
  //台账提交成功后
  _success(res) {
    this.getOpenerEventChannel().emit('uploadOver', {
      indexGroup: that.data.indexGroup
@@ -100,6 +102,7 @@
    })
  },
  //图片放大预览
  previewImage(e) {
    const {
      index
pages/m_promise/promiseinfo/promiseinfo.js
@@ -181,7 +181,7 @@
          msg
        })
      }
    })
    }, app.globalData.accessToken.openId)
  },
  onSubmit: function () {
pages/m_user/base_c/c_company-info/c_company-info.js
@@ -1,6 +1,16 @@
// pages/m_user/base_c/c_company-info/c_company-info.js
import {companyLedger} from '../../../../data/sceneInfo'
import userservice from '../../../../service/userservice'
import authservice from '../../../../service/authservice'
import ledgerservice from "../../../../service/ledgerservice"
import b_inputCheck from '../../../../base/behaviors/b_inputCheck'
import b_uploadLedger from '../../../m_ledger/behaviors/b_uploadLedger'
import b_loadingToast from '../../../../base/behaviors/b_loadingToast'
const app = getApp()
Component({
  behaviors: [b_inputCheck, b_uploadLedger, b_loadingToast],
  options: {
    addGlobalClass: true,
  },
@@ -11,6 +21,10 @@
    submitText: {
      type: String,
      value: '提交'
    },
    sceneType: {
      type: String,
      value: '1'
    },
  },
  /**
@@ -29,47 +43,59 @@
    sceneTypeIndex: 0,
    msg: [{
        name: "企业名称",
        id: "department",
        id: "ciName",
        input: true,
        value: '',
        noValue: false,
      },
      {
        name: "企业地址",
        id: "address",
        id: "ciAddress",
        input: true,
        value: '',
        noValue: false,
      },
      {
        name: "信用代码",
        id: "code",
        id: "ciOrgCode",
        input: true,
        value: "",
        noValue: false,
      },
      {
        name: "法人",
        id: "contract",
        id: "ciJuridicalPerson",
        input: true,
        value: '',
        noValue: false,
      },
      {
        name: "联系人",
        id: "contract",
        id: "ciContactName",
        input: true,
        value: '',
        noValue: false,
      },
      {
        name: "联系方式",
        id: "contract",
        id: "ciTelephone",
        input: true,
        value: '',
        noValue: false,
      },
    ],
  },
  ready() {
    this.setData({
      loadingText: '上传中',
      loadCompleteText: '上传完成'
    })
    this.setData({
      ledger: companyLedger[this.data.sceneType]
    })
    this.getCompanyInfo()
  },
  /**
@@ -83,6 +109,87 @@
      })
    },
    //获取企业信息
    getCompanyInfo() {
      var that = this
      userservice.getBaseInfo(app.globalData.accessToken.userId, {
        success(data) {
          const msg = that.data.msg
          if (data.company != null) {
            const info = data.company
            msg[0].value = info.ciName
            msg[1].value = info.ciAddress
            msg[2].value = info.ciOrgCode
            msg[3].value = info.ciJuridicalPerson
            msg[4].value = info.ciContactName
            msg[5].value = info.ciTelephone
            that.setData({
              msg, info
            })
          }
        }
      }, app.globalData.accessToken.openId)
      ledgerservice.getLedgerDetail(
        app.globalData.accessToken.userId, that.data.ledger.ledgerSubTypeId, that.data.ledger.sceneType, undefined, {
          success(res) {
            if (res.length > 0) {
              let detail = res[0]
              if (detail.upLoad) {
                let imgFiles = [{
                  url: detail.path1[0],
                  loading: false
                }]
                that.setData({
                  imgFiles
                })
              }
            }
          }
        })
    },
    //提交企业信息
    _submit() {
      var that = this
      this.setData({loading: true})
      authservice.authCompany(app.globalData.accessToken.openId, this.data.info, {
        success(res) {
          that.submintLedger()
        },
      })
    },
    //提交图片信息
    submintLedger() {
      if (this.data.imgFiles.length == 0) {
        this.setData({
          loading: false
        })
        wx.navigateBack({
          delta: 1,
        })
        return
      }
      if (this.data.imgFiles[0].url.indexOf('http') != -1) {
        wx.downloadFile({
          url: this.data.imgFiles[0].url,
          success: (res) => {
            const imgPath = res.tempFilePath
            this.data.imgFiles[0].url = imgPath
            this._uploadLedger()
          }
        })
      } else {
        this._uploadLedger()
      }
    },
    //上传完成后,回退
    _success(res) {
      wx.navigateBack({
        delta: 1,
      })
    }
    
  }
})
pages/m_user/base_c/c_company-info/c_company-info.wxml
@@ -1,15 +1,17 @@
<!--pages/m_user/base_c/c_company-info/c_company-info.wxml-->
<view class="page__bd">
  <view class="top-card">
  <!-- <view class="top-card">
    <view class="tag"><text style="color: transparent;">*</text>企业类型</view>
    <picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value">
      <view class="picker-text">{{sceneTypes[sceneTypeIndex].name}}</view>
    </picker>
    <mp-icon icon="arrow" color="#59D5B3" size="{{10}}"></mp-icon>
  </view>
  </view> -->
  <mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips>
  <view class="items">
    <mp-cells>
      <input-cell wx:for="{{msg}}" wx:key="id" item="{{item}}" bindpassValue="changeMsg"></input-cell>
      <input-cell id="{{item.id}}" wx:for="{{msg}}" wx:key="index" item="{{item}}" bindpassValue="changeMsg"></input-cell>
    </mp-cells>
  </view>
  <view class="weui-upload-view">
pages/m_user/base_c/c_scene-info/c_scene-info.js
@@ -1,8 +1,9 @@
// pages/m_user/base_c/c_scene-info/c_scene-info.js
import sceneInfo from '../../../../data/sceneInfo'
import {sceneInfo, sceneLedger} from '../../../../data/sceneInfo'
import userservice from '../../../../service/userservice'
import deviceservice from '../../../../service/deviceservice'
import b_inputCheck from '../../behaviors/b_inputCheck'
import ledgerservice from "../../../../service/ledgerservice"
import b_inputCheck from '../../../../base/behaviors/b_inputCheck'
import b_uploadLedger from '../../../m_ledger/behaviors/b_uploadLedger'
import b_loadingToast from '../../../../base/behaviors/b_loadingToast'
@@ -31,29 +32,18 @@
    }
  },
  attached() {
  ready() {
    this.setData({
      loadingText: '上传中',
      loadCompleteText: '上传完成'
    })
  },
  pageLifetimes: {
    show: function () {
      // é¡µé¢è¢«å±•示
      const info = sceneInfo()
      this.setData({
        msg: info.get(this.data.sceneType)
      msg: info.get(this.data.sceneType),
      ledger: sceneLedger[this.data.sceneType]
      })
      //获取场景信息
      this.getSceneInfo()
    },
    hide: function () {
      // é¡µé¢è¢«éšè—
    },
    resize: function (size) {
      // é¡µé¢å°ºå¯¸å˜åŒ–
    }
  },
  /**
@@ -82,13 +72,11 @@
                msg[3].value = data.baseInfo.biAddress
                msg[10].value = data.baseInfo.biContact
                msg[11].value = data.baseInfo.biTelephone
                msg[12].value = data.baseInfo.biTownName == null ? [] :
                [
                msg[12].value = data.baseInfo.biTownName == null ? [] : [
                  data.baseInfo.biProvinceName, data.baseInfo.biCityName, data.baseInfo.biDistrictName, data.baseInfo.biTownName, 
                  data.baseInfo.biProvinceCode, data.baseInfo.biCityCode, data.baseInfo.biDistrictCode, data.baseInfo.biTownCode, 
                ]
                msg[12].displayValue = data.baseInfo.biTownName == null ? [] :
                [
                msg[12].displayValue = data.baseInfo.biTownName == null ? [] : [
                  data.baseInfo.biProvinceName, data.baseInfo.biCityName, data.baseInfo.biDistrictName, data.baseInfo.biTownName, 
                ]
              }
@@ -166,6 +154,23 @@
                  }
                }
              })
              ledgerservice.getLedgerDetail(
                app.globalData.accessToken.userId, that.data.ledger.ledgerSubTypeId, that.data.ledger.sceneType, undefined, {
                  success(res) {
                    if (res.length > 0) {
                      let detail = res[0]
                      if (detail.upLoad) {
                        let imgFiles = [{
                          url: detail.path1[0],
                          loading: false
                        }]
                        that.setData({
                          imgFiles
                        })
                      }
                    }
                  }
                })
              break;
            case '2':
@@ -193,13 +198,15 @@
            msg
          })
        }
      })
      }, app.globalData.accessToken.openId)
    },
    //提交场景信息
    submit() {
    _submit() {
      var that = this
      this.setData({loading: true})
      this.setData({
        loading: true
      })
      //针对不同场景,数据结构会有不同的定制需求
      switch (this.data.sceneType) {
        case '1':
@@ -227,7 +234,34 @@
    //提交图片信息
    submintLedger() {
      if (this.data.imgFiles.length == 0) {
        this.setData({
          loading: false
        })
        wx.navigateBack({
          delta: 1,
        })
        return
      }
      if (this.data.imgFiles[0].url.indexOf('http') != -1) {
        wx.downloadFile({
          url: this.data.imgFiles[0].url,
          success: (res) => {
            const imgPath = res.tempFilePath
            this.data.imgFiles[0].url = imgPath
      this._uploadLedger()
    }
        })
      } else {
        this._uploadLedger()
      }
    },
    //上传完成后,回退
    _success(res) {
      wx.navigateBack({
        delta: 1,
      })
    }
  }
})
pages/m_user/base_c/c_scene-info/c_scene-info.wxml
@@ -22,7 +22,7 @@
            <picker wx:if="{{item.pickerMode == 'selector'}}" mode="selector" bindchange="pickerChange" data-index="{{index}}" data-mode="selector" value="{{item.selectIndex}}" range="{{item.options}}" range-key="name" class="value">
              <view class="picker-text">{{item.options[item.selectIndex].name}}</view>
            </picker>
            <picker wx:elif="{{item.pickerMode == 'region'}}" mode="region" bindchange="pickerChange" data-index="{{index}}" data-mode="region" value="{{item.displayValue}}" class="value" level="sub-district" custom-item="空">
            <picker wx:elif="{{item.pickerMode == 'region'}}" mode="region" bindchange="pickerChange" data-index="{{index}}" data-mode="region" value="{{item.displayValue}}" class="value" level="sub-district">
              <view class="picker-text" wx:if="{{item.value.length > 0}}">{{item.value[0] + (item.value[1] == item.value[0] ? '' : item.value[1]) + item.value[2] + item.value[3]}}</view>
              <view wx:else class="picker-text" style="color: #B2B2B2;">请选择街镇</view>
            </picker>
pages/m_user/behaviors/b_login.js
pages/m_user/companyauthentication/companyauthentication.js
@@ -1,5 +1,4 @@
// pages/m_user/companyauthentication/companyauthentication.js
import $f from '../../../service/baserequest'
Page({
pages/m_user/companyauthentication/companyauthentication.json
@@ -1,5 +1,5 @@
{
  "navigationBarTitleText": "企业认证",
  "navigationBarTitleText": "企业信息认证",
  "usingComponents": {
    "c-company-info": "../base_c/c_company-info/c_company-info"
  }
pages/m_user/companyauthentication/companyauthentication.wxml
@@ -1,6 +1,6 @@
<!--pages/m_user/companyauthentication/companyauthentication.wxml-->
<view class="page">
  <image class="banner-bg" src="/res/icons/companyinfo-1.png" mode="widthFix"></image>
  <view class="tips">请仔细检查系统预留的企业信息,确认是否正确,调整完成后提交完成企业认证</view>
  <view class="tips">请仔细检查以下信息,确认是否正确,调整完成后提交完成认证(其中带*的为必填项,其余为选填项)</view>
  <c-company-info></c-company-info>
</view>
pages/m_user/mine/mine.js
@@ -9,6 +9,7 @@
   * é¡µé¢çš„初始数据
   */
  data: {
    version: app.globalData.version,
    //认证状态,[企业, åœºæ™¯, ä¸ªäºº]
    authStatus:[]
  },
@@ -20,6 +21,10 @@
    this.setData({
      userRealName: app.globalData.userInfo.realname
    })
    this.getBaseInfo()
  },
  onShow() {
    this.getAuthStatus()
  },
@@ -41,6 +46,19 @@
        }
      }
    })
  },
  getBaseInfo() {
    var that = this
    userservice.getBaseInfo(app.globalData.accessToken.userId, {
      success(data) {
        if (data.company != null) {
          that.setData({
            companyName: data.company.ciName
          })
        }
      }
    }, app.globalData.accessToken.openId)
  },
  logout() {
@@ -70,6 +88,9 @@
        break;
      case "5":
        url = "/pages/m_service/p_schedule/p_schedule"
        break;
      case "6":
        url = "/pages/m_user/p_about/p_about"
        break;
    }
    if (url != "") {
@@ -103,7 +124,7 @@
        break;
      //个人认证
      case "2":
        url = ""
        url = "/pages/m_user/personalauthentication/personalauthentication"
        break;
    }
    if (url != "") {
pages/m_user/mine/mine.wxml
@@ -5,27 +5,29 @@
      <image class="user-icon" src="/res/icons/learn_2.png" mode="aspectFill"></image>
      <view class="flex-v">
        <view class="user-name">{{userRealName}}</view>
        <view class="user-tag">
          <!-- <view>企业未认证</view>
          <view>店铺未认证</view>
          <view>个人未认证</view> -->
        </view>
        <view class="user-tag">{{companyName}}</view>
      </view>
    </view>
  </view>
  <view class="page__bd">
    <view class="fyui-panel user-authentication">
      <view bindtap="gotoAuthentication" data-index="0">
        <text class="{{authStatus[0] ? 'status-1' : 'status-2'}}">{{authStatus[0] ? '已认证' : '未认证'}}</text>
        <image src="/res/icons/icon3.png"></image>
        <view>{{authStatus[0] ? '修改企业信息' : '企业信息认证'}}</view>
        <!-- <view>{{authStatus[0] ? '修改企业信息' : '企业信息认证'}}</view> -->
        <view>企业信息认证</view>
      </view>
      <view bindtap="gotoAuthentication" data-index="1">
        <image src="/res/icons/icon3.png"></image>
        <view>{{authStatus[1] ? '修改店铺信息' : '店铺信息认证'}}</view>
        <text class="{{authStatus[1] ? 'status-1' : 'status-2'}}">{{authStatus[1] ? '已认证' : '未认证'}}</text>
        <image src="/res/icons/scene_info.png"></image>
        <!-- <view>{{authStatus[1] ? '修改店铺信息' : '店铺信息认证'}}</view> -->
        <view>店铺信息认证</view>
      </view>
      <view bindtap="gotoAuthentication" data-index="2">
        <image src="/res/icons/icon3.png"></image>
        <view>{{authStatus[2] ? '修改个人信息' : '个人信息认证'}}</view>
        <text class="{{authStatus[2] ? 'status-1' : 'status-2'}}">{{authStatus[2] ? '已认证' : '未认证'}}</text>
        <image src="/res/icons/personal.png"></image>
        <!-- <view>{{authStatus[2] ? '修改个人信息' : '个人信息认证'}}</view> -->
        <view>个人信息认证</view>
      </view>
    </view>
    <view class="fyui-panel">
@@ -71,6 +73,13 @@
        <view class="fyui-cell__bd">环保日程</view>
        <view class="fyui-cell__ft"></view>
      </view>
      <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="6">
        <view class="fyui-cell__hd">
          <image src="/res/icons/icon6.png" class="icon" />
        </view>
        <view class="fyui-cell__bd">关于</view>
        <view class="fyui-cell__ft">{{version}}</view>
      </view>
    </view>
  </view>
pages/m_user/mine/mine.wxss
@@ -53,18 +53,44 @@
}
.user-authentication {
  position: relative;
  display: flex;
  justify-content: space-between;
}
.user-authentication>view {
  position: relative;
  text-align: center;
  padding: 36px 16px;
  padding: 20px 16px;
  font-size: 14px;
  color: var(--fyui-text-color_1);
  color: var(--fyui-text-color_2);
}
.user-authentication>view>image {
  width: 40px;
  height: 40px;
}
.user-authentication .status-1{
  position: absolute;
  top: 36px;
  right: 10px;
  font-size: 10px;
  color: white;
  background-color: #05EDC4;
  border: white 2px solid;
  padding: 0 4px;
  border-radius: 4px;
}
.user-authentication .status-2{
  position: absolute;
  top: 36px;
  right: 10px;
  font-size: 10px;
  color: white;
  background-color: #F20202;
  border: white 2px solid;
  padding: 0 4px;
  border-radius: 4px;
}
pages/m_user/p_about/p_about.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
// pages/m_user/p_about/p_about.js
const app = getApp()
Page({
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    version: app.globalData.version,
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  },
  goto(e) {
    var url = ""
    var index = e.currentTarget.dataset.index
    switch (index) {
      case "0":
        wx.downloadFile({
          url: app.globalData.agreement,
          success: function (res) {
            wx.hideLoading()
            const filePath = res.tempFilePath
            wx.openDocument({
              filePath: filePath,
              success: function (res) {
                console.log('打开文档成功')
              },
              fail(error) {
                console.log(error);
              }
            })
          }
        })
        return;
      case "1":
        url = "/pages/m_user/p_changepw/p_changepw"
        break;
    }
    if (url != "") {
      wx.navigateTo({
        url: url
      })
    } else {
      wx.showToast({
        title: '功能敬请期待',
        duration: 1000,
        icon: 'none',
        mask: true,
      })
    }
  },
})
pages/m_user/p_about/p_about.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,4 @@
{
  "navigationBarTitleText": "关于",
  "usingComponents": {}
}
pages/m_user/p_about/p_about.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
<!--pages/m_user/p_about/p_about.wxml-->
<view class="page">
  <view class="page__hd">
    <image src="/res/icons/app_icon.png"></image>
    <view>{{version}}</view>
  </view>
  <view class="page__bd">
    <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="0">
      <view class="fyui-cell__hd">
      </view>
      <view class="fyui-cell__bd">服务协议</view>
      <view class="fyui-cell__ft"></view>
    </view>
    <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="1">
      <view class="fyui-cell__hd">
      </view>
      <view class="fyui-cell__bd">修改密码</view>
      <view class="fyui-cell__ft"></view>
    </view>
  </view>
  <view class="page__ft">
    <view>业务指导:上海市生态环境局执法总队</view>
    <view>技术支持:上海飞羽环保科技有限公司</view>
  </view>
</view>
pages/m_user/p_about/p_about.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
/* pages/m_user/p_about/p_about.wxss */
.title:active {
  background-color: var(--fyui-BG-COLOR-ACTIVE);
}
.fyui-cell_select {
  font-size: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(238, 238, 238);
}
.page {
  justify-content: space-between;
  background-color: transparent;
}
.page__hd {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 30vh;
}
.page__hd>image{
  width: 88px;
  height: 88px;
}
.page__hd>view{
  font-size: 14px;
  color: var(--fyui-text-color_2);
  margin-top: 16px;
}
.page__bd{
  flex: 1;
  color: var(--fyui-text-color_1);
}
.page__ft{
  font-size: 12px;
  color: var(--fyui-text-color_3);
}
pages/m_user/p_changepw/p_changepw.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,93 @@
// pages/m_user/p_changepw/p_changepw.js
import b_inputCheck from '../../../base/behaviors/b_inputCheck'
import b_loadingToast from '../../../base/behaviors/b_loadingToast'
Page({
  behaviors: [b_inputCheck, b_loadingToast],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    msg: [{
        name: "原密码",
        id: "oldPassword",
        input: true,
        type: 'password',
        value: '',
        noValue: false,
      },
      {
        name: "新密码",
        id: "newPassword",
        input: true,
        type: 'password',
        value: '',
        noValue: false,
      },
      {
        name: "确认密码",
        id: "pwCheck",
        input: true,
        type: 'password',
        value: "",
        noValue: false,
      },
    ],
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面显示
   */
  onShow() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面隐藏
   */
  onHide() {
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面卸载
   */
  onUnload() {
  },
  /**
   * é¡µé¢ç›¸å…³äº‹ä»¶å¤„理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * é¡µé¢ä¸Šæ‹‰è§¦åº•事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * ç”¨æˆ·ç‚¹å‡»å³ä¸Šè§’分享
   */
  onShareAppMessage() {
  }
})
pages/m_user/p_changepw/p_changepw.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
{
  "navigationBarTitleText": "修改密码",
  "usingComponents": {
    "mp-cells":"/component/cells/cells",
    "input-cell":"/component/inputcell/inputcell",
    "mp-icon": "/component/icon/icon",
    "mp-toptips":"/component/toptips/toptips",
    "mp-upload":"/component/uploader/uploader"
  }
}
pages/m_user/p_changepw/p_changepw.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
<!--pages/m_user/p_changepw/p_changepw.wxml-->
<view class="page">
  <!-- <mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips> -->
  <view class="page__bd">
    <view class="items">
      <mp-cells>
        <input-cell id="{{item.id}}" wx:for="{{msg}}" wx:key="id" item="{{item}}" bindpassValue="changeMsg"></input-cell>
      </mp-cells>
    </view>
  </view>
  <view class="page__ft">
    <view class="submit" bindtap="onSubmit">提交</view>
  </view>
</view>
pages/m_user/p_changepw/p_changepw.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/* pages/m_user/p_changepw/p_changepw.wxss */
.items {
  position: relative;
  padding: 0 16px;
  background-color: white;
}
pages/m_user/personalauthentication/personalauthentication.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,127 @@
// pages/m_user/personalauthentication/personalauthentication.js
import userservice from '../../../service/userservice'
import authservice from '../../../service/authservice'
import b_inputCheck from '../../../base/behaviors/b_inputCheck'
import b_loadingToast from '../../../base/behaviors/b_loadingToast'
const app = getApp()
Page({
  behaviors: [b_inputCheck, b_loadingToast],
  /**
   * é¡µé¢çš„初始数据
   */
  data: {
    idTypes: [
      {value: '0', name: '身份证'},
    ],
    idTypeIndex: 0,
    msg: [{
        name: "姓名",
        id: "piName",
        input: true,
        value: '',
        noValue: false,
      },
      {
        name: "证件类型",
        id: "piIdType",
        type: 'picker',
        pickerMode: 'selector',
        value: '',
        noValue: false,
        selectIndex: 0,
        options: [
          {name: '未选择', value: '-1'},
          {name: '身份证', value: '0'},
        ]
      },
      {
        name: "证件编号",
        id: "piId",
        input: true,
        value: "",
        noValue: false,
      },
      {
        name: "职位",
        id: "piPosition",
        type: 'picker',
        pickerMode: 'selector',
        value: '',
        noValue: false,
        selectIndex: 0,
        options: [
          {name: '未选择', value: '-1'},
          {name: '管理员', value: '0'},
          {name: '职员', value: '1'},
        ]
      },
    ],
  },
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面加载
   */
  onLoad(options) {
    this.setData({
      loadingText: '上传中',
      loadCompleteText: '上传完成'
    })
    this.getPersonalInfo()
  },
  changeIDType(e) {
    let i = e.detail.value
    this.setData({
      idTypeIndex: i
    })
  },
  getPersonalInfo() {
    var that = this
    userservice.getBaseInfo(app.globalData.accessToken.userId, {
      success(data) {
        const msg = that.data.msg
        if (data.personalInfo != null) {
          const info = data.personalInfo
          msg[0].value = info.piName
          msg[1].value = info.piIdType
          for (let i = 0; i < msg[1].options.length; i++) {
            const o = msg[1].options[i];
            if (o.name == msg[1].value) {
              msg[1].selectIndex = i
              break
            }
          }
          msg[2].value = info.piId
          msg[3].value = info.piPosition
          for (let i = 0; i < msg[3].options.length; i++) {
            const o = msg[3].options[i];
            if (o.name == msg[3].value) {
              msg[3].selectIndex = i
              break
            }
          }
          that.setData({
            msg, info
          })
        }
      }
    }, app.globalData.accessToken.openId)
  },
  //提交个人信息
  _submit() {
    var that = this
    this.setData({loading: true})
    authservice.authPersonal(app.globalData.accessToken.openId, this.data.info, {
      success(res) {
        that.setData({loading: false})
        wx.navigateBack({
          delta: 1,
        })
      },
    })
  },
})
pages/m_user/personalauthentication/personalauthentication.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
{
  "navigationBarTitleText": "个人信息认证",
  "usingComponents": {
    "mp-cells":"/component/cells/cells",
    "input-cell":"/component/inputcell/inputcell",
    "mp-icon": "/component/icon/icon",
    "mp-toptips":"/component/toptips/toptips",
    "mp-upload":"/component/uploader/uploader"
  }
}
pages/m_user/personalauthentication/personalauthentication.wxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
<!--pages/m_user/personalauthentication/personalauthentication.wxml-->
<mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips>
<view class="page">
  <image class="banner-bg" src="/res/icons/companyinfo-1.png" mode="widthFix"></image>
  <view class="tips">请仔细检查以下信息,确认是否正确,调整完成后提交完成认证(其中带*的为必填项,其余为选填项)</view>
  <view class="page__bd">
    <!-- <view class="top-card">
    <view class="tag"><text style="color: transparent;">*</text>企业类型</view>
    <picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value">
      <view class="picker-text">{{sceneTypes[sceneTypeIndex].name}}</view>
    </picker>
    <mp-icon icon="arrow" color="#59D5B3" size="{{10}}"></mp-icon>
  </view> -->
    <view class="items">
      <mp-cells>
        <block wx:for="{{msg}}" wx:key="index">
        <block wx:if="{{item.type == 'picker'}}">
          <view class="hr-view"></view>
          <view class="top-card">
            <view id="{{item.id}}" class="tag"><text class="{{item.required != false ? 'required' : 'not-required'}}">*</text>{{item.name}}</view>
            <picker wx:if="{{item.pickerMode == 'selector'}}" mode="selector" bindchange="pickerChange" data-index="{{index}}" data-mode="selector" value="{{item.selectIndex}}" range="{{item.options}}" range-key="name" class="value">
              <view class="picker-text">{{item.options[item.selectIndex].name}}</view>
            </picker>
            <picker wx:elif="{{item.pickerMode == 'region'}}" mode="region" bindchange="pickerChange" data-index="{{index}}" data-mode="region" value="{{item.displayValue}}" class="value" level="sub-district" custom-item="空">
              <view class="picker-text" wx:if="{{item.value.length > 0}}">{{item.value[0] + (item.value[1] == item.value[0] ? '' : item.value[1]) + item.value[2] + item.value[3]}}</view>
              <view wx:else class="picker-text" style="color: #B2B2B2;">请选择街镇</view>
            </picker>
            <mp-icon icon="arrow" color="black" size="{{10}}"></mp-icon>
          </view>
        </block>
        <input-cell id="{{item.id}}" wx:else item="{{item}}" bindpassValue="changeMsg"></input-cell>
      </block>
      </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/m_user/personalauthentication/personalauthentication.wxss
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
/* pages/m_user/personalauthentication/personalauthentication.wxss */
.tips {
  position: relative;
  color: white;
  padding: 16px;
  font-size: 14px;
  font-weight: 550;
}
.banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* background-color: aqua; */
}
.top-card {
  position: relative;
  display: flex;
  flex-direction: row;
  background-color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 8px 0px;
  /* margin: 0 8px; */
  font-size: 16px;
}
.picker-text {
  /* color: var(--fyui-primary-color); */
  color: var(--fyui-text-color_1);
}
.items {
  position: relative;
  padding: 0 16px;
  background-color: white;
}
.top-card .tag {
  /* display: inline-block; */
  width: 32vw;
  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: 16px;
}
.page__ft {
  background-color: white;
}
.required {
  color: red;
  text-align: center;
  vertical-align: middle;
}
.not-required {
  color: transparent;
}
pages/m_user/sceneauthentication/sceneauthentication.json
@@ -1,5 +1,5 @@
{
  "navigationBarTitleText": "店铺认证",
  "navigationBarTitleText": "店铺信息认证",
  "usingComponents": {
    "c-scene-info": "../base_c/c_scene-info/c_scene-info"
  }
pages/m_user/sceneauthentication/sceneauthentication.wxml
@@ -1,7 +1,7 @@
<!--pages/m_user/sceneauthentication/sceneauthentication.wxml-->
<view class="page">
  <image class="banner-bg" src="/res/icons/companyinfo-1.png" mode="widthFix"></image>
  <view class="tips">请仔细检查系统预留的企业信息,确认是否正确,调整完成后提交完成企业认证</view>
  <view class="tips">请仔细检查以下信息,确认是否正确,调整完成后提交完成认证(其中带*的为必填项,其余为选填项)</view>
  <c-scene-info sceneType="{{sceneType}}" bindonSubmit="onSubmit"></c-scene-info>
</view>
pages/m_user/userlogin/userlogin.js
@@ -118,5 +118,28 @@
      })
      return false
    }
  },
  gotoAgreement() {
    wx.showLoading({
      title: ' æ‰“开中',
      mask: true,
    })
    wx.downloadFile({
      url: app.globalData.agreement,
      success: function (res) {
        wx.hideLoading()
        const filePath = res.tempFilePath
        wx.openDocument({
          filePath: filePath,
          success: function (res) {
            console.log('打开文档成功')
          },
          fail(error) {
            console.log(error);
          }
        })
      }
    })
  }
})
pages/m_user/userlogin/userlogin.wxml
@@ -1,13 +1,24 @@
<!--pages/m_user/userlogin/userlogin.wxml-->
<view>
<view class="page">
  <view class="page__bd">
  <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>
  <label class="weui-agree" bindtap="checkboxChange">
    <view class="weui-agree">
      <label bindtap="checkboxChange">
    <checkbox class="weui-agree__checkbox-check" value="{{agree}}" checked="{{agree}}" />
    <span class="weui-agree__checkbox"></span>
    <span class="weui-agree__text">阅读并同意<text>《中小企业守法服务平台用户条款》</text>及<text>《隐私条款》</text></span>
        <span class="weui-agree__text">阅读并同意</span>
  </label>
      <span class="weui-agree__text"><text bindtap="gotoAgreement">《中小企业守法服务平台用户条款》</text>
        <!-- åŠ<text>《隐私条款》</text> -->
      </span>
    </view>
  </view>
  <view class="page__ft">
    <view>业务指导:上海市生态环境局执法总队</view>
    <view>技术支持:上海飞羽环保科技有限公司</view>
  </view>
</view>
pages/m_user/userlogin/userlogin.wxss
@@ -29,3 +29,18 @@
.weui-agree__text>text {
  color: #3CD0B6;
}
.page {
  justify-content: space-between;
  background-color: transparent;
}
.page__bd{
  flex: 1;
  color: var(--fyui-text-color_1);
}
.page__ft{
  font-size: 12px;
  color: var(--fyui-text-color_3);
}
project.config.json
@@ -50,7 +50,7 @@
  },
  "compileType": "miniprogram",
  "libVersion": "2.26.0",
  "appid": "wxffd1438dd373fcf6",
  "appid": "wx5758efcebb0774de",
  "projectname": "ep-law-abiding",
  "editorSetting": {
    "tabIndent": "insertSpaces",
res/icons/app_icon.png
res/icons/icon3.png

res/icons/icon6.png
res/icons/personal.png
res/icons/scene_info.png
service/authservice.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
const $f = require('./baserequest')
module.exports = {
  //企业信息认证
  authCompany: function (wxUserId, company, fun) {
    let cb = {
      url: '/auth/company',
      params: {
        wxUserId: wxUserId,
      },
      data: company,
    }
    Object.assign(cb, fun)
    $f.post(cb)
  },
  //场景信息认证
  authScene: function (wxUserId, sceneType, sceneInfo, fun) {
    let cb = {
      url: '/auth/scene',
      params: {
        wxUserId: wxUserId,
        sceneType: sceneType
      },
      data: sceneInfo,
    }
    Object.assign(cb, fun)
    $f.post(cb)
  },
  //个人信息认证
  authPersonal: function (wxUserId, personal, fun) {
    let cb = {
      url: '/auth/personal',
      params: {
        wxUserId: wxUserId,
      },
      data: personal,
    }
    Object.assign(cb, fun)
    $f.post(cb)
  },
  //获取用户认证状态
  getAuthStatus: function (wxUserId, userId, fun) {
    let cb = {
      url: `/auth/status`,
      params: {
        wxUserId: wxUserId,
        userId: userId
      }
    }
    Object.assign(cb, fun)
    $f.get(cb)
  },
}
service/baserequest.js
@@ -11,12 +11,15 @@
const util = require("../utils/util.js")
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://192.168.0.137: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 = "https://fyami.com.cn:447/meeting/file/"
const baseUrl = "http://192.168.0.137:8080"
// const baseUrl = "https://fyami.com.cn:447"
// const baseUrl = "https://fyami.com.cn"
// const bu = "https://fyami.com.cn"
const bu = "https://fyami.com.cn:447"
const basePicUrl = `${bu}/images/`
const baseIconUrl = `${bu}/images/weixin/eplaw/`
const baseFileUrl = `${bu}/meeting/file/`
function request(fun) {
  if (fun.params != undefined) {
service/ledgerservice.js
@@ -53,12 +53,14 @@
      url: `/ledger/${userId}/detail2`,
      params: {
        sceneType: sceneType,
        time: time
      },
    }
    if (ledgerSubTypeId) {
      cb.params.ledgerSubTypeId = ledgerSubTypeId
    }
    if (time) {
      cb.params.time = time
    }
    Object.assign(cb, fun)
    let fun1 = util.deepCopy(cb)
service/userservice.js
@@ -34,13 +34,16 @@
    $f.get(cb)
  },
  //获取用户基础信息
  getBaseInfo: function (userId, fun) {
  getBaseInfo: function (userId, fun, wxUserId) {
    let cb = {
      url: `/userInfo/baseInfo`,
      params: {
        userId: userId
      }
    }
    if (wxUserId) {
      cb.params.wxUserId = wxUserId
    }
    Object.assign(cb, fun)
    $f.get(cb)