From 0f51940bc899827f84019d2c0c165b23014d8eca Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 08 八月 2022 17:50:09 +0800
Subject: [PATCH] 承诺书和智能咨询模块
---
pages/home/home.js | 5
pages/promise/promise.js | 161 ++++--
pages/module_consult/consultsearch/consultsearch.wxss | 64 +++
pages/module_consult/consultsearch/consultsearch.wxml | 26 +
app.wxss | 40 +
component/searchbar/searchbar.js | 253 ++++++++++++
pages/module_consult/consulthome/consulthome.wxml | 57 ++
pages/promiseresult/promiseresult.wxss | 6
pages/module_consult/consulthome/consulthome.wxss | 59 ++
pages/promiseresult/promiseresult.wxml | 5
res/icons/con_lib_bg.png | 0
res/icons/con_lib.png | 0
pages/promise/promise.wxml | 8
service/promiseservice.js | 14
pages/module_consult/consultsearch/consultsearch.json | 8
component/searchbar/searchbar.wxss | 70 +++
service/baserequest.js | 9
component/searchbar/searchbar.wxml | 19
pages/promiseinfo/promiseinfo.js | 153 +++++--
pages/module_consult/consultsearch/consultsearch.js | 87 ++++
app.json | 5
pages/promiseinfo/promiseinfo.wxml | 2
/dev/null | 0
pages/module_consult/consulthome/consulthome.json | 8
res/icons/con_qa_bg.png | 0
pages/module_consult/consulthome/consulthome.js | 91 ++++
pages/promiseresult/promiseresult.js | 17
res/icons/con_pro.png | 0
res/icons/con_qa.png | 0
res/icons/con_pro_bg.png | 0
component/searchbar/searchbar.json | 7
pages/promisefile/promisefile.js | 43 +
32 files changed, 1,077 insertions(+), 140 deletions(-)
diff --git a/app.json b/app.json
index 5e163f7..b4d7859 100644
--- a/app.json
+++ b/app.json
@@ -1,4 +1,5 @@
{
+ "entryPagePath": "pages/module_consult/consultsearch/consultsearch",
"pages": [
"pages/login/login",
"pages/home/home",
@@ -15,7 +16,9 @@
"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",
diff --git a/app.wxss b/app.wxss
index e5e7f31..373a62f 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,13 +1,15 @@
/**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;
@@ -19,6 +21,7 @@
display: flex;
justify-content: space-between;
}
+
.flex-v {
position: relative;
display: flex;
@@ -51,6 +54,17 @@
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 ***********************************/
@@ -96,11 +110,12 @@
text-align: center;
/* z-index: 1; */
}
+
/********************************** 涓荤晫闈㈣儗鏅�-end ***********************************/
/********************************** 妯悜鍥炬爣鏂囨湰-start ***********************************/
.fyui-cell {
- padding: 8px 16px;
+ padding: 8px 8px;
position: relative;
display: -webkit-box;
display: -webkit-flex;
@@ -114,13 +129,13 @@
.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 {
@@ -145,7 +160,7 @@
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
}
@@ -159,6 +174,11 @@
-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 {
@@ -185,7 +205,7 @@
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;
}
@@ -228,7 +248,7 @@
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;
}
@@ -248,13 +268,14 @@
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 ***********************************/
@@ -271,15 +292,16 @@
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 ***********************************/
\ No newline at end of file
diff --git a/component/searchbar/searchbar.js b/component/searchbar/searchbar.js
new file mode 100644
index 0000000..2fa793e
--- /dev/null
+++ b/component/searchbar/searchbar.js
@@ -0,0 +1,253 @@
+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鍐呭彧浼氳皟鐢ㄤ竴娆earch鍑芥暟
+ 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
+ });
+ }
+
+ }
+});
+
+/***/ })
+
+/******/ });
\ No newline at end of file
diff --git a/component/searchbar/searchbar.json b/component/searchbar/searchbar.json
new file mode 100644
index 0000000..67ee694
--- /dev/null
+++ b/component/searchbar/searchbar.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "mp-cells": "../cells/cells",
+ "mp-cell": "../cell/cell"
+ }
+}
\ No newline at end of file
diff --git a/component/searchbar/searchbar.wxml b/component/searchbar/searchbar.wxml
new file mode 100644
index 0000000..e576090
--- /dev/null
+++ b/component/searchbar/searchbar.wxml
@@ -0,0 +1,19 @@
+<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>
\ No newline at end of file
diff --git a/component/searchbar/searchbar.wxss b/component/searchbar/searchbar.wxss
new file mode 100644
index 0000000..22ce4fc
--- /dev/null
+++ b/component/searchbar/searchbar.wxss
@@ -0,0 +1,70 @@
+.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;
+}
\ No newline at end of file
diff --git a/pages/home/home.js b/pages/home/home.js
index 1b765f9..c8044e1 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -141,8 +141,8 @@
break;
case "2":
//鏅鸿兘鍦ㄧ嚎鍜ㄨ
- url = ""
- return;
+ url = "/pages/module_consult/consulthome/consulthome"
+ break;
case "3":
//鍦ㄧ嚎瀹堟硶瀛︿範
@@ -155,7 +155,6 @@
let bodyUrl = e.currentTarget.dataset.url
let fileType = e.currentTarget.dataset.filetype
wx.downloadFile({
- // 绀轰緥 url锛屽苟闈炵湡瀹炲瓨鍦�
url: bodyUrl,
success: function (res) {
const filePath = res.tempFilePath
diff --git a/pages/module_consult/consulthome/consulthome.js b/pages/module_consult/consulthome/consulthome.js
new file mode 100644
index 0000000..1601e1a
--- /dev/null
+++ b/pages/module_consult/consulthome/consulthome.js
@@ -0,0 +1,91 @@
+// 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 () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.json b/pages/module_consult/consulthome/consulthome.json
new file mode 100644
index 0000000..dc42aff
--- /dev/null
+++ b/pages/module_consult/consulthome/consulthome.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "鏅鸿兘鍜ㄨ",
+ "navigationBarBackgroundColor": "#57E4CB",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {
+ "mp-icon": "/component/icon/icon"
+ }
+}
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.wxml b/pages/module_consult/consulthome/consulthome.wxml
new file mode 100644
index 0000000..9d0ed1b
--- /dev/null
+++ b/pages/module_consult/consulthome/consulthome.wxml
@@ -0,0 +1,57 @@
+<!--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>
\ No newline at end of file
diff --git a/pages/module_consult/consulthome/consulthome.wxss b/pages/module_consult/consulthome/consulthome.wxss
new file mode 100644
index 0000000..1ddf948
--- /dev/null
+++ b/pages/module_consult/consulthome/consulthome.wxss
@@ -0,0 +1,59 @@
+/* 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;
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultsearch/consultsearch.js b/pages/module_consult/consultsearch/consultsearch.js
new file mode 100644
index 0000000..ce2483c
--- /dev/null
+++ b/pages/module_consult/consultsearch/consultsearch.js
@@ -0,0 +1,87 @@
+// 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);
+ },
+})
\ No newline at end of file
diff --git a/pages/module_consult/consultsearch/consultsearch.json b/pages/module_consult/consultsearch/consultsearch.json
new file mode 100644
index 0000000..40c2e0e
--- /dev/null
+++ b/pages/module_consult/consultsearch/consultsearch.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "鎼滅储",
+ "navigationBarBackgroundColor": "#57E4CB",
+ "navigationBarTextStyle": "white",
+ "usingComponents": {
+ "mp-icon": "/component/icon/icon"
+ }
+}
\ No newline at end of file
diff --git a/pages/module_consult/consultsearch/consultsearch.wxml b/pages/module_consult/consultsearch/consultsearch.wxml
new file mode 100644
index 0000000..4df8402
--- /dev/null
+++ b/pages/module_consult/consultsearch/consultsearch.wxml
@@ -0,0 +1,26 @@
+<!--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>
diff --git a/pages/module_consult/consultsearch/consultsearch.wxss b/pages/module_consult/consultsearch/consultsearch.wxss
new file mode 100644
index 0000000..c0dcc56
--- /dev/null
+++ b/pages/module_consult/consultsearch/consultsearch.wxss
@@ -0,0 +1,64 @@
+/* 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;
+}
\ No newline at end of file
diff --git a/pages/promise/promise.js b/pages/promise/promise.js
index ea77b2e..3563360 100644
--- a/pages/promise/promise.js
+++ b/pages/promise/promise.js
@@ -1,5 +1,6 @@
// pages/promise/promise.js
const moment = require('../../utils/moment.min')
+const promiseservice = require("../../service/promiseservice")
const app = getApp()
Page({
@@ -10,48 +11,32 @@
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
- })
- }
- }
- })
+
},
/**
@@ -63,45 +48,99 @@
var period = `${now.year()}/${now.month()+1}-${now.month()+1}`
var deadline = now.endOf('year').format("YYYY骞碝M鏈圖D鏃�")
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骞碝M鏈圖D鏃�")
+ 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骞碝M鏈圖D鏃�')}瀹屾垚`,
+ 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() {
+
+ }
})
\ No newline at end of file
diff --git a/pages/promise/promise.wxml b/pages/promise/promise.wxml
index 71b6046..9232b43 100644
--- a/pages/promise/promise.wxml
+++ b/pages/promise/promise.wxml
@@ -5,21 +5,21 @@
<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>
diff --git a/pages/promisefile/promisefile.js b/pages/promisefile/promisefile.js
index 8340c6d..8b8a565 100644
--- a/pages/promisefile/promisefile.js
+++ b/pages/promisefile/promisefile.js
@@ -74,25 +74,56 @@
},
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',
+ })
+ },
+ })
}
})
diff --git a/pages/promiseinfo/promiseinfo.js b/pages/promiseinfo/promiseinfo.js
index d42f0f8..d6587a5 100644
--- a/pages/promiseinfo/promiseinfo.js
+++ b/pages/promiseinfo/promiseinfo.js
@@ -20,48 +20,64 @@
sceneType: '--',
msg: [{
- name: "鍗曚綅鍚嶇О",
- id: "department",
- input: true,
- value: "",
- noValue: false
- },
- {
- name: "淇$敤浠g爜",
- 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: "淇$敤浠g爜",
+ 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: '鐜繚涓讳綋璐d换鎵胯', checked: true},
- {value: 'type2', name: '鐜琛屾斂璁稿彲浜嬮」', checked: false},
- {value: 'type3', name: '鐜繚涓撻」璧勯噾鎴栧叾浠栬祫閲戣ˉ鍔�', checked: false},
- {value: 'type4', name: '鍏朵粬鐜繚鐢虫姤浜嬮」', checked: false}
+ commitTypes: [{
+ value: 'type1',
+ name: '鐜繚涓讳綋璐d换鎵胯',
+ checked: true
+ },
+ {
+ value: 'type2',
+ name: '鐜琛屾斂璁稿彲浜嬮」',
+ checked: false
+ },
+ {
+ value: 'type3',
+ name: '鐜繚涓撻」璧勯噾鎴栧叾浠栬祫閲戣ˉ鍔�',
+ checked: false
+ },
+ {
+ value: 'type4',
+ name: '鍏朵粬鐜繚鐢虫姤浜嬮」',
+ checked: false
+ }
],
commitTypeIndex: 0,
},
@@ -71,6 +87,29 @@
*/
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
})
@@ -176,12 +215,12 @@
/**
* 淇℃伅瀹屾暣搴︽鏌�
*/
- 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({
@@ -196,6 +235,34 @@
})
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
diff --git a/pages/promiseinfo/promiseinfo.wxml b/pages/promiseinfo/promiseinfo.wxml
index e425af3..65543c5 100644
--- a/pages/promiseinfo/promiseinfo.wxml
+++ b/pages/promiseinfo/promiseinfo.wxml
@@ -18,7 +18,7 @@
</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>
diff --git a/pages/promiseresult/promiseresult.js b/pages/promiseresult/promiseresult.js
index 805578f..e6786d7 100644
--- a/pages/promiseresult/promiseresult.js
+++ b/pages/promiseresult/promiseresult.js
@@ -1,18 +1,31 @@
// 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
+ })
+ })
},
/**
diff --git a/pages/promiseresult/promiseresult.wxml b/pages/promiseresult/promiseresult.wxml
index cd7949d..67d735b 100644
--- a/pages/promiseresult/promiseresult.wxml
+++ b/pages/promiseresult/promiseresult.wxml
@@ -1,4 +1,5 @@
<!--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>
diff --git a/pages/promiseresult/promiseresult.wxss b/pages/promiseresult/promiseresult.wxss
index 61fe779..22c1d30 100644
--- a/pages/promiseresult/promiseresult.wxss
+++ b/pages/promiseresult/promiseresult.wxss
@@ -1,7 +1,5 @@
/* pages/promiseresult/promiseresult.wxss */
image {
- width: 90vw;
- height: 90vh;
- margin: auto;
- margin-top: 16px;
+ width: 100%;
+ height: 100vh;
}
\ No newline at end of file
diff --git a/res/icons/con_lib.png b/res/icons/con_lib.png
new file mode 100644
index 0000000..de3ac38
--- /dev/null
+++ b/res/icons/con_lib.png
Binary files differ
diff --git a/res/icons/con_lib_bg.png b/res/icons/con_lib_bg.png
new file mode 100644
index 0000000..a35a13a
--- /dev/null
+++ b/res/icons/con_lib_bg.png
Binary files differ
diff --git a/res/icons/con_pro.png b/res/icons/con_pro.png
new file mode 100644
index 0000000..130bef5
--- /dev/null
+++ b/res/icons/con_pro.png
Binary files differ
diff --git a/res/icons/con_pro_bg.png b/res/icons/con_pro_bg.png
new file mode 100644
index 0000000..04fab95
--- /dev/null
+++ b/res/icons/con_pro_bg.png
Binary files differ
diff --git a/res/icons/con_qa.png b/res/icons/con_qa.png
new file mode 100644
index 0000000..68f9565
--- /dev/null
+++ b/res/icons/con_qa.png
Binary files differ
diff --git a/res/icons/con_qa_bg.png b/res/icons/con_qa_bg.png
new file mode 100644
index 0000000..015b8f8
--- /dev/null
+++ b/res/icons/con_qa_bg.png
Binary files differ
diff --git a/res/icons/promisefile.png b/res/icons/promisefile.png
deleted file mode 100644
index db10967..0000000
--- a/res/icons/promisefile.png
+++ /dev/null
Binary files differ
diff --git a/res/icons/seal.png b/res/icons/seal.png
deleted file mode 100644
index eadaa44..0000000
--- a/res/icons/seal.png
+++ /dev/null
Binary files differ
diff --git a/res/icons/sign.png b/res/icons/sign.png
deleted file mode 100644
index f0cb367..0000000
--- a/res/icons/sign.png
+++ /dev/null
Binary files differ
diff --git a/service/baserequest.js b/service/baserequest.js
index e05ce6b..21ed36a 100644
--- a/service/baserequest.js
+++ b/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.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) {
diff --git a/service/promiseservice.js b/service/promiseservice.js
index 6a57320..f94f0fe 100644
--- a/service/promiseservice.js
+++ b/service/promiseservice.js
@@ -17,4 +17,18 @@
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)
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3