承诺书和智能咨询模块
1. 承诺书模块基本逻辑走通;
2. 智能咨询模块完成主页面和搜索页面部分UI;
已修改13个文件
已删除3个文件
已添加18个文件
| | |
| | | { |
| | | "entryPagePath": "pages/module_consult/consultsearch/consultsearch", |
| | | "pages": [ |
| | | "pages/login/login", |
| | | "pages/home/home", |
| | |
| | | "pages/notice/notice", |
| | | "pages/gradereport/gradereport", |
| | | "pages/test/test", |
| | | "pages/promisesign/promisesign" |
| | | "pages/promisesign/promisesign", |
| | | "pages/module_consult/consulthome/consulthome", |
| | | "pages/module_consult/consultsearch/consultsearch" |
| | | ], |
| | | "window": { |
| | | "backgroundTextStyle": "light", |
| | |
| | | /**app.wxss**/ |
| | | @import "/libs/weui.wxss"; |
| | | |
| | | page{ |
| | | page { |
| | | --fyui-primary-color: #59D5B3; |
| | | --fyui-text-color_1: #191919; |
| | | --fyui-text-color_2: #7F7F7F; |
| | | --fyui-text-color_3: #B2B2B2; |
| | | --fyui-BG_1: #F5F5F5; |
| | | --fyui-BG-COLOR-ACTIVE: #ececec5d; |
| | | } |
| | | |
| | | /********************************** éç¨-start ***********************************/ |
| | | .statusbar-title { |
| | | text-align: center; |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .flex-v { |
| | | position: relative; |
| | | display: flex; |
| | |
| | | transform: rotate(90deg); |
| | | margin: 0 4px; |
| | | } |
| | | |
| | | .fyui-mask { |
| | | background: rgba(0, 0, 0, .2); |
| | | position: absolute; |
| | | z-index: 1000; |
| | | top: 0; |
| | | right: 0; |
| | | left: 0; |
| | | bottom: 0 |
| | | } |
| | | |
| | | /********************************** éç¨-end ***********************************/ |
| | | |
| | | /********************************** 主çé¢èæ¯-start ***********************************/ |
| | |
| | | text-align: center; |
| | | /* z-index: 1; */ |
| | | } |
| | | |
| | | /********************************** 主çé¢èæ¯-end ***********************************/ |
| | | |
| | | /********************************** 横å徿 ææ¬-start ***********************************/ |
| | | .fyui-cell { |
| | | padding: 8px 16px; |
| | | padding: 8px 8px; |
| | | position: relative; |
| | | display: -webkit-box; |
| | | display: -webkit-flex; |
| | |
| | | .fyui-cell__hd { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-right: 8px; |
| | | } |
| | | |
| | | .fyui-cell__bd { |
| | | -webkit-box-flex: 1; |
| | | -webkit-flex: 1; |
| | | flex: 1; |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .fyui-cell__ft { |
| | |
| | | mask-image: url(data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.454%206.58l1.06-1.06%205.78%205.779a.996.996%200%20010%201.413l-5.78%205.779-1.06-1.061%205.425-5.425-5.425-5.424z%22%20fill%3D%22%23B2B2B2%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E); |
| | | position: absolute; |
| | | top: 50%; |
| | | right: 16px; |
| | | right: 8px; |
| | | margin-top: -12px |
| | | } |
| | | |
| | |
| | | -webkit-align-items: center; |
| | | align-items: flex-start; |
| | | height: 80px; |
| | | background-color: white; |
| | | } |
| | | |
| | | .fyui-box:active { |
| | | background-color: var(--fyui-BG-COLOR-ACTIVE); |
| | | } |
| | | |
| | | .fyui-box .fyui-box__hd { |
| | |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .fyui-box .fyui-box__bd .fyui-box__content{ |
| | | .fyui-box .fyui-box__bd .fyui-box__content { |
| | | color: var(--fyui-text-color_1); |
| | | font-size: 14px; |
| | | } |
| | |
| | | padding: 4px 0px; |
| | | } |
| | | |
| | | .fyui-box__text .fyui-box__bd .fyui-box__content{ |
| | | .fyui-box__text .fyui-box__bd .fyui-box__content { |
| | | color: var(--fyui-text-color_3); |
| | | font-size: x-small; |
| | | } |
| | |
| | | margin-top: 4px; |
| | | } |
| | | |
| | | .fyui-box__text .fyui-box__ft{ |
| | | .fyui-box__text .fyui-box__ft { |
| | | display: flex; |
| | | flex-direction: row; |
| | | font-size: smaller; |
| | | color: var(--fyui-text-color_3); |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | /********************************** 横å徿 ææ¬-end ***********************************/ |
| | | |
| | | /********************************** å
容颿¿-start ***********************************/ |
| | |
| | | border-radius: 0; |
| | | } |
| | | |
| | | .fyui-panel .fyui-panel_title{ |
| | | .fyui-panel .fyui-panel_title { |
| | | font-size: 15px; |
| | | font-weight: 600; |
| | | color: var(--fyui-text-color_1); |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .fyui-panel .fyui-panel_desc{ |
| | | .fyui-panel .fyui-panel_desc { |
| | | font-size: 14px; |
| | | color: var(--fyui-text-color_2); |
| | | } |
| | | |
| | | /********************************** å
容颿¿-end ***********************************/ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | module.exports = |
| | | /******/ (function(modules) { // webpackBootstrap |
| | | /******/ // The module cache |
| | | /******/ var installedModules = {}; |
| | | /******/ |
| | | /******/ // The require function |
| | | /******/ function __webpack_require__(moduleId) { |
| | | /******/ |
| | | /******/ // Check if module is in cache |
| | | /******/ if(installedModules[moduleId]) { |
| | | /******/ return installedModules[moduleId].exports; |
| | | /******/ } |
| | | /******/ // Create a new module (and put it into the cache) |
| | | /******/ var module = installedModules[moduleId] = { |
| | | /******/ i: moduleId, |
| | | /******/ l: false, |
| | | /******/ exports: {} |
| | | /******/ }; |
| | | /******/ |
| | | /******/ // Execute the module function |
| | | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| | | /******/ |
| | | /******/ // Flag the module as loaded |
| | | /******/ module.l = true; |
| | | /******/ |
| | | /******/ // Return the exports of the module |
| | | /******/ return module.exports; |
| | | /******/ } |
| | | /******/ |
| | | /******/ |
| | | /******/ // expose the modules object (__webpack_modules__) |
| | | /******/ __webpack_require__.m = modules; |
| | | /******/ |
| | | /******/ // expose the module cache |
| | | /******/ __webpack_require__.c = installedModules; |
| | | /******/ |
| | | /******/ // define getter function for harmony exports |
| | | /******/ __webpack_require__.d = function(exports, name, getter) { |
| | | /******/ if(!__webpack_require__.o(exports, name)) { |
| | | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
| | | /******/ } |
| | | /******/ }; |
| | | /******/ |
| | | /******/ // define __esModule on exports |
| | | /******/ __webpack_require__.r = function(exports) { |
| | | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| | | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| | | /******/ } |
| | | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| | | /******/ }; |
| | | /******/ |
| | | /******/ // create a fake namespace object |
| | | /******/ // mode & 1: value is a module id, require it |
| | | /******/ // mode & 2: merge all properties of value into the ns |
| | | /******/ // mode & 4: return value when already ns object |
| | | /******/ // mode & 8|1: behave like require |
| | | /******/ __webpack_require__.t = function(value, mode) { |
| | | /******/ if(mode & 1) value = __webpack_require__(value); |
| | | /******/ if(mode & 8) return value; |
| | | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
| | | /******/ var ns = Object.create(null); |
| | | /******/ __webpack_require__.r(ns); |
| | | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
| | | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
| | | /******/ return ns; |
| | | /******/ }; |
| | | /******/ |
| | | /******/ // getDefaultExport function for compatibility with non-harmony modules |
| | | /******/ __webpack_require__.n = function(module) { |
| | | /******/ var getter = module && module.__esModule ? |
| | | /******/ function getDefault() { return module['default']; } : |
| | | /******/ function getModuleExports() { return module; }; |
| | | /******/ __webpack_require__.d(getter, 'a', getter); |
| | | /******/ return getter; |
| | | /******/ }; |
| | | /******/ |
| | | /******/ // Object.prototype.hasOwnProperty.call |
| | | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
| | | /******/ |
| | | /******/ // __webpack_public_path__ |
| | | /******/ __webpack_require__.p = ""; |
| | | /******/ |
| | | /******/ |
| | | /******/ // Load entry module and return exports |
| | | /******/ return __webpack_require__(__webpack_require__.s = 26); |
| | | /******/ }) |
| | | /************************************************************************/ |
| | | /******/ ({ |
| | | |
| | | /***/ 26: |
| | | /***/ (function(module, exports, __webpack_require__) { |
| | | |
| | | "use strict"; |
| | | |
| | | |
| | | Component({ |
| | | options: { |
| | | addGlobalClass: true |
| | | }, |
| | | properties: { |
| | | extClass: { |
| | | type: String, |
| | | value: '' |
| | | }, |
| | | focus: { |
| | | type: Boolean, |
| | | value: false |
| | | }, |
| | | autoFocus: { |
| | | type: Boolean, |
| | | value: true |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | value: 'æç´¢' |
| | | }, |
| | | value: { |
| | | type: String, |
| | | value: '' |
| | | }, |
| | | search: { |
| | | // è¿åPromiseç彿° |
| | | // @ts-ignore |
| | | type: Function, |
| | | value: null |
| | | }, |
| | | throttle: { |
| | | // 500mså
åªä¼è°ç¨ä¸æ¬¡search彿° |
| | | type: Number, |
| | | value: 500 |
| | | }, |
| | | cancelText: { |
| | | type: String, |
| | | value: 'åæ¶' |
| | | }, |
| | | cancel: { |
| | | type: Boolean, |
| | | value: true |
| | | }, |
| | | tips: { |
| | | type: String, |
| | | value: "æç´¢" |
| | | } |
| | | }, |
| | | data: { |
| | | result: [] // æç´¢ç»æ |
| | | }, |
| | | |
| | | /* @ts-ignore */ |
| | | lastSearch: Date.now(), |
| | | lifetimes: { |
| | | // @ts-ignore |
| | | attached() { |
| | | // @ts-ignore |
| | | if (this.data.focus) { |
| | | this.setData({ |
| | | searchState: true |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | clearInput() { |
| | | // @ts-ignore |
| | | this.setData({ |
| | | value: '', |
| | | focus: true, |
| | | result: [] |
| | | }); // @ts-ignore |
| | | |
| | | this.triggerEvent('clear'); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | inputFocus(e) { |
| | | // this.setData({ |
| | | // searchState: true |
| | | // }) |
| | | // @ts-ignore |
| | | this.triggerEvent('focus', e.detail); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | inputBlur(e) { |
| | | this.setData({ |
| | | focus: false |
| | | }); |
| | | this.triggerEvent('blur', e.detail); |
| | | }, |
| | | |
| | | showInput() { |
| | | this.setData({ |
| | | focus: true, |
| | | searchState: true |
| | | }); |
| | | }, |
| | | |
| | | hideInput() { |
| | | this.setData({ |
| | | searchState: false |
| | | }); |
| | | this.triggerEvent('hide'); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | inputChange(e) { |
| | | this.setData({ |
| | | value: e.detail.value |
| | | }); |
| | | this.triggerEvent('input', e.detail); |
| | | |
| | | // if (Date.now() - this.lastSearch < this.data.throttle) { |
| | | // return; |
| | | // } |
| | | |
| | | if (typeof this.data.search !== 'function') { |
| | | return; |
| | | } |
| | | |
| | | this.lastSearch = Date.now(); |
| | | this.timerId = setTimeout(() => { |
| | | if (Date.now() - this.lastSearch < this.data.throttle) { |
| | | return; |
| | | } |
| | | this.data.search(e.detail.value).then(json => { |
| | | this.setData({ |
| | | result: json |
| | | }); |
| | | }).catch(err => { |
| | | console.error('search error', err); |
| | | }); |
| | | }, this.data.throttle); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | selectResult(e) { |
| | | const { |
| | | index |
| | | } = e.currentTarget.dataset; |
| | | const item = this.data.result[index]; |
| | | this.triggerEvent('selectresult', { |
| | | index, |
| | | item |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | /***/ }) |
| | | |
| | | /******/ }); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "mp-cells": "../cells/cells", |
| | | "mp-cell": "../cell/cell" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <view class="weui-search-bar {{searchState ? 'weui-search-bar_focusing' : ''}} {{extClass}} margin-16-h search-bar"> |
| | | <view class="weui-search-bar__form"> |
| | | <view class="weui-search-bar__box box"> |
| | | <icon class="weui-icon-search" type="search" size="12"></icon> |
| | | <input type="text" class="weui-search-bar__input input" placeholder="{{placeholder}}" value="{{value}}" focus="{{focus}}" bindblur="inputBlur" bindfocus="inputFocus" bindinput="inputChange" /> |
| | | <text class="weui-icon-clear" hover-class="weui-active" wx:if="{{value.length > 0}}" bindtap="clearInput"></text> |
| | | </view> |
| | | <label class="weui-search-bar__label" bindtap="showInput"> |
| | | <icon class="weui-icon-search" type="search" size="12"></icon> |
| | | <text class="weui-search-bar__text">{{tips}}</text> |
| | | </label> |
| | | </view> |
| | | <view wx:if="{{cancel && searchState}}" class="weui-search-bar__cancel-btn" bindtap="hideInput">{{cancelText}}</view> |
| | | </view> |
| | | <mp-cells ext-class=" {{'searchbar-result ' + extClass}}" wx:if="{{searchState && result.length > 0}}"> |
| | | <mp-cell class="result" bindtap="selectResult" body-class="weui-cell_primary" data-index="{{index}}" wx:for="{{result}}" wx:key="index" hover> |
| | | <view>{{item.text}}</view> |
| | | </mp-cell> |
| | | </mp-cells> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .weui-search-bar { |
| | | position: relative; |
| | | padding: 8px; |
| | | display: -webkit-box; |
| | | display: -webkit-flex; |
| | | display: flex; |
| | | box-sizing: border-box; |
| | | background-color: white; |
| | | -webkit-text-size-adjust: 100%; |
| | | -webkit-box-align: center; |
| | | -webkit-align-items: center; |
| | | align-items: center |
| | | } |
| | | |
| | | .weui-search-bar__label text { |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | vertical-align: middle |
| | | } |
| | | |
| | | .weui-search-bar__box text { |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | vertical-align: middle |
| | | } |
| | | |
| | | .search-bar { |
| | | /* position: relative; */ |
| | | /* height: 60rpx; */ |
| | | /* border-radius: 2rpx; */ |
| | | padding: 4px; |
| | | } |
| | | |
| | | .search-bar .box { |
| | | /* height: 52rpx; */ |
| | | /* font-size: 12px; */ |
| | | /* margin: 0; */ |
| | | /* background-color: tomato; */ |
| | | } |
| | | |
| | | .search-bar .input { |
| | | padding: 0; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .weui-search-bar__label { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | left: 16rpx; |
| | | z-index: 2; |
| | | font-size: 0; |
| | | border-radius: 4px; |
| | | display: -webkit-box; |
| | | display: -webkit-flex; |
| | | display: flex; |
| | | -webkit-box-align: left; |
| | | -webkit-align-items: left; |
| | | align-items: left; |
| | | -webkit-box-pack: left; |
| | | -webkit-justify-content: left; |
| | | justify-content: left; |
| | | color: var(--weui-FG-1); |
| | | background: var(--weui-BG-2) |
| | | } |
| | | |
| | | .weui-search-bar__cancel-btn { |
| | | font-size: 12px; |
| | | } |
| | |
| | | break; |
| | | case "2": |
| | | //æºè½å¨çº¿å¨è¯¢ |
| | | url = "" |
| | | return; |
| | | url = "/pages/module_consult/consulthome/consulthome" |
| | | break; |
| | | case "3": |
| | | //å¨çº¿å®æ³å¦ä¹ |
| | | |
| | |
| | | let bodyUrl = e.currentTarget.dataset.url |
| | | let fileType = e.currentTarget.dataset.filetype |
| | | wx.downloadFile({ |
| | | // ç¤ºä¾ urlï¼å¹¶éçå®åå¨ |
| | | url: bodyUrl, |
| | | success: function (res) { |
| | | const filePath = res.tempFilePath |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/module_consult/consulthome/consulthome.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | searchTips: '请è¾å
¥å
³é®åæç´¢', |
| | | hotTopics: [{ |
| | | pic: '', |
| | | title: 'ææææææææææææææææææ', |
| | | abstract: 'æææææææææææææææææææææ', |
| | | time: '2022-02-04', |
| | | author: 'ä½è
', |
| | | itemCount: '5', |
| | | tags: ['tag1', 'tag2'] |
| | | },{ |
| | | pic: '', |
| | | title: 'ææææææææææææææææææ', |
| | | abstract: 'æææææææææææææææææææææ', |
| | | time: '2022-02-04', |
| | | author: 'ä½è
', |
| | | itemCount: '5', |
| | | tags: ['tag1', 'tag2'] |
| | | },{ |
| | | pic: '', |
| | | title: 'ææææææææææææææææææ', |
| | | abstract: 'æææææææææææææææææææææ', |
| | | time: '2022-02-04', |
| | | author: 'ä½è
', |
| | | itemCount: '5', |
| | | tags: ['tag1', 'tag2'] |
| | | }] |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom: function () { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage: function () { |
| | | |
| | | } |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "æºè½å¨è¯¢", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/module_consult/consulthome/consulthome.wxml--> |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view class="search-bar" bindtap="search"> |
| | | <mp-icon icon="search" size="15" color="black"></mp-icon> |
| | | <text>{{searchTips}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <view class="flex-h"> |
| | | <view class="card"> |
| | | <image src="/res/icons/con_pro_bg.png" class="card-bg" mode="scaleToFill"/> |
| | | <view class="card-title">常è§é®é¢</view> |
| | | <view class="card-abstract">常è§ä¼ä¸ç¯ä¿é®é¢</view> |
| | | <image src="/res/icons/con_pro.png" mode="aspectFit" class="icon"></image> |
| | | </view> |
| | | <view class="divider"></view> |
| | | <view class="card middle"> |
| | | <image src="/res/icons/con_lib_bg.png" class="card-bg" mode="scaleToFill"/> |
| | | <view class="card-title">ç¯ä¿ç¥è¯åº</view> |
| | | <view class="card-abstract">ç¯ä¿æ³å¾æ³è§</view> |
| | | <image src="/res/icons/con_lib.png" mode="aspectFit" class="icon"></image> |
| | | </view> |
| | | <view class="divider"></view> |
| | | <view class="card"> |
| | | <image src="/res/icons/con_qa_bg.png" class="card-bg" mode="scaleToFill"/> |
| | | <view class="card-title">æºè½å¨è¯¢</view> |
| | | <view class="card-abstract">ç¯ä¿ä¸å®¶ å¨çº¿å¨è¯¢</view> |
| | | <image src="/res/icons/con_qa.png" mode="aspectFit" class="icon"></image> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="fyui-cell fyui-cell_select"> |
| | | <view class="fyui-cell__bd">çé¨</view> |
| | | <view class="fyui-cell__ft">æ´å¤</view> |
| | | </view> |
| | | <view wx:for="{{hotTopics}}" wx:key="index"> |
| | | <view class="fyui-box fyui-box__text"> |
| | | <view class="fyui-box__hd"> |
| | | <text class="" wx:for="{{item.tags}}" wx:key="i" data-index="i" wx:for-item="tag">{{tag}}</text> |
| | | {{item.title}} |
| | | </view> |
| | | <view class="fyui-box__bd"> |
| | | <view class="fyui-box__content">{{item.abstract}}</view> |
| | | |
| | | </view> |
| | | <view class="fyui-box__ft"> |
| | | <view>{{item.time}}</view> |
| | | <view>{{item.author}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="page__ft"> |
| | | </view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/module_consult/consulthome/consulthome.wxss */ |
| | | .page__bd { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .search-bar { |
| | | min-width: 50vw; |
| | | padding: 6px 8px; |
| | | font-size: 12px; |
| | | line-height: 24px; |
| | | color: var(--fyui-text-color_2); |
| | | text-align: left; |
| | | background-color: white; |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .card { |
| | | position: relative; |
| | | /* background-color: cyan; */ |
| | | border-radius: 10px; |
| | | padding: 6px; |
| | | text-align: center; |
| | | flex: 1; |
| | | } |
| | | |
| | | .card:active { |
| | | background-color: var(--fyui-BG-COLOR-ACTIVE); |
| | | } |
| | | |
| | | .card .card-bg { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .divider { |
| | | width: 8px; |
| | | } |
| | | .card .card-title { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .card .card-abstract { |
| | | font-size: 12px; |
| | | color: var(--fyui-text-color_2); |
| | | } |
| | | |
| | | .card .icon { |
| | | height: 56px; |
| | | width: 60px; |
| | | } |
| | | |
| | | |
| | | /* --fyui-box */ |
| | | .fyui-box__tag { |
| | | justify-content: space-evenly; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // pages/module_consult/consultsearch/consultsearch.js |
| | | Page({ |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | focus: false, |
| | | placeholder: 'æç´¢', |
| | | value: '', |
| | | |
| | | histroy: [], |
| | | |
| | | hotTopic: [], |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady: function () { |
| | | |
| | | }, |
| | | |
| | | clearInput() { |
| | | // @ts-ignore |
| | | this.setData({ |
| | | value: '', |
| | | focus: true, |
| | | result: [] |
| | | }); // @ts-ignore |
| | | |
| | | this.triggerEvent('clear'); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | inputFocus(e) { |
| | | // this.setData({ |
| | | // searchState: true |
| | | // }) |
| | | // @ts-ignore |
| | | this.triggerEvent('focus', e.detail); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | inputBlur(e) { |
| | | this.setData({ |
| | | focus: false |
| | | }); |
| | | this.triggerEvent('blur', e.detail); |
| | | }, |
| | | |
| | | // @ts-ignore |
| | | inputChange(e) { |
| | | this.setData({ |
| | | value: e.detail.value |
| | | }); |
| | | this.triggerEvent('input', e.detail); |
| | | |
| | | // if (Date.now() - this.lastSearch < this.data.throttle) { |
| | | // return; |
| | | // } |
| | | |
| | | if (typeof this.data.search !== 'function') { |
| | | return; |
| | | } |
| | | |
| | | this.lastSearch = Date.now(); |
| | | this.timerId = setTimeout(() => { |
| | | if (Date.now() - this.lastSearch < this.data.throttle) { |
| | | return; |
| | | } |
| | | this.data.search(e.detail.value).then(json => { |
| | | this.setData({ |
| | | result: json |
| | | }); |
| | | }).catch(err => { |
| | | console.error('search error', err); |
| | | }); |
| | | }, this.data.throttle); |
| | | }, |
| | | }) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "navigationBarTitleText": "æç´¢", |
| | | "navigationBarBackgroundColor": "#57E4CB", |
| | | "navigationBarTextStyle": "white", |
| | | "usingComponents": { |
| | | "mp-icon": "/component/icon/icon" |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--pages/module_consult/consultsearch/consultsearch.wxml--> |
| | | <view class="page"> |
| | | <view class="page__hd"> |
| | | <view class="search-bar" bindtap="search"> |
| | | <mp-icon icon="search" size="15" color="black"></mp-icon> |
| | | <text>{{searchTips}}</text> |
| | | <input type="text" class="search-bar__input" placeholder="{{placeholder}}" value="{{value}}" focus="{{focus}}" bindblur="inputBlur" bindfocus="inputFocus" bindinput="inputChange" /> |
| | | <text class="weui-icon-clear" hover-class="weui-active" wx:if="{{value.length > 0}}" bindtap="clearInput"></text> |
| | | </view> |
| | | <view class="btn" bindtap="search">æç´¢</view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <view wx:if="{{histroy.length > 0}}"> |
| | | <view>åå²è®°å½</view> |
| | | <text wx:for="{{history}}"></text> |
| | | </view> |
| | | |
| | | <view>大家é½å¨æ</view> |
| | | <view wx:for="{{hotTopic}}"> |
| | | <text>{{index + 1}}</text> |
| | | <text>{{item}}</text> |
| | | <image src=""></image> |
| | | </view> |
| | | </view> |
| | | <view class="page__ft"></view> |
| | | </view> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* pages/module_consult/consultsearch/consultsearch.wxss */ |
| | | .page__hd { |
| | | /* background-color: white; */ |
| | | padding: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .page__bd { |
| | | padding-left: 10px; |
| | | padding-right: 10px; |
| | | } |
| | | |
| | | .search-bar { |
| | | flex: 1; |
| | | position: relative; |
| | | min-width: 50vw; |
| | | padding: 6px 8px; |
| | | font-size: 12px; |
| | | line-height: 24px; |
| | | color: var(--fyui-text-color_2); |
| | | text-align: left; |
| | | background-color: white; |
| | | border-radius: 20px; |
| | | border: 2px solid #57E4CB; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search-bar .weui-icon-clear { |
| | | /* position: absolute; |
| | | top: 50%; |
| | | right: 0; |
| | | margin-top: -16px; */ |
| | | padding-left: 8px; |
| | | width: 16px; |
| | | height: 16px; |
| | | -webkit-mask-size: 16px; |
| | | mask-size: 16px; |
| | | /* display: block; */ |
| | | } |
| | | |
| | | .search-bar .search-bar__input { |
| | | width: 100%; |
| | | border: 0; |
| | | font-size: 14px; |
| | | line-height: 20px; |
| | | box-sizing: content-box; |
| | | background: transparent; |
| | | caret-color: var(--weui-BRAND); |
| | | color: var(--weui-FG-0); |
| | | } |
| | | |
| | | .btn { |
| | | border-radius: 20px; |
| | | line-height: 20px; |
| | | font-size: 14px; |
| | | width: 70px; |
| | | background: linear-gradient(to top right, #42E4D5, #94DBF2); |
| | | padding: 4px 2px; |
| | | text-align: center; |
| | | color: white; |
| | | margin-left: 4px; |
| | | } |
| | |
| | | // pages/promise/promise.js |
| | | const moment = require('../../utils/moment.min') |
| | | const promiseservice = require("../../service/promiseservice") |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | |
| | | data: { |
| | | text1: "å·²å¼å¯!è¯·åæ¶å®ææ¿è¯º", |
| | | text3: "廿¿è¯º", |
| | | status: 0, |
| | | |
| | | promise: [{ |
| | | period: 'æ¿è¯ºå¨æï¼2021å¹´1æ~2021å¹´12æ', |
| | | time: '2021å¹´1æ6æ¥å®æ' |
| | | }, { |
| | | period: 'æ¿è¯ºå¨æï¼2020å¹´1æ~2020å¹´12æ', |
| | | time: '2020å¹´1æ6æ¥å®æ' |
| | | time: '2021å¹´1æ6æ¥å®æ', |
| | | picPath: '', |
| | | pdfPath: '' |
| | | }], |
| | | newPromise: [{ |
| | | period: 'æ¿è¯ºå¨æï¼2022å¹´1æ~2022å¹´12æ', |
| | | time: '2022å¹´5æ10æ¥å®æ' |
| | | },{ |
| | | period: 'æ¿è¯ºå¨æï¼2021å¹´1æ~2021å¹´12æ', |
| | | time: '2021å¹´1æ6æ¥å®æ' |
| | | }, { |
| | | period: 'æ¿è¯ºå¨æï¼2020å¹´1æ~2020å¹´12æ', |
| | | time: '2020å¹´1æ6æ¥å®æ' |
| | | }], |
| | | deadline: "----å¹´--æ--æ¥", |
| | | deadline: "æ¿è¯ºæªæ¢æ¶é´ï¼----å¹´--æ--æ¥", |
| | | }, |
| | | |
| | | promiseHistory: [], |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | this._initPlanYear() |
| | | this.getCommitment() |
| | | }, |
| | | |
| | | /** |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow: function () { |
| | | var that = this |
| | | wx.getStorage({ |
| | | key: "promise", |
| | | success(res) { |
| | | if(res.data){ |
| | | that.setData({ |
| | | promise: that.data.newPromise |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | var period = `${now.year()}/${now.month()+1}-${now.month()+1}` |
| | | var deadline = now.endOf('year').format("YYYYå¹´MMæDDæ¥") |
| | | this.setData({ |
| | | planYear: `${year}å¹´`, |
| | | maxYear: year, |
| | | thisPeiod: period, |
| | | deadline: deadline |
| | | year: year, |
| | | deadline: `æ¿è¯ºæªæ¢æ¶é´ï¼${deadline}` |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢è·³è½¬ |
| | | * 夿å½å卿å
çæ¿è¯ºæ¯å¦å®æ |
| | | */ |
| | | goto: function (e) { |
| | | var url = "" |
| | | var index = e.currentTarget.dataset.index |
| | | switch (index) { |
| | | case "0": |
| | | //廿¿è¯º |
| | | url = `/pages/promiseinfo/promiseinfo` |
| | | break; |
| | | case "1": |
| | | //æ¥çæ¿è¯ºç»æ |
| | | url = `/pages/promiseresult/promiseresult` |
| | | break; |
| | | case "2": |
| | | // |
| | | url = "" |
| | | return; |
| | | case "3": |
| | | // |
| | | url = "" |
| | | break; |
| | | case "4": |
| | | break; |
| | | case "5": |
| | | break; |
| | | } |
| | | if (url != "") { |
| | | wx.navigateTo({ |
| | | url: url |
| | | }) |
| | | checkStatus() { |
| | | if (this.promiseHistory.length > 0) { |
| | | var first = this.promiseHistory[0] |
| | | var firstYear = moment(first.cmCreateTime).year() |
| | | if (firstYear >= this.data.year) { |
| | | var deadline = moment().add(1, 'years').endOf('year').format("YYYYå¹´MMæDDæ¥") |
| | | this.setData({ |
| | | text1: "徿£!æ¬æ¬¡æ¿è¯ºå·²å®æ", |
| | | text3: "æ¥çæ¿è¯º", |
| | | status: 1, |
| | | deadline: `䏿¬¡æ¿è¯ºæ¶é´ï¼${deadline}` |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è·ååå²è®°å½ |
| | | */ |
| | | getCommitment() { |
| | | var that = this |
| | | promiseservice.getCommitment(app.globalData.accessToken.userId, { |
| | | success(data) { |
| | | that.promiseHistory = data |
| | | let promise = [] |
| | | data.forEach(d => { |
| | | const time = moment(d.cmCreateTime) |
| | | promise.push({ |
| | | period: `æ¿è¯ºå¨æï¼${time.year()}å¹´1æ~${time.year()}å¹´12æ`, |
| | | time: `${time.format('YYYYå¹´MMæDDæ¥')}宿`, |
| | | picPath: d.cmUrl, |
| | | pdfPath: d.cmPdfUrl |
| | | }) |
| | | }); |
| | | that.setData({ |
| | | promise |
| | | }) |
| | | |
| | | that.checkStatus() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 跳转è³å»æ¿è¯º |
| | | */ |
| | | gotoPromise(e) { |
| | | var status = e.currentTarget.dataset.status |
| | | if (status == 0) { |
| | | wx.navigateTo({ |
| | | url: '/pages/promiseinfo/promiseinfo' |
| | | }) |
| | | } else { |
| | | this.gotoResult(0) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è·³è½¬è³æ¿è¯ºè¯¦æ
|
| | | */ |
| | | gotoDetail(e) { |
| | | var i = e.currentTarget.dataset.index |
| | | this.gotoResult(i) |
| | | }, |
| | | |
| | | gotoResult (i) { |
| | | var p = this.data.promise[i] |
| | | wx.navigateTo({ |
| | | url: '/pages/promiseresult/promiseresult', |
| | | success: function (res) { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | promise: { |
| | | picPath: p.picPath, |
| | | pdfPath: p.pdfPath |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 跳转è³åå²è®°å½ |
| | | */ |
| | | gotoHistory() { |
| | | |
| | | } |
| | | }) |
| | |
| | | <view class="page__hd"> |
| | | <view> |
| | | <view class="title">{{text1}}</view> |
| | | <view class="tag">æ¿è¯ºæªæ¢æ¶é´ï¼{{deadline}}</view> |
| | | <view class="tag">{{deadline}}</view> |
| | | </view> |
| | | <view class="btn" bindtap="goto" data-index="0">{{text3}}</view> |
| | | <view class="btn" bindtap="gotoPromise" data-status="{{status}}">{{text3}}</view> |
| | | </view> |
| | | <view class="page__bd"> |
| | | <view class="fyui-cell fyui-cell_select title"> |
| | | <view class="fyui-cell__bd">å岿¿è¯º</view> |
| | | <view class="fyui-cell__ft">æ¥çæ´å¤</view> |
| | | </view> |
| | | <view wx:for="{{promise}}" wx:key="index" data-index="index"> |
| | | <view wx:for="{{promise}}" wx:key="index"> |
| | | <view class="p-cell fyui-panel"> |
| | | <view class="p-title"> 宿³ | æ¿è¯º</view> |
| | | <view class="p-content">{{item.period}}</view> |
| | | <view class="p-tag">{{item.time}}</view> |
| | | <view class="p-btn" bindtap="goto" data-index="1">å»çç</view> |
| | | <view class="p-btn" bindtap="gotoDetail" data-index="{{index}}">å»çç</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | }, |
| | | |
| | | onSubmit: function () { |
| | | wx.setStorage({ |
| | | key: "promise", |
| | | data: true, |
| | | }) |
| | | // wx.setStorage({ |
| | | // key: "promise", |
| | | // data: true, |
| | | // }) |
| | | // wx.navigateTo({ |
| | | // url: '/pages/promiseresult/promiseresult', |
| | | // }) |
| | | wx.showLoading({ |
| | | title: 'æ¿è¯ºä¹¦çæä¸', |
| | | mask: true, |
| | | success: (res) => {}, |
| | | fail: (res) => {}, |
| | | complete: (res) => {}, |
| | | }) |
| | | setTimeout(() => { |
| | | wx.hideLoading() |
| | | }, 20000); |
| | | |
| | | let signPic = this.data.imgFiles[0] |
| | | |
| | | promiseservice.createCommitment(app.globalData.accessToken.userId, this.commitmentVo, signPic, { |
| | | success(data) { |
| | | console.log(data); |
| | | if (data.data.success) { |
| | | wx.navigateTo({ |
| | | url: '/pages/promiseresult/promiseresult', |
| | | success: function (res) { |
| | | // éè¿ eventChannel å被æå¼é¡µé¢ä¼ éæ°æ® |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | promise: { |
| | | picPath: data.data[0], |
| | | pdfPath: data.data[1], |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | fail(res) { |
| | | console.log(res); |
| | | }, |
| | | complete(res) { |
| | | console.log(res); |
| | | wx.hideLoading({ |
| | | success: (res) => { |
| | | wx.showToast({ |
| | | title: 'çæå®æ', |
| | | duration: 1500, |
| | | icon: 'success', |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | |
| | |
| | | sceneType: '--', |
| | | |
| | | msg: [{ |
| | | name: "åä½åç§°", |
| | | id: "department", |
| | | input: true, |
| | | value: "", |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "ä¿¡ç¨ä»£ç ", |
| | | id: "socialCode", |
| | | input: true, |
| | | value: "", |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "æ¥å»ºå·", |
| | | id: "number", |
| | | input: true, |
| | | value: "", |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "æ³äººå§å", |
| | | id: "juridicalPerson", |
| | | input: true, |
| | | value: '', |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "身份è¯å·", |
| | | id: "idNo", |
| | | input: true, |
| | | value: "", |
| | | noValue: false, |
| | | maxLength: 18 |
| | | }, |
| | | ], |
| | | name: "åä½åç§°", |
| | | id: "department", |
| | | input: true, |
| | | value: "", |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "ä¿¡ç¨ä»£ç ", |
| | | id: "socialCode", |
| | | input: true, |
| | | value: "", |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "æ¥å»ºå·", |
| | | id: "number", |
| | | input: true, |
| | | value: "", |
| | | noValue: false, |
| | | required: false |
| | | }, |
| | | { |
| | | name: "æ³äººå§å", |
| | | id: "juridicalPerson", |
| | | input: true, |
| | | value: '', |
| | | noValue: false |
| | | }, |
| | | { |
| | | name: "身份è¯å·", |
| | | id: "idNo", |
| | | input: true, |
| | | value: "", |
| | | noValue: false, |
| | | maxLength: 18 |
| | | }, |
| | | ], |
| | | |
| | | commitTypes: [ |
| | | {value: 'type1', name: 'ç¯ä¿ä¸»ä½è´£ä»»æ¿è¯º', checked: true}, |
| | | {value: 'type2', name: 'ç¯å¢è¡æ¿è®¸å¯äºé¡¹', checked: false}, |
| | | {value: 'type3', name: 'ç¯ä¿ä¸é¡¹èµéæå
¶ä»èµéè¡¥å©', checked: false}, |
| | | {value: 'type4', name: 'å
¶ä»ç¯ä¿ç³æ¥äºé¡¹', checked: false} |
| | | commitTypes: [{ |
| | | value: 'type1', |
| | | name: 'ç¯ä¿ä¸»ä½è´£ä»»æ¿è¯º', |
| | | checked: true |
| | | }, |
| | | { |
| | | value: 'type2', |
| | | name: 'ç¯å¢è¡æ¿è®¸å¯äºé¡¹', |
| | | checked: false |
| | | }, |
| | | { |
| | | value: 'type3', |
| | | name: 'ç¯ä¿ä¸é¡¹èµéæå
¶ä»èµéè¡¥å©', |
| | | checked: false |
| | | }, |
| | | { |
| | | value: 'type4', |
| | | name: 'å
¶ä»ç¯ä¿ç³æ¥äºé¡¹', |
| | | checked: false |
| | | } |
| | | ], |
| | | commitTypeIndex: 0, |
| | | }, |
| | |
| | | */ |
| | | onLoad: function (options) { |
| | | let st = this.data.sceneTypeMap[app.globalData.userInfo.extension2] |
| | | switch (st) { |
| | | case '2': |
| | | case '3': |
| | | case '4': |
| | | case '5': |
| | | case '6': |
| | | this.setData({ |
| | | 'msg[2].name': 'æ¥å»ºå·' |
| | | }) |
| | | break; |
| | | |
| | | case '1': |
| | | case '7': |
| | | this.setData({ |
| | | 'msg[2].name': 'ç¯è¯å®¡æ¹æå·' |
| | | }) |
| | | break; |
| | | default: |
| | | this.setData({ |
| | | 'msg[2].name': 'ç¯è¯å®¡æ¹æå·' |
| | | }) |
| | | break; |
| | | } |
| | | this.setData({ |
| | | sceneType: st |
| | | }) |
| | |
| | | /** |
| | | * ä¿¡æ¯å®æ´åº¦æ£æ¥ |
| | | */ |
| | | submitCheck () { |
| | | submitCheck() { |
| | | let msg = this.data.msg |
| | | let msgLength = msg.length |
| | | //确认信æ¯å®æ´åº¦ |
| | | for (let i = 0; i < msgLength; i++) { |
| | | if (msg[i].value === "") { |
| | | if (msg[i].required != false && msg[i].value === "") { |
| | | let error = msg[i].name + "ä¸å¯ä¸ºç©º" |
| | | let path = "msg[" + i + "].noValue" |
| | | this.setData({ |
| | |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | //身份è¯ä½æ°å¤æ |
| | | if (i == 4) { |
| | | if (msg[i].value.length < msg[i].maxLength) { |
| | | let error = msg[i].name + "使°é误" |
| | | let path = "msg[" + i + "].noValue" |
| | | this.setData({ |
| | | errorMsg: error, |
| | | [path]: true |
| | | }) |
| | | |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | |
| | | var cList = [] |
| | | for (let i = 0; i < this.data.commitTypes.length; i++) { |
| | | const t = this.data.commitTypes[i]; |
| | | if (t.checked) { |
| | | cList.push(t) |
| | | } |
| | | } |
| | | if (cList.length == 0) { |
| | | this.setData({ |
| | | errorMsg: 'è³å°éæ©ä¸é¡¹æ¿è¯ºç±»å', |
| | | }) |
| | | return false |
| | | } |
| | | |
| | | return true |
| | |
| | | </view> |
| | | <view class="last"> |
| | | <checkbox-group bindchange="checkboxChange"> |
| | | <label wx:for="{{commitTypes}}" wx:key="{{item.value}}" class="weui-cell weui-check__label"> |
| | | <label wx:for="{{commitTypes}}" wx:key="value" class="weui-cell weui-check__label"> |
| | | <view class="weui-cell__hd"> |
| | | <checkbox value="{{item.value}}" checked="{{item.checked}}"></checkbox> |
| | | </view> |
| | |
| | | // pages/promiseresult/promiseresult.js |
| | | const $f = require("../../service/baserequest") |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | promise: { |
| | | picPath: '', |
| | | pdfPath: '', |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad: function (options) { |
| | | |
| | | 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 |
| | | that.setData({ |
| | | promise: data.promise |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | <!--pages/promiseresult/promiseresult.wxml--> |
| | | <view class="page"> |
| | | <image src="/res/icons/promisefile.png"></image> |
| | | <view class=""> |
| | | <image src="{{promise.picPath}}" class="image" show-menu-by-longpress="true" mode="widthFix"></image> |
| | | <!-- <image src="https://fyami.com.cn:447/images/commitment-restaurant-1659927781518.jpg" class="image" show-menu-by-longpress="true" mode="widthFix"></image> --> |
| | | </view> |
| | |
| | | /* pages/promiseresult/promiseresult.wxss */ |
| | | image { |
| | | width: 90vw; |
| | | height: 90vh; |
| | | margin: auto; |
| | | margin-top: 16px; |
| | | width: 100%; |
| | | height: 100vh; |
| | | } |
| | |
| | | |
| | | const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete']; |
| | | // const baseUrl = "http://127.0.0.1:8080" |
| | | const baseUrl = "http://192.168.0.116:8080" |
| | | // const baseUrl = "https://fyami.com.cn:447/" |
| | | const basePicUrl = baseUrl + "images/" |
| | | const baseFileUrl = baseUrl + "meeting/file/" |
| | | const baseUrl = "http://192.168.0.106:8080" |
| | | // const baseUrl = "https://fyami.com.cn:447" |
| | | // const basePicUrl = baseUrl + "/images/" |
| | | const basePicUrl = "https://fyami.com.cn:447/images/" |
| | | const baseFileUrl = baseUrl + "/meeting/file/" |
| | | |
| | | function request(fun) { |
| | | if (fun.params != undefined) { |
| | |
| | | complete: (res) => {fun.complete(res)}, |
| | | }) |
| | | }, |
| | | |
| | | //è·åç¨æ·æ¿è¯ºä¹¦åå²è®°å½ |
| | | getCommitment: function(userId, fun, page = 1, perPage = 30) { |
| | | let cb = { |
| | | url: '/commitment/letter', |
| | | params: { |
| | | userId: userId, |
| | | page: page, |
| | | per_page: perPage |
| | | }, |
| | | } |
| | | Object.assign(cb, fun) |
| | | $f.get(cb) |
| | | } |
| | | } |