From d7ca134342a0a2004d9c15fab49fd0a41557e29c Mon Sep 17 00:00:00 2001 From: liuwh <964324856@qq.com> Date: Sat, 07 Sep 2024 21:59:18 +0800 Subject: [PATCH] 提交 --- gz-wxparty/components/vant/radio/index.js | 68 gz-wxparty/components/vant/sidebar-item/index.d.ts | 1 gz-wxparty/utils/util.js | 6 by-wxparty/pages/register/index.wxml | 2 gz-wxparty/pages/myRegisterFlow/index.wxml | 63 gz-wxparty/images/avatar.png | 0 gz-wxparty/components/vant/radio-group/index.json | 3 gz-wxparty/pages/perfectInformation/index.wxml | 2 gz-wxparty/components/vant/grid-item/index.d.ts | 1 gz-wxparty/pages/addPerson/index.js | 309 + gz-wxparty/pages/homePage/index.wxml | 225 gz-wxparty/components/vant/sidebar/index.wxss | 1 gz-wxparty/pages/addPerson/index.wxml | 133 gz-wxparty/pages/addAddress/index.wxml | 2 gz-wxparty/pages/register/index.js | 1294 ++------ gz-wxparty/components/textarea/index.wxml | 12 gz-wxparty/components/personal-data-dom/index.js | 1 gz-wxparty/components/vant/radio-group/index.wxss | 1 gz-wxparty/pages/homePage/index.js | 1065 ++---- gz-wxparty/pages/ssimList/index.js | 269 + gz-wxparty/components/vant/sidebar/index.json | 3 gz-wxparty/pages/addPerson/index.json | 5 gz-wxparty/images/me_3.png | 0 gz-wxparty/components/vant/sidebar-item/index.wxml | 18 gz-wxparty/pages/myRegisterList/index.wxml | 77 gz-wxparty/components/vant/datetime-picker/index.wxss | 1 gz-wxparty/app.wxss | 6 gz-wxparty/components/vant/grid/index.js | 57 gz-wxparty/components/vant/radio/index.json | 6 gz-wxparty/pages/register/index.json | 17 gz-wxparty/pages/ssimList/index.wxml | 44 gz-wxparty/images/me_1.png | 0 gz-wxparty/components/vant/grid/index.wxs | 13 gz-wxparty/components/vant/sidebar/index.js | 36 gz-wxparty/components/vant/sidebar/index.d.ts | 1 gz-wxparty/pages/organizeList/index.wxml | 41 gz-wxparty/components/vant/grid-item/index.wxs | 32 gz-wxparty/pages/speechToText/index.json | 4 gz-wxparty/pages/organizeDetail/index.json | 4 gz-wxparty/components/vant/radio/index.wxss | 1 gz-wxparty/pages/register/index.wxss | 505 +++ gz-wxparty/components/vant/radio/index.d.ts | 1 gz-wxparty/components/vant/datetime-picker/index.json | 6 gz-wxparty/pages/homePage/index.wxss | 379 + gz-wxparty/pages/addPerson/index.wxss | 163 + gz-wxparty/components/vant/radio-group/index.wxml | 5 gz-wxparty/components/vant/sidebar/index.wxml | 3 gz-wxparty/pages/perfectInformation/index.js | 383 +- gz-wxparty/app.js | 96 gz-wxparty/components/vant/grid/index.d.ts | 1 gz-wxparty/styles/public_components.wxss | 8 gz-wxparty/app.json | 27 gz-wxparty/pages/organizeDetail/index.wxss | 16 gz-wxparty/pages/homePage/index.json | 3 gz-wxparty/pages/speechToText/index.wxss | 227 + gz-wxparty/pages/myRegisterList/index.js | 153 gz-wxparty/pages/organizeList/index.js | 259 + gz-wxparty/pages/caseType/index.wxml | 49 gz-wxparty/pages/ssimList/index.wxss | 77 gz-wxparty/pages/organizeList/index.wxss | 78 gz-wxparty/pages/ssimDetail/index.js | 51 gz-wxparty/pages/ssimDetail/index.wxml | 28 gz-wxparty/components/vant/radio-group/index.d.ts | 1 gz-wxparty/pages/organizeList/index.json | 5 gz-wxparty/components/vant/grid/index.wxml | 8 gz-wxparty/pages/me/index.wxml | 99 gz-wxparty/components/vant/radio/index.wxs | 33 gz-wxparty/pages/caseType/index.js | 86 gz-wxparty/img/me-center.png | 0 gz-wxparty/pages/addAddress/index.json | 4 gz-wxparty/components/vant/rate/index.wxss | 2 gz-wxparty/pages/ssimList/index.json | 4 gz-wxparty/components/vant/rate/index.js | 57 gz-wxparty/components/vant/radio/index.wxml | 30 gz-wxparty/pages/login/index.wxml | 2 gz-wxparty/pages/organizeDetail/index.js | 51 gz-wxparty/pages/register/index.wxml | 630 ++- gz-wxparty/pages/speechToText/index.js | 175 + gz-wxparty/components/vant/grid-item/index.wxss | 1 gz-wxparty/api/api.js | 10 gz-wxparty/components/steps/index.wxss | 85 gz-wxparty/utils/wxs/util.wxs | 51 gz-wxparty/font/DingTalk_JinBuTi_Regular.ttf | 0 gz-wxparty/images/me_2.png | 0 gz-wxparty/pages/organizeDetail/index.wxml | 28 gz-wxparty/components/vant/grid-item/index.json | 6 gz-wxparty/pages/myRegisterFlow/index.js | 47 gz-wxparty/pages/speechToText/index.wxml | 79 gz-wxparty/project.private.config.json | 5 gz-wxparty/components/vant/datetime-picker/index.d.ts | 1 gz-wxparty/pages/caseType/index.wxss | 131 gz-wxparty/pages/ssimDetail/index.wxss | 16 gz-wxparty/img/right.png | 0 gz-wxparty/components/vant/grid/index.json | 3 gz-wxparty/pages/perfectInformation/index.json | 2 gz-wxparty/styles/public.wxss | 463 +- gz-wxparty/pages/myRegisterFlow/index.json | 4 gz-wxparty/pages/perfectInformation/index.wxss | 3 gz-wxparty/components/vant/grid/index.wxss | 1 gz-wxparty/pages/me/index.wxss | 26 gz-wxparty/components/vant/sidebar-item/index.js | 32 gz-wxparty/components/vant/grid-item/index.js | 54 gz-wxparty/pages/myRegisterList/index.json | 4 gz-wxparty/pages/me/index.js | 92 gz-wxparty/pages/addAddress/index.js | 66 gz-wxparty/components/vant/sidebar-item/index.json | 6 gz-wxparty/pages/addAddress/index.wxss | 1 gz-wxparty/pages/myRegisterList/index.wxss | 141 gz-wxparty/components/vant/datetime-picker/index.js | 329 ++ gz-wxparty/components/vant/grid-item/index.wxml | 27 gz-wxparty/components/steps/index.wxml | 77 gz-wxparty/pages/ssimDetail/index.json | 5 gz-wxparty/components/textarea/index.wxss | 1 /dev/null | 11 gz-wxparty/pages/caseType/index.json | 4 gz-wxparty/pages/myRegisterFlow/index.wxss | 58 gz-wxparty/components/textarea/index.json | 4 gz-wxparty/components/vant/sidebar-item/index.wxss | 1 gz-wxparty/components/vant/radio-group/index.js | 24 gz-wxparty/components/vant/datetime-picker/index.wxml | 16 gz-wxparty/components/textarea/index.js | 23 121 files changed, 6,519 insertions(+), 2,948 deletions(-) diff --git a/by-wxparty/pages/register/index.wxml b/by-wxparty/pages/register/index.wxml index f620ca7..94341e8 100644 --- a/by-wxparty/pages/register/index.wxml +++ b/by-wxparty/pages/register/index.wxml @@ -51,7 +51,7 @@ 纠纷描述 <text class="cell-required">(必填)</text> </view> - <van-field autosize="{{ { maxHeight: 88, minHeight: 22 } }}" bind:change="handleChange" border="{{ false }}" custom-style="padding:0;" data-key="caseDes" placeholder="请简要描述纠纷发生的时间、地点及经过" type="textarea" value="{{ submitData.caseDes }}" /> + <van-field autosize="{{ { maxHeight: 88, minHeight: 88 } }}" bind:change="handleChange" border="{{ false }}" custom-style="padding:0;" data-key="caseDes" placeholder="请简要描述纠纷发生的时间、地点及经过请简要描述纠纷发生的时间、地点及经过请简要描述纠纷发生的时间、地点及经过" type="textarea" value="{{ submitData.caseDes }}" /> <!-- <view class="case"> <view class="img-case_2"> <image src="/img/case_1.png" class="img1"></image> diff --git a/gz-wxparty/api/api.js b/gz-wxparty/api/api.js index 2ead488..7ae9632 100644 --- a/gz-wxparty/api/api.js +++ b/gz-wxparty/api/api.js @@ -7,11 +7,11 @@ // === 测试环境 === - debug: 'https://gz.hugeinfo.com.cn/', - // debug: 'http://refa5j.natappfree.cc/', - img: 'https://gz.hugeinfo.com.cn/dyh/wx414ae04ac3f10b4e/images/', - assets: 'https://gz.hugeinfo.com.cn/dyh/wx414ae04ac3f10b4e/js/', - txt: 'https://gz.hugeinfo.com.cn/dyh/wx414ae04ac3f10b4e/txt/', + // debug: 'https://gz.hugeinfo.com.cn/', + debug: 'http://n3uvrw.natappfree.cc/', + img: 'http://120.79.193.119:9103/wx414ae04ac3f10b4e/images/', + assets: 'http://120.79.193.119:9103/wx414ae04ac3f10b4e/js/', + txt: 'http://120.79.193.119:9103/wx414ae04ac3f10b4e/txt/', // === 正式环境 === diff --git a/gz-wxparty/app.js b/gz-wxparty/app.js index 4fd9fe2..c164f94 100644 --- a/gz-wxparty/app.js +++ b/gz-wxparty/app.js @@ -2,48 +2,54 @@ const $$ = require('./utils/util'); App({ - onLaunch() { - // 小程序更新 - const updateManager = wx.getUpdateManager(); - updateManager.onCheckForUpdate(function (res) { - // 请求完新版本信息的回调 - if (res.hasUpdate == true) { - updateManager.onUpdateReady(function () { - $$.loginOutClearData(); - wx.showModal({ - title: '更新提示', - content: '检测到新版本更新', - showCancel: false, - success(res) { - if (res.confirm) { - // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 - updateManager.applyUpdate(); - } - }, - }); - }); - } - }); - updateManager.onUpdateFailed(function () { - // 新版本下载失败 - wx.showModal({ - title: '已经有新版本了哟~', - content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', - }); - }); - // 获取缓存的token - let userInfo = wx.getStorageSync('userInfo'); - if (userInfo) { - this.globalData.token = userInfo.token; - } - }, - globalData: { - token: '', // 用户token - material: { - uploadVisible: false, - data: [], // 材料上传的数据 - person: [], // 申请调解页面进入附件上传页面时,需要传递的申请人,代理人,被申请人的数据,便于身份材料时选择 - }, - caseMsg: {}, // 案件详情,用于我的申请时跳转到其他页面传输案件的数据。 - }, -}); + onLaunch() { + // 字体 + wx.loadFontFace({ + family: 'DingTalk', // 字体名称 + source: 'url("../../font/DingTalk_JinBuTi_Regular.ttf")', + global: true, // 是否全局生效 + }) + // 小程序更新 + const updateManager = wx.getUpdateManager(); + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + if (res.hasUpdate == true) { + updateManager.onUpdateReady(function () { + $$.loginOutClearData(); + wx.showModal({ + title: '更新提示', + content: '检测到新版本更新', + showCancel: false, + success(res) { + if (res.confirm) { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate(); + } + }, + }); + }); + } + }); + updateManager.onUpdateFailed(function () { + // 新版本下载失败 + wx.showModal({ + title: '已经有新版本了哟~', + content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', + }); + }); + // 获取缓存的token + let userInfo = wx.getStorageSync('userInfo'); + if (userInfo) { + this.globalData.token = userInfo.token; + } + }, + globalData: { + token: '', // 用户token + material: { + uploadVisible: false, + data: [], // 材料上传的数据 + person: [], // 申请调解页面进入附件上传页面时,需要传递的申请人,代理人,被申请人的数据,便于身份材料时选择 + }, + caseMsg: {}, // 案件详情,用于我的申请时跳转到其他页面传输案件的数据。 + }, +}); \ No newline at end of file diff --git a/gz-wxparty/app.json b/gz-wxparty/app.json index e47f48a..daecd87 100644 --- a/gz-wxparty/app.json +++ b/gz-wxparty/app.json @@ -4,6 +4,12 @@ "pages/homePageInfo/index", "pages/messageCenter/index", "pages/register/index", + "pages/caseType/index", + "pages/addAddress/index", + "pages/speechToText/index", + "pages/addPerson/index", + "pages/myRegisterList/index", + "pages/myRegisterFlow/index", "pages/autograph/index", "pages/course/index", "pages/orderConfirm/index", @@ -21,12 +27,17 @@ "pages/agreement/index", "pages/login/index", "pages/webview/index", - "pages/classicCase/index" + "pages/classicCase/index", + "pages/ssimList/index", + "pages/ssimDetail/index", + "pages/organizeDetail/index", + "pages/organizeList/index" + ], "window": { "backgroundTextStyle": "dark", - "navigationBarBackgroundColor": "#d10202", - "navigationBarTitleText": "云法调解微信小程序", + "navigationBarBackgroundColor": "#1A6FB8", + "navigationBarTitleText": "广州解纷码", "navigationBarTextStyle": "white", "backgroundColor": "#d10202", "backgroundColorTop": "#d10202", @@ -49,7 +60,7 @@ "van-picker": "./components/vant/picker/index", "van-popup": "./components/vant/popup/index", "van-row": "./components/vant/row/index", - "van-col": "./components/vant/col/index", + "van-col": "./components/vant/col/index", "van-search": "./components/vant/search/index", "van-divider": "./components/vant/divider/index", "van-tab": "./components/vant/tab/index", @@ -60,9 +71,17 @@ "van-cell": "./components/vant/cell/index", "van-cell-group": "./components/vant/cell-group/index", "van-field": "./components/vant/field/index", + "van-radio": "./components/vant/radio/index", + "van-radio-group": "./components/vant/radio-group/index", "van-checkbox": "./components/vant/checkbox/index", "van-checkbox-group": "./components/vant/checkbox-group/index", "van-toast": "./components/vant/toast/index", + "van-sidebar-item": "./components/vant/sidebar-item/index", + "van-sidebar": "./components/vant/sidebar/index", + "van-grid": "./components/vant/grid/index", + "van-grid-item": "./components/vant/grid-item/index", + "van-datetime-picker": "./components/vant/datetime-picker/index", + "van-rate": "./components/vant/rate/index", "van-switch": "./components/vant/switch/index" }, "lazyCodeLoading": "requiredComponents" diff --git a/gz-wxparty/app.wxss b/gz-wxparty/app.wxss index 115184a..dfe8a57 100644 --- a/gz-wxparty/app.wxss +++ b/gz-wxparty/app.wxss @@ -3,6 +3,12 @@ @import './styles/animate.wxss'; @import './components/vant/common/index.wxss'; +/* font-family */ +@font-face { + font-family: 'DingTalk'; + src: url('./font/DingTalk_JinBuTi_Regular.ttf') format('truetype'); +} + page { color: var(--text-color); background-color: var(--bg-color); diff --git a/gz-wxparty/components/personal-data-dom/index.js b/gz-wxparty/components/personal-data-dom/index.js index 99b2337..570bc6c 100644 --- a/gz-wxparty/components/personal-data-dom/index.js +++ b/gz-wxparty/components/personal-data-dom/index.js @@ -120,6 +120,7 @@ }, // 获取手机号码 _handleGetPhoneNumber(e) { + console.log('eeeee',e); this.triggerEvent('handleGetPhoneNumber', e.detail.code); }, // 获取个人信息 diff --git a/gz-wxparty/components/steps/index.wxml b/gz-wxparty/components/steps/index.wxml index 85f12b8..e343597 100644 --- a/gz-wxparty/components/steps/index.wxml +++ b/gz-wxparty/components/steps/index.wxml @@ -1,39 +1,42 @@ <!--步骤条--> <view class="steps"> - <block wx:if="{{ stepsType === 'number' }}"> - <view class="steps-item {{ index <= stepsActive && 'steps-item-active' }}" wx:for="{{ stepsData }}" wx:key="index"> - <view class="steps-item-round" wx:if="{{ index > stepsActive }}">{{ index + 1 }}</view> - <view class="steps-item-round" wx:else> - <van-icon name="success" /> - </view> - <view class="steps-item-text">{{ item }}</view> - <view class="steps-item-icon" wx:if="{{ index < stepsData.length - 1 }}"> - <block wx:if="{{ index > stepsActive }}"> - <van-icon name="{{ imgUrl }}steps-arrow.png" size="14" /> - </block> - <block wx:else> - <van-icon name="{{ imgUrl }}steps-arrow-active.png" size="14" /> - </block> - </view> - </view> - </block> - <block wx:else> - <view class="steps-item {{ index <= stepsActive && 'steps-item-active' }}" wx:for="{{ stepsData }}" wx:key="index"> - <view class="steps-item-round" wx:if="{{ index > stepsActive }}"> - <van-icon name="{{ imgUrl }}{{ item.icon }}" /> - </view> - <view class="steps-item-round" wx:else> - <van-icon name="{{ imgUrl }}{{ item.activeIcon }}" /> - </view> - <view class="steps-item-text">{{ item.title }}</view> - <view class="steps-item-icon" wx:if="{{ index < stepsData.length - 1 }}"> - <block wx:if="{{ index > stepsActive }}"> - <van-icon name="{{ imgUrl }}steps-arrow.png" size="14" /> - </block> - <block wx:else> - <van-icon name="{{ imgUrl }}steps-arrow-active.png" size="14" /> - </block> - </view> - </view> - </block> -</view> + <block wx:if="{{ stepsType === 'number' }}"> + <view class="steps-item {{ index <= stepsActive && 'steps-item-active' }}" wx:for="{{ stepsData }}" wx:key="index"> + <view class="steps-item-round" wx:if="{{ index > stepsActive }}">{{ index + 1 }}</view> + <view class="steps-item-round" wx:else> + <van-icon name="success" /> + </view> + <view class="steps-item-text">{{ item }}</view> + <view class="steps-item-icon" wx:if="{{ index < stepsData.length - 1 }}"> + <block wx:if="{{ index > stepsActive }}"> + <van-icon name="{{ imgUrl }}steps-arrow.png" size="14" /> + </block> + <block wx:else> + <van-icon name="{{ imgUrl }}steps-arrow-active.png" size="14" /> + </block> + </view> + </view> + </block> + <block wx:else> + <view class="steps-item {{ index <= stepsActive && 'steps-item-active' }}" wx:for="{{ stepsData }}" wx:key="index"> + <view class="steps-item-round" wx:if="{{ index > stepsActive }}"> + <view class="steps-item-number">{{item.number}}</view> + </view> + <view class="steps-item-round" wx:if="{{ index === stepsActive }}"> + <view class="steps-item-number">{{item.number}}</view> + </view> + <view class="steps-item-round1" wx:if="{{ index < stepsActive }}"> + <van-icon name="success" /> + </view> + <view class="steps-item-text">{{ item.title }}</view> + <view class="steps-item-icon" wx:if="{{ index < stepsData.length - 1 }}"> + <block wx:if="{{ index > stepsActive }}"> + <view class="steps-item-line"></view> + </block> + <block wx:else> + <view class="steps-item-hoverLine"></view> + </block> + </view> + </view> + </block> +</view> \ No newline at end of file diff --git a/gz-wxparty/components/steps/index.wxss b/gz-wxparty/components/steps/index.wxss index 1838218..de676a0 100644 --- a/gz-wxparty/components/steps/index.wxss +++ b/gz-wxparty/components/steps/index.wxss @@ -1,51 +1,82 @@ /* components/steps/index.wxss */ .steps { - display: flex; - align-items: center; - background-color: #ffffff; + display: flex; + align-items: center; + background-color: #ffffff; } .steps-item { - position: relative; - flex: 1; - display: flex; - flex-direction: column; - align-items: center; + position: relative; + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + color: rgba(23, 26, 29, 0.40); } .steps-item-active, .steps-item-active .steps-item-icon { - color: var(--main-color); + color: var(--main-color); } .steps-item-active .steps-item-round { - background-color: var(--red-1); - color: var(--main-color); + background-color: var(--main-color); + color: var(--white); +} + +.steps-item-line {} + +.steps-item-hoverLine { + width: 168rpx; + border: 1px solid var(--main-color); +} + +.steps-item-line { + width: 168rpx; + border: 1px solid #E5E6EB; +} + +.steps-item-active .steps-item-number1 { + background-color: var(--main-color); + color: var(--white); } .steps-item-round { - position: relative; - width: 60rpx; - height: 60rpx; - border-radius: 50%; - color: #646566; - margin-bottom: 8rpx; - background-color: #f2f2f2; + position: relative; + width: 60rpx; + height: 60rpx; + border-radius: 50%; + color: #86909C; + margin-bottom: 8rpx; + background-color: #F2F3F5; + display: flex; + align-items: center; + justify-content: center; +} + +.steps-item-round1 { + position: relative; + width: 60rpx; + height: 60rpx; + border-radius: 50%; + color: #86909C; + margin-bottom: 8rpx; + background-color: #e8f3ff; display: flex; align-items: center; justify-content: center; } .steps-item-text { - font-size: 24rpx; - line-height: 40rpx; + font-size: 24rpx; + line-height: 40rpx; } .steps-item-icon { - position: absolute; - z-index: 999; - top: 50%; - margin-top: -16rpx; - right: -16rpx; - color: #cccccc; -} + position: absolute; + z-index: 889; + top: 50%; + margin-top: -24rpx; + right: -88rpx; + color: #cccccc; +} \ No newline at end of file diff --git a/gz-wxparty/components/textarea/index.js b/gz-wxparty/components/textarea/index.js new file mode 100644 index 0000000..225de8c --- /dev/null +++ b/gz-wxparty/components/textarea/index.js @@ -0,0 +1,23 @@ +// components/textarea/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/gz-wxparty/components/textarea/index.json b/gz-wxparty/components/textarea/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/gz-wxparty/components/textarea/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/components/textarea/index.wxml b/gz-wxparty/components/textarea/index.wxml new file mode 100644 index 0000000..b4809c1 --- /dev/null +++ b/gz-wxparty/components/textarea/index.wxml @@ -0,0 +1,12 @@ +<block> + <view class="cell-item"> + <view class="cell-title"><text><text class="cell-required">*</text> 事项概况</text></view> + <van-field custom-style="padding:0 20rpx;line-height:90rpx" autosize="{{ { maxHeight: 88, minHeight: 88 } }}" bind:change="handleChange" border="{{ false }}" data-key="caseDes" placeholder="请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过" type="textarea" value="{{ submitData.caseDes }}" /> + </view> + <view> + <view class="textarea-foot"> + <view></view> + </view> + <!-- <recording bind:getwords="handleGetWords" bind:onVisible="handleVisibleRecording" data-type="caseDes" /> --> + </view> +</block> \ No newline at end of file diff --git a/gz-wxparty/components/textarea/index.wxss b/gz-wxparty/components/textarea/index.wxss new file mode 100644 index 0000000..e8f95d7 --- /dev/null +++ b/gz-wxparty/components/textarea/index.wxss @@ -0,0 +1 @@ +/* components/textarea/index.wxss */ \ No newline at end of file diff --git a/gz-wxparty/components/vant/datetime-picker/index.d.ts b/gz-wxparty/components/vant/datetime-picker/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/datetime-picker/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/datetime-picker/index.js b/gz-wxparty/components/vant/datetime-picker/index.js new file mode 100644 index 0000000..e30afef --- /dev/null +++ b/gz-wxparty/components/vant/datetime-picker/index.js @@ -0,0 +1,329 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var validator_1 = require("../common/validator"); +var shared_1 = require("../picker/shared"); +var currentYear = new Date().getFullYear(); +function isValidDate(date) { + return (0, validator_1.isDef)(date) && !isNaN(new Date(date).getTime()); +} +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +function padZero(val) { + return "00".concat(val).slice(-2); +} +function times(n, iteratee) { + var index = -1; + var result = Array(n < 0 ? 0 : n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} +function getTrueValue(formattedValue) { + if (formattedValue === undefined) { + formattedValue = '1'; + } + while (isNaN(parseInt(formattedValue, 10))) { + formattedValue = formattedValue.slice(1); + } + return parseInt(formattedValue, 10); +} +function getMonthEndDay(year, month) { + return 32 - new Date(year, month - 1, 32).getDate(); +} +var defaultFormatter = function (type, value) { return value; }; +(0, component_1.VantComponent)({ + classes: ['active-class', 'toolbar-class', 'column-class'], + props: __assign(__assign({}, shared_1.pickerProps), { value: { + type: null, + observer: 'updateValue', + }, filter: null, type: { + type: String, + value: 'datetime', + observer: 'updateValue', + }, showToolbar: { + type: Boolean, + value: true, + }, formatter: { + type: null, + value: defaultFormatter, + }, minDate: { + type: Number, + value: new Date(currentYear - 10, 0, 1).getTime(), + observer: 'updateValue', + }, maxDate: { + type: Number, + value: new Date(currentYear + 10, 11, 31).getTime(), + observer: 'updateValue', + }, minHour: { + type: Number, + value: 0, + observer: 'updateValue', + }, maxHour: { + type: Number, + value: 23, + observer: 'updateValue', + }, minMinute: { + type: Number, + value: 0, + observer: 'updateValue', + }, maxMinute: { + type: Number, + value: 59, + observer: 'updateValue', + } }), + data: { + innerValue: Date.now(), + columns: [], + }, + methods: { + updateValue: function () { + var _this = this; + var data = this.data; + var val = this.correctValue(data.value); + var isEqual = val === data.innerValue; + this.updateColumnValue(val).then(function () { + if (!isEqual) { + _this.$emit('input', val); + } + }); + }, + getPicker: function () { + if (this.picker == null) { + this.picker = this.selectComponent('.van-datetime-picker'); + var picker_1 = this.picker; + var setColumnValues_1 = picker_1.setColumnValues; + picker_1.setColumnValues = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return setColumnValues_1.apply(picker_1, __spreadArray(__spreadArray([], args, true), [false], false)); + }; + } + return this.picker; + }, + updateColumns: function () { + var _a = this.data.formatter, formatter = _a === void 0 ? defaultFormatter : _a; + var results = this.getOriginColumns().map(function (column) { return ({ + values: column.values.map(function (value) { return formatter(column.type, value); }), + }); }); + return this.set({ columns: results }); + }, + getOriginColumns: function () { + var filter = this.data.filter; + var results = this.getRanges().map(function (_a) { + var type = _a.type, range = _a.range; + var values = times(range[1] - range[0] + 1, function (index) { + var value = range[0] + index; + return type === 'year' ? "".concat(value) : padZero(value); + }); + if (filter) { + values = filter(type, values); + } + return { type: type, values: values }; + }); + return results; + }, + getRanges: function () { + var data = this.data; + if (data.type === 'time') { + return [ + { + type: 'hour', + range: [data.minHour, data.maxHour], + }, + { + type: 'minute', + range: [data.minMinute, data.maxMinute], + }, + ]; + } + var _a = this.getBoundary('max', data.innerValue), maxYear = _a.maxYear, maxDate = _a.maxDate, maxMonth = _a.maxMonth, maxHour = _a.maxHour, maxMinute = _a.maxMinute; + var _b = this.getBoundary('min', data.innerValue), minYear = _b.minYear, minDate = _b.minDate, minMonth = _b.minMonth, minHour = _b.minHour, minMinute = _b.minMinute; + var result = [ + { + type: 'year', + range: [minYear, maxYear], + }, + { + type: 'month', + range: [minMonth, maxMonth], + }, + { + type: 'day', + range: [minDate, maxDate], + }, + { + type: 'hour', + range: [minHour, maxHour], + }, + { + type: 'minute', + range: [minMinute, maxMinute], + }, + ]; + if (data.type === 'date') + result.splice(3, 2); + if (data.type === 'year-month') + result.splice(2, 3); + return result; + }, + correctValue: function (value) { + var data = this.data; + // validate value + var isDateType = data.type !== 'time'; + if (isDateType && !isValidDate(value)) { + value = data.minDate; + } + else if (!isDateType && !value) { + var minHour = data.minHour; + value = "".concat(padZero(minHour), ":00"); + } + // time type + if (!isDateType) { + var _a = value.split(':'), hour = _a[0], minute = _a[1]; + hour = padZero(range(hour, data.minHour, data.maxHour)); + minute = padZero(range(minute, data.minMinute, data.maxMinute)); + return "".concat(hour, ":").concat(minute); + } + // date type + value = Math.max(value, data.minDate); + value = Math.min(value, data.maxDate); + return value; + }, + getBoundary: function (type, innerValue) { + var _a; + var value = new Date(innerValue); + var boundary = new Date(this.data["".concat(type, "Date")]); + var year = boundary.getFullYear(); + var month = 1; + var date = 1; + var hour = 0; + var minute = 0; + if (type === 'max') { + month = 12; + date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1); + hour = 23; + minute = 59; + } + if (value.getFullYear() === year) { + month = boundary.getMonth() + 1; + if (value.getMonth() + 1 === month) { + date = boundary.getDate(); + if (value.getDate() === date) { + hour = boundary.getHours(); + if (value.getHours() === hour) { + minute = boundary.getMinutes(); + } + } + } + } + return _a = {}, + _a["".concat(type, "Year")] = year, + _a["".concat(type, "Month")] = month, + _a["".concat(type, "Date")] = date, + _a["".concat(type, "Hour")] = hour, + _a["".concat(type, "Minute")] = minute, + _a; + }, + onCancel: function () { + this.$emit('cancel'); + }, + onConfirm: function () { + this.$emit('confirm', this.data.innerValue); + }, + onChange: function () { + var _this = this; + var data = this.data; + var value; + var picker = this.getPicker(); + var originColumns = this.getOriginColumns(); + if (data.type === 'time') { + var indexes = picker.getIndexes(); + value = "".concat(+originColumns[0].values[indexes[0]], ":").concat(+originColumns[1] + .values[indexes[1]]); + } + else { + var indexes = picker.getIndexes(); + var values = indexes.map(function (value, index) { return originColumns[index].values[value]; }); + var year = getTrueValue(values[0]); + var month = getTrueValue(values[1]); + var maxDate = getMonthEndDay(year, month); + var date = getTrueValue(values[2]); + if (data.type === 'year-month') { + date = 1; + } + date = date > maxDate ? maxDate : date; + var hour = 0; + var minute = 0; + if (data.type === 'datetime') { + hour = getTrueValue(values[3]); + minute = getTrueValue(values[4]); + } + value = new Date(year, month - 1, date, hour, minute); + } + value = this.correctValue(value); + this.updateColumnValue(value).then(function () { + _this.$emit('input', value); + _this.$emit('change', picker); + }); + }, + updateColumnValue: function (value) { + var _this = this; + var values = []; + var type = this.data.type; + var formatter = this.data.formatter || defaultFormatter; + var picker = this.getPicker(); + if (type === 'time') { + var pair = value.split(':'); + values = [formatter('hour', pair[0]), formatter('minute', pair[1])]; + } + else { + var date = new Date(value); + values = [ + formatter('year', "".concat(date.getFullYear())), + formatter('month', padZero(date.getMonth() + 1)), + ]; + if (type === 'date') { + values.push(formatter('day', padZero(date.getDate()))); + } + if (type === 'datetime') { + values.push(formatter('day', padZero(date.getDate())), formatter('hour', padZero(date.getHours())), formatter('minute', padZero(date.getMinutes()))); + } + } + return this.set({ innerValue: value }) + .then(function () { return _this.updateColumns(); }) + .then(function () { return picker.setValues(values); }); + }, + }, + created: function () { + var _this = this; + var innerValue = this.correctValue(this.data.value); + this.updateColumnValue(innerValue).then(function () { + _this.$emit('input', innerValue); + }); + }, +}); diff --git a/gz-wxparty/components/vant/datetime-picker/index.json b/gz-wxparty/components/vant/datetime-picker/index.json new file mode 100644 index 0000000..a778e91 --- /dev/null +++ b/gz-wxparty/components/vant/datetime-picker/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-picker": "../picker/index" + } +} diff --git a/gz-wxparty/components/vant/datetime-picker/index.wxml b/gz-wxparty/components/vant/datetime-picker/index.wxml new file mode 100644 index 0000000..ade2202 --- /dev/null +++ b/gz-wxparty/components/vant/datetime-picker/index.wxml @@ -0,0 +1,16 @@ +<van-picker + class="van-datetime-picker" + active-class="active-class" + toolbar-class="toolbar-class" + column-class="column-class" + title="{{ title }}" + columns="{{ columns }}" + item-height="{{ itemHeight }}" + show-toolbar="{{ showToolbar }}" + visible-item-count="{{ visibleItemCount }}" + confirm-button-text="{{ confirmButtonText }}" + cancel-button-text="{{ cancelButtonText }}" + bind:change="onChange" + bind:confirm="onConfirm" + bind:cancel="onCancel" +/> diff --git a/gz-wxparty/components/vant/datetime-picker/index.wxss b/gz-wxparty/components/vant/datetime-picker/index.wxss new file mode 100644 index 0000000..99694d6 --- /dev/null +++ b/gz-wxparty/components/vant/datetime-picker/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss'; \ No newline at end of file diff --git a/gz-wxparty/components/vant/grid-item/index.d.ts b/gz-wxparty/components/vant/grid-item/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/grid-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/grid-item/index.js b/gz-wxparty/components/vant/grid-item/index.js new file mode 100644 index 0000000..a7d47a2 --- /dev/null +++ b/gz-wxparty/components/vant/grid-item/index.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var relation_1 = require("../common/relation"); +var link_1 = require("../mixins/link"); +(0, component_1.VantComponent)({ + relation: (0, relation_1.useParent)('grid'), + classes: ['content-class', 'icon-class', 'text-class'], + mixins: [link_1.link], + props: { + icon: String, + iconColor: String, + iconPrefix: { + type: String, + value: 'van-icon', + }, + dot: Boolean, + info: null, + badge: null, + text: String, + useSlot: Boolean, + }, + data: { + viewStyle: '', + }, + mounted: function () { + this.updateStyle(); + }, + methods: { + updateStyle: function () { + if (!this.parent) { + return; + } + var _a = this.parent, data = _a.data, children = _a.children; + var columnNum = data.columnNum, border = data.border, square = data.square, gutter = data.gutter, clickable = data.clickable, center = data.center, direction = data.direction, reverse = data.reverse, iconSize = data.iconSize; + this.setData({ + center: center, + border: border, + square: square, + gutter: gutter, + clickable: clickable, + direction: direction, + reverse: reverse, + iconSize: iconSize, + index: children.indexOf(this), + columnNum: columnNum, + }); + }, + onClick: function () { + this.$emit('click'); + this.jumpLink(); + }, + }, +}); diff --git a/gz-wxparty/components/vant/grid-item/index.json b/gz-wxparty/components/vant/grid-item/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/gz-wxparty/components/vant/grid-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/gz-wxparty/components/vant/grid-item/index.wxml b/gz-wxparty/components/vant/grid-item/index.wxml new file mode 100644 index 0000000..e95087d --- /dev/null +++ b/gz-wxparty/components/vant/grid-item/index.wxml @@ -0,0 +1,27 @@ +<wxs src="../wxs/utils.wxs" module="utils" /> +<wxs src="./index.wxs" module="computed" /> + +<view + class="custom-class {{ utils.bem('grid-item', { square }) }}" + style="{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}" + bindtap="onClick" +> + <view + class="content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}" + style="{{ computed.contentStyle({ square, gutter }) }}" + > + <block wx:if="{{ useSlot }}"> + <slot /> + </block> + <block wx:else> + <view class="van-grid-item__icon icon-class"> + <van-icon wx:if="{{ icon }}" name="{{ icon }}" color="{{ iconColor }}" class-prefix="{{ iconPrefix }}" dot="{{ dot }}" info="{{ badge || info }}" size="{{ iconSize }}" /> + <slot wx:else name="icon"></slot> + </view> + <view class="van-grid-item__text text-class"> + <text wx:if="{{ text }}">{{ text }}</text> + <slot wx:else name="text"></slot> + </view> + </block> + </view> +</view> diff --git a/gz-wxparty/components/vant/grid-item/index.wxs b/gz-wxparty/components/vant/grid-item/index.wxs new file mode 100644 index 0000000..2cfe37d --- /dev/null +++ b/gz-wxparty/components/vant/grid-item/index.wxs @@ -0,0 +1,32 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function wrapperStyle(data) { + var width = 100 / data.columnNum + '%'; + + return style({ + width: width, + 'padding-top': data.square ? width : null, + 'padding-right': addUnit(data.gutter), + 'margin-top': + data.index >= data.columnNum && !data.square + ? addUnit(data.gutter) + : null, + }); +} + +function contentStyle(data) { + return data.square + ? style({ + right: addUnit(data.gutter), + bottom: addUnit(data.gutter), + height: 'auto', + }) + : ''; +} + +module.exports = { + wrapperStyle: wrapperStyle, + contentStyle: contentStyle, +}; diff --git a/gz-wxparty/components/vant/grid-item/index.wxss b/gz-wxparty/components/vant/grid-item/index.wxss new file mode 100644 index 0000000..acaea84 --- /dev/null +++ b/gz-wxparty/components/vant/grid-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-grid-item{box-sizing:border-box;float:left;position:relative}.van-grid-item--square{height:0}.van-grid-item__content{background-color:var(--grid-item-content-background-color,#fff);box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:var(--grid-item-content-padding,16px 8px)}.van-grid-item__content:after{border-width:0 1px 1px 0;z-index:1}.van-grid-item__content--surround:after{border-width:1px}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--square{left:0;position:absolute;right:0;top:0}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 8px}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 8px}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 8px 0 0}.van-grid-item__content--clickable:active{background-color:var(--grid-item-content-active-color,#f2f3f5)}.van-grid-item__icon{align-items:center;display:flex;font-size:var(--grid-item-icon-size,26px);height:var(--grid-item-icon-size,26px)}.van-grid-item__text{word-wrap:break-word;color:var(--grid-item-text-color,#646566);font-size:var(--grid-item-text-font-size,12px)}.van-grid-item__icon+.van-grid-item__text{margin-top:8px} \ No newline at end of file diff --git a/gz-wxparty/components/vant/grid/index.d.ts b/gz-wxparty/components/vant/grid/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/grid/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/grid/index.js b/gz-wxparty/components/vant/grid/index.js new file mode 100644 index 0000000..28d14f4 --- /dev/null +++ b/gz-wxparty/components/vant/grid/index.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var relation_1 = require("../common/relation"); +(0, component_1.VantComponent)({ + relation: (0, relation_1.useChildren)('grid-item'), + props: { + square: { + type: Boolean, + observer: 'updateChildren', + }, + gutter: { + type: null, + value: 0, + observer: 'updateChildren', + }, + clickable: { + type: Boolean, + observer: 'updateChildren', + }, + columnNum: { + type: Number, + value: 4, + observer: 'updateChildren', + }, + center: { + type: Boolean, + value: true, + observer: 'updateChildren', + }, + border: { + type: Boolean, + value: true, + observer: 'updateChildren', + }, + direction: { + type: String, + observer: 'updateChildren', + }, + iconSize: { + type: String, + observer: 'updateChildren', + }, + reverse: { + type: Boolean, + value: false, + observer: 'updateChildren', + }, + }, + methods: { + updateChildren: function () { + this.children.forEach(function (child) { + child.updateStyle(); + }); + }, + }, +}); diff --git a/gz-wxparty/components/vant/grid/index.json b/gz-wxparty/components/vant/grid/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/gz-wxparty/components/vant/grid/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/gz-wxparty/components/vant/grid/index.wxml b/gz-wxparty/components/vant/grid/index.wxml new file mode 100644 index 0000000..2e4118f --- /dev/null +++ b/gz-wxparty/components/vant/grid/index.wxml @@ -0,0 +1,8 @@ +<wxs src="./index.wxs" module="computed" /> + +<view + class="van-grid custom-class {{ border && !gutter ? 'van-hairline--top' : '' }}" + style="{{ computed.rootStyle({ gutter }) }}" +> + <slot /> +</view> diff --git a/gz-wxparty/components/vant/grid/index.wxs b/gz-wxparty/components/vant/grid/index.wxs new file mode 100644 index 0000000..cd3b1bd --- /dev/null +++ b/gz-wxparty/components/vant/grid/index.wxs @@ -0,0 +1,13 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function rootStyle(data) { + return style({ + 'padding-left': addUnit(data.gutter), + }); +} + +module.exports = { + rootStyle: rootStyle, +}; diff --git a/gz-wxparty/components/vant/grid/index.wxss b/gz-wxparty/components/vant/grid/index.wxss new file mode 100644 index 0000000..e347440 --- /dev/null +++ b/gz-wxparty/components/vant/grid/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-grid{box-sizing:border-box;overflow:hidden;position:relative} \ No newline at end of file diff --git a/gz-wxparty/components/vant/radio-group/index.d.ts b/gz-wxparty/components/vant/radio-group/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/radio-group/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/radio-group/index.js b/gz-wxparty/components/vant/radio-group/index.js new file mode 100644 index 0000000..ddb2a60 --- /dev/null +++ b/gz-wxparty/components/vant/radio-group/index.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var relation_1 = require("../common/relation"); +(0, component_1.VantComponent)({ + field: true, + relation: (0, relation_1.useChildren)('radio'), + props: { + value: { + type: null, + observer: 'updateChildren', + }, + direction: String, + disabled: { + type: Boolean, + observer: 'updateChildren', + }, + }, + methods: { + updateChildren: function () { + this.children.forEach(function (child) { return child.updateFromParent(); }); + }, + }, +}); diff --git a/gz-wxparty/components/vant/radio-group/index.json b/gz-wxparty/components/vant/radio-group/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/gz-wxparty/components/vant/radio-group/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/gz-wxparty/components/vant/radio-group/index.wxml b/gz-wxparty/components/vant/radio-group/index.wxml new file mode 100644 index 0000000..0ab17af --- /dev/null +++ b/gz-wxparty/components/vant/radio-group/index.wxml @@ -0,0 +1,5 @@ +<wxs src="../wxs/utils.wxs" module="utils" /> + +<view class="{{ utils.bem('radio-group', [direction]) }}"> + <slot></slot> +</view> diff --git a/gz-wxparty/components/vant/radio-group/index.wxss b/gz-wxparty/components/vant/radio-group/index.wxss new file mode 100644 index 0000000..4e3b5d4 --- /dev/null +++ b/gz-wxparty/components/vant/radio-group/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-radio-group--horizontal{display:flex;flex-wrap:wrap} \ No newline at end of file diff --git a/gz-wxparty/components/vant/radio/index.d.ts b/gz-wxparty/components/vant/radio/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/radio/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/radio/index.js b/gz-wxparty/components/vant/radio/index.js new file mode 100644 index 0000000..61a86d5 --- /dev/null +++ b/gz-wxparty/components/vant/radio/index.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var version_1 = require("../common/version"); +var component_1 = require("../common/component"); +var relation_1 = require("../common/relation"); +(0, component_1.VantComponent)({ + field: true, + relation: (0, relation_1.useParent)('radio-group', function () { + this.updateFromParent(); + }), + classes: ['icon-class', 'label-class'], + props: { + name: null, + value: null, + disabled: Boolean, + useIconSlot: Boolean, + checkedColor: String, + labelPosition: { + type: String, + value: 'right', + }, + labelDisabled: Boolean, + shape: { + type: String, + value: 'round', + }, + iconSize: { + type: null, + value: 20, + }, + }, + data: { + direction: '', + parentDisabled: false, + }, + methods: { + updateFromParent: function () { + if (!this.parent) { + return; + } + var _a = this.parent.data, value = _a.value, parentDisabled = _a.disabled, direction = _a.direction; + this.setData({ + value: value, + direction: direction, + parentDisabled: parentDisabled, + }); + }, + emitChange: function (value) { + var instance = this.parent || this; + instance.$emit('input', value); + instance.$emit('change', value); + if ((0, version_1.canIUseModel)()) { + instance.setData({ value: value }); + } + }, + onChange: function () { + if (!this.data.disabled && !this.data.parentDisabled) { + this.emitChange(this.data.name); + } + }, + onClickLabel: function () { + var _a = this.data, disabled = _a.disabled, parentDisabled = _a.parentDisabled, labelDisabled = _a.labelDisabled, name = _a.name; + if (!(disabled || parentDisabled) && !labelDisabled) { + this.emitChange(name); + } + }, + }, +}); diff --git a/gz-wxparty/components/vant/radio/index.json b/gz-wxparty/components/vant/radio/index.json new file mode 100644 index 0000000..0a336c0 --- /dev/null +++ b/gz-wxparty/components/vant/radio/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index" + } +} diff --git a/gz-wxparty/components/vant/radio/index.wxml b/gz-wxparty/components/vant/radio/index.wxml new file mode 100644 index 0000000..5f898c0 --- /dev/null +++ b/gz-wxparty/components/vant/radio/index.wxml @@ -0,0 +1,30 @@ +<wxs src="../wxs/utils.wxs" module="utils" /> +<wxs src="./index.wxs" module="computed" /> + +<view class="{{ utils.bem('radio', [direction]) }} custom-class"> + <view + wx:if="{{ labelPosition === 'left' }}" + class="{{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }} label-class" + bindtap="onClickLabel" + > + <slot /> + </view> + <view class="van-radio__icon-wrap" style="font-size: {{ utils.addUnit(iconSize) }}" bindtap="onChange"> + <slot wx:if="{{ useIconSlot }}" name="icon" /> + <van-icon + wx:else + name="success" + class="{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}" + style="{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}" + custom-class="icon-class" + custom-style="{{ computed.iconCustomStyle({ iconSize }) }}" + /> + </view> + <view + wx:if="{{ labelPosition === 'right' }}" + class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled: disabled || parentDisabled }]) }}" + bindtap="onClickLabel" + > + <slot /> + </view> +</view> diff --git a/gz-wxparty/components/vant/radio/index.wxs b/gz-wxparty/components/vant/radio/index.wxs new file mode 100644 index 0000000..a428aad --- /dev/null +++ b/gz-wxparty/components/vant/radio/index.wxs @@ -0,0 +1,33 @@ +/* eslint-disable */ +var style = require('../wxs/style.wxs'); +var addUnit = require('../wxs/add-unit.wxs'); + +function iconStyle(data) { + var styles = { + 'font-size': addUnit(data.iconSize), + }; + + if ( + data.checkedColor && + !(data.disabled || data.parentDisabled) && + data.value === data.name + ) { + styles['border-color'] = data.checkedColor; + styles['background-color'] = data.checkedColor; + } + + return style(styles); +} + +function iconCustomStyle(data) { + return style({ + 'line-height': addUnit(data.iconSize), + 'font-size': '.8em', + display: 'block', + }); +} + +module.exports = { + iconStyle: iconStyle, + iconCustomStyle: iconCustomStyle, +}; diff --git a/gz-wxparty/components/vant/radio/index.wxss b/gz-wxparty/components/vant/radio/index.wxss new file mode 100644 index 0000000..257b0c7 --- /dev/null +++ b/gz-wxparty/components/vant/radio/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.van-radio__icon-wrap{flex:none}.van-radio--horizontal{margin-right:var(--padding-sm,12px)}.van-radio__icon{align-items:center;border:1px solid var(--radio-border-color,#c8c9cc);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,20px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border-color,background-color;width:1em}.van-radio__icon--round{border-radius:100%}.van-radio__icon--checked{background-color:var(--radio-checked-icon-color,#1989fa);border-color:var(--radio-checked-icon-color,#1989fa);color:#fff}.van-radio__icon--disabled{background-color:var(--radio-disabled-background-color,#ebedf0);border-color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__icon--disabled.van-radio__icon--checked{color:var(--radio-disabled-icon-color,#c8c9cc)}.van-radio__label{word-wrap:break-word;color:var(--radio-label-color,#323233);line-height:var(--radio-size,20px);padding-left:var(--radio-label-margin,10px)}.van-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.van-radio__label--disabled{color:var(--radio-disabled-label-color,#c8c9cc)}.van-radio__label:empty{margin:0} \ No newline at end of file diff --git a/gz-wxparty/components/vant/rate/README.md b/gz-wxparty/components/vant/rate/README.md deleted file mode 100644 index 0195770..0000000 --- a/gz-wxparty/components/vant/rate/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# Rate 评分 - -### 介绍 - -用于对事物进行评级操作。 - -### 引入 - -在`app.json`或`index.json`中引入组件,详细介绍见[快速上手](#/quickstart#yin-ru-zu-jian)。 - -```json -"usingComponents": { - "van-rate": "@vant/weapp/rate/index" -} -``` - -## 代码演示 - -### 基础用法 - -```html -<van-rate value="{{ value }}" bind:change="onChange" /> -``` - -```javascript -Page({ - data: { - value: 3, - }, - - onChange(event) { - this.setData({ - value: event.detail, - }); - }, -}); -``` - -### 自定义图标 - -```html -<van-rate - value="{{ value }}" - icon="like" - void-icon="like-o" - bind:change="onChange" -/> -``` - -### 自定义样式 - -```html -<van-rate - value="{{ value }}" - size="{{ 25 }}" - color="#ffd21e" - void-icon="star" - void-color="#eee" - bind:change="onChange" -/> -``` - -### 半星 - -```html -<van-rate - value="{{ value }}" - allow-half - void-icon="star" - void-color="#eee" - bind:change="onChange" -/> -``` - -```javascript -Page({ - data: { - value: 2.5, - }, - - onChange(event) { - this.setData({ - value: event.detail, - }); - }, -}); -``` - -### 自定义数量 - -```html -<van-rate value="{{ value }}" count="{{ 6 }}" bind:change="onChange" /> -``` - -### 禁用状态 - -```html -<van-rate disabled value="{{ value }}" bind:change="onChange" /> -``` - -### 只读状态 - -```html -<van-rate readonly value="{{ value }}" bind:change="onChange" /> -``` - -### 监听 change 事件 - -评分变化时,会触发 `change` 事件。 - -```html -<van-rate value="{{ value }}" bind:change="onChange" /> -``` - -```javascript -Page({ - data: { - value: 2, - }, - - onChange(event) { - Toast('当前值:' + event.detail); - }, -}); -``` - -## API - -### Props - -| 参数 | 说明 | 类型 | 默认值 | -| --- | --- | --- | --- | -| name | 在表单内提交时的标识符 | _string_ | - | -| value | 当前分值 | _number_ | - | -| count | 图标总数 | _number_ | `5` | -| size | 图标大小,默认单位为 `px` | _string \| number_ | `20px` | -| gutter | 图标间距,默认单位为 `px` | _string \| number_ | `4px` | -| color | 选中时的颜色 | _string_ | `#ffd21e` | -| void-color | 未选中时的颜色 | _string_ | `#c7c7c7` | -| icon | 选中时的图标名称或图片链接,可选值见 [Icon 组件](#/icon) | _string_ | `star` | -| void-icon | 未选中时的图标名称或图片链接,可选值见 [Icon 组件](#/icon) | _string_ | `star-o` | -| allow-half | 是否允许半选 | _boolean_ | `false` | -| readonly | 是否为只读状态 | _boolean_ | `false` | -| disabled | 是否禁用评分 | _boolean_ | `false` | -| disabled-color | 禁用时的颜色 | _string_ | `#bdbdbd` | -| touchable | 是否可以通过滑动手势选择评分 | _boolean_ | `true` | - -### Events - -| 事件名称 | 说明 | 回调参数 | -| -------- | ------------------------ | --------------------- | -| bind:change | 当前分值变化时触发的事件 | event.detail:当前分值 | - -### 外部样式类 - -| 类名 | 说明 | -| ------------ | ------------ | -| custom-class | 根节点样式类 | -| icon-class | 图标样式类 | diff --git a/gz-wxparty/components/vant/rate/demo/index.json b/gz-wxparty/components/vant/rate/demo/index.json deleted file mode 100644 index 5e8b209..0000000 --- a/gz-wxparty/components/vant/rate/demo/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "van-rate": "../../rate/index", - "van-toast": "../../toast/index", - "demo-block": "../../../example/components/demo-block/index" - } -} diff --git a/gz-wxparty/components/vant/rate/demo/index.less b/gz-wxparty/components/vant/rate/demo/index.less deleted file mode 100644 index ef26581..0000000 --- a/gz-wxparty/components/vant/rate/demo/index.less +++ /dev/null @@ -1,3 +0,0 @@ -.rate-position { - margin-left: 15px; -} diff --git a/gz-wxparty/components/vant/rate/demo/index.ts b/gz-wxparty/components/vant/rate/demo/index.ts deleted file mode 100644 index 2630dde..0000000 --- a/gz-wxparty/components/vant/rate/demo/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { VantComponent } from '../../common/component'; -import Toast from '../../toast/toast'; - -VantComponent({ - data: { - value1: 3, - value2: 3, - value3: 3, - value4: 2.5, - value5: 4, - value6: 3, - value8: 2, - }, - - methods: { - onChange(event) { - Toast({ - context: this, - message: '当前值:' + event.detail, - }); - }, - }, -}); diff --git a/gz-wxparty/components/vant/rate/demo/index.wxml b/gz-wxparty/components/vant/rate/demo/index.wxml deleted file mode 100644 index 03a45ae..0000000 --- a/gz-wxparty/components/vant/rate/demo/index.wxml +++ /dev/null @@ -1,70 +0,0 @@ -<demo-block title="基础用法"> - <van-rate - custom-class="rate-position" - model:value="{{ value1 }}" - /> -</demo-block> - -<demo-block title="自定义图标"> - <van-rate - custom-class="rate-position" - icon="like" - void-icon="like-o" - model:value="{{ value2 }}" - /> -</demo-block> - -<demo-block title="自定义样式"> - <van-rate - custom-class="rate-position" - model:value="{{ value3 }}" - size="{{ 25 }}" - color="#ffd21e" - void-icon="star" - void-color="#eee" - /> -</demo-block> - -<demo-block title="半星"> - <van-rate - custom-class="rate-position" - model:value="{{ value4 }}" - allow-half - void-icon="star" - void-color="#eee" - /> -</demo-block> - -<demo-block title="自定义数量"> - <van-rate - custom-class="rate-position" - model:value="{{ value5 }}" - count="{{ 6 }}" - /> -</demo-block> - -<demo-block title="禁用状态"> - <van-rate - custom-class="rate-position" - value="{{ value6 }}" - disabled - /> -</demo-block> - -<demo-block title="只读状态"> - <van-rate - custom-class="rate-position" - value="{{ value6 }}" - readonly - /> -</demo-block> - -<demo-block title="监听 change 事件"> - <van-rate - custom-class="rate-position" - value="{{ value8 }}" - bind:change="onChange" - /> -</demo-block> - -<van-toast id="van-toast" /> diff --git a/gz-wxparty/components/vant/rate/index.js b/gz-wxparty/components/vant/rate/index.js index 23b7345..30a96de 100644 --- a/gz-wxparty/components/vant/rate/index.js +++ b/gz-wxparty/components/vant/rate/index.js @@ -1,13 +1,26 @@ -import { getAllRect } from '../common/utils'; -import { VantComponent } from '../common/component'; -import { canIUseModel } from '../common/version'; -VantComponent({ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var utils_1 = require("../common/utils"); +var component_1 = require("../common/component"); +var version_1 = require("../common/version"); +(0, component_1.VantComponent)({ field: true, classes: ['icon-class'], props: { value: { type: Number, - observer(value) { + observer: function (value) { if (value !== this.data.innerValue) { this.setData({ innerValue: value }); } @@ -31,7 +44,7 @@ count: { type: Number, value: 5, - observer(value) { + observer: function (value) { this.setData({ innerCountArray: Array.from({ length: value }) }); }, }, @@ -46,31 +59,33 @@ innerCountArray: Array.from({ length: 5 }), }, methods: { - onSelect(event) { - const { data } = this; - const { score } = event.currentTarget.dataset; + onSelect: function (event) { + var _this = this; + var data = this.data; + var score = event.currentTarget.dataset.score; if (!data.disabled && !data.readonly) { this.setData({ innerValue: score + 1 }); - if (canIUseModel()) { + if ((0, version_1.canIUseModel)()) { this.setData({ value: score + 1 }); } - wx.nextTick(() => { - this.$emit('input', score + 1); - this.$emit('change', score + 1); + wx.nextTick(function () { + _this.$emit('input', score + 1); + _this.$emit('change', score + 1); }); } }, - onTouchMove(event) { - const { touchable } = this.data; + onTouchMove: function (event) { + var _this = this; + var touchable = this.data.touchable; if (!touchable) return; - const { clientX } = event.touches[0]; - getAllRect(this, '.van-rate__icon').then((list) => { - const target = list - .sort((cur, next) => cur.dataset.score - next.dataset.score) - .find((item) => clientX >= item.left && clientX <= item.right); + var clientX = event.touches[0].clientX; + (0, utils_1.getAllRect)(this, '.van-rate__icon').then(function (list) { + var target = list + .sort(function (cur, next) { return cur.dataset.score - next.dataset.score; }) + .find(function (item) { return clientX >= item.left && clientX <= item.right; }); if (target != null) { - this.onSelect(Object.assign(Object.assign({}, event), { currentTarget: target })); + _this.onSelect(__assign(__assign({}, event), { currentTarget: target })); } }); }, diff --git a/gz-wxparty/components/vant/rate/index.less b/gz-wxparty/components/vant/rate/index.less deleted file mode 100644 index b537bcd..0000000 --- a/gz-wxparty/components/vant/rate/index.less +++ /dev/null @@ -1,39 +0,0 @@ -@import '../common/style/var.less'; - -.van-rate { - display: inline-flex; - user-select: none; - - &__item { - position: relative; - padding: 0 var(--rate-horizontal-padding, @rate-horizontal-padding); - - &:not(:last-child) { - padding-right: var(--rate-icon-gutter, @rate-icon-gutter); - } - } - - &__icon { - display: block; - height: 100%; - color: var(--rate-icon-void-color, @rate-icon-void-color); - font-size: var(--rate-icon-size, @rate-icon-size); - - &--half { - position: absolute; - top: 0; - width: 0.5em; - overflow: hidden; - left: var(--rate-horizontal-padding, @rate-horizontal-padding); - color: var(--rate-icon-full-color, @rate-icon-full-color); - } - - &--full { - color: var(--rate-icon-full-color, @rate-icon-full-color); - } - - &--disabled { - color: var(--rate-icon-disabled-color, @rate-icon-disabled-color); - } - } -} diff --git a/gz-wxparty/components/vant/rate/index.ts b/gz-wxparty/components/vant/rate/index.ts deleted file mode 100644 index 6a95c65..0000000 --- a/gz-wxparty/components/vant/rate/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { getAllRect } from '../common/utils'; -import { VantComponent } from '../common/component'; -import { canIUseModel } from '../common/version'; - -VantComponent({ - field: true, - - classes: ['icon-class'], - - props: { - value: { - type: Number, - observer(value: number) { - if (value !== this.data.innerValue) { - this.setData({ innerValue: value }); - } - }, - }, - readonly: Boolean, - disabled: Boolean, - allowHalf: Boolean, - size: null, - icon: { - type: String, - value: 'star', - }, - voidIcon: { - type: String, - value: 'star-o', - }, - color: String, - voidColor: String, - disabledColor: String, - count: { - type: Number, - value: 5, - observer(value: number) { - this.setData({ innerCountArray: Array.from({ length: value }) }); - }, - }, - gutter: null, - touchable: { - type: Boolean, - value: true, - }, - }, - - data: { - innerValue: 0, - innerCountArray: Array.from({ length: 5 }), - }, - - methods: { - onSelect(event: WechatMiniprogram.CustomEvent) { - const { data } = this; - const { score } = event.currentTarget.dataset; - if (!data.disabled && !data.readonly) { - this.setData({ innerValue: score + 1 }); - - if (canIUseModel()) { - this.setData({ value: score + 1 }); - } - - wx.nextTick(() => { - this.$emit('input', score + 1); - this.$emit('change', score + 1); - }); - } - }, - - onTouchMove(event: WechatMiniprogram.TouchEvent) { - const { touchable } = this.data; - if (!touchable) return; - - const { clientX } = event.touches[0]; - - getAllRect(this, '.van-rate__icon').then((list) => { - const target = list - .sort((cur, next) => cur.dataset.score - next.dataset.score) - .find((item) => clientX >= item.left && clientX <= item.right); - - if (target != null) { - this.onSelect({ - ...event, - currentTarget: (target as unknown) as WechatMiniprogram.Target, - }); - } - }); - }, - }, -}); diff --git a/gz-wxparty/components/vant/rate/index.wxss b/gz-wxparty/components/vant/rate/index.wxss index 470e4f4..e2a517e 100644 --- a/gz-wxparty/components/vant/rate/index.wxss +++ b/gz-wxparty/components/vant/rate/index.wxss @@ -1 +1 @@ -@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:100%}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)} \ No newline at end of file +@import '../common/index.wxss';.van-rate{display:inline-flex;-webkit-user-select:none;user-select:none}.van-rate__item{padding:0 var(--rate-horizontal-padding,2px);position:relative}.van-rate__item:not(:last-child){padding-right:var(--rate-icon-gutter,4px)}.van-rate__icon{color:var(--rate-icon-void-color,#c8c9cc);display:block;font-size:var(--rate-icon-size,20px);height:1em}.van-rate__icon--half{left:var(--rate-horizontal-padding,2px);overflow:hidden;position:absolute;top:0;width:.5em}.van-rate__icon--full,.van-rate__icon--half{color:var(--rate-icon-full-color,#ee0a24)}.van-rate__icon--disabled{color:var(--rate-icon-disabled-color,#c8c9cc)} \ No newline at end of file diff --git a/gz-wxparty/components/vant/rate/test/__snapshots__/demo.spec.ts.snap b/gz-wxparty/components/vant/rate/test/__snapshots__/demo.spec.ts.snap deleted file mode 100644 index 8a3e477..0000000 --- a/gz-wxparty/components/vant/rate/test/__snapshots__/demo.spec.ts.snap +++ /dev/null @@ -1,977 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should render demo and match snapshot 1`] = ` -<main> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 基础用法 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 自定义图标 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-like" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-like" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-like" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-like-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-like-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 自定义样式 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="font-size:25px" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#ffd21e" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="font-size:25px" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#ffd21e" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{2}}" - style="font-size:25px" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#ffd21e" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{3}}" - style="font-size:25px" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="font-size:25px" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 半星 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - <van-icon - class="van-rate__icon van-rate__icon--half van-rate__icon--full" - customClass="icon-class" - data-score="{{-0.5}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - <van-icon - class="van-rate__icon van-rate__icon--half van-rate__icon--full" - customClass="icon-class" - data-score="{{0.5}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - <van-icon - class="van-rate__icon van-rate__icon--half van-rate__icon--full" - customClass="icon-class" - data-score="{{1.5}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - <van-icon - class="van-rate__icon van-rate__icon--half" - customClass="icon-class" - data-score="{{2.5}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - <van-icon - class="van-rate__icon van-rate__icon--half" - customClass="icon-class" - data-score="{{3.5}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="color:#eee" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 自定义数量 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{5}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 禁用状态 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--disabled van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--disabled van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--disabled van-rate__icon--full" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--disabled" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--disabled" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 只读状态 - </wx-view> - <van-rate - customClass="rate-position" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <demo-block> - <wx-view - class="custom-class demo-block van-clearfix " - > - <wx-view - class="demo-block__title" - > - 监听 change 事件 - </wx-view> - <van-rate - customClass="rate-position" - bind:change="onChange" - > - <wx-view - class="van-rate custom-class" - bind:touchmove="onTouchMove" - > - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{0}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon van-rate__icon--full" - customClass="icon-class" - data-score="{{1}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{2}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{3}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - <wx-view - class="van-rate__item" - style="" - > - <van-icon - class="van-rate__icon" - customClass="icon-class" - data-score="{{4}}" - style="" - bind:click="onSelect" - > - <wx-view - class="custom-class van-icon van-icon-star-o" - style="" - bind:tap="onClick" - /> - </van-icon> - </wx-view> - </wx-view> - </van-rate> - </wx-view> - </demo-block> - <van-toast - id="van-toast" - > - <van-transition - customClass="van-toast__container" - /> - </van-toast> -</main> -`; diff --git a/gz-wxparty/components/vant/rate/test/demo.spec.ts b/gz-wxparty/components/vant/rate/test/demo.spec.ts deleted file mode 100644 index 4c3798c..0000000 --- a/gz-wxparty/components/vant/rate/test/demo.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import path from 'path'; -import simulate from 'miniprogram-simulate'; - -test('should render demo and match snapshot', () => { - const id = simulate.load(path.resolve(__dirname, '../demo/index'), { - rootPath: path.resolve(__dirname, '../../'), - }); - const comp = simulate.render(id); - comp.attach(document.createElement('parent-wrapper')); - expect(comp.toJSON()).toMatchSnapshot(); -}); diff --git a/gz-wxparty/components/vant/sidebar-item/index.d.ts b/gz-wxparty/components/vant/sidebar-item/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/sidebar-item/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/sidebar-item/index.js b/gz-wxparty/components/vant/sidebar-item/index.js new file mode 100644 index 0000000..eac568f --- /dev/null +++ b/gz-wxparty/components/vant/sidebar-item/index.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var relation_1 = require("../common/relation"); +(0, component_1.VantComponent)({ + classes: ['active-class', 'disabled-class'], + relation: (0, relation_1.useParent)('sidebar'), + props: { + dot: Boolean, + badge: null, + info: null, + title: String, + disabled: Boolean, + }, + methods: { + onClick: function () { + var _this = this; + var parent = this.parent; + if (!parent || this.data.disabled) { + return; + } + var index = parent.children.indexOf(this); + parent.setActive(index).then(function () { + _this.$emit('click', index); + parent.$emit('change', index); + }); + }, + setActive: function (selected) { + return this.setData({ selected: selected }); + }, + }, +}); diff --git a/gz-wxparty/components/vant/sidebar-item/index.json b/gz-wxparty/components/vant/sidebar-item/index.json new file mode 100644 index 0000000..bf0ebe0 --- /dev/null +++ b/gz-wxparty/components/vant/sidebar-item/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/gz-wxparty/components/vant/sidebar-item/index.wxml b/gz-wxparty/components/vant/sidebar-item/index.wxml new file mode 100644 index 0000000..c5c08a6 --- /dev/null +++ b/gz-wxparty/components/vant/sidebar-item/index.wxml @@ -0,0 +1,18 @@ +<wxs src="../wxs/utils.wxs" module="utils" /> + +<view + class="{{ utils.bem('sidebar-item', { selected, disabled }) }} {{ selected ? 'active-class' : '' }} {{ disabled ? 'disabled-class' : '' }} custom-class" + hover-class="van-sidebar-item--hover" + hover-stay-time="70" + bind:tap="onClick" +> + <view class="van-sidebar-item__text"> + <van-info + wx:if="{{ badge != null || info !== null || dot }}" + dot="{{ dot }}" + info="{{ badge != null ? badge : info }}" + /> + <view wx:if="{{ title }}">{{ title }}</view> + <slot wx:else name="title" /> + </view> +</view> diff --git a/gz-wxparty/components/vant/sidebar-item/index.wxss b/gz-wxparty/components/vant/sidebar-item/index.wxss new file mode 100644 index 0000000..f1ce421 --- /dev/null +++ b/gz-wxparty/components/vant/sidebar-item/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-sidebar-item{background-color:var(--sidebar-background-color,#f7f8fa);border-left:3px solid transparent;box-sizing:border-box;color:var(--sidebar-text-color,#323233);display:block;font-size:var(--sidebar-font-size,14px);line-height:var(--sidebar-line-height,20px);overflow:hidden;padding:var(--sidebar-padding,20px 12px 20px 8px);-webkit-user-select:none;user-select:none}.van-sidebar-item__text{display:inline-block;position:relative;word-break:break-all}.van-sidebar-item--hover:not(.van-sidebar-item--disabled){background-color:var(--sidebar-active-color,#f2f3f5)}.van-sidebar-item:after{border-bottom-width:1px}.van-sidebar-item--selected{border-color:var(--sidebar-selected-border-color,#ee0a24);color:var(--sidebar-selected-text-color,#323233);font-weight:var(--sidebar-selected-font-weight,500)}.van-sidebar-item--selected:after{border-right-width:1px}.van-sidebar-item--selected,.van-sidebar-item--selected.van-sidebar-item--hover{background-color:var(--sidebar-selected-background-color,#fff)}.van-sidebar-item--disabled{color:var(--sidebar-disabled-text-color,#c8c9cc)} \ No newline at end of file diff --git a/gz-wxparty/components/vant/sidebar/index.d.ts b/gz-wxparty/components/vant/sidebar/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/gz-wxparty/components/vant/sidebar/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/gz-wxparty/components/vant/sidebar/index.js b/gz-wxparty/components/vant/sidebar/index.js new file mode 100644 index 0000000..f3e0a58 --- /dev/null +++ b/gz-wxparty/components/vant/sidebar/index.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var component_1 = require("../common/component"); +var relation_1 = require("../common/relation"); +(0, component_1.VantComponent)({ + relation: (0, relation_1.useChildren)('sidebar-item', function () { + this.setActive(this.data.activeKey); + }), + props: { + activeKey: { + type: Number, + value: 0, + observer: 'setActive', + }, + }, + beforeCreate: function () { + this.currentActive = -1; + }, + methods: { + setActive: function (activeKey) { + var _a = this, children = _a.children, currentActive = _a.currentActive; + if (!children.length) { + return Promise.resolve(); + } + this.currentActive = activeKey; + var stack = []; + if (currentActive !== activeKey && children[currentActive]) { + stack.push(children[currentActive].setActive(false)); + } + if (children[activeKey]) { + stack.push(children[activeKey].setActive(true)); + } + return Promise.all(stack); + }, + }, +}); diff --git a/gz-wxparty/components/vant/sidebar/index.json b/gz-wxparty/components/vant/sidebar/index.json new file mode 100644 index 0000000..467ce29 --- /dev/null +++ b/gz-wxparty/components/vant/sidebar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/gz-wxparty/components/vant/sidebar/index.wxml b/gz-wxparty/components/vant/sidebar/index.wxml new file mode 100644 index 0000000..96b11c7 --- /dev/null +++ b/gz-wxparty/components/vant/sidebar/index.wxml @@ -0,0 +1,3 @@ +<view class="van-sidebar custom-class"> + <slot /> +</view> diff --git a/gz-wxparty/components/vant/sidebar/index.wxss b/gz-wxparty/components/vant/sidebar/index.wxss new file mode 100644 index 0000000..5a2d44f --- /dev/null +++ b/gz-wxparty/components/vant/sidebar/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-sidebar{width:var(--sidebar-width,80px)} \ No newline at end of file diff --git a/gz-wxparty/font/DingTalk_JinBuTi_Regular.ttf b/gz-wxparty/font/DingTalk_JinBuTi_Regular.ttf new file mode 100644 index 0000000..c4efa55 --- /dev/null +++ b/gz-wxparty/font/DingTalk_JinBuTi_Regular.ttf Binary files differ diff --git a/gz-wxparty/images/avatar.png b/gz-wxparty/images/avatar.png new file mode 100644 index 0000000..90673f1 --- /dev/null +++ b/gz-wxparty/images/avatar.png Binary files differ diff --git a/gz-wxparty/images/me_1.png b/gz-wxparty/images/me_1.png new file mode 100644 index 0000000..49bc1a1 --- /dev/null +++ b/gz-wxparty/images/me_1.png Binary files differ diff --git a/gz-wxparty/images/me_2.png b/gz-wxparty/images/me_2.png new file mode 100644 index 0000000..a4ca297 --- /dev/null +++ b/gz-wxparty/images/me_2.png Binary files differ diff --git a/gz-wxparty/images/me_3.png b/gz-wxparty/images/me_3.png new file mode 100644 index 0000000..8162a9f --- /dev/null +++ b/gz-wxparty/images/me_3.png Binary files differ diff --git a/gz-wxparty/img/me-center.png b/gz-wxparty/img/me-center.png new file mode 100644 index 0000000..03bbb9c --- /dev/null +++ b/gz-wxparty/img/me-center.png Binary files differ diff --git a/gz-wxparty/img/right.png b/gz-wxparty/img/right.png new file mode 100644 index 0000000..8add306 --- /dev/null +++ b/gz-wxparty/img/right.png Binary files differ diff --git a/gz-wxparty/pages/addAddress/index.js b/gz-wxparty/pages/addAddress/index.js new file mode 100644 index 0000000..4116e15 --- /dev/null +++ b/gz-wxparty/pages/addAddress/index.js @@ -0,0 +1,66 @@ +// pages/addAddress/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/gz-wxparty/pages/addAddress/index.json b/gz-wxparty/pages/addAddress/index.json new file mode 100644 index 0000000..ef3eb97 --- /dev/null +++ b/gz-wxparty/pages/addAddress/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "选择纠纷发生地", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/addAddress/index.wxml b/gz-wxparty/pages/addAddress/index.wxml new file mode 100644 index 0000000..ed7cdbf --- /dev/null +++ b/gz-wxparty/pages/addAddress/index.wxml @@ -0,0 +1,2 @@ +<!--pages/addAddress/index.wxml--> +<text>pages/addAddress/index.wxml</text> diff --git a/gz-wxparty/pages/addAddress/index.wxss b/gz-wxparty/pages/addAddress/index.wxss new file mode 100644 index 0000000..221957e --- /dev/null +++ b/gz-wxparty/pages/addAddress/index.wxss @@ -0,0 +1 @@ +/* pages/addAddress/index.wxss */ \ No newline at end of file diff --git a/gz-wxparty/pages/addPerson/index.js b/gz-wxparty/pages/addPerson/index.js new file mode 100644 index 0000000..558a8df --- /dev/null +++ b/gz-wxparty/pages/addPerson/index.js @@ -0,0 +1,309 @@ +// pages/addPerson/index.js +const $$ = require('../../utils/util'); +const app = getApp(); +import Toast from '../../components/vant/toast/toast'; +Page({ + + /** + * 页面的初始数据 + */ + select: {}, // 下拉框数据 + data: { + imgUrl: $$.url.img, + popup: { + formtype: '', + index: 0, + }, + personTypes: [{ + title: '自然人', + imgUrl: $$.url.img + 'person-types_1.png', + imgUrlActive: $$.url.img + 'person-types_1_active.png', + }, { + title: '法人', + imgUrl: $$.url.img + 'person-types_2.png', + imgUrlActive: $$.url.img + 'person-types_2_active.png', + }, { + title: '非法人组织', + imgUrl: $$.url.img + 'person-types_3.png', + imgUrlActive: $$.url.img + 'person-types_3_active.png', + }], + personTypesActive: 0, // 人员类型切换 + perType: '', + formData: { + trueName: '', + mobile: '', + certiType: '', + certiTypeName: '', + certiNo: '', + addr: '', + placeAddr: '', + workUnit: '', + nation: '', + nationName: '', + sex: '09_00003-1', + sexName: '男', + }, //表单存储对象 + }, + + // 保存 + handleNext(e) { + let personTypesActive = this.data.personTypesActive; + let data = { + ...this.data.formData, + perType: this.data.perType, + perTypeName: this.data.perTypeName, + perClass: personTypesActive === 0 ? '09_01001-1' : personTypesActive === 1 ? '09_01001-2' : personTypesActive === 2 ? '09_01001-3' : "", + perClassName: personTypesActive === 0 ? '自然人' : personTypesActive === 1 ? '法人' : personTypesActive === 2 ? '非法人组织' : "", + } + console.log('data', data); + // 获取当前页面栈 + var pages = getCurrentPages(); + + // 上一个页面 + var prevPage = pages[pages.length - 2]; + // 直接设置数据对象到上一页面的data中 + prevPage.setData({ + oneData: data, + editIndex: this.data.editIndex || false, + }); + + wx.navigateBack({ + delta: 1, + }) + + }, + + // 选择法人或非法人组织 + selectUnit(e) { + let type = e.currentTarget.dataset.type; + // 法人信息 + if (key === 'person') { + + } + }, + + // 获取手机号码 + async _handleGetPhoneNumber(e) { + let that = this; + let phone = await that.selectComponent('#common-page').handleGetPhoneNumber(e.detail.code); + that.data.formData.mobile = phone; + that.setData({ + formData: that.data.formData + }); + }, + + // 身份证ocr + handleOCR(e) { + let that = this; + wx.chooseMedia({ + count: 1, + mediaType: ['image'], + success(res2) { + const tempFiles = res2.tempFiles[0]; + $$.showLoading(); + wx.uploadFile({ + url: `${$$.baseUrl}${$$.url.sys}/api/wechat/fileInfo/wecatRecognition`, + filePath: tempFiles.tempFilePath, + name: 'file', + header: { + Authorization: app.globalData.token + }, + complete(res3) { + $$.hideLoading(); + if (res3.errMsg === 'uploadFile:ok') { + let { + code, + data + } = JSON.parse(res3.data); + if (code == -1) { + $$.errorModal({ + content: '识别失败' + }); + return; + } + that.data.formData.certiNo = data?.ocrResult.certiNo; + that.data.formData.certiType = data?.ocrResult.certiType; + that.data.formData.certiTypeName = data?.ocrResult.certiTypeName; + that.data.formData.trueName = data?.ocrResult.trueName; + that.data.formData.placeAddr = data?.ocrResult.placeAddr; + that.data.formData.sex = data?.ocrResult.sex; + that.data.formData.sexName = data?.ocrResult.sexName; + that.data.formData.nation = data?.ocrResult.nation; + that.data.formData.nationName = data?.ocrResult.nationName; + that.setData({ + formData: that.data.formData + }); + } + }, + }); + }, + }); + }, + + // 表单修改 + handleChange(e) { + let key = e.currentTarget.dataset.key, + value = e.detail; + if (key === 'sex') { + this.data.formData[key] = value; + this.data.formData[key + 'Name'] = value === '09_00003-2' ? '女' : value === '09_00003-1' ? '男' : ''; + } else { + this.data.formData[key] = value; + } + this.setData({ + formData: this.data.formData + }); + }, + + + // 人员类型切换 + _handleSelectData(e) { + let index = e.currentTarget.dataset.index; + this.setData({ + personTypesActive: index + }) + }, + + // 下拉框选择开启 + handleShowPopup(e) { + let type = e.currentTarget.dataset.type; + let selectData = []; + let selectOption = this.select[type]; + selectData = [{ + values: selectOption, + defaultIndex: 0 + }]; + this.setData({ + popup: { + formtype: e.currentTarget.dataset.key, + index: e.currentTarget.dataset.index, + visible: true, + title: e.currentTarget.dataset.title, + type: type, + selectData: selectData, + }, + }); + }, + + // 关闭下拉框选择 + handleClosePopup() { + this.data.popup.visible = false; + this.setData({ + popup: this.data.popup + }); + }, + + // 下拉框选择确认 + handleConfirmPicker({ + detail + }) { + let formtype = this.data.popup.formtype; + let value = detail.detail.value, + arr = []; + this.data.popup.visible = false; + console.log('value', value[0].value); + console.log('formtype', formtype); + this.data.formData[formtype] = value[0].value; + this.data.formData[formtype + 'Name'] = value[0].label; + this.setData({ + popup: this.data.popup, + formData: this.data.formData + }); + }, + + // 请求下拉框资源 + async getSelectOptionData() { + const res = await $$.commonRequest({ + url: `${$$.url.assets}selectOption.json`, + type: 'get' + }); + if (res) { + this.select.cardType = res.data.cardType || []; + this.select.nation = res.data.nation || []; + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + perType, + perTypeName, + data, + index + } = options; + if (data) { + data = JSON.parse(data); + console.log('data', data); + wx.setNavigationBarTitle({ + title: "修改" + data.perTypeName + }) + this.setData({ + editIndex: index, + formData: data, + perType: data.perType, + perTypeName: data.perTypeName, + personTypesActive: data.perClass === '09_01001-1' ? 0 : data.perClass === '09_01001-2' ? 1 : data.perClass === '09_01001-3' ? 2 : 0, + }) + } else { + wx.setNavigationBarTitle({ + title: "添加" + perTypeName + }) + this.setData({ + perType, + perTypeName + }) + } + this.getSelectOptionData(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/gz-wxparty/pages/addPerson/index.json b/gz-wxparty/pages/addPerson/index.json new file mode 100644 index 0000000..5010db8 --- /dev/null +++ b/gz-wxparty/pages/addPerson/index.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "", + "usingComponents": { + } +} \ No newline at end of file diff --git a/gz-wxparty/pages/addPerson/index.wxml b/gz-wxparty/pages/addPerson/index.wxml new file mode 100644 index 0000000..f77d356 --- /dev/null +++ b/gz-wxparty/pages/addPerson/index.wxml @@ -0,0 +1,133 @@ +<!--pages/addPerson/index.wxml--> + +<common-page id="common-page" bind:onCancelPicker="handleClosePopup" bind:onChangePicker="handleChangeColumns" bind:onClosePopup="handleClosePopup" bind:onConfirmPicker="handleConfirmPicker" popup="{{ popup }}"> + <view class="addPerson-main"> + <!-- 人员类型切换 --> + <view class="person-type-select"> + <view class="person-type-select-person">人员类型</view> + <view class="personTypes"> + <view bindtap="_handleSelectData" data-index="{{index}}" class="personTypes-item {{ index === personTypesActive && 'personTypes-item-active' }}" wx:for="{{ personTypes }}" wx:key="index"> + <view class="personTypes-item-round" wx:if="{{ index === personTypesActive }}"> + <image src="{{item.imgUrlActive}}" mode="" /> + </view> + <view class="personTypes-item-round" wx:else> + <image src="{{item.imgUrl}}" mode="" /> + </view> + <view class="personTypes-item-text">{{ item.title }}</view> + <view wx:if="{{ index === personTypesActive }}" class="personTypes-item-sueecss"> + <van-icon size="20" name="checked" /> + </view> + </view> + </view> + </view> + <!-- 表单-自然人 --> + <view wx:if="{{personTypesActive===0}}" class="popupMsg-form"> + <view class="cell-item"> + <view class="cell-title"> + <text><text class="cell-required">*</text> 姓名</text> + <view bindtap="handleOCR" class="cell-idCard"> + <image src="{{imgUrl}}card.png" mode="" /> 身份证识别 + </view> + </view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="trueName" input-align="right" placeholder="请输入" value="{{ formData.trueName || '' }}" /> + </view> + </view> + <view class="cell-item"> + <view class="cell-title"> + <text><text class="cell-required">*</text> 联系方式</text> + <van-button open-type="getPhoneNumber" bindgetphonenumber="_handleGetPhoneNumber" style="font-weight: 400;" class="cell-phone">本机号码</van-button> + </view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="mobile" input-align="right" placeholder="请填写手机号码" value="{{ formData.mobile || '' }}" /> + </view> + </view> + <view bindtap="handleShowPopup" class="cell cell-item" data-title="证件类型" data-key="certiType" data-type="cardType"> + <view class="cell-title"><text><text class="cell-required">*</text> 证件类型</text></view> + <view class="{{ !formData.certiTypeName ? 'cell-placeholder' : '' }} cell-select">{{ formData.certiTypeName ? formData.certiTypeName : '未选择' }}</view> + <view class="cell-arrow"> + <van-icon name="arrow" /> + </view> + </view> + <view class="cell-item"> + <view class="cell-title"> + <text><text class="cell-required">*</text> 证件号码</text> + </view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="certiNo" input-align="right" placeholder="请填写完整证件号码" value="{{ formData.certiNo || '' }}" /> + </view> + </view> + <view style="height: 16rpx;"></view> + <view class="cell-item"> + <view class="cell-title1">联系地址</view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="addr" input-align="right" placeholder="请填写详细地址" value="{{ formData.addr || '' }}" /> + </view> + </view> + <view class="cell-item"> + <view class="cell-title1">户籍地址</view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="placeAddr" input-align="right" placeholder="请填写户籍地址" value="{{ formData.placeAddr || '' }}" /> + </view> + </view> + <view class="cell-item"> + <view class="cell-title1">工作单位</view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="workUnit" input-align="right" placeholder="请填写单位全名" value="{{ formData.workUnit || '' }}" /> + </view> + </view> + + <view bindtap="handleShowPopup" class="cell cell-item" data-title="民族" data-key="nation" data-type="nation"> + <view class="cell-title1">民族</view> + <view class="{{ !formData.nationName ? 'cell-placeholder' : '' }} cell-select">{{ formData.nationName ? formData.nationName : '未选择' }}</view> + <view class="cell-arrow"> + <van-icon name="arrow" /> + </view> + </view> + <view class="cell cell-item"> + <view style="flex:1" class="cell-title1">性别</view> + <view class="cell-radio"> + <van-radio-group bind:change="handleChange" data-key="sex" value="{{ formData.sex }}"> + <view class="cell-radio"> + <view> + <van-radio name="09_00003-2">女</van-radio> + </view> + <view> + <van-radio name="09_00003-1">男</van-radio> + </view> + </view> + </van-radio-group> + </view> + </view> + </view> + <!-- 法人 --> + <view wx:if="{{personTypesActive===1}}" class="popupMsg-form"> + <view bindtap="selectUnit" data-type="person" class="cell cell-item" data-title="企业信息"> + <view class="cell-title"><text><text class="cell-required">*</text> 企业信息</text></view> + <view class="{{ !formData.certiTypeName ? 'cell-placeholder' : '' }} cell-select">{{ formData.certiTypeName ? formData.certiTypeName : '选择' }}</view> + <view class="cell-arrow"> + <van-icon name="arrow" /> + </view> + </view> + </view> + <!-- 非法人组织 --> + <view wx:if="{{personTypesActive===2}}" class="popupMsg-form"> + <view bindtap="selectUnit" data-type="units" class="cell cell-item" data-title="机构信息"> + <view class="cell-title"><text><text class="cell-required">*</text> 机构信息</text></view> + <view class="{{ !formData.certiTypeName ? 'cell-placeholder' : '' }} cell-select">{{ formData.certiTypeName ? formData.certiTypeName : '选择' }}</view> + <view class="cell-arrow"> + <van-icon name="arrow" /> + </view> + </view> + </view> + <!-- 保存 --> + <view class="submitButton" catch:tap=""> + <view style="flex: 1;"> + <van-button bind:click="handleNext" block data-type="next" type="primary">保存</van-button> + <view class="safeHeight" /> + </view> + </view> + </view> + + +</common-page> \ No newline at end of file diff --git a/gz-wxparty/pages/addPerson/index.wxss b/gz-wxparty/pages/addPerson/index.wxss new file mode 100644 index 0000000..dddfd18 --- /dev/null +++ b/gz-wxparty/pages/addPerson/index.wxss @@ -0,0 +1,163 @@ +/* pages/addPerson/index.wxss */ +@import '../../styles/public_components.wxss'; + +.submitButton { + position: fixed; + bottom: 0; + left: 0; + right: 0; + display: flex; + padding: 32rpx var(--padding-my); + background-color: #fff; + z-index: 99; +} + +.cell-item { + padding: 24rpx 32rpx 24rpx 12rpx; + background-color: #fff; +} + +.cell-item-select {} + +.cell-idCard { + color: var(--main-color); + display: flex; + align-items: center; + font-weight: 400; +} + +.cell-phone .van-button { + color: var(--main-color); + border: none !important; + padding: 0 !important; +} + +.cell-idCard image { + width: 34rpx; + height: 32rpx; + margin-right: 8rpx; +} + +.cell-title { + margin-bottom: 8rpx; + display: flex; + justify-content: space-between; +} + +.cell-radio { + display: flex; + gap: 27rpx; +} + +.cell-title1 { + font-weight: 600; + font-size: 30rpx; + line-height: 46rpx; + padding-left: 20rpx; +} + +.cell-select { + padding: 0 20rpx; +} + +.cell-required { + color: #d1021c; + font-size: 30rpx; +} + +.cell-item .van-field__control--right { + text-align: left +} + +.popupMsg-form { + margin-top: 16rpx; + flex: 1; + margin-bottom: 162rpx; +} + +.person-type-select { + background-color: #fff; + +} + +.person-type-select-person { + padding: 24rpx 32rpx 16rpx; +} + +/* components/personTypes/index.wxss */ +.personTypes { + display: flex; + align-items: center; + background-color: #ffffff; + gap: 32rpx; + padding: 0 32rpx 32rpx; +} + +.personTypes-item { + position: relative; + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + color: rgba(23, 26, 29, 0.40); + border: 1px solid #E5E6EB; + border-radius: 12rpx; + padding: 18rpx 0 10rpx; + position: relative; +} + +.personTypes-item-active, +.personTypes-item-active .personTypes-item-icon { + color: var(--main-color); + border: 1px solid #1a6fb8; +} + + + +.personTypes-item-line {} + +.personTypes-item-hoverLine { + width: 168rpx; + border: 1px solid var(--main-color); +} + +.personTypes-item-line { + width: 168rpx; + border: 1px solid #E5E6EB; +} + +.personTypes-item-active .personTypes-item-number1 { + background-color: var(--main-color); + color: var(--white); +} + +.personTypes-item-round { + position: relative; + width: 60rpx; + height: 60rpx; + color: #86909C; + margin-bottom: 8rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.personTypes-item-round image { + width: 100%; + height: 100%; +} + +.personTypes-item-sueecss { + position: absolute; + right: 10rpx; + top: 10rpx; +} + +.personTypes-item-icon { + position: absolute; + z-index: 889; + top: 50%; + margin-top: -24rpx; + right: -88rpx; + color: #cccccc; +} \ No newline at end of file diff --git a/gz-wxparty/pages/caseType/index.js b/gz-wxparty/pages/caseType/index.js new file mode 100644 index 0000000..a8af22c --- /dev/null +++ b/gz-wxparty/pages/caseType/index.js @@ -0,0 +1,86 @@ +// pages/caseType/index.js +const $$ = require('../../utils/util'); +const app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + imgUrl: $$.url.img, + typeList: [ + [{ + title: '邻里纠纷', + value: '24_000011-1', + imgUrl: 'caseType-1-1.png' + }, { + title: '拖欠、克扣工资', + value: '24_000011-3', + imgUrl: 'caseType-1-5.png' + }, { + title: '门诊及住院待遇', + value: '24_000011-4', + imgUrl: 'caseType-1-10.png' + }, { + title: '公共设施', + imgUrl: 'caseType-1-4.png' + }, { + title: '施工问题', + imgUrl: 'caseType-1-2.png' + }, { + title: '违章建筑', + imgUrl: 'caseType-1-6.png' + }, { + title: '港澳青年来穗服务', + imgUrl: 'caseType-1-7.png' + }, { + title: '乱摆卖、垃圾清理...', + imgUrl: 'caseType-1-8.png' + }, { + title: '噪声、气味、污水...', + imgUrl: 'caseType-1-9.png' + }, { + title: '车辆乱停放', + imgUrl: 'caseType-1-14.png' + }, { + title: '出租车、公交车站...', + imgUrl: 'caseType-1-11.png' + }, { + title: '电动车违规问题', + imgUrl: 'caseType-1-12.png' + }, { + title: '教培机构投诉', + imgUrl: 'caseType-1-13.png' + }, { + title: '物业/业委会管理', + imgUrl: 'caseType-1-3.png' + }] + ], + activeKey: '0' + }, + + + onClick(e) { + let item = e.currentTarget.dataset.item; + console.log(item); + // 获取当前页面栈 + var pages = getCurrentPages(); + // 上一个页面 + var prevPage = pages[pages.length - 2]; + // 直接设置数据对象到上一页面的data中 + prevPage.setData({ + twoData: item + }); + wx.navigateBack({ + delta: 1, + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, +}) \ No newline at end of file diff --git a/gz-wxparty/pages/caseType/index.json b/gz-wxparty/pages/caseType/index.json new file mode 100644 index 0000000..83d44e0 --- /dev/null +++ b/gz-wxparty/pages/caseType/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "选择纠纷类型", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/caseType/index.wxml b/gz-wxparty/pages/caseType/index.wxml new file mode 100644 index 0000000..314c7f1 --- /dev/null +++ b/gz-wxparty/pages/caseType/index.wxml @@ -0,0 +1,49 @@ +<!--pages/caseType/index.wxml--> +<view class="ssimList"> + <!-- 搜索 --> + <view class="card"> + <view class="cell"> + <view class="cell-right"> + <view style="display: flex;gap:20rpx"> + <van-icon name="search" /> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0;background-color:#f2f3f5" data-key="keyword" placeholder="输入关键词查找纠纷类型" value="{{ search.keyword }}" /> + </view> + <view style="display: flex;"> + <view style="color:#E5E6EB;margin-right: 16rpx;">|</view> + <view bindtap="searchButton" class="public-color">查询</view> + </view> + </view> + </view> + </view> + + <!-- 主体 --> + <view class='caseType-main'> + <view class="sidebar"> + <van-sidebar active-key="{{ activeKey }}"> + <van-sidebar-item title="热点事项" /> + <van-sidebar-item title="市场监管" /> + <van-sidebar-item title="劳动社保" /> + <van-sidebar-item title="城市管理" /> + <van-sidebar-item title="交通运输" /> + <van-sidebar-item title="教育医疗" /> + <van-sidebar-item title="公共服务" /> + <van-sidebar-item title="房屋规划" /> + </van-sidebar> + </view> + <view class="grid"> + <van-grid border="{{ false }}" column-num="3"> + <van-grid-item bind:click='onClick' data-item="{{item}}" use-slot wx:for="{{typeList[activeKey] }}" wx:for-item="item"> + <view class="grid-flex"> + <view class="grid-img"> + <image src="{{imgUrl}}{{item.imgUrl}}" mode="" /> + </view> + <view class="grid-title"> + {{item.title}} + </view> + </view> + </van-grid-item> + </van-grid> + </view> + + </view> +</view> \ No newline at end of file diff --git a/gz-wxparty/pages/caseType/index.wxss b/gz-wxparty/pages/caseType/index.wxss new file mode 100644 index 0000000..6a98199 --- /dev/null +++ b/gz-wxparty/pages/caseType/index.wxss @@ -0,0 +1,131 @@ +/* pages/caseType/index.wxss */ + + +.cell-left { + display: flex; + width: 28%; + justify-content: space-between; + align-items: center; + background: #f2f3f5; + padding: 12rpx 16rpx; + border-radius: 10rpx; +} + +.cell-left-l { + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: var(--font-size-md, 14px); +} + +.cell-right { + flex: 1; + display: flex; + justify-content: space-between; + align-items: center; + background: #f2f3f5; + padding: 12rpx 16rpx; + border-radius: 10rpx; + font-size: var(--font-size-md, 14px); +} + +.card-box { + padding: 24rpx 24rpx 0 24rpx; +} + +.card { + border-radius: 2px; + background-color: #ffffff; + padding: 24rpx; +} + +.card-list { + border-radius: 2px; + background-color: #fff; + padding: 24rpx +} + +.ssim-scroll { + flex: 1; + overflow: hidden; +} + +.card-title { + font-size: 30rpx; + line-height: 46rpx; +} + +.card-subTitle { + padding-top: 8rpx; +} + +.card-subTitle-l { + color: rgba(23, 26, 29, 0.60); +} + +.ssimList { + height: 100%; + display: flex; + flex-direction: column; + position: absolute; + left: 0; + right: 0; +} + +.sidebar { + background: #f2f2f2; +} + +.sidebar .van-sidebar { + width: 216rpx; +} + +.sidebar .van-sidebar-item--selected { + border-color: var(--main-color); + border-width: 8rpx; +} + +.sidebar .van-sidebar-item--selected { + background-color: #fff !important; +} + +.grid { + background-color: #fff; + width: 100%; +} + +.grid-flex { + display: flex; + flex-direction: column; + align-items: center; +} + +.grid-img { + width: 128rpx; + height: 128rpx; + background-color: #eff8ff; + display: flex; + justify-content: center; + align-items: center; +} + +.grid-img image { + width: 64rpx; + height: 64rpx; +} + +.grid-title { + font-size: 28rpx; + line-height: 44rpx; + text-align: center; +} + +.caseType-main { + display: flex; + flex: 1; +} + +.caseType-main .van-sidebar-item { + background-color: #f2f2f2; +} \ No newline at end of file diff --git a/gz-wxparty/pages/homePage/index.js b/gz-wxparty/pages/homePage/index.js index 136872b..6dabba8 100644 --- a/gz-wxparty/pages/homePage/index.js +++ b/gz-wxparty/pages/homePage/index.js @@ -2,733 +2,412 @@ const $$ = require('../../utils/util'); const app = getApp(); -// 热门资讯 与 视频 +// 咨询动态 function getVideoAndMessageApi(param) { - return $$.request({ - url: 'paHotNews/listShow', - type: 'get', - submitData: param || {}, - service: 'sys', - noToken: true - }); + return $$.request({ + url: 'paHotNews/listShow', + type: 'get', + submitData: param || {}, + service: 'sys', + noToken: true + }); } // 调解资源 function getResourseApi(param) { - return $$.request({ - url: 'paCaseInfo/mediatePower', - type: 'get', - submitData: param || {}, - service: 'mediate', - noToken: true - }); -} - -// 消息提醒 -function getPopupMsgApi() { - return $$.request({ - url: 'paCaseInfo/newsRemind', - type: 'get', - service: 'mediate' - }); + return $$.request({ + url: 'ctUnit/countUnit', + type: 'get', + submitData: param || {}, + service: 'cust' + }); } function loginApi(submitData) { - return $$.request({ - url: 'paAccount/tryRegister', - type: 'post', - submitData, - service: 'cust', - noToken: true - }); + return $$.request({ + url: 'paAccount/tryRegister', + type: 'post', + submitData, + service: 'cust', + noToken: true + }); } function registerApi(submitData) { - return $$.request({ url: 'paAccount/empower', type: 'post', submitData, service: 'cust', noToken: true }); + return $$.request({ + url: 'paAccount/empower', + type: 'post', + submitData, + service: 'cust', + noToken: true + }); } Page({ - /** - * 页面的初始数据 - */ - msgCheckId: null, // 已经阅读过的提示不在弹出 - data: { - visible: true, - imgUrl: $$.url.img, - agreementMsg: '', // 服务协议 - popupVisible: false, - banner: [`${$$.url.img}banner-1.png`, `${$$.url.img}banner-2.jpg`, `${$$.url.img}banner-3.jpg`], // 轮播图 - resources: [{ - icon: `${$$.url.img}case.png`, - num: '0', - unit: '件', - title: '累计调解案件', - color: '#EB4D55', - type: 'case', - }, - { - icon: `${$$.url.img}mediater.png`, - num: '0', - unit: '名', - title: '注册调解员', - color: '#D10269', - type: 'mediater', - }, - { - icon: `${$$.url.img}organizations.png`, - num: '0', - unit: '家', - title: '入驻调解组织', - color: '#02D1D1', - type: 'organization', - }, - ], // 调解资源 - video: [], // 热门视频 - videoMore: false, - newMessage: [], // 最新资讯 - newMessageMore: false, - message: [{}], // 消息通知 - // 底部弹窗消息 - popupMsg: [{ - show: false, - type: 1, // 1:实名认证提醒,2:调解中提醒,3:预约提醒,4:司法确认中提醒 - title: '', - subTitle: '', - content: [], - buttonText: '', - }, ], - }, + /** + * 页面的初始数据 + */ + msgCheckId: null, // 已经阅读过的提示不在弹出 + data: { + visible: true, + imgUrl: $$.url.img, + agreementMsg: '', // 服务协议 + popupVisible: false, + banner: [`${$$.url.img}banner-1.png`, `${$$.url.img}banner-2.jpg`, `${$$.url.img}banner-3.jpg`], // 轮播图 + countUnitData: {}, //化解资源 + userInfo: {}, //用户信息 + video: [], // 热门视频 + videoMore: false, + newMessage: [], // 最新资讯 + newMessageMore: false, + message: [{}], // 消息通知 + // 底部弹窗消息 + popupMsg: [{ + show: false, + type: 1, + title: '实名认证提醒', + subTitle: '您尚未通过实名认证,请尽快前往认证', + buttonText: '前往认证', + }], + }, - // 跳转资讯链接 - goSeeMessage(e) { - let url = e.currentTarget.dataset.url; - wx.navigateTo({ - url: '../webview/index?showUrl=' + url - }); - }, + // 跳转资讯链接 + goSeeMessage(e) { + let url = e.currentTarget.dataset.url; + wx.navigateTo({ + url: '../webview/index?showUrl=' + url + }); + }, - // 校验登录 or 实名 - userTest(type) { - if (!app.globalData.token && (type === 'login' || type === 'all')) { - $$.showModal({ - content: '抱歉您未登录,是否前往登录?', - success: (res) => { - if (res.confirm) { - wx.navigateTo({ - url: '../../pages/login/index', - }); - } - }, - }); - return false; - } - $$.hideLoading(); - }, - - // 调解资源去看看 - handleNavigateTo(e) { - let type = e.currentTarget.dataset.type; - if (type === 'case') { - $$.showToast({ - title: '功能暂未开启,敬请期待' - }); - } else if (type === 'register') { - if ($$.userTest('all')) { - wx.navigateTo({ - url: '../../pages/register/index', - }); - } - } else { - if ($$.userTest('login')) { - wx.navigateTo({ - url: '../../pages/findAdjust/index?type=' + (type === 'mediater' ? '1' : '2'), - }); - } - } - }, - - // 查看更多 - handleGetMore(e) { - let type = e.currentTarget.dataset.type; - wx.navigateTo({ - url: `../../pages/homePageInfo/index?type=${type}`, - }); - }, - - // 平台协议操作 - handleAgree(e) { - let type = e.currentTarget.dataset.type; - if (type === 'noAgree') { - this.selectComponent('#tabbar-page').loginOut(); - $$.loginOutClearData(); - } else { - // 同意协议之后退出登录后不重复弹出 - wx.setStorage({ - key: 'agreement', - data: 1 - }); - } + // 调解资源去看看 + handleNavigateTo(e) { + let type = e.currentTarget.dataset.type; + let url = e.currentTarget.dataset.url; + if (type === 'register') { + if (!$$.userTest('all', 'bottom')) { this.setData({ - popupVisible: false + popupMsg: [{ + show: true, + type: 1, + title: '实名认证提醒', + subTitle: '您尚未通过实名认证,请尽快前往认证', + buttonText: '前往认证', + }, ], }); - }, - - // 跳转至我的消息 - handleGoToMessageCenter() { + return; + } + wx.navigateTo({ + url: url, + }); + } else { + if ($$.userTest('login')) { wx.navigateTo({ - url: '../../pages/messageCenter/index', + url: '../../pages/findAdjust/index?type=' + (type === 'mediater' ? '1' : '2'), }); - }, + } + } + }, - // 关闭消息弹窗 - handleClosePopupMsg(e) { - let index = e.currentTarget.dataset.index; - this.data.popupMsg[index].show = false; - this.data.popupMsg[index].content?.forEach((x) => { - this.msgCheckId = [...(this.msgCheckId || []), x.caseId]; - }); - this.setData({ - popupMsg: this.data.popupMsg - }); - }, + // 查看更多 + handleGetMore(e) { + let type = e.currentTarget.dataset.type; + wx.navigateTo({ + url: `../../pages/homePageInfo/index?type=${type}`, + }); + }, - // 消息弹窗操作, TODO:跳转至详情页面的代码屏蔽,暂无用到,后续不用可删除 - handleClickPopupMsg(e) { - let value = e.currentTarget.dataset.item; - // let t = e.currentTarget.dataset.t; - if (e.currentTarget.dataset.type === 'more' && value.content.length === 1) { - return; - } - this.handleClosePopupMsg(e); - if (value.type === 1) { - wx.navigateTo({ - url: '../../pages/realNameAuthentication/index' - }); - return; - } - if (value.type === 2 || (value.type === 3 && value.content[t].meetType === '22_00020-1')) { - wx.navigateTo({ - url: '../../pages/myMediate/index' - }); - return; - } - if (value.type === 4 || (value.type === 3 && value.content[t].meetType === '22_00020-2')) { - wx.navigateTo({ - url: '../../pages/myJudicialConfirmation/index' - }); - return; - } - // let caseId = value.content[t][value.type === 2 ? 'caseId' : 'id']; - // let pageType = '1'; - // if (value.type === 2 || (value.type === 3 && value.content[t].meetType === '22_00020-1')) { - // pageType = '1'; // 调解 - // } - // if (value.type === 4 || (value.type === 3 && value.content[t].meetType === '22_00020-2')) { - // pageType = '2'; // 司法确认 - // } - }, + // 跳转 + _handleGoPage(e) { + let url = e.currentTarget.dataset.url; + wx.navigateTo({ + url: url, + }); + }, - // 获取底部弹窗消息提醒 - async getPopupMsg() { - const res = await getPopupMsgApi(); - if (res.type) { - let homePageMsgOut = []; - try { - let obj = wx.getStorageSync('homePageMsgOut'); - if (obj.time === $$.timeFormat(new Date(), 'YYYY-MM-DD')) { - homePageMsgOut = obj.value; - } - } catch (e) {} - let meetRemind = { - show: false, - type: 3, - title: '预约提醒', - content: [], - buttonText: '了解详情' - }; - let meetRemindVisible = false; - if (res.data.meetRemind) { - res.data.meetRemind.forEach((x) => { - if (homePageMsgOut.includes(x.caseId)) { - return; - } - let nowTime = $$.moment(); - let startTime = $$.moment(x.orderStartTime); - let diffTime = startTime.diff(nowTime, 'hours'); - // 距离预约开始时间小于一个小时并且未过期的时候提醒 - if (diffTime > 0 && diffTime <= 1) { - meetRemind.content.push(x); - meetRemindVisible = true; - } - }); - if (meetRemindVisible) { - meetRemind.show = true; - } - } - let caseRemind = { - show: false, - type: 2, - title: '调解中提醒', - content: [], - buttonText: '进入调解' - }; - let caseRemindVisible = false; - if (res.data.caseRemind) { - res.data.caseRemind.forEach((x) => { - if (homePageMsgOut.includes(x.caseId)) { - return; - } - caseRemind.content.push(x); - caseRemindVisible = true; - }); - if (caseRemindVisible) { - caseRemind.show = true; - } - } - let judicRemind = { - show: false, - type: 4, - title: '司法确认中提醒', - content: [], - buttonText: '进入司法确认' - }; - let judicRemindVisible = false; - if (res.data.judicRemind) { - res.data.judicRemind.forEach((x) => { - if (homePageMsgOut.includes(x.caseId)) { - return; - } - judicRemind.content.push(x); - judicRemindVisible = true; - }); - if (judicRemindVisible) { - judicRemind.show = true; - } - } - this.msgCheckId = homePageMsgOut; - this.setData({ - popupMsg: [meetRemind, caseRemind, judicRemind] - }); - } - }, + // 平台协议操作 + handleAgree(e) { + let type = e.currentTarget.dataset.type; + if (type === 'noAgree') { + this.selectComponent('#tabbar-page').loginOut(); + $$.loginOutClearData(); + } else { + // 同意协议之后退出登录后不重复弹出 + wx.setStorage({ + key: 'agreement', + data: 1 + }); + } + this.setData({ + popupVisible: false + }); + }, - // 获取首页视频资讯数据 - async getVideoAndMessage(param) { - const res = await getVideoAndMessageApi(param); - if (res.type) { - let hotVideoList = res.data.hotVideoList || []; - let hotNewsList = res.data.hotNewsList || []; - wx.setStorage({ - key: 'homePageNewMsgTime', - data: $$.timeFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), - }); - this.setData({ - video: hotVideoList.filter((item, index) => index < 2), - videoMore: hotVideoList.length > 2 ? true : false, - newMessage: hotNewsList.filter((item, index) => index < 2), - newMessageMore: hotNewsList.length > 2 ? true : false, - }); - } - }, + // 跳转至我的消息 + handleGoToMessageCenter() { + wx.navigateTo({ + url: '../../pages/messageCenter/index', + }); + }, - // 获取首页调解资源数量 - async getResourse(param) { - const res = await getResourseApi(param); - let resources = { - ...this.data.resources - }; - if (res.type) { - resources[0].num = res.data.caseNum || 0; //累计案件 - resources[1].num = res.data.mediatorNum || 0; //调解员 - resources[2].num = res.data.unitNum || 0; //调解组织 - this.setData({ - resources - }); - } - }, + // 关闭消息弹窗 + handleClosePopupMsg(e) { + let index = e.currentTarget.dataset.index; + this.data.popupMsg[index].show = false; + this.data.popupMsg[index].content?.forEach((x) => { + this.msgCheckId = [...(this.msgCheckId || []), x.caseId]; + }); + this.setData({ + popupMsg: this.data.popupMsg + }); + }, - // 获取服务协议 - async getAgreement() { - const res = await $$.commonRequest({ - url: `${$$.url.txt}agree.txt`, - type: 'get' - }); - if (res) { - this.data.popupVisible = true; - this.setData({ - popupVisible: true, - agreementMsg: `<pre class="pre">${res || '-'}</pre>` - }); - } - }, - - // getLogin(formData) { - // $$.showLoading(); - // wx.login({ - // async success(res) { - // const submitData = { - // ...formData, - // code: res.code - // } - // const res1 = await getjumpApi(submitData) - // $$.hideLoading(); - // if (res1.resp_code === "000000000000") { - // wx.setStorage({ - // key: 'userInfo', - // data: res1.data - // }); - // app.globalData.token = res1.data.token; - // $$.showToast({ - // title: '登录成功', - // icon: 'success' - // }); - // await $$.sleep(); - // wx.reLaunch({ - // url: '../../pages/homePage/index', - // }); - // } else { - // $$.showModal({ - // title: '提示', - // content: '您尚未注册,是否前往注册?', - // cancelText: '取消', - // confirmText: '前往', - // success: (res) => { - // if (res.confirm) { - // wx.navigateTo({ - // url: '../../pages/realNameAuthentication/index?backNum=2', - // }); - // } else { - // wx.navigateBack({ - // delta: 1, - // }); - // } - // }, - // }); - // } - - // } - // }) - // }, - - async dd() { - $$.showLoading(); - wx.login({ - async success(res) { - if (res.code) { - const accountInfo = wx.getAccountInfoSync(); - const submitData = { - appid: accountInfo.miniProgram.appId, - code: res.code, - } - const res1 = await loginApi(submitData); - if (res1.type) { - console.log(res1.data, 'res1111') - if (res1.data.state === '1') { - $$.hideLoading(); - console.log(res1, 'res1'); - wx.setStorage({ - key: 'userInfo', - data: res1.data - }); - app.globalData.token = res1.data.token; - $$.showToast({ - title: '登录成功', - icon: 'success' - }); - await $$.sleep(); - wx.reLaunch({ - url: '../../pages/homePage/index', - }); - - } else { - $$.hideLoading(); - app.globalData.access_token = wx.getStorageSync('access_token'); - $$.showModal({ - title: '提示', - content: '您尚未注册,是否前往注册?', - cancelText: '取消', - confirmText: '前往', - success: (res) => { - if (res.confirm) { - $$.showLoading(); - wx.getUserProfile({ - desc: '完善用户信息', - complete(res) { - if (res.errMsg === 'getUserProfile:ok') { - wx.login({ - async success(res2) { - if (res2.code) { - const accountInfo = wx.getAccountInfoSync(); - const submitData = { - appid: accountInfo.miniProgram.appId, - code: res2.code, - avatar: res?.userInfo.avatarUrl, - encryptedData: res.encryptedData, - ivStr: res.iv, - }; - const res3 = await registerApi(submitData); - $$.hideLoading(); - if (res3.type) { - wx.setStorage({ - key: 'userInfo', - data: res3.data - }); - app.globalData.token = res3.data.token; - $$.showToast({ - title: '登录成功', - icon: 'success' - }); - await $$.sleep(); - wx.reLaunch({ - url: '../../pages/homePage/index', - }); - } - } else { - $$.hideLoading(); - $$.showToast('登录失败,请稍后重试'); - } - }, - }); - } else { - $$.hideLoading(); - $$.showToast({ - title: '抱歉!授权失败' - }); - } - }, - }); - - // wx.navigateTo({ - // url: '../../pages/login/index', - // }); - } else { - wx.navigateBack({ - delta: 1, - }); - } - }, - }); - } - - } - - // app.globalData.access_token = wx.getStorageSync('access_token'); - // console.log(res, 'res') - // console.log(app.globalData.access_token, 'app.globalData.access_token') - // $$.showModal({ - // title: '提示', - // content: '您尚未注册,是否前往注册?', - // cancelText: '取消', - // confirmText: '前往', - // success: (res) => { - // if (res.confirm) { - // wx.navigateTo({ - // url: '../../pages/login/index', - // }); - // } else { - // wx.navigateBack({ - // delta: 1, - // }); - // } - // }, - // }); - - // const accountInfo = wx.getAccountInfoSync(); - // const submitData = { - // appid: accountInfo.miniProgram.appId, - // code: res.code, - // } - // app.globalData.access_token = wx.getStorageSync('access_token'); - // const res1 = await loginApi(submitData); - // console.log(res1, 'res1') - // $$.hideLoading(); - // console.log(res1, 'res1'); - // if (res1.type) { - // wx.setStorage({ - // key: 'userInfo', - // data: res1.data - // }); - // app.globalData.token = res1.data.token; - // $$.showToast({ - // title: '登录成功', - // icon: 'success' - // }); - // await $$.sleep(); - // wx.reLaunch({ - // url: '../../pages/homePage/index', - // }); - // } - - } else { - $$.hideLoading(); - $$.showToast('登录失败,请稍后重试'); - } - } - }) - }, - - aa() { - wx.navigateTo({ - url: '../../pages/homePage/index?access_token=2', - }); - }, - - cc() { - wx.navigateTo({ - url: '../../pages/realNameAuthentication/index', - }); - }, - - bb() { - wx.request({ - url: 'https://xcx.pinganbaiyun.cn/p_060_cs_intf/api_001/sv_002_get_paby_login_info', //仅为示例,并非真实的接口地址 - data: { - "access_token": "测试token", - "app_id": "测试", - "secret": "测试" - }, - method: 'post', - success(res) { - console.log(res.data, '平安白云') - } - }) - }, + // 消息弹窗操作, TODO:跳转至详情页面的代码屏蔽,暂无用到,后续不用可删除 + handleClickPopupMsg(e) { + let value = e.currentTarget.dataset.item; + // let t = e.currentTarget.dataset.t; + if (e.currentTarget.dataset.type === 'more' && value.content.length === 1) { + return; + } + this.handleClosePopupMsg(e); + if (value.type === 1) { + wx.navigateTo({ + url: '../../pages/realNameAuthentication/index' + }); + return; + } + if (value.type === 2 || (value.type === 3 && value.content[t].meetType === '22_00020-1')) { + wx.navigateTo({ + url: '../../pages/myMediate/index' + }); + return; + } + if (value.type === 4 || (value.type === 3 && value.content[t].meetType === '22_00020-2')) { + wx.navigateTo({ + url: '../../pages/myJudicialConfirmation/index' + }); + return; + } + }, + // 获取首页视频资讯数据 + async getVideoAndMessage(param) { + const res = await getVideoAndMessageApi(param); + if (res.type) { + let hotVideoList = res.data.hotVideoList || []; + let hotNewsList = res.data.hotNewsList || []; + wx.setStorage({ + key: 'homePageNewMsgTime', + data: $$.timeFormat(new Date(), 'YYYY-MM-DD HH:mm:ss'), + }); + this.setData({ + video: hotVideoList.filter((item, index) => index < 2), + videoMore: hotVideoList.length > 2 ? true : false, + newMessage: hotNewsList.filter((item, index) => index < 2), + newMessageMore: hotNewsList.length > 2 ? true : false, + }); + } + }, - // async handleGetUserInfo() { - // $$.showLoading(); - // wx.getUserProfile({ - // desc: '完善用户信息', - // complete(res) { - // if (res.errMsg === 'getUserProfile:ok') { - // wx.login({ - // async success(res2) { - // if (res2.code) { - // const accountInfo = wx.getAccountInfoSync(); - // const submitData = { - // appid: accountInfo.miniProgram.appId, - // code: res2.code, - // avatar: res?.userInfo.avatarUrl, - // encryptedData: res.encryptedData, - // ivStr: res.iv, - // }; - // const res3 = await loginApi(submitData); - // $$.hideLoading(); - // if (res3.type) { - // wx.setStorage({ - // key: 'userInfo', - // data: res3.data - // }); - // app.globalData.token = res3.data.token; - // $$.showToast({ - // title: '登录成功', - // icon: 'success' - // }); - // await $$.sleep(); - // wx.reLaunch({ - // url: '../../pages/homePage/index', - // }); - // } - // } else { - // $$.hideLoading(); - // $$.showToast('登录失败,请稍后重试'); - // } - // }, - // }); - // } else { - // $$.hideLoading(); - // $$.showToast({ - // title: '抱歉!授权失败' - // }); - // } - // }, - // }); - // }, + // 获取首页调解资源数量 + async getResourse(param) { + const res = await getResourseApi(param); + this.setData({ + countUnitData: res.data + }); + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - // const formData = { - // access_token: options.access_token, - // appid: options.appid, - // secret: options.secret - // // } + // 获取服务协议 + async getAgreement() { + const res = await $$.commonRequest({ + url: `${$$.url.txt}agree.txt`, + type: 'get' + }); + if (res) { + this.data.popupVisible = true; + this.setData({ + popupVisible: true, + agreementMsg: `<pre class="pre">${res || '-'}</pre>` + }); + } + }, - // this.dd(); - // this.handleGetUserInfo() - // 当登录后返回时弹出协议 - let agreement = wx.getStorageSync('agreement'); - if (!agreement && app.globalData.token) this.getAgreement(); - }, - - onShow(options) { - console.log(options,'options') - if (options.extraData.access_token && !app.globalData.token) { - wx.setStorage({ - key: 'access_token', - data: options.extraData.access_token - }); - this.dd(); - $$.showToast({ - title: '已监测到平安白云传入的access_token', + async dd() { + $$.showLoading(); + wx.login({ + async success(res) { + if (res.code) { + const accountInfo = wx.getAccountInfoSync(); + const submitData = { + appid: accountInfo.miniProgram.appId, + code: res.code, + } + const res1 = await loginApi(submitData); + if (res1.type) { + console.log(res1.data, 'res1111') + if (res1.data.state === '1') { + $$.hideLoading(); + console.log(res1, 'res1'); + wx.setStorage({ + key: 'userInfo', + data: res1.data + }); + app.globalData.token = res1.data.token; + $$.showToast({ + title: '登录成功', icon: 'success' - }); - } - let appid = wx.getAccountInfoSync().miniProgram.appId; - this.getResourse({ - appid - }); - let that = this; - wx.getStorage({ - key: 'homePageNewMsgTime', - complete: (res) => { - if (that.data.video.length === 0 || that.data.newMessage.length == 0) { - this.getVideoAndMessage({ - appid - }); - return; - } - if (res.data && $$.moment().diff($$.moment(res.data), 'minute') > 60) { - this.getVideoAndMessage({ - appid - }); - } - }, - }); - // 获取弹窗信息提醒 - if (app.globalData.token) { - if (!$$.userTest('realName', 'bottom')) { - this.setData({ - popupMsg: [{ - show: true, - type: 1, - title: '实名认证提醒', - subTitle: '您尚未通过实名认证,根据调解实名制规定,建议您尽快前往认证。', - buttonText: '前往认证', - }, ], - }); - return; - } - this.getPopupMsg(); - } - }, + }); + await $$.sleep(); + wx.reLaunch({ + url: '../../pages/homePage/index', + }); - onHide() { - if (!!this.msgCheckId) { - wx.setStorage({ - key: 'homePageMsgOut', - data: { - time: $$.timeFormat(new Date(), 'YYYY-MM-DD'), - value: this.msgCheckId, + } else { + $$.hideLoading(); + app.globalData.access_token = wx.getStorageSync('access_token'); + $$.showModal({ + title: '提示', + content: '您尚未注册,是否前往注册?', + cancelText: '取消', + confirmText: '前往', + success: (res) => { + if (res.confirm) { + $$.showLoading(); + wx.getUserProfile({ + desc: '完善用户信息', + complete(res) { + if (res.errMsg === 'getUserProfile:ok') { + wx.login({ + async success(res2) { + if (res2.code) { + const accountInfo = wx.getAccountInfoSync(); + const submitData = { + appid: accountInfo.miniProgram.appId, + code: res2.code, + avatar: res?.userInfo.avatarUrl, + encryptedData: res.encryptedData, + ivStr: res.iv, + }; + const res3 = await registerApi(submitData); + $$.hideLoading(); + if (res3.type) { + wx.setStorage({ + key: 'userInfo', + data: res3.data + }); + app.globalData.token = res3.data.token; + $$.showToast({ + title: '登录成功', + icon: 'success' + }); + await $$.sleep(); + wx.reLaunch({ + url: '../../pages/homePage/index', + }); + } + } else { + $$.hideLoading(); + $$.showToast('登录失败,请稍后重试'); + } + }, + }); + } else { + $$.hideLoading(); + $$.showToast({ + title: '抱歉!授权失败' + }); + } + }, + }); + + // wx.navigateTo({ + // url: '../../pages/login/index', + // }); + } else { + wx.navigateBack({ + delta: 1, + }); + } }, - }); + }); + } + } + } else { + $$.hideLoading(); + $$.showToast('登录失败,请稍后重试'); } - }, + } + }) + }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () {}, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) {}, + + onShow(options) { + if (!$$.userTest('login')) { + return + } + let userInfo = wx.getStorageSync('userInfo') || {}; + let appid = wx.getAccountInfoSync().miniProgram.appId; + this.setData({ + userInfo + }); + + + let that = this; + wx.getStorage({ + key: 'homePageNewMsgTime', + complete: (res) => { + if (that.data.video.length === 0 || !that.data.countUnitData) { + this.getVideoAndMessage({ + appid + }); + this.getResourse({ + appid + }); + return; + } + if (res.data && $$.moment().diff($$.moment(res.data), 'minute') > 60) { + this.getVideoAndMessage({ + appid + }); + this.getResourse({ + appid + }); + } + }, + }); + let agreement = wx.getStorageSync('agreement'); + + // 获取弹窗信息提醒 + if (app.globalData.token) { + if (!agreement) { + this.getAgreement(); + return; + } + if (!$$.userTest('realName', 'bottom')) { + this.setData({ + popupMsg: [{ + show: true, + type: 1, + title: '实名认证提醒', + subTitle: '您尚未通过实名认证,请尽快前往认证', + buttonText: '前往认证', + }, ], + }); + return; + } + } + }, + + onHide() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () {}, }); \ No newline at end of file diff --git a/gz-wxparty/pages/homePage/index.json b/gz-wxparty/pages/homePage/index.json index ea40d61..420077d 100644 --- a/gz-wxparty/pages/homePage/index.json +++ b/gz-wxparty/pages/homePage/index.json @@ -1,6 +1,5 @@ { - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black", + "usingComponents": { "time-format": "../../components/time-format/index" } diff --git a/gz-wxparty/pages/homePage/index.wxml b/gz-wxparty/pages/homePage/index.wxml index 8bcb029..ffe903b 100644 --- a/gz-wxparty/pages/homePage/index.wxml +++ b/gz-wxparty/pages/homePage/index.wxml @@ -3,149 +3,122 @@ <page-meta page-style="{{ popupMsg.show ? 'overflow: hidden;' : '' }}" /> -<tabbar-page id="tabbar-page"> - <!-- 幻灯片 --> + +<!-- 幻灯片 --> +<view class="homePage-main"> <swiper autoplay="{{ true }}" class="swiper" indicator-dots="{{ true }}"> <swiper-item wx:for="{{ banner }}" wx:key="index"> <image class="swiper-item" src="{{ item }}" /> </swiper-item> </swiper> <view class="main"> - <view bindtap="handleNavigateTo" class="mediate" data-type="register"> - <image class="mediate-image" src="{{ imgUrl }}/apply.png" /> + <view class="mediate"> + <view>你好,{{userInfo.trueName||'游客'}}</view> + <view bindtap="_handleGoPage" data-url="../../pages/me/index" wx:if="{{userInfo.realStatus===1}}" class="public-color">个人中心</view> + <view wx:else bindtap="handleNavigateTo" data-url="../../pages/realNameAuthentication/index" data-type="register" class="public-color">实名认证</view> </view> - <!-- 消息通知 --> - <view bindtap="handleGoToMessageCenter" class="message-bg"> - <swiper autoplay="true" interval="3000" style="height: 100%;" vertical="true"> - <block wx:for="{{ message }}" wx:key="index"> - <swiper-item> - <view class="message"> - <view class="message-content"> - <view class="message-item"> - <view class="message-item-round" /> - <view class="message-item-text">您的案件已经进入调解流程</view> - <view class="message-item-time">2分钟前</view> - </view> - </view> - <image src="{{ imgUrl }}/rightCircleOutlined.png" style="width: 24rpx;height: 24rpx;" /> - </view> - </swiper-item> - </block> - </swiper> - </view> - <!-- 调解资源 --> - <!-- <view bindtap='aa'>1111</view> --> - <view class="resources radius"> - <view class="itemTitle"> - <image class="itemTitle-image" src="{{ imgUrl }}mediation-center.png" /> - <view>调解资源</view> + <!-- 服务申请 --> + <view> + <view class="main_title">服务申请</view> + <view class="flex"> + <view bindtap="handleNavigateTo" data-url="../../pages/register/index" data-type="register" class="flex_1 flex_blue"> + <view class="main_subTitle">反映诉求</view> + <view>轻松来访</view> + </view> + <view bindtap="handleNavigateTo" data-url="../../pages/myRegisterList/index" data-type="register" class="flex_1 flex_orange"> + <view class="main_subTitle">我的申请</view> + <view>申请进度查询</view> + </view> </view> - <view class="item-resources"> - <view class="item-resources-item-bg" wx:for="{{ resources }}" wx:key="index"> - <view bindtap="handleNavigateTo" data-type="{{ item.type }}" class="item-resources-item"> - <image class="item-resources-image" src="{{ item.icon }}" /> - <view class="item-resources-num" style="color:{{item.color}}">{{ item.num }}{{ item.unit }}</view> - <view class="item-resources-title">{{ item.title }}</view> - <view class="item-resources-btn" style="color:{{item.color}};border-color: {{item.color}};">去看看</view> + <view class="flex marginTop_12"> + <view class="flex_1 flex_green"> + <view class="main_subTitle">事项咨询</view> + <view>解决您身边的问题</view> + </view> + </view> + </view> + <!-- 化解资源 --> + <view> + <view class="main_title">化解资源</view> + <view class="flex" style="gap:16rpx"> + <view class="flex_2" bindtap="_handleGoPage" data-url="../../pages/ssimList/index"> + <image class="flex_2_image" src="{{imgUrl}}home_1.png" mode="" /> + <view> + <view class="flex_zy_title">综治中心</view> + <view class="flex_num">{{countUnitData.zzUnitNum||0}}</view> + </view> + </view> + <view class="flex_2" bindtap="_handleGoPage" data-url="../../pages/organizeList/index"> + <image class="flex_2_image1" src="{{imgUrl}}home_2.png" mode="" /> + <view> + <view class="flex_zy_title">调解组织</view> + <view class="flex_num">{{countUnitData.tzUnitNum||0}}</view> </view> </view> </view> </view> - <!-- 热门视频 --> - <view class="item-cell-group radius" wx:if="{{ video.length > 0 }}"> - <view class="itemTitle"> - <image class="itemTitle-image" src="{{ imgUrl }}video.png" /> - <view>热门视频</view> - </view> - <block> - <view class="item-cell item-cell-video" wx:for="{{ video }}" wx:key="index"> - <view class="item-cell-content"> - <view class="van-multi-ellipsis--l2">{{ item.title }}</view> - <view class="item-cell-text"> - 发布时间: - <time-format format="YYYY-MM-DD" value="{{ item.pushTime }}" /> - </view> - </view> - <video class="item-video" id="myVideo-{{index}}" show-mute-btn="{{ true }}" src="{{ item.showUrl }}" /> + + <!-- 咨询动态 --> + <view> + <view class="flex_dt"> + <view class="main_title">咨询动态</view> + <view bindtap="handleGetMore" data-type="newMsg" wx:if="{{ newMessageMore }}" class=" flex_dt_more">查看更多 + <image class="flex_dt_more_img" src="./../../img/right.png" /> </view> - <view bindtap="handleGetMore" class="more-btn" data-type="hotVideo" wx:if="{{ videoMore }}"> - <view>查看更多</view> - <image class="more-btn-image" src="{{ imgUrl }}downCircleOutlined.png" /> - </view> - </block> - </view> - <!-- 最新资讯 --> - <view class="item-cell-group radius"> - <view class="itemTitle"> - <image class="itemTitle-image" src="{{ imgUrl }}new-msg.png" /> - <view>最新资讯</view> </view> - <block> - <view class="item-cell" wx:for="{{ newMessage }}" wx:key="index"> - <view bindtap="goSeeMessage" class="van-multi-ellipsis--l3" data-url="{{ item.showUrl }}">{{ item.title }}</view> - <view class="item-cell-text"> - 发布时间: - <time-format format="YYYY-MM-DD" value="{{ item.pushTime }}" /> + <view class="dt_card" bindtap="goSeeMessage" wx:for="{{ newMessage }}" style="margin-top:{{index===0?0:'8px'}}" wx:key="index"> + <view class="dt_card_l"> + <view class="dt_card_title">{{item.title}}</view> + <view class="dt_card_time"> + <time-format format="YYYY-MM-DD" value="{{ item.pushTime }}" /> {{item.playNum}}人阅读 </view> </view> - <view bindtap="handleGetMore" class="more-btn" data-type="newMsg" wx:if="{{ newMessageMore }}"> - <view>查看更多</view> - <image class="more-btn-image" src="{{ imgUrl }}downCircleOutlined.png" /> - </view> - </block> + <view class="dt_card_r"></view> + </view> </view> </view> - <!-- 平台服务协议弹出 --> - <van-popup bind:close="handleClosePopup" round show="{{ popupVisible }}" z-index="1000"> - <scroll-view class="popup-scroll" scroll-y> - <rich-text nodes="{{ agreementMsg }}"></rich-text> - </scroll-view> - <view class="popup-button"> - <van-button bind:click="handleAgree" block data-type="agree" round type="primary">同意</van-button> - <view bindtap="handleAgree" class="popup-button-no" data-type="noAgree">不同意并退出</view> + +</view> + + +<!-- 底部弹窗 --> +<block wx:for="{{ popupMsg }}" wx:key="index"> + <van-popup bind:close="handleClosePopupMsg" closeable data-index="{{ index }}" position="bottom" round show="{{ item.show }}" title="{{ item.title || '' }}" zIndex="1000"> + <view class="homePage-popupMsg"> + <view class="homePage-popupMsg-subTitle" wx:if="{{ item.subTitle }}">{{ item.subTitle }}</view> + <image class="homePage-popupMsg-realNamePng" src="{{ imgUrl }}msg-realName.png" wx:if="{{ item.type === 1 }}" /> + <scroll-view scroll-y="{{true}}" style="max-height:600rpx" wx:elif="{{ item.type === 3 }}"> + <view bind:tap="handleClickPopupMsg" class="homePage-popupMsg-content-item" data-index="{{ index }}" data-item="{{ item }}" data-t="{{ t }}" data-type="more" wx:for="{{ item.content }}" wx:for-index="t" wx:for-item="x" wx:key="t"> + <image class="homePage-popupMsg-content-itemImg" src="{{ imgUrl }}msg-order.png" /> + <view class="homePage-popupMsg-content-itemTitle second-font"> + <view> + 预约事项:{{ x.meetWayName }} + <text class="tag tag-green-border" style="margin-left:16rpx">{{x.meetTypeName}}</text> + </view> + <view> + 预约时间:今天 + <time-format format="HH:mm" value="{{ x.orderStartTime }}" /> + <text>~</text> + <time-format format="HH:mm" value="{{ x.orderEndTime }}" /> + </view> + <view>预约地点:{{ x.meetAddr || '-' }}</view> + </view> + <van-icon name="arrow" size="16" wx:if="{{ item.content.length > 1 }}" /> + </view> + </scroll-view> + <scroll-view scroll-y="{{true}}" style="max-height:600rpx" wx:else> + <view bind:tap="handleClickPopupMsg" class="homePage-popupMsg-content-item" data-index="{{ index }}" data-item="{{ item }}" data-t="{{ t }}" data-type="more" wx:for="{{ item.content }}" wx:for-index="t" wx:for-item="x" wx:key="t"> + <image class="homePage-popupMsg-content-itemImg" src="{{ imgUrl }}msg-mediate-ing.png" /> + <view class="homePage-popupMsg-content-itemTitle"> + <view>{{ x[ item.type === 2 ? 'caseTitle' : 'judicTitle' ] || '-' }}</view> + <text class="tag tag-orange">进行中</text> + </view> + <van-icon name="arrow" size="16" wx:if="{{ item.content.length > 1 }}" /> + </view> + </scroll-view> + </view> + <view class="homePage-popupMsg-button" wx:if="{{ item.type === 1 || item.content.length === 1 }}"> + <van-button bind:click="handleClickPopupMsg" block data-index="{{ index }}" data-t="0" data-item="{{ item }}" type="primary">{{ item.buttonText }}</van-button> </view> </van-popup> - <!-- 底部弹窗 --> - <block wx:for="{{ popupMsg }}" wx:key="index"> - <van-popup bind:close="handleClosePopupMsg" closeable data-index="{{ index }}" position="bottom" round show="{{ item.show }}" title="{{ item.title || '' }}" zIndex="1000"> - <view class="homePage-popupMsg"> - <view class="homePage-popupMsg-subTitle" wx:if="{{ item.subTitle }}">{{ item.subTitle }}</view> - <image class="homePage-popupMsg-realNamePng" src="{{ imgUrl }}msg-realName.png" wx:if="{{ item.type === 1 }}" /> - <scroll-view scroll-y="{{true}}" style="max-height:600rpx" wx:elif="{{ item.type === 3 }}"> - <view bind:tap="handleClickPopupMsg" class="homePage-popupMsg-content-item" data-index="{{ index }}" data-item="{{ item }}" data-t="{{ t }}" data-type="more" wx:for="{{ item.content }}" wx:for-index="t" wx:for-item="x" wx:key="t"> - <image class="homePage-popupMsg-content-itemImg" src="{{ imgUrl }}msg-order.png" /> - <view class="homePage-popupMsg-content-itemTitle second-font"> - <view> - 预约事项:{{ x.meetWayName }} - <text class="tag tag-green-border" style="margin-left:16rpx">{{x.meetTypeName}}</text> - </view> - <view> - 预约时间:今天 - <time-format format="HH:mm" value="{{ x.orderStartTime }}" /> - <text>~</text> - <time-format format="HH:mm" value="{{ x.orderEndTime }}" /> - </view> - <view>预约地点:{{ x.meetAddr || '-' }}</view> - </view> - <van-icon name="arrow" size="16" wx:if="{{ item.content.length > 1 }}" /> - </view> - </scroll-view> - <scroll-view scroll-y="{{true}}" style="max-height:600rpx" wx:else> - <view bind:tap="handleClickPopupMsg" class="homePage-popupMsg-content-item" data-index="{{ index }}" data-item="{{ item }}" data-t="{{ t }}" data-type="more" wx:for="{{ item.content }}" wx:for-index="t" wx:for-item="x" wx:key="t"> - <image class="homePage-popupMsg-content-itemImg" src="{{ imgUrl }}msg-mediate-ing.png" /> - <view class="homePage-popupMsg-content-itemTitle"> - <view>{{ x[ item.type === 2 ? 'caseTitle' : 'judicTitle' ] || '-' }}</view> - <text class="tag tag-orange">进行中</text> - </view> - <van-icon name="arrow" size="16" wx:if="{{ item.content.length > 1 }}" /> - </view> - </scroll-view> - </view> - <view class="homePage-popupMsg-button" wx:if="{{ item.type === 1 || item.content.length === 1 }}"> - <van-button bind:click="handleClickPopupMsg" block data-index="{{ index }}" data-t="0" data-item="{{ item }}" type="primary">{{ item.buttonText }}</van-button> - </view> - </van-popup> - </block> - - -</tabbar-page> \ No newline at end of file +</block> \ No newline at end of file diff --git a/gz-wxparty/pages/homePage/index.wxss b/gz-wxparty/pages/homePage/index.wxss index 5354393..b692ea1 100644 --- a/gz-wxparty/pages/homePage/index.wxss +++ b/gz-wxparty/pages/homePage/index.wxss @@ -2,260 +2,387 @@ @import '../../styles/public_components.wxss'; .radius { - border-radius: var(--border-radius-card); + border-radius: var(--border-radius-card); } .pre { - font-size: 28rpx; - line-height: 1.5; + font-size: 28rpx; + line-height: 1.5; } .swiper { - height: 300rpx; + height: 300rpx; } .swiper-item { - height: 100%; - width: 100%; + height: 100%; + width: 100%; +} + +.homePage-main { + height: 100vh; + background-color: #EFF8FF; } .main { - padding: 16rpx var(--padding-my); + padding: 16rpx var(--padding-my); +} + +.main_title { + padding: var(--padding-my) 0 24rpx; + font-size: 32rpx; + line-height: 48rpx; +} + +.main_subTitle { + font-size: 32rpx; + line-height: 48rpx; +} + +.main_color { + color: var(--main-color); +} + +.flex { + display: flex; + gap: 30rpx; + +} + +.flex_1 { + flex: 1; + color: #fff; + padding: 12px; + border-radius: 4px; +} + +.flex_2 { + flex: 1; + padding: 12px; + border-radius: 4px; + display: flex; + gap: 16rpx; +} + +.flex_2_image { + width: 166rpx; + height: 100rpx; +} + +.flex_2_image1 { + width: 96rpx; + height: 96rpx; +} + +.flex_dt { + display: flex; + justify-content: space-between; +} + +.flex_zy_title { + color: rgba(23, 26, 29, 0.60); + font-size: 28rpx; + white-space: nowrap; +} + +.flex_num { + font-family: DingTalk; + color: var(--main-color); + font-size: 20px; + line-height: 28px; +} + +.flex_dt_more { + color: rgba(26, 111, 184, 0.60); + display: flex; + align-items: center; +} + +.flex_dt_more_img { + width: 14px; + height: 14px; +} + +.dt_card { + border-radius: 2px; + background-color: #fff; + display: flex; + justify-content: space-between; + padding: 8px 12px; +} + +.dt_card_l { + flex: 2; +} + +.dt_card_time { + color: rgba(23, 26, 29, 0.40); +} + +.dt_card_r { + flex: 1; + background: #ef6c24; +} + +.dt_card_title { + margin-bottom: 4px; +} + +.flex_blue { + background: linear-gradient(90deg, #5fa6d4, #3a8ac6 50%, #1a6fb8 100%); +} + +.flex_orange { + background: linear-gradient(90deg, #ffa940, #fa8c16 50%, #ef6c24 100%); +} + +.flex_green { + background: linear-gradient(90deg, #36cfc9, #13c2c2 50%, #08979c 100%); +} + +.marginTop_12 { + margin-top: 24rpx; } .mediate { - height: 140rpx; + height: 92rpx; + background-color: #fff; + border-radius: 4px; + display: flex; + align-items: center; + padding: 0 32rpx; + justify-content: space-between; } .mediate-image { - height: 140rpx; - width: 100%; + height: 140rpx; + width: 100%; } .message-bg { - height: 24rpx; - padding: 16rpx; - background-color: #ffffff; - margin-top: 16rpx; - border-radius: 10rpx; + height: 24rpx; + padding: 16rpx; + background-color: #ffffff; + margin-top: 16rpx; + border-radius: 10rpx; } .message { - height: 24rpx; - font-size: 24rpx; - line-height: 24rpx; - display: flex; - align-items: center; + height: 24rpx; + font-size: 24rpx; + line-height: 24rpx; + display: flex; + align-items: center; } .message-content { - flex: 1; - overflow: hidden; - padding-right: 8rpx; + flex: 1; + overflow: hidden; + padding-right: 8rpx; } .message-item { - display: flex; - align-items: center; + display: flex; + align-items: center; } .message-item:last-child { - margin-bottom: 0; + margin-bottom: 0; } .message-item-round { - width: 12rpx; - height: 12rpx; - border-radius: 50%; - background-color: #000000; + width: 12rpx; + height: 12rpx; + border-radius: 50%; + background-color: #000000; } .message-item-text { - flex: 1; - padding: 0 16rpx; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + flex: 1; + padding: 0 16rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .message-item-time { - color: rgba(0, 0, 0, 0.5); + color: rgba(0, 0, 0, 0.5); } .resources { - background-color: #ffffff; - margin-top: 16rpx; - padding: 16rpx; + background-color: #ffffff; + margin-top: 16rpx; + padding: 16rpx; } .item-resources { - display: flex; - overflow-x: auto; - margin: 0 -12rpx; + display: flex; + overflow-x: auto; + margin: 0 -12rpx; } .item-resources-item-bg { - min-width: 33%; - max-width: 33%; - overflow: hidden; + min-width: 33%; + max-width: 33%; + overflow: hidden; } .item-resources-item { - display: flex; - flex-direction: column; - align-items: center; - padding: 32rpx 0 16rpx; + display: flex; + flex-direction: column; + align-items: center; + padding: 32rpx 0 16rpx; } .item-resources-num { - font-size: 24rpx; - padding: 8rpx 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 100%; - text-align: center; + font-size: 24rpx; + padding: 8rpx 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + text-align: center; } .item-resources-title { - font-size: 24rpx; - margin-bottom: 12rpx; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - width: 100%; - text-align: center; + font-size: 24rpx; + margin-bottom: 12rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + text-align: center; } .item-resources-image { - height: 80rpx; - width: 80rpx; + height: 80rpx; + width: 80rpx; } .item-resources-btn { - font-size: 24rpx; - padding: 8rpx; - border: 1rpx solid; - border-radius: 21rpx; - line-height: 24rpx; + font-size: 24rpx; + padding: 8rpx; + border: 1rpx solid; + border-radius: 21rpx; + line-height: 24rpx; } .itemTitle { - display: flex; - align-items: center; - color: var(--main-color); - font-weight: 600; + display: flex; + align-items: center; + color: var(--main-color); + font-weight: 600; } .itemTitle-image { - width: 28rpx; - height: 28rpx; - margin-right: 16rpx; + width: 28rpx; + height: 28rpx; + margin-right: 16rpx; } .item-video { - height: 132rpx; - width: 184rpx; - border-radius: 4rpx; + height: 132rpx; + width: 184rpx; + border-radius: 4rpx; } .item-cell-group { - background-color: #ffffff; - margin-top: 16rpx; - padding: 16rpx 16rpx 0; + background-color: #ffffff; + margin-top: 16rpx; + padding: 16rpx 16rpx 0; } .item-cell-video { - display: flex; + display: flex; align-items: center; } .item-cell { - padding: 24rpx 0; - border-bottom: 2rpx solid rgba(0, 0, 0, 0.03); + padding: 24rpx 0; + border-bottom: 2rpx solid rgba(0, 0, 0, 0.03); } .item-cell:last-child { - border: none; + border: none; } .item-cell-content { - display: flex; - flex-direction: column; - justify-content: space-between; - flex: 1; - padding-right: 66rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + flex: 1; + padding-right: 66rpx; } .item-cell-text { margin-top: 24rpx; - font-size: 24rpx; - line-height: 40rpx; - color: #c8c9cc; - display: flex; + font-size: 24rpx; + line-height: 40rpx; + color: #c8c9cc; + display: flex; } .van-cell-group--inset { - margin: 0 !important; - border-radius: 8rpx !important; + margin: 0 !important; + border-radius: 8rpx !important; } .popup-scroll { - height: 800rpx; - width: 600rpx; - padding: 24rpx; - background-color: #ffffff; + height: 800rpx; + width: 600rpx; + padding: 24rpx; + background-color: #ffffff; } .popup-button { - padding: 0 64rpx 24rpx; + padding: 0 64rpx 24rpx; } .popup-button-no { - font-size: 28rpx; - text-align: center; - padding: 24rpx 0 0; - text-decoration: underline; + font-size: 28rpx; + text-align: center; + padding: 24rpx 0 0; + text-decoration: underline; } .homePage-popupMsg { - padding: 32rpx; + padding: 32rpx; } .homePage-popupMsg-realNamePng { - width: 340rpx; - height: 300rpx; - position: relative; - left: 50%; - margin-left: -170rpx; + width: 340rpx; + height: 300rpx; + position: relative; + left: 50%; + margin-left: -170rpx; } .homePage-popupMsg-content-item { - display: flex; - align-items: center; - margin-bottom: 16rpx; + display: flex; + align-items: center; + margin-bottom: 16rpx; } .homePage-popupMsg-content-item:last-child { - margin-bottom: 0; + margin-bottom: 0; } .homePage-popupMsg-content-itemImg { - width: 100rpx; - height: 100rpx; + width: 100rpx; + height: 100rpx; } .homePage-popupMsg-content-itemTitle { - flex: 1; - padding-left: 16rpx; + flex: 1; + padding-left: 16rpx; } .homePage-popupMsg-subTitle { - margin-bottom: 32rpx; + margin-bottom: 32rpx; } .homePage-popupMsg-button { - padding: 32rpx 0; - margin: 0 32rpx; - border-top: 2rpx solid var(--border-color); -} + padding: 32rpx 0; + margin: 0 32rpx; + border-top: 2rpx solid var(--border-color); +} \ No newline at end of file diff --git a/gz-wxparty/pages/login/index.wxml b/gz-wxparty/pages/login/index.wxml index c343d2c..bb0259c 100644 --- a/gz-wxparty/pages/login/index.wxml +++ b/gz-wxparty/pages/login/index.wxml @@ -1,7 +1,7 @@ <!--pages/login/index.wxml--> <view class="noLogin"> <view class="noLogin-content"> - <image class="noLogin-image" src="{{ imgUrl }}me-center.png" /> + <image class="noLogin-image" src="./../../img/me-center.png" /> <view>请先登录账号</view> </view> <van-button bind:click="handleGetUserInfo" block type="primary">登录</van-button> diff --git a/gz-wxparty/pages/me/index.js b/gz-wxparty/pages/me/index.js index 2a8563d..c2006b3 100644 --- a/gz-wxparty/pages/me/index.js +++ b/gz-wxparty/pages/me/index.js @@ -12,51 +12,61 @@ // 获取用户信息 function getUserInfoApi() { - return $$.request({ url: 'paUser/personal', type: 'get', service: 'cust' }); + return $$.request({ + url: 'paUser/personal', + type: 'get', + service: 'cust' + }); } Page({ - /** - * 页面的初始数据 - */ - data: { - imgUrl: $$.url.img, // icon图片地址 - userInfo: {}, // 用户信息 - }, + /** + * 页面的初始数据 + */ + data: { + imgUrl: $$.url.img, // icon图片地址 + userInfo: {}, // 用户信息 + }, - // 点击完善资料 - handleGo() { - let visible = this.data.userInfo.realStatus === '1'; - wx.navigateTo({ url: visible ? '../../pages/perfectInformation/index?type=improvedata' : '../../pages/perfectInformation/index' }); - }, + // 点击完善资料 + handleGo() { + let visible = this.data.userInfo.realStatus === '1'; + wx.navigateTo({ + url: visible ? '../../pages/perfectInformation/index?type=improvedata' : '../../pages/perfectInformation/index' + }); + }, - // 退出登录 - handleLoginOut() { - $$.showModal({ - content: '是否确认退出登录?', - success: (res) => { - if (res.confirm) { - $$.loginOutClearData(); - $$.showToast('已退出登录'); - wx.reLaunch({ - url: '../../pages/homePage/index', - }); - } - }, - }); - }, + // 退出登录 + handleLoginOut() { + $$.showModal({ + content: '是否确认退出登录?', + success: (res) => { + if (res.confirm) { + $$.loginOutClearData(); + $$.showToast('已退出登录'); + wx.reLaunch({ + url: '../../pages/homePage/index', + }); + } + }, + }); + }, - // 获取用户信息 - async getUserInfo() { - $$.showLoading(); - const res = await getUserInfoApi(); - $$.hideLoading(); - if (res.type) { - this.setData({ userInfo: res.data }); - } - }, + // 获取用户信息 + async getUserInfo() { + $$.showLoading(); + const res = await getUserInfoApi(); + $$.hideLoading(); + if (res.type) { + this.setData({ + userInfo: res.data + }); + } + }, - onLoad: function () { - this.getUserInfo(); - }, -}); + onLoad: function () {}, + + onShow(options) { + this.getUserInfo(); + }, +}); \ No newline at end of file diff --git a/gz-wxparty/pages/me/index.wxml b/gz-wxparty/pages/me/index.wxml index 47f976f..8e1ac24 100644 --- a/gz-wxparty/pages/me/index.wxml +++ b/gz-wxparty/pages/me/index.wxml @@ -1,64 +1,61 @@ <!--个人中心--> <common-page id="common-page"> - <view> - <view bindtap="handleGo" class="header"> - <view class="header-img"> - <image class="header-img-image" src="{{ userInfo.avatar }}" wx:if="{{ userInfo.avatar }}" /> - <van-icon name="user-circle-o" size="100rpx" wx:else /> - </view> - <view> - <view class="header-title">{{ userInfo.trueName || '微信用户'}}</view> - <view class="header-subTitle"> - <text>完善资料</text> - <van-icon name="records" size="28rpx" /> - </view> - </view> - </view> - <view class="main-card"> - <van-cell-group inset> - <van-cell is-link link-type="navigateTo" url="../../pages/messageCenter/index"> - <view class="main-card-item" slot="title"> - <image class="main-card-item-image" src="{{ imgUrl }}message.png" /> - <text>我的消息</text> - </view> - <view class="main-msgRound" wx:if="{{ userInfo.msgCount }}">{{ userInfo.msgCount }}</view> - </van-cell> - <van-cell - border="{{ false }}" - is-link - link-type="navigateTo" - url="{{userInfo.realStatus === '1' ? '../../pages/perfectInformation/index?isCheck=true' : '../../pages/realNameAuthentication/index'}}" - > - <view class="main-card-item" slot="title"> - <image class="main-card-item-image" src="{{ imgUrl }}realName.png" /> - <text>实名认证</text> - </view> - <view - class="main-realName {{ userInfo.realStatus === '1' ? 'main-realName-green' : 'main-realName-red'}}" - >{{ userInfo.realStatus === '1' ? '已认证' : '未认证' }}</view> - </van-cell> - </van-cell-group> - </view> - <view class="main-card"> - <van-cell-group inset> - <van-cell border="{{ false }}" is-link link-type="navigateTo" url="../../pages/agreement/index"> + <view> + <view class="header"> + <view class="header-img"> + <image class="header-img-image" src="{{ userInfo.avatar }}" wx:if="{{ userInfo.avatar }}" /> + <van-icon name="user-circle-o" size="100rpx" wx:else /> + </view> + <view> + <view bindtap="handleGo" class="header-title"> + <text>{{ userInfo.trueName || '游客'}}</text> + <image class="main-card-item-edit" src="../../images/me_3.png" mode="" /> + </view> + + <view wx:if="{{realStatus === '1'}}" class="header-subTitle"><text>最近登录时间: + <time-format format="YYYY年MM月DD日" value="{{ userInfo.loginTime }}" /> + </text></view> + </view> + </view> + <view class="main-card"> + <van-cell-group inset> + <!-- <van-cell wx:if="{{realStatus === '1'}}" is-link link-type="navigateTo" url="../../pages/messageCenter/index"> --> + <van-cell is-link link-type="navigateTo" url="../../pages/messageCenter/index"> + <view class="main-card-item" slot="title"> + <image class="main-card-item-image" src="../../images/me_2.png" /> + <text>我的消息</text> + </view> + <view class="main-msgRound" wx:if="{{ userInfo.msgCount }}">{{ userInfo.msgCount }}</view> + </van-cell> + <van-cell is-link link-type="navigateTo" url="{{userInfo.realStatus === '1' ? '../../pages/perfectInformation/index?isCheck=true' : '../../pages/realNameAuthentication/index'}}"> + <view class="main-card-item" slot="title"> + <image class="main-card-item-image" src="../../images/me_1.png" /> + <text>实名认证</text> + </view> + <view class="main-realName {{ userInfo.realStatus === 1 ? 'main-realName-green' : 'main-realName-red'}}">{{ userInfo.realStatus === 1 ? '已认证' : '未认证' }}</view> + </van-cell> + </van-cell-group> + </view> + <view class="main-card"> + <van-cell-group inset> + <!-- <van-cell border="{{ false }}" is-link link-type="navigateTo" url="../../pages/agreement/index"> <view class="main-card-item" slot="title"> <image class="main-card-item-image" src="{{ imgUrl }}agreement.png" /> <text>服务协议</text> </view> - </van-cell> - <!-- TODO:后期需求添加 --> - <!-- <van-cell is-link border="{{ false }}"> + </van-cell> --> + <!-- TODO:后期需求添加 --> + <!-- <van-cell is-link border="{{ false }}"> <view slot="title" class="main-card-item"> <image class="main-card-item-image" src="{{ imgUrl }}proposal.png" /> <text>反馈建议</text> </view> <view wx:if="{{ userInfo.opinionCount }}" class="main-msgRound">{{ userInfo.opinionCount }}</view> </van-cell>--> - </van-cell-group> - </view> - <view class="loginOut"> + </van-cell-group> + </view> + <!-- <view class="loginOut"> <van-button bind:click="handleLoginOut" block type="default">退出登录</van-button> - </view> - </view> -</common-page> + </view> --> + </view> +</common-page> \ No newline at end of file diff --git a/gz-wxparty/pages/me/index.wxss b/gz-wxparty/pages/me/index.wxss index 7c0f259..947108e 100644 --- a/gz-wxparty/pages/me/index.wxss +++ b/gz-wxparty/pages/me/index.wxss @@ -1,26 +1,30 @@ /* pages/me/index.wxss */ .header { - padding: 24rpx var(--padding-my); + padding: 0 var(--padding-my); background-color: var(--main-color); display: flex; align-items: center; - color: #ffffff; + color: #ffffff; + height: 524rpx; + justify-content: center; + flex-direction: column; } .header-img { - margin-right: 32rpx; overflow: hidden; } .header-img-image { - height: 100rpx; - width: 100rpx; + height: 256rpx; + width: 256rpx; border-radius: 50%; } .header-title { font-size: 36rpx; - margin-bottom: 16rpx; + margin-bottom: 16rpx; + margin-top: 32rpx; + text-align: center; } .header-subTitle { @@ -42,11 +46,17 @@ } .main-card-item-image { - height: 56rpx; - width: 56rpx; + height: 30rpx; + width: 30rpx; margin-right: 16rpx; } +.main-card-item-edit { + height: 30rpx; + width: 30rpx; + margin-left: 16rpx; +} + .main-msgRound { width: 40rpx; height: 40rpx; diff --git a/gz-wxparty/pages/myRegisterFlow/index.js b/gz-wxparty/pages/myRegisterFlow/index.js new file mode 100644 index 0000000..d1d39b8 --- /dev/null +++ b/gz-wxparty/pages/myRegisterFlow/index.js @@ -0,0 +1,47 @@ +// pages/myRegisterFlow/index.js +const $$ = require('../../utils/util'); +const app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + imgUrl: $$.url.img, + flows: [{ + title: '提交申请', + status: '1', + name1: '线上', + name2: '2024-7-12 12:00', + name3: '金融纠纷' + }, { + title: '事项办理', + status: '2', + name4: '2024-7-12 12:00', + name5: '白云区新市街司法所' + }, { + title: '事项办结', + status: '3', + name6: '2024-7-12 12:00', + name7: '1', + name7_1: '化解成功' + } + // , { + // title: '事项评价', + // status: '4', + // name8: '2024-7-12 12:00', + // name9: '张孟宇', + // name10: '4', + // name11: '工作人员认真负责结案结果符合预期' + // } + ] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, +}) \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterFlow/index.json b/gz-wxparty/pages/myRegisterFlow/index.json new file mode 100644 index 0000000..2bdf431 --- /dev/null +++ b/gz-wxparty/pages/myRegisterFlow/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "办理流程", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterFlow/index.wxml b/gz-wxparty/pages/myRegisterFlow/index.wxml new file mode 100644 index 0000000..6ff349e --- /dev/null +++ b/gz-wxparty/pages/myRegisterFlow/index.wxml @@ -0,0 +1,63 @@ +<!--pages/myRegisterFlow/index.wxml--> +<view class="main"> + <view class="flex" wx:for="{{flows}}" data-item="{{ item }}" data-index="{{ index }}" wx:key="index"> + <view class="left"> + <view class="icon"> + <van-icon size='16' name="{{imgUrl}}myRegisterList_5.png" /> + </view> + <view wx:if="{{index < 3}}" class="line"></view> + </view> + <view class="right" style="margin-bottom:{{index<flows.length-1 ?'32rpx':'0'}}"> + <view class="list-content-flex margin-top"> + <view class="list-content-value">{{item.title}}</view> + </view> + <view wx:if="{{item.status==='1'}}" class="list-content-flex margin-top"> + <view class="list-content-title">反映形式:</view> + <view class="list-content-value">{{item.name1}}</view> + </view> + <view wx:if="{{item.status==='1'}}" class="list-content-flex margin-top"> + <view class="list-content-title">申请时间:</view> + <view class="list-content-value">{{item.name2}}</view> + </view> + <view wx:if="{{item.status==='1'}}" class="list-content-flex margin-top"> + <view class="list-content-title">纠纷类型:</view> + <view class="list-content-value">{{item.name3}}</view> + </view> + <view wx:if="{{item.status==='2'}}" class="list-content-flex margin-top"> + <view class="list-content-title">受理时间:</view> + <view class="list-content-value">{{item.name4}}</view> + </view> + <view wx:if="{{item.status==='2'}}" class="list-content-flex margin-top"> + <view class="list-content-title">承办部门:</view> + <view class="list-content-value">{{item.name5}}</view> + </view> + <view wx:if="{{item.status==='3'}}" class="list-content-flex margin-top"> + <view class="list-content-title">办结时间:</view> + <view class="list-content-value">{{item.name6}}</view> + </view> + <view wx:if="{{item.status==='3'}}" class="list-content-flex margin-top"> + <view class="list-content-title">化解结果:</view> + <view class="list-content-value {{item.name7==='1'? 'green':item.name7==='2'? 'red':''}}">{{item.name7_1}}</view> + </view> + <view wx:if="{{item.status==='4'}}" class="list-content-flex margin-top"> + <view class="list-content-title">评价时间:</view> + <view class="list-content-value">{{item.name8}}</view> + </view> + <view wx:if="{{item.status==='4'}}" class="list-content-flex margin-top"> + <view class="list-content-title">评价人:</view> + <view class="list-content-value">{{item.name9}}</view> + </view> + <view wx:if="{{item.status==='4'}}" class="list-content-flex margin-top"> + <view class="list-content-title">评价等级:</view> + <view class="list-content-value"> + <van-rate value="{{item.name10}}" size="{{ 18 }}" count="5" color="#ffd21e" void-icon="star" void-color="#C9CDD4" bind:change="onChange" /> + </view> + </view> + <view wx:if="{{item.status==='4'}}" class="list-content-flex margin-top"> + <view class="list-content-title">评语:</view> + <view class="list-content-value">{{item.name11}}</view> + </view> + </view> + </view> +</view> +<view wx:if="{{flows.length < 4}}" class="myRegisterFlow_bind public-color" bindtap="onClick">进展太慢,催一下?</view> \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterFlow/index.wxss b/gz-wxparty/pages/myRegisterFlow/index.wxss new file mode 100644 index 0000000..adb8bad --- /dev/null +++ b/gz-wxparty/pages/myRegisterFlow/index.wxss @@ -0,0 +1,58 @@ +/* pages/myRegisterFlow/index.wxss */ +.main { + padding: 32rpx 24rpx; +} + +.flex { + display: flex; + gap: 24rpx; +} + +.icon { + width: 15px; + height: 15px; + background: #e8f3ff; + border-radius: 50%; + padding: 6rpx; +} + +.line { + height: 100%; + border-left: 1px solid #1a6fb8; +} + +.left { + display: flex; + flex-direction: column; + align-items: center; + gap: 8rpx; +} + +.list-content-flex { + display: flex; + align-items: flex-start; +} + +.margin-top { + margin-top: 8rpx; +} + +.list-content-title { + width: 140rpx; + font-size: 28rpx; + color: rgba(23, 26, 29, 0.60); +} + +.list-content-value { + font-size: 28rpx; + flex: 1; +} + +.green { + color: #00B42A; +} + +.myRegisterFlow_bind { + padding: 0 24rpx; + text-align: center; +} \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterList/index.js b/gz-wxparty/pages/myRegisterList/index.js new file mode 100644 index 0000000..e4fdbf1 --- /dev/null +++ b/gz-wxparty/pages/myRegisterList/index.js @@ -0,0 +1,153 @@ +// pages/myRegisterList/index.js +const $$ = require('../../utils/util'); +const app = getApp(); + + +function pageQueryApi(param) { + return $$.request({ + url: 'caseInfo/pageCard', + type: 'get', + submitData: param || {}, + service: 'mediate' + }) +} + +Page({ + + /** + * 页面的初始数据 + */ + data: { + imgUrl: $$.url.img, + search: { + page: 1, + size: 10, + processStatus: '', + personType: '1' + }, + searchValue: '全部', + showModal: false, + processStatusList: [{ + label: '全部', + value: '', + hover: true + }, { + label: '待受理', + value: '1' + }, { + label: '办理中', + value: '2' + }, { + label: '已结案', + value: '3' + }, { + label: '不予受理', + value: '4' + }], + dataList: [{ + title: '', + show: true + }, { + title: '', + show: false + }] + }, + + // 查看 + GoPage(e) { + let url = e.currentTarget.dataset.url; + wx.navigateTo({ + url: url, + }); + }, + + // 关闭筛选框 + addClosePopup() { + this.setData({ + showModal: false + }) + }, + + // 打开筛选条件 + searchChange() { + this.setData({ + showModal: true + }) + }, + + searchSelect(e) { + let idx = e.currentTarget.dataset.index; + let item = e.currentTarget.dataset.item; + let searchData = { + ...this.data.search, + processStatus: item.value + } + this.pageQuery(searchData) + this.setData({ + processStatusList: this.data.processStatusList?.map((item, index) => ({ + ...item, + hover: index === idx ? true : false + })), + searchValue: item.label + }) + }, + + // 切换tab + threeTagChange(e) { + value = e.detail; + this.setData({ + search: { + ...this.data.search, + personType: value, + } + }); + }, + + // 折叠列表 + changeShow(e) { + let idx = e.currentTarget.dataset.index; + this.data.dataList[idx].show = !this.data.dataList[idx].show; + this.setData({ + dataList: this.data.dataList + }) + }, + + async pageQuery(params, type) { + $$.showLoading(); + const res = await pageQueryApi(params); + $$.hideLoading(); + if (this.data.loading) { + this.setData({ + loading: false + }); + } + if (res.type) { + if (params.page === 1) { + this.data.data = res.data.content || []; + } else { + this.data.data = this.data.data.concat(res.data.content || []); + } + this.setData({ + search: params, + data: this.data.data, + total: res.data.totalElements || 0 + }); + if (type === 'onPullDownRefresh') { + $$.showToast({ + title: '已是最新记录', + duration: 1000 + }); + wx.stopPullDownRefresh(); + } + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.pageQuery(this.data.search) + }, + + +}) \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterList/index.json b/gz-wxparty/pages/myRegisterList/index.json new file mode 100644 index 0000000..fc37723 --- /dev/null +++ b/gz-wxparty/pages/myRegisterList/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "进度查询", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterList/index.wxml b/gz-wxparty/pages/myRegisterList/index.wxml new file mode 100644 index 0000000..49e12f7 --- /dev/null +++ b/gz-wxparty/pages/myRegisterList/index.wxml @@ -0,0 +1,77 @@ +<!--pages/myRegisterList/index.wxml--> +<view class="three-tag"> + <van-tabs bind:click="threeTagChange" active="{{search.personType}}"> + <van-tab title="我是申请方" name="1"></van-tab> + <van-tab title="我是被申请方" name="2"></van-tab> + </van-tabs> +</view> +<!-- 筛选 --> +<view bindtap="searchChange" class="search"> + <view class="search-title">全部</view> + <van-icon size='9' name="{{imgUrl}}down.png" /> +</view> + +<view class="list" wx:for="{{dataList}}" data-item="{{ item }}" data-index="{{ index }}" wx:key="index"> + <view style="{{!item.show&&'border-bottom:none'}}" class="list-top"> + <view>2024年7月12日反映诉求</view> + <view class="list-top-r"> + <view class="list-top-r-tag">待受理</view> + <van-icon wx:if="{{item.show}}" size='16' bindtap="changeShow" data-index="{{ index }}" name="{{imgUrl}}myRegisterList_1.png" /> + <van-icon wx:else size='16' bindtap="changeShow" data-index="{{ index }}" name="{{imgUrl}}myRegisterList_4.png" /> + </view> + </view> + <view class="list-content" wx:if="{{item.show}}"> + <view class="list-content-flex"> + <view class="list-content-title">申请时间</view> + <view class="list-content-value">2024-7-12 12:00</view> + </view> + <view class="list-content-flex margin-top"> + <view class="list-content-title">申请方</view> + <view class="list-content-value">李晓明</view> + </view> + <view class="list-content-flex margin-top"> + <view class="list-content-title">被申请方</view> + <view class="list-content-value">广东好又多贸易有限公司、张菲菲</view> + </view> + <view class="list-border"></view> + <view class="list-detail"> + <view class="list-detail-l"> + <van-icon size='16' name="{{imgUrl}}myRegisterList_1.png" /> + <view class="list-detail-title">事项详情</view> + </view> + <view class="list-detail-r">查看</view> + </view> + <view class="list-detail"> + <view class="list-detail-l"> + <van-icon size='16' name="{{imgUrl}}myRegisterList_2.png" /> + <view class="list-detail-title">解纷助手</view> + </view> + <view class="list-detail-r">查看</view> + </view> + <view bindtap="GoPage" data-url="../../pages/myRegisterFlow/index" class="list-detail"> + <view class="list-detail-l"> + <van-icon size='16' name="{{imgUrl}}myRegisterList_3.png" /> + <view class="list-detail-title">办理流程</view> + </view> + <view class="list-detail-r">查看</view> + </view> + </view> +</view> + +<van-overlay show="{{ showModal }}" bind:click="addClosePopup"> + +</van-overlay> + +<view wx:if="{{ showModal }}" class="showModal-search"> + <view bindtap="searchChange" class="search"> + <view class="search-title">{{searchValue}}</view> + <van-icon size='9' name="{{imgUrl}}down.png" /> + </view> + <view class="showModal-select"> + <view class="showModal-select-title">办理进度</view> + <view bindtap="searchSelect" class="showModal-select-flex" wx:for="{{processStatusList}}" data-item="{{ item }}" data-index="{{ index }}" wx:key="index"> + <view class="showModal-select-flex-text {{item.hover&& 'public-color'}}">{{item.label}}</view> + <van-icon wx:if="{{item.hover}}" size='15' name="{{imgUrl}}myRegisterList_5.png" /> + </view> + </view> +</view> \ No newline at end of file diff --git a/gz-wxparty/pages/myRegisterList/index.wxss b/gz-wxparty/pages/myRegisterList/index.wxss new file mode 100644 index 0000000..229e5ba --- /dev/null +++ b/gz-wxparty/pages/myRegisterList/index.wxss @@ -0,0 +1,141 @@ +/* pages/myRegisterList/index.wxss */ +.search { + display: flex; + background-color: #fff; + margin: 24rpx; + padding: 24rpx; + align-items: center; + border-radius: 5px; +} + +.showModal-search { + position: absolute; + top: 96rpx; + width: 100%; + z-index: 991; +} + +.showModal-select { + background-color: #fff; + margin: 0 24rpx; + border-radius: 5px; + padding: 32rpx; +} + +.showModal-select-title { + color: rgba(23, 26, 29, 0.60); +} + +.showModal-select-flex { + display: flex; + margin-top: 24rpx; + justify-content: space-between; +} + +.search-title { + margin-right: 16rpx; +} + +.three-tag {} + +.three-tag .van-tabs__wrap { + height: 96rpx !important; +} + +.three-tag .van-tabs__nav { + height: 100%; +} + +.three-tag .van-tabs__scroll--line { + height: 100%; +} + +.three-tag .van-tab { + height: 100%; + line-height: 96rpx !important; +} + +.list { + background-color: #fff; + margin: 16rpx 24rpx 0; + border-radius: 4px; +} + +.list-top { + border-bottom: 1px dashed #e5e6eb; + padding: 24rpx; + display: flex; + justify-content: space-between; + align-items: center; +} + +.list-top-r { + display: flex; + align-items: center; + gap: 10rpx; +} + +.list-top-r-tag { + background: #eff8ff; + border-radius: 2px; + padding: 7rpx 12rpx; + color: var(--main-color); +} + +.list-content { + padding: 24rpx; +} + +.list-content-flex { + display: flex; + align-items: flex-start; + gap: 48rpx; +} + +.margin-top { + margin-top: 16rpx; +} + +.list-content-title { + width: 120rpx; + color: rgba(23, 26, 29, 0.60); +} + +.list-content-value { + flex: 1; +} + +.list-border { + border-bottom: 1px solid #E5E6EB; + margin-top: 24rpx; +} + +.list-detail { + display: flex; + justify-content: space-between; + background-color: #f7f8fa; + margin-top: 24rpx; + padding: 16rpx 24rpx; +} + +.list-detail-l { + display: flex; + gap: 8rpx; +} + +.list-detail-title { + font-size: 28rpx; +} + +.list-detail-r { + color: var(--main-color); + font-size: 28rpx; +} + +.one-add-person-tip .van-popup--round { + width: 90%; +} + +.one-add-person-tip .van-popup--center { + top: 198rpx !important; +} \ No newline at end of file diff --git a/gz-wxparty/pages/organizeDetail/index.js b/gz-wxparty/pages/organizeDetail/index.js new file mode 100644 index 0000000..bb51c26 --- /dev/null +++ b/gz-wxparty/pages/organizeDetail/index.js @@ -0,0 +1,51 @@ +// pages/organizeDetail/index.js +const $$ = require('../../utils/util'); + +function getByIdApi(param) { + return $$.request({ + url: 'ctUnit/getById', + type: 'get', + submitData: param || {}, + service: 'cust' + }) +} +Page({ + + /** + * 页面的初始数据 + */ + data: { + data: {}, + }, + + + // 获取纠纷案件详情 + async getById(data) { + $$.showLoading(); + const res = await getByIdApi({ + id: data.id + }); + $$.hideLoading(); + if (res.type) { + let data = res.data || {}; + this.setData({ + data + }); + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.getById(options); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + +}) \ No newline at end of file diff --git a/gz-wxparty/pages/organizeDetail/index.json b/gz-wxparty/pages/organizeDetail/index.json new file mode 100644 index 0000000..b7c5e36 --- /dev/null +++ b/gz-wxparty/pages/organizeDetail/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "调解组织详情", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/organizeDetail/index.wxml b/gz-wxparty/pages/organizeDetail/index.wxml new file mode 100644 index 0000000..c6f7c0e --- /dev/null +++ b/gz-wxparty/pages/organizeDetail/index.wxml @@ -0,0 +1,28 @@ +<!--pages/ssimDetail/index.wxml--> +<common-page> + <view class="card"> + <view class="cell3"> + <view class="cell-title-placeholder">服务中心名称</view> + <view>{{ data.unitName || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">办公地址</view> + <view>{{ data.addr || '-' }}</view> + </view> + <map longitude="113.2038664" latitude="23.1622136" show-location="false" scale="16" style="width: 100%; height: 280rpx;"></map> + <view class="cell3"> + <view class="cell-title-placeholder">邮政编码</view> + <view>{{ data.postalCode || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">联系电话</view> + <view>{{ data.dutyMobile || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">办公时间</view> + <view>{{data.workTimeWeek||'-'}}</view> + <view>{{data.workTimeAm||'-'}}</view> + <view>{{data.workTimePm||'-'}}</view> + </view> + </view> +</common-page> \ No newline at end of file diff --git a/gz-wxparty/pages/organizeDetail/index.wxss b/gz-wxparty/pages/organizeDetail/index.wxss new file mode 100644 index 0000000..fa6f248 --- /dev/null +++ b/gz-wxparty/pages/organizeDetail/index.wxss @@ -0,0 +1,16 @@ +/* pages/organizeDetail/index.wxss *//* pages/ssimDetail/index.wxss */ +.card { + padding: 24rpx 32rpx; + background-color: #ffffff; + border-radius: var(--border-radius-card); +} + +.cell3 { + margin-bottom: 16rpx; +} + +.cell-title-placeholder { + font-size: 28rpx; + line-height: 44rpx; + color: rgba(0, 0, 0, 0.5); +} \ No newline at end of file diff --git a/gz-wxparty/pages/organizeList/index.js b/gz-wxparty/pages/organizeList/index.js new file mode 100644 index 0000000..17381bc --- /dev/null +++ b/gz-wxparty/pages/organizeList/index.js @@ -0,0 +1,259 @@ +const $$ = require('../../utils/util'); +const app = getApp(); + +function pageZzQueryApi(param) { + return $$.request({ + url: 'ctUnit/pageTjQuery', + type: 'get', + submitData: param || {}, + service: 'cust' + }) +} + +Page({ + /** + * 页面的初始数据 + */ + userInfo: {}, + location: [], // 省市区等地理资源 + data: { + imgUrl: $$.url.img, + search: { + prov: '', + provName: '', + city: '', + cityName: '', + area: '', + areaName: '', + road: '', + roadName: '', + keyword: '', + page: 1, + size: 10, + }, // 查询条件 + data: [], // 数据 + total: 0, // 总数 + popup: { + formtype: '', + index: 0, + }, // 下拉弹出框数据 + }, + + // 下拉框选择确认 + handleConfirmPicker({ + detail + }) { + let type = this.data.popup.type, + value = detail.detail.value, + arr = []; + this.data.popup.visible = false; + if (type === 'caseCause') { + arr = ['caseType', 'caseTypeName']; + arr.forEach((x, t) => { + this.data.search[x] = value[0][t === 0 ? 'value' : 'label']; + }); + } else if (type === 'location') { + arr = [ + ['city', 'cityName'], + ['area', 'areaName'], + ['road', 'roadName'], + ]; + arr.forEach((x, t) => { + this.data.search[x[0]] = value[t]?.value || ''; + this.data.search[x[1]] = value[t]?.label || ''; + }); + } + this.setData({ + popup: this.data.popup, + search: this.data.search + }); + }, + + // 多行下拉选择时,省市区选择 + handleChangeColumns(e) { + if (this.data.popup.type === 'location') { + let selectData = $$.changeLocation(e, this.location, this.data.popup.selectData); + this.setData({ + popup: { + ...this.data.popup, + selectData + } + }); + } + }, + + // 下拉框选择开启 + handleShowPopup(e) { + let type = e.currentTarget.dataset.type; + let selectData = []; + if (type === 'location') { + if (this.location.length === 0) { + return false; + } + let selectOption = JSON.parse(JSON.stringify(this.location)); + let arr = $$.getLocationIndex(this.location, this.data.search); // 计算默认的市区县下标 + selectData = [{ + values: selectOption, + defaultIndex: arr[0] + }, + { + values: selectOption[arr[0]].children, + defaultIndex: arr[1] + }, + { + values: selectOption[arr[0]].children[arr[1]].children || [], + defaultIndex: arr[2] + }, + ]; + selectData.forEach((x) => { + x.values.forEach((y) => { + delete y.children; + }); + }); + } else { + let selectOption = this.select[type]; + selectData = [{ + values: selectOption, + defaultIndex: 0 + }]; + } + this.setData({ + popup: { + formtype: e.currentTarget.dataset.formtype, + index: e.currentTarget.dataset.index, + visible: true, + title: e.currentTarget.dataset.title, + type: type, + selectData: selectData, + }, + }); + }, + + // 关闭下拉框选择 + handleClosePopup() { + this.data.popup.visible = false; + this.setData({ + popup: this.data.popup + }); + }, + + searchButton() { + this.pageZzQuery(this.data.search) + }, + + async pageZzQuery(params, type) { + $$.showLoading(); + const res = await pageZzQueryApi(params); + $$.hideLoading(); + if (this.data.loading) { + this.setData({ + loading: false + }); + } + if (res.type) { + if (params.page === 1) { + this.data.data = res.data.content || []; + } else { + this.data.data = this.data.data.concat(res.data.content || []); + } + this.setData({ + search: params, + data: this.data.data, + total: res.data.totalElements || 0 + }); + if (type === 'onPullDownRefresh') { + $$.showToast({ + title: '已是最新记录', + duration: 1000 + }); + wx.stopPullDownRefresh(); + } + } + }, + + // 关闭底部弹窗 + handleClosePopupMsg() { + if (this.data.popupMsg.type === 1) { + this.getUserInfo(this.data.popupMsg.intentionObj); + } else { + this.setData({ + popupMsg: { + show: false + } + }); + } + }, + + // 滚动到底部获取案件 + handlescrolltolower() { + if (this.data.data.length >= this.data.total) { + return false; + } + if (!this.data.loading) { + this.data.loading = true; + this.setData({ + loading: this.data.loading + }); + let submitData = { + ...this.data.search + }; + submitData.page = submitData.page + 1; + this.pageZzQuery(submitData); + } + }, + + // 返回首页 + handleGoHomepage() { + if (this.data.changeVisible) { + wx.navigateBack({ + delta: 1, + }); + return false; + } + wx.reLaunch({ + url: '../../pages/homePage/index', + }); + }, + + // 获取省市区等地理资源 + async getLocationData() { + $$.showLoading(); + const res = await $$.commonRequest({ + url: `${$$.url.assets}locationSelect.json`, + type: 'get' + }); + $$.hideLoading(); + if (res) { + let location = []; + $$.province.forEach((x) => { + location.push(res[x][0]); + }); + this.location = location; + } + }, + + // 跳转详情 + _handleGoPage(e) { + let url = e.currentTarget.dataset.url; + let id = e.currentTarget.dataset.id; + wx.navigateTo({ + url: url + '?id=' + id, + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.pageZzQuery(this.data.search) + this.getLocationData(); + }, + + onShow: function () { + // this.pageZzQuery(this.data.search); + }, + + onHide: function () {}, + + onUnload: function () {}, +}); \ No newline at end of file diff --git a/gz-wxparty/pages/organizeList/index.json b/gz-wxparty/pages/organizeList/index.json new file mode 100644 index 0000000..99ee6f3 --- /dev/null +++ b/gz-wxparty/pages/organizeList/index.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "调解组织查询", + "usingComponents": { + } +} \ No newline at end of file diff --git a/gz-wxparty/pages/organizeList/index.wxml b/gz-wxparty/pages/organizeList/index.wxml new file mode 100644 index 0000000..991e464 --- /dev/null +++ b/gz-wxparty/pages/organizeList/index.wxml @@ -0,0 +1,41 @@ +<common-page bind:onCancelPicker="handleClosePopup" bind:onChangePicker="handleChangeColumns" bind:onClosePopup="handleClosePopup" bind:onConfirmPicker="handleConfirmPicker" popup="{{ popup }}"> + <view class="ssimList"> + <!-- 综治中心查询 --> + <view class="card"> + <view class="cell"> + <view bindtap="handleShowPopup" data-type="location" class="cell-arrow cell-left"> + <view class="cell-left-l">{{ search.roadName ? search.roadName : '未选择' }}</view> + <van-icon name="arrow-down" /> + </view> + <view style="width:16rpx"></view> + <view class="cell-right"> + <van-icon name="search" /> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0;background-color:#f2f3f5" data-key="keyword" placeholder="请输入中心名称" value="{{ search.keyword }}" /> + <view style="color:#E5E6EB">|</view> + <view bindtap="searchButton" class="public-color">查询</view> + </view> + </view> + </view> + + <!-- 列表 --> + <van-empty description="暂无数据" wx:if="{{ total === 0 }}" /> + <view class="ssim-scroll" wx:else> + <scroll-view bindscrolltolower="handlescrolltolower" scroll-y="true" style="height: 100%;"> + <view class="card-box" wx:for="{{ data }}" wx:key="index"> + <view class="card-list" bindtap="_handleGoPage" data-id="{{ item.id }}" data-url="../../pages/organizeDetail/index"> + <view class="card-title">{{item.unitName}}</view> + <view class="card-subTitle"><text class="card-subTitle-l">办公地址:</text>{{item.addr}}</view> + <view class="card-subTitle"><text class="card-subTitle-l">联系电话:</text>{{item.dutyMobile}}</view> + </view> + </view> + <block> + <van-divider contentPosition="center" custom-style="margin-top: 12px;" wx:if="{{ data.length >= total && data.length !== 0 }}">没有更多了</van-divider> + <view class="myMediate-scroll-loading" wx:if="{{ loading }}"> + <van-loading type="spinner" /> + </view> + </block> + </scroll-view> + </view> + <view class="safeHeight" /> + </view> +</common-page> \ No newline at end of file diff --git a/gz-wxparty/pages/organizeList/index.wxss b/gz-wxparty/pages/organizeList/index.wxss new file mode 100644 index 0000000..703e19e --- /dev/null +++ b/gz-wxparty/pages/organizeList/index.wxss @@ -0,0 +1,78 @@ + +@import '../../styles/public_components.wxss'; + +.ssimList { + height: 100%; + display: flex; + flex-direction: column; + position: absolute; + left: 0; + right: 0; +} + +.card { + background-color: #ffffff; + padding: 0 24rpx; +} + +.cell-left { + display: flex; + width: 28%; + justify-content: space-between; + align-items: center; + background: #f2f3f5; + padding: 12rpx 16rpx; + border-radius: 10rpx; +} + +.cell-left-l { + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: var(--font-size-md, 14px); +} + +.cell-right { + flex: 1; + display: flex; + justify-content: space-between; + align-items: center; + background: #f2f3f5; + padding: 12rpx 16rpx; + border-radius: 10rpx; + font-size: var(--font-size-md, 14px); +} + +.card-box { + padding: 24rpx 24rpx 0 24rpx; +} + +.card { + border-radius: 2px; + background-color: #fff; +} + +.card-list { + border-radius: 2px; + background-color: #fff; + padding: 24rpx +} + +.ssim-scroll { + flex: 1; + overflow: hidden; +} + +.card-title { + font-size: 30rpx; + line-height: 46rpx; +} + +.card-subTitle { + padding-top: 8rpx; +} + +.card-subTitle-l { + color: rgba(23, 26, 29, 0.60); +} \ No newline at end of file diff --git a/gz-wxparty/pages/perfectInformation/index.js b/gz-wxparty/pages/perfectInformation/index.js index b7bc4bc..422da58 100644 --- a/gz-wxparty/pages/perfectInformation/index.js +++ b/gz-wxparty/pages/perfectInformation/index.js @@ -3,198 +3,217 @@ // 保存信息 function setUserInfoApi(submitData) { - return $$.request({ url: 'paUser/perfectInfo', type: 'post', submitData, service: 'cust' }); + return $$.request({ + url: 'paUser/perfectInfo', + type: 'post', + submitData, + service: 'cust' + }); } Page({ - /** - * 页面的初始数据 - */ - copySubmitData: {}, // 数据复制 - isCheck: false, - data: { - submitData: { - trueName: '', - mobile: '', - sex: '09_00003-1', - sexName: '男', - idcardType: '09_00015-1', - idcardTypeName: '身份证', - idcard: '', - prov: '', - provName: '', - city: '', - cityName: '', - area: '', - areaName: '', - road: '', - roadName: '', - village: '', - villageName: '', - addr: '', - }, - popup: {}, // 下拉弹出框数据 - isCheck: false, // 是否只是查看 - isImproveData: false, // 是否是完善资料进入,则不显示身份证的修改 - }, + /** + * 页面的初始数据 + */ + copySubmitData: {}, // 数据复制 + isCheck: false, + data: { + submitData: { + trueName: '', + mobile: '', + sex: '09_00003-1', + sexName: '男', + idcardType: '09_00015-1', + idcardTypeName: '身份证', + idcard: '', + prov: '', + provName: '', + city: '', + cityName: '', + area: '', + areaName: '', + road: '', + roadName: '', + village: '', + villageName: '', + addr: '', + }, + popup: {}, // 下拉弹出框数据 + isCheck: false, // 是否只是查看 + isImproveData: false, // 是否是完善资料进入,则不显示身份证的修改 + }, - // 展示弹出层 - handleShowPopup(e) { - this.setData({ popup: e.detail }); - }, + // 展示弹出层 + handleShowPopup(e) { + this.setData({ + popup: e.detail + }); + }, - // 关闭弹出层 - handleClosePopup() { - this.data.popup.visible = false; - this.setData({ popup: this.data.popup }); - }, + // 关闭弹出层 + handleClosePopup() { + this.data.popup.visible = false; + this.setData({ + popup: this.data.popup + }); + }, - // 下拉框确认选择 - handleConfirmPicker({ detail }) { - let type = this.data.popup.type; - let value = detail.detail.value; - let arr = []; - this.data.popup.visible = false; - if (type === 'location') { - arr = [ - ['prov', 'provName'], - ['city', 'cityName'], - ['area', 'areaName'], - ['road', 'roadName'], - ['village', 'villageName'], - ]; - arr.forEach((x, t) => { - this.data.submitData[x[0]] = value[t]?.value || ''; - this.data.submitData[x[1]] = value[t]?.label || ''; - }); - } else { - if (type === 'cardType') { - arr = ['idcardType', 'idcardTypeName']; - } else if (type === 'sex') { - arr = ['sex', 'sexName']; - } - arr.forEach((x, t) => { - this.data.submitData[x] = value[t === 0 ? 'value' : 'label']; - }); - } - this.setData({ submitData: this.data.submitData, popup: this.data.popup }); - }, + // 下拉框确认选择 + handleConfirmPicker({ + detail + }) { + let type = this.data.popup.type; + let value = detail.detail.value; + let arr = []; + this.data.popup.visible = false; + if (type === 'location') { + arr = [ + ['prov', 'provName'], + ['city', 'cityName'], + ['area', 'areaName'], + ['road', 'roadName'], + ['village', 'villageName'], + ]; + arr.forEach((x, t) => { + this.data.submitData[x[0]] = value[t]?.value || ''; + this.data.submitData[x[1]] = value[t]?.label || ''; + }); + } else { + if (type === 'cardType') { + arr = ['idcardType', 'idcardTypeName']; + } else if (type === 'sex') { + arr = ['sex', 'sexName']; + } + arr.forEach((x, t) => { + this.data.submitData[x] = value[t === 0 ? 'value' : 'label']; + }); + } + this.setData({ + submitData: this.data.submitData, + popup: this.data.popup + }); + }, - // form的change - handleChange(e) { - const { key, value } = e.detail; - this.data.submitData[key] = value; - this.setData({ submitData: this.data.submitData }); - }, + // form的change + handleChange(e) { + const { + key, + value + } = e.detail; + this.data.submitData[key] = value; + this.setData({ + submitData: this.data.submitData + }); + }, - // 修改picker的列时触发 - handleChangeColumns(e) { - if (this.data.popup.type === 'location') { - let selectData = $$.changeLocation(e, this.selectComponent('#personal-data-dom').location, this.data.popup.selectData); - this.setData({ popup: { ...this.data.popup, selectData } }); - } - }, + // 修改picker的列时触发 + handleChangeColumns(e) { + if (this.data.popup.type === 'location') { + let selectData = $$.changeLocation(e, this.selectComponent('#personal-data-dom').location, this.data.popup.selectData); + this.setData({ + popup: { + ...this.data.popup, + selectData + } + }); + } + }, - // 验证 - checkSubmitData() { - if (this.data.submitData.mobile && !$$.mobileRegExp(this.data.submitData.mobile)) { - $$.showToast({ title: '请输入正确的手机号码' }); - return false; - } - let userInfo = wx.getStorageSync('userInfo'); - let that = this; - if (userInfo.realStatus === '1' && this.data.submitData.trueName !== this.copySubmitData.trueName) { - $$.showModal({ - content: '您修改了姓名,修改后需重新实名认证,是否继续操作?', - success: (res) => { - if (res.confirm) { - userInfo.realStatus = '99'; - wx.setStorageSync('userInfo', userInfo); - that.handleSave(); - } - }, - }); - return false; - } - if (userInfo.realStatus === '1' && this.data.submitData.idcard !== this.copySubmitData.idcard) { - $$.showModal({ - content: '您修改了身份证号码,修改后需重新实名认证,是否继续操作?', - success: (res) => { - if (res.confirm) { - userInfo.realStatus = '99'; - wx.setStorageSync('userInfo', userInfo); - that.handleSave(); - } - }, - }); - return false; - } - that.handleSave(); - }, + // 验证 + checkSubmitData() { + if (this.data.submitData.mobile && !$$.mobileRegExp(this.data.submitData.mobile)) { + $$.showToast({ + title: '请输入正确的手机号码' + }); + return false; + } + let userInfo = wx.getStorageSync('userInfo'); + let that = this; + if (userInfo.realStatus === '1' && this.data.submitData.trueName !== this.copySubmitData.trueName) { + $$.showModal({ + content: '您修改了姓名,修改后需重新实名认证,是否继续操作?', + success: (res) => { + if (res.confirm) { + userInfo.realStatus = '99'; + wx.setStorageSync('userInfo', userInfo); + that.handleSave(); + } + }, + }); + return false; + } + if (userInfo.realStatus === '1' && this.data.submitData.idcard !== this.copySubmitData.idcard) { + $$.showModal({ + content: '您修改了身份证号码,修改后需重新实名认证,是否继续操作?', + success: (res) => { + if (res.confirm) { + userInfo.realStatus = '99'; + wx.setStorageSync('userInfo', userInfo); + that.handleSave(); + } + }, + }); + return false; + } + that.handleSave(); + }, - // 保存 - async handleSave() { - $$.showLoading(); - const res = await setUserInfoApi(this.data.submitData); - $$.hideLoading(); - if (res.type) { - $$.showToast({ title: '操作成功', icon: 'success' }); - let realStatus = wx.getStorageSync('userInfo')?.realStatus; - if (realStatus === '99') { - $$.showModal({ - title: '实名认证提醒', - content: '检测到您尚未完成实名认证,认证后您将享受到更加完善的调解服务,是否现在前往认证?', - cancelText: '暂不认证', - confirmText: '前往认证', - success: (res) => { - if (res.confirm) { - wx.navigateTo({ - url: '../../pages/realNameAuthentication/index?backNum=2', - }); - } else { - wx.navigateBack({ - delta: 1, - }); - } - }, - }); - } else { - await $$.sleep(); - wx.navigateBack({ - delta: 1, - }); - } - } - }, + // 保存 + async handleSave() { + $$.showLoading(); + const res = await setUserInfoApi(this.data.submitData); + $$.hideLoading(); + if (res.type) { + $$.showToast({ + title: '操作成功', + icon: 'success' + }); + await $$.sleep(); + wx.navigateBack({ + delta: 1, + success: function (res) { + // 返回页面刷新接口 + wx.emitEvent('getUserInfo', {}); + } + }); + } + }, - // 获取个人信息 - getUserInfo(e) { - let data = e.detail || {}; - let keys = Object.keys(this.data.submitData); - keys.forEach((x) => { - if (data[x]) { - this.data.submitData[x] = data[x]; - } - }); - if (this.isCheck && this.data.submitData.idcardType === '09_00015-1') { - this.data.submitData.idcard = `${this.data.submitData.idcard?.substring(0, 6)}********${this.data.submitData.idcard?.substring(14)}`; - } - this.setData({ submitData: this.data.submitData }); - this.copySubmitData = Object.assign({}, this.data.submitData); - }, + // 获取个人信息 + getUserInfo(e) { + let data = e.detail || {}; + let keys = Object.keys(this.data.submitData); + keys.forEach((x) => { + if (data[x]) { + this.data.submitData[x] = data[x]; + } + }); + if (this.isCheck && this.data.submitData.idcardType === '09_00015-1') { + this.data.submitData.idcard = `${this.data.submitData.idcard?.substring(0, 6)}********${this.data.submitData.idcard?.substring(14)}`; + } + this.setData({ + submitData: this.data.submitData + }); + this.copySubmitData = Object.assign({}, this.data.submitData); + }, - // 获取手机号码 - async handleGetPhoneNumber(e) { - let phone = await this.selectComponent('#common-page').handleGetPhoneNumber(e.detail); - this.data.submitData.mobile = phone; - this.setData({ submitData: this.data.submitData }); - }, + // 获取手机号码 + async handleGetPhoneNumber(e) { + let phone = await this.selectComponent('#common-page').handleGetPhoneNumber(e.detail); + this.data.submitData.mobile = phone; + this.setData({ + submitData: this.data.submitData + }); + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.setData({ isCheck: !!options.isCheck, isImproveData: !!options.type }); - this.isCheck = !!options.isCheck; - }, -}); + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + isCheck: !!options.isCheck, + isImproveData: !!options.type + }); + this.isCheck = !!options.isCheck; + }, +}); \ No newline at end of file diff --git a/gz-wxparty/pages/perfectInformation/index.json b/gz-wxparty/pages/perfectInformation/index.json index 78f9995..f97dbcc 100644 --- a/gz-wxparty/pages/perfectInformation/index.json +++ b/gz-wxparty/pages/perfectInformation/index.json @@ -1,5 +1,5 @@ { - "navigationBarTitleText": "完善资料", + "navigationBarTitleText": "个人信息", "usingComponents": { "personal-data-dom": "../../components/personal-data-dom/index" } diff --git a/gz-wxparty/pages/perfectInformation/index.wxml b/gz-wxparty/pages/perfectInformation/index.wxml index 0aa5ec4..e29728f 100644 --- a/gz-wxparty/pages/perfectInformation/index.wxml +++ b/gz-wxparty/pages/perfectInformation/index.wxml @@ -22,7 +22,7 @@ isImproveData="{{ isImproveData }}" /> <view class="submit" wx:if="{{ !isCheck }}"> - <van-button bind:click="handleSave" block type="primary">保存</van-button> + <van-button bind:click="handleSave" block type="primary">更新</van-button> <view class="safeHeight" /> </view> </common-page> diff --git a/gz-wxparty/pages/perfectInformation/index.wxss b/gz-wxparty/pages/perfectInformation/index.wxss index 17cf47b..c3eac46 100644 --- a/gz-wxparty/pages/perfectInformation/index.wxss +++ b/gz-wxparty/pages/perfectInformation/index.wxss @@ -3,6 +3,7 @@ position: fixed; bottom: 0; left: 0; - right: 0; + right: 0; + background: #fff; padding: var(--padding-my); } diff --git a/gz-wxparty/pages/register/index.js b/gz-wxparty/pages/register/index.js index 6ffc318..b290991 100644 --- a/gz-wxparty/pages/register/index.js +++ b/gz-wxparty/pages/register/index.js @@ -12,83 +12,11 @@ }); } -// 获取案件详情 -function getCaseDetailApi(submitData) { +function caseRegisterSaveApi(submitData) { return $$.request({ - url: 'paCaseInfo/getCaseInfo?id=' + submitData, - type: 'get', - service: 'mediate' - }); -} - -// 获取保存的草稿案件 -function getDraftCaseApi(type) { - return $$.request({ - url: 'paCaseInfo/listByInputUserAndStatus?inputStatus=' + type, - type: 'get', - service: 'mediate' - }); -} - -// 保存草稿 or 保存案件 -function submitCaseApi(submitData) { - return $$.request({ - url: 'paCaseInfo/applyCase', + url: 'caseInfo/caseRegister', type: 'post', submitData, - service: 'mediate' - }); -} - -// 检查请求中的风险 -function checkCaseClaimRiskApi(submitData) { - return $$.request({ - url: 'guide/checkCaseClaimRisk', - type: 'post', - submitData, - v1: true, - service: 'mediate' - }); -} - -// 获取历史填写过的人员数据 -function getPersonHistoryApi() { - return $$.request({ - url: 'paCaseInfo/pickUser', - type: 'get', - service: 'mediate' - }); -} - -//类案推荐缓存 -function getCaseApi(submitData) { - return $$.request({ - url: 'guide/cacheLatjCaseGuide', - submitData, - type: 'get', - v1: true, - service: 'mediate' - }); -} - -//案件特征 -function getFeatureApi(submitData) { - return $$.request({ - url: 'guide/cacheCaseFeature', - submitData, - type: 'get', - v1: true, - service: 'mediate' - }); - } - -//调解策略及争议焦点 -function getCacheOpenAiCaseGuideList(submitData) { - return $$.request({ - url: 'guide/cacheOpenAiCaseGuideList', - submitData, - type: 'get', - v1: true, service: 'mediate' }); } @@ -101,24 +29,30 @@ location: [], // 省市区等地理资源 select: {}, // 下拉框数据 goToMaterialSave: false, // 避免跳转到材料上传页面重复保存草稿 + agreementMsg: '', // 服务协议 data: { + stepText: 5, //用户须知倒计时5秒 + timer: null, // 用于存储定时器的引用 + popupVisibleText: false, //是否滚动到底部 imgUrl: $$.url.img, steps: [{ - title: '填写申请', - icon: '', + title: '填写人员', + number: '1', activeIcon: 'steps-register-1-active.png' }, { - title: '预览申请', - icon: 'steps-register-2.png', + title: '描述纠纷', + number: '2', activeIcon: 'steps-register-2-active.png' }, { title: '提交申请', - icon: 'steps-register-3.png', + number: '3', activeIcon: 'steps-register-3-active.png' }, ], + saveStatus: false, //未提交,已提交 + oneList: [], titleShow: { '09_01001-1': ['自然人', '姓名', '真实姓名'], '09_01001-2': ['法人', '企业名称', '企业全名', '法定代表人姓名'], @@ -126,30 +60,25 @@ }, // 用于判断显示的输入框标题 stepsActive: 0, // 步骤条当前下标 submitData: { - caseDes: '', + occurTime: new Date().getTime(), + occurTimeName: $$.moment(new Date().getTime()).format('YYYY-MM-DD'), caseType: '', caseTypeName: '', - caseClaim: '', - prov: '', - provName: '', - city: '', - cityName: '', - area: '', - areaName: '', - road: '', - roadName: '', - village: '', - villageName: '', addr: '', - wantUserId: '', - wantUserName: '', - wantUnitId: '', - wantUnitName: '', + lat: '', + lng: '', + peopleNum: '', + amount: '', + caseDes: '', + caseClaim: '', plaintiffList: [], defendantList: [], }, // 表单数据 + addPersonData: {}, //添加的当事人 materialNum: 0, // 纠纷材料总数量 userInfoVisible: false, // 是否采用个人信息更新申请人信息 + timePicker: false, //时间选择展示 + maxDate: new Date().getTime(), popup: { formtype: '', // 控制在纠纷信息 or 申请人信息 or 被申请人添加数据 index: 0, // 如为申请人信息 or 被申请人确认下拉选择此参数为下标 @@ -176,197 +105,68 @@ data: [], activeIndex: null }, // 选择人员 - caseCause: [{ - value: '22_00039-0005', - label: '家庭婚姻纠纷', - }, - { - value: '22_00039-0004', - label: '邻里纠纷', - }, - { - value: '22_00039-0019', - label: '房屋宅基地纠纷', - }, - { - value: '22_00039-0002', - label: '合同纠纷', - }, - { - value: '22_00039-0020', - label: '生产经营纠纷', - }, - { - value: '22_00039-0013', - label: '损害赔偿纠纷', - }, - { - value: '22_00039-0015', - label: '山林土地纠纷', - }, - { - value: '22_00039-0016', - label: '征地纠纷', - }, - { - value: '22_00039-0021', - label: '环境污染纠纷', - }, - { - value: '22_00039-0001', - label: '劳动争议纠纷', - }, - { - value: '22_00039-0006', - label: '道路交通事故纠纷', - }, - { - value: '22_00039-0007', - label: '医疗纠纷', - }, - { - value: '22_00039-0022', - label: '物业管理纠纷', - }, - { - value: '22_00039-0018', - label: '消费纠纷', - }, - { - value: '22_00039-0023', - label: '旅游纠纷', - }, - { - value: '22_00039-0008', - label: '知识产权纠纷', - }, - { - value: '22_00039-0024', - label: '互联网纠纷', - }, - { - value: '22_00039-0003', - label: '借贷纠纷', - }, - { - value: '22_00039-0009', - label: '所有权纠纷', - }, - { - value: '22_00039-0010', - label: '继承纠纷', - }, - { - value: '22_00039-0011', - label: '人格权纠纷', - }, - { - value: '22_00039-0012', - label: '股权转让纠纷', - }, - { - value: '22_00039-0014', - label: '建设用地使用权纠纷', - }, - { - value: '22_00039-0017', - label: '其他纠纷', - }, - ], + threeAvtice: '1', + caseDesNum: 0, //事项概况字数 + caseClaimNum: 0, //事项申请字数 }, - //类案推荐展开隐藏 - _case() { - this.setData({ - showDetail: !this.data.showDetail, + // 获取服务协议 + async getAgreement() { + var that = this; + const res = await $$.commonRequest({ + url: `${$$.url.txt}agree.txt`, + type: 'get' + }); + if (res) { + that.data.popupVisible = true; + that.setData({ + popupVisible: true, + }); + this.startCountdown(); // 启动倒计时 + } + }, + + //须知弹窗倒计时 + startCountdown: function () { + let that = this; + that.setData({ + timer: setInterval(function () { + if (that.data.stepText > 0) { + that.data.stepText--; + that.setData({ + stepText: that.data.stepText + }); + } else { + clearInterval(that.data.timer); // 倒计时结束,清除定时器 + // 在这里执行销毁操作,比如隐藏或删除倒计时组件 + } + }, 1000) }) }, - - // 身份证ocr - handleOCR(e) { - let that = this; - wx.chooseMedia({ - count: 1, - mediaType: ['image'], - success(res2) { - const tempFiles = res2.tempFiles[0]; - $$.showLoading(); - wx.uploadFile({ - url: `${$$.baseUrl}${$$.url.sys}/api/v1/fileInfo/wecatRecognition`, - filePath: tempFiles.tempFilePath, - name: 'file', - header: { - Authorization: app.globalData.token - }, - complete(res3) { - $$.hideLoading(); - if (res3.errMsg === 'uploadFile:ok') { - let { - code, - data - } = JSON.parse(res3.data); - if (code == -1) { - $$.errorModal({ - content: '识别失败' - }); - return; - } - let item = that.data.popupMsg.data; - that.data.popupMsg.data.certiNo = data?.ocrResult.certificateNumber; - that.data.popupMsg.data[item.perClass === '09_01001-1' ? 'trueName' : 'deputy'] = data?.ocrResult.trueName; - that.setData({ - popupMsg: that.data.popupMsg - }); - } - }, - }); - }, - }); - }, - // 表单修改 handleChange(e) { - let formtype = e.currentTarget.dataset.formtype, - key = e.currentTarget.dataset.key, + let key = e.currentTarget.dataset.key, value = e.detail; - if (formtype === 'popupMsg') { - // 修改申请人and被申请人的form - this.data.popupMsg.data[key] = value; - } else { - this.data.submitData[key] = value; - } + this.data.submitData[key] = value; this.setData({ submitData: this.data.submitData }); + if (key === 'caseDes' || key === 'caseClaim') { + this.setData({ + [key + 'Num']: value.length + }); + } }, - // 删除意向调解信息 - handleDeleteWant() { - let that = this; - $$.showModal({ - content: '确定删除意向调解信息吗?', - success: (res) => { - if (res.confirm) { - let obj = { - wantUserId: '', - wantUserName: '', - wantUnitId: '', - wantUnitName: '', - }; - that.setData({ - submitData: { - ...that.data.submitData, - ...obj - } - }); - } - }, + threeTagChange(e) { + value = e.detail; + this.setData({ + threeAvtice: value }); }, - // 下拉框选择确认 handleConfirmPicker({ detail @@ -382,11 +182,9 @@ }); } else if (type === 'location') { arr = [ - ['prov', 'provName'], ['city', 'cityName'], ['area', 'areaName'], - ['road', 'roadName'], - ['village', 'villageName'], + ['road', 'roadName'] ]; arr.forEach((x, t) => { this.data.submitData[x[0]] = value[t]?.value || ''; @@ -399,18 +197,6 @@ }); }, - // 多行下拉选择时,省市区选择 - handleChangeColumns(e) { - if (this.data.popup.type === 'location') { - let selectData = $$.changeLocation(e, this.location, this.data.popup.selectData); - this.setData({ - popup: { - ...this.data.popup, - selectData - } - }); - } - }, // 下拉框选择开启 handleShowPopup(e) { @@ -434,16 +220,17 @@ values: selectOption[arr[0]].children[arr[1]].children || [], defaultIndex: arr[2] }, - { - values: selectOption[arr[0]].children[arr[1]].children[arr[2]].children || [], - defaultIndex: arr[3] - }, ]; selectData.forEach((x) => { x.values.forEach((y) => { delete y.children; }); }); + } else if (type === 'occurTime') { + this.setData({ + timePicker: true + }) + return; } else { let selectOption = this.select[type]; selectData = [{ @@ -462,7 +249,6 @@ }, }); }, - // 关闭下拉框选择 handleClosePopup() { this.data.popup.visible = false; @@ -471,708 +257,131 @@ }); }, - // 调解请求输入时额外的需求操作 - handlecaseClaimFocus() { - if (!this.data.submitData.caseClaim) { - this.data.submitData.caseClaim = '请求1:'; - this.setData({ - submitData: this.data.submitData - }); - } - }, - // 点击新增 or 删除 or 修改 申请人或被申请人 - handleEditParty(e) { - let that = this; - let formtype = e.currentTarget.dataset.formtype, - index = e.currentTarget.dataset.index, - edittype = e.currentTarget.dataset.edittype, - agent = e.currentTarget.dataset.agent; - let type = formtype === 'plaintiffList' ? 2 : 3; - if (edittype === 'delete') { - // 点击删除 - $$.showModal({ - content: '确定删除当前人员信息吗?', - success: (res) => { - if (res.confirm) { - let formtype_ = that.data.popupMsg.type === 2 ? 'plaintiffList' : 'defendantList'; - let partyIndex = that.data.popupMsg.partyIndex; - if (this.data.popupMsg.partyTabActive === '2') { - that.data.submitData[formtype_][partyIndex].agent = null; - } else { - that.data.submitData[formtype_].splice(partyIndex, 1); - } - that.setData({ - submitData: that.data.submitData, - popupMsg: { - show: false - } - }); - } - }, - }); - } else if (edittype === 'edit') { - // 点击修改 - let data = this.data.submitData[formtype][index]; - this.setData({ - popupMsg: { - show: true, - title: formtype === 'plaintiffList' ? '修改申请人' : '修改被申请人', - type: type, - editType: 'edit', - buttonText: '保存信息', - partyArr: this.select['personClass'], - partyTabActive: agent ? '2' : '1', - partyIndex: index, - perClassIndex: agent ? 0 : data.perClass === '09_01001-1' ? 0 : data.perClass === '09_01001-2' ? 1 : 2, - data: agent ? data.agent : data, - }, - }); - } else { - // 点击增加 - this.setData({ - popupMsg: { - show: true, - title: formtype === 'plaintiffList' ? '增加申请人' : '增加被申请人', - type: type, - editType: 'add', - buttonText: '保存信息', - partyArr: this.select['personClass'], - partyTabActive: '1', // 当事人代理人tab下标 - perClassIndex: 0, // 当事人类型下标 - data: { - id: $$.getBusinessId(), - perClass: '09_01001-1', - perClassName: '自然人', - trueName: '', - deputy: '', - mobile: '', - certiNo: '', - }, - }, - }); - } - }, - // 切换增加弹窗的'1'当事人,'2'代理人 - handleChangeTab(e) { - if (this.data.popupMsg.editType === 'edit') { - Toast.fail('不支持修改类型'); - return false; - } + // 滚动到底部事件 + handlescrolltolower() { this.setData({ - popupMsg: { - ...this.data.popupMsg, - partyTabActive: e.detail.name, - perClassIndex: 0, - partyIndex: 0, - data: { - ...this.data.popupMsg.data, - perClass: '09_01001-1', - perClassName: '自然人', - trueName: '', - deputy: '', - mobile: '', - certiNo: '', - }, - }, - }); + popupVisibleText: true + }) }, - // 切换增加弹窗的人员类型 - handleChangePerClass(e) { - if (this.data.popupMsg.editType === 'edit') { - Toast.fail('不支持修改类型'); - return false; - } - let value = e.currentTarget.dataset.item; - let index = e.currentTarget.dataset.index; - let arr = ['perClass', 'perClassName']; - arr.forEach((x, t) => { - this.data.popupMsg.data[x] = value[t === 0 ? 'value' : 'label']; - }); - this.data.popupMsg.data.trueName = ''; - this.data.popupMsg.data.deputy = ''; - this.data.popupMsg.perClassIndex = index; - this.setData({ - popupMsg: this.data.popupMsg - }); - }, - - // 选择代理人 - handleSelectAgent(e) { - this.setData({ - popupMsg: { - ...this.data.popupMsg, - partyIndex: e.currentTarget.dataset.index, - }, - }); - }, - - // 底部弹窗操作,恢复草稿 - handleClickPopupMsg() { - if (this.data.popupMsg.type === 1) { - // 恢复草稿 - this.setData({ - materialNum: this.data.popupMsg.submitData.fileSize, - userInfoVisible: false, - submitData: { - ...this.data.submitData, - ...this.data.popupMsg.submitData, - ...this.data.popupMsg.intentionObj - }, - popupMsg: { - show: false - }, - }); - } else { - // 当事人保存 - let popupMsg = this.data.popupMsg; - let data = this.data.popupMsg.data; - - // 信息校验 - let msg = null; - let arr = this.data.submitData[popupMsg.type === 2 ? 'defendantList' : 'plaintiffList']; - let arr2 = this.data.submitData[popupMsg.type === 2 ? 'plaintiffList' : 'defendantList']; - - console.log('arr2', arr2); - console.log('arr', arr); - console.log('data', data); - console.log('popupMsg', popupMsg); - forEach: for (let t = 0; t < arr.length; t++) { - if (arr[t].certiNo === data.certiNo && !!$$.verifyEmpty(data.certiNo)) { - msg = '申请人与被申请人不能相同'; - break forEach; - } - } - forEach: for (let t = 0; t < arr2.length; t++) { - if (arr2[t].certiNo === data.certiNo && !!$$.verifyEmpty(data.certiNo) && arr2[t].perClass === data.perClass && t !== popupMsg.partyIndex) { - msg = `与${popupMsg.type === 3 ? '被' : ''}申请人不能重复`; - break forEach; - } - } - // 被申请人可不需要手机号码,申请人和代理人需要 - if ( - (data.mobile && !$$.mobileRegExp(data.mobile) && popupMsg.type === 3) || - (!$$.mobileRegExp(data.mobile) && popupMsg.type === 2) || - (!$$.mobileRegExp(data.mobile) && popupMsg.partyTabActive === '2') - ) { - msg = '请输入正确的手机号码'; - } - if (!$$.verifyEmpty(data.trueName) || (data.perClass !== '09_01001-1' && !$$.verifyEmpty(data.deputy))) { - msg = '请补充' + (popupMsg.type === 3 ? '被' : '') + '申请人方的' + (popupMsg.partyTabActive === '1' ? '当事人' : '代理人') + '信息'; - } - if (popupMsg.partyTabActive === '1') { - - } - // 增加申请人的信息 - // if (!arr2[popupMsg.partyIndex]?.trueName || !arr2[popupMsg.partyIndex]?.mobile) { - // msg = '请补充申请人方的当事人信息'; - // } - if (msg) { - Toast.fail(msg); - return; - } - if (popupMsg.partyTabActive === '2' && typeof popupMsg.partyIndex !== 'number') { - Toast.fail('请选择代理对象'); - return; - } - if (popupMsg.partyTabActive === '2' && arr2[popupMsg.partyIndex]?.certiNo === data.certiNo) { - Toast.fail('代理人与当事人不能相同'); - return; - } - - let type = popupMsg.type === 2 ? 'plaintiffList' : 'defendantList'; - if (popupMsg.partyTabActive === '2') { - this.data.submitData[type][popupMsg.partyIndex] = { - ...this.data.submitData[type][popupMsg.partyIndex] - }; - this.data.submitData[type][popupMsg.partyIndex].agent = { - ...this.data.submitData[type][popupMsg.partyIndex].agent, - ...data - }; - } else { - if (popupMsg.editType === 'add') { - this.data.submitData[type] = [...this.data.submitData[type], data]; - } else { - this.data.submitData[type][popupMsg.partyIndex] = { - ...this.data.submitData[type][popupMsg.partyIndex], - ...data - }; - } - } - this.setData({ - submitData: this.data.submitData, - popupMsg: { - show: false - } - }); - } - }, - - // 关闭底部弹窗 - handleClosePopupMsg() { - if (this.data.popupMsg.type === 1) { - this.getUserInfo(this.data.popupMsg.intentionObj); - } else { - this.setData({ - popupMsg: { - show: false - } - }); - } - }, - - // 关闭选择人员 - handleVisiblePopupSelect(e) { + // 用户须知 + handleAgree(e) { let type = e.currentTarget.dataset.type; - if (type === 'open') { - this.getPersonHistory(); - } else { - this.setData({ - popupSelect: { - show: false - } - }); - } - }, - - // 选择人员 - handleSelectPerson(e) { - this.setData({ - popupSelect: { - ...this.data.popupSelect, - activeIndex: e.currentTarget.dataset.index - } - }); - }, - - // 确定历史人员数据填充 - handleConfirmPerson() { - if (typeof this.data.popupSelect.activeIndex !== 'number') { - Toast.fail('请选择人员'); + if (!this.data.popupVisibleText) { + Toast('请阅读完整的用户须知'); return; } - let data = this.data.popupSelect.data[this.data.popupSelect.activeIndex] || {}; - this.data.popupMsg.perClassIndex = - this.data.popupMsg.partyTabActive === '2' ? 0 : data.perClass === '09_01001-1' ? 0 : data.perClass === '09_01001-2' ? 1 : 2; - this.data.popupMsg.data = { - ...this.data.popupMsg.data, - perClass: data.perClass, - perClassName: data.perClassName, - trueName: data.trueName, - deputy: data.deputy, - mobile: data.mobile, - certiNo: data.certiNo, - }; - this.setData({ - popupSelect: { - show: false - }, - popupMsg: this.data.popupMsg - }); - }, - - // 跳转至材料上传页面 - handleGoToMaterial() { - // 先保存 - if (this.data.submitData.inputStatus !== '2') { - this.goToMaterialSave = true; - this.saveCase(); - } - // 获取人员数据保存至全局变量中,方便附件上传页面获取有多少人员 - let person = []; - let arr = ['plaintiffList', 'defendantList']; - arr.forEach((y) => { - this.data.submitData[y].forEach((x) => { - if (x.trueName) { - person.push({ - id: x.id, - perClass: x.perClass, - perClassName: x.perClassName, - trueName: x.trueName, - }); - } - if (x.agent && x.agent.trueName) { - person.push({ - agent: true, - id: x.agent.id, - perClass: x.agent.perClass, - perClassName: x.agent.perClassName, - trueName: x.agent.trueName, - }); - } + if (type === 'agree') { + // 同意协议之后退出登录后不重复弹出 + wx.setStorage({ + key: 'agreement', + data: 1 }); - }); - app.globalData.material.person = person; - wx.navigateTo({ - url: '../../pages/materialShow/index?caseId=' + this.data.submitData.id + '&editVisible=true', + } + this.setData({ + popupVisible: false }); }, // 下一步 or 上一步 handleNext(e) { let type = e.currentTarget.dataset.type; - let content = this.data.tipData.guideList.length === 0 ? - '请再次仔细核对您的申请信息,确定提交调解申请吗?' : - `根据人工智能大数据分析,您的请求可调整为:【${this.data.tipData.guideList}】(以上建议仅供参考),确定提交调解申请吗?` if (type === 'next' && this.data.stepsActive === 0) { - // this.checkCaseDetail(); - this.fengxian(); - } else if (type === 'next' && this.data.stepsActive === 1) { - let that = this; - $$.showModal({ - title: '申请提交确认', - content: content, - success: (res) => { - if (res.confirm) { - that.submitCase(); - } - }, + this.setData({ + stepsActive: 1 }); - } else if (type === 'back' && this.data.stepsActive === 1) { + return; + } + if (type === 'back' && this.data.stepsActive === 1) { this.setData({ stepsActive: 0 }); - } - }, - - // 校验提交信息的必填项并下一步 - checkCaseDetail() { - let msg = ''; - let submitData = this.data.submitData; - let arr1 = [{ - key: 'area', - title: '纠纷发生地' - }, - { - key: 'caseDes', - title: '纠纷描述' - }, - { - key: 'caseClaim', - title: '调解请求' - }, - ]; - forEach: for (let i = 0; i < arr1.length; i++) { - if (!$$.verifyEmpty(submitData[arr1[i].key])) { - msg = arr1[i].title; - break forEach; - } - } - if (msg) { - Toast.fail(msg + '未填写'); - return false; - } - if (submitData.plaintiffList.length === 0) { - Toast.fail('至少添加一名申请人'); - return false; - } - if (submitData.plaintiffList?.length > 0) { - if (!submitData.plaintiffList[0].trueName) { - Toast.fail('至少添加一名申请人'); - return false; - } - } - if (submitData.defendantList.length === 0) { - Toast.fail('至少添加一名被申请人'); - return false; - } - if (submitData.defendantList?.length > 0) { - if (!submitData.defendantList[0].trueName) { - Toast.fail('至少添加一名申请人'); - return false; - } - } - if (msg) { - Toast.fail(msg); - return false; - } - // this.fengxian(); - this.setData({ - stepsActive: 1 - }); - }, - - // 返回首页 - handleGoHomepage() { - if (this.data.changeVisible) { - wx.navigateBack({ - delta: 1, - }); - return false; - } - wx.reLaunch({ - url: '../../pages/homePage/index', - }); - }, - - // 录音组件开启 and 关闭触发 - handleVisibleRecording(e) { - this.setData({ - recordingVisible: !this.data.recordingVisible - }); - }, - - // 获取录音转写的文字 - handleGetWords(e) { - let key = e.currentTarget.dataset.type; - let value = e.detail; - if (key === 'caseDes') { - this.data.submitData[key] = this.data.submitData[key] + value; - this.setData({ - submitData: this.data.submitData, - recordingVisible: !this.data.recordingVisible - }); - } else { - if (!this.data.submitData.caseClaim) { - this.data.submitData[key] = '请求1:' + value; - } else { - this.data.submitData[key] = this.data.submitData[key] + value; - } - this.setData({ - submitData: this.data.submitData, - recordingVisible: !this.data.recordingVisible - }); - } - }, - - // 退出页面保存草稿前判断,如果地址没有更改则不需要保存。 - handleCheckSave() { - if (this.data.popupMsg.type === 1 && this.data.popupMsg.show) { - // 恢复草稿弹窗时退出不保存 return; } - if (this.goToMaterialSave || this.data.stepsActive !== 0 || this.data.submitData.inputStatus === '2') { - // 跳转纠纷材料 || 不在第一步骤 || 修改时则不保存 - this.goToMaterialSave = false; - return; - } - // 地址变动后保存草稿 - let save = false; - if (['prov', 'city', 'area', 'road', 'village'].map((x) => this.data.submitData[x]).join('') !== this.userInfo.address) save = true; - let arr = ['caseDes', 'caseType', 'caseTypeName', 'caseClaim', 'addr', 'wantUserId', 'wantUserName', 'wantUnitId', 'wantUnitName']; - arr.forEach((x) => { - if ($$.verifyEmpty(this.data.submitData[x])) save = true; - }); - if (this.data.submitData['plaintiffList'].length > 1 || this.data.submitData['defendantList'].length > 0) { - save = true; - } - if (save) { - this.saveCase(); - } - }, - - async fengxian() { - let that = this; - $$.showLoading(); - let submitData = this.data.submitData; - const res = await checkCaseClaimRiskApi({ - caseDes: submitData.caseDes, - caseClaim: submitData.caseClaim, - caseTypeName: submitData.caseTypeName, - }); - $$.hideLoading(); - if (res.type) { - if (res.data?.case_risk_claims || res.data?.guide_risk_claims) { - if (res.data?.case_risk_claims.length && res.data?.guide_risk_claims.length) { - let caseList = res.data?.case_risk_claims; - let guideList = res.data?.guide_risk_claims; - let caseText = res.data?.caseText; - let caseTitle = res.data?.caseTitle; - let similarity = res.data?.similarity; - if (!this.data.tipData.guideList || JSON.stringify(this.data.tipData.guideList) !== JSON.stringify(guideList)) { - this.setData({ - 'tipData.guideList': guideList, - 'tipData.caseList': caseList, - caseText: caseText, - caseTitle: caseTitle, - similarity: similarity, - showCase: true, - }); - } else { - this.checkCaseDetail(); - } - that.setData({ - tipData: { - caseList, - guideList - } - }) - } else { - this.setData({ - 'tipData.guideList': [], - 'tipData.caseList': [], - }); - this.checkCaseDetail(); - } - } - } - }, - - // 上传案件 - async submitCase() { - $$.showLoading(); - let submitData = this.data.submitData; - submitData.inputStatus = '2'; - submitData.process = null; - const res = await submitCaseApi(submitData); - $$.hideLoading(); - if (res.type) { - if (this.data.changeVisible) { - // 用于当“我的调解”页面等其他页面进入修改时,修改后返回更新数据凭证 - app.globalData.caseMsg.handleVisible = true; - } + if (type === 'next' && this.data.stepsActive === 1) { this.setData({ stepsActive: 2 }); - let caseId = res.data; - // 在这里调用接口 - // getCaseApi({ - // caseId, - // start_page_num: '0', - // end_page_num: '100' - // }); - // getFeatureApi({ - // caseId, - // }) - // getCacheOpenAiCaseGuideList({ - // caseId, - // guideTypes: '5,6' - // }) + return; } - }, - // 保存草稿 - async saveCase() { - let submitData = this.data.submitData; - submitData.inputStatus = '1'; - const res = await submitCaseApi(submitData); - if (res.type) { - console.log('保存成功'); - } - }, - - // 修改案件 时 获取案件信息 - async getCaseData(caseId, changeVisible) { - $$.showLoading(); - const res = await getCaseDetailApi(caseId); - $$.hideLoading(); - if (res.type) { + if (type === 'back' && this.data.stepsActive === 2) { this.setData({ - materialNum: res.data.fileSize, - userInfoVisible: false, - submitData: res.data, - changeVisible: changeVisible, + stepsActive: 1 + }); + return; + } + // 申请提交 + if (type === 'next' && this.data.stepsActive === 2) { + let data = this.data.submitData; + let list = this.data.oneList; + let personList = []; //"15_020008-1" 申请方当事人 ,"15_020008-2" 被申请方当事人 + let agentList = []; //"24_00006-1" 申请方代理人 ,"24_00006-2" 被申请方代理人 + personList = list.filter(item => item.perType === '15_020008-1' || item.perType === '15_020008-2'); + agentList = list.filter(item => item.perType === '24_00006-1' || item.perType === '24_00006-2'); + this.caseRegisterSave({ + ...data, + personList, + agentList }); } }, - // 获取当前页面是否存在草稿 - async getDraftCase(options) { - let intentionObj = {}; - if (options.type) { - // 找他调页面跳转进入赋值意向调解信息 - let arr = []; - if (options.type === '1') { - arr = ['wantUserId', 'wantUserName']; - } else { - arr = ['wantUnitId', 'wantUnitName']; - } - intentionObj[arr[0]] = options.id; - intentionObj[arr[1]] = options.name; - } + async caseRegisterSave(params) { $$.showLoading(); - const res = await getDraftCaseApi('1'); - if (res.type) { - if (res.data?.id) { - $$.hideLoading(); - this.userInfo = { - address: ['prov', 'city', 'area', 'road', 'village'].map((x) => res.data[x]).join('') - }; - this.setData({ - popupMsg: { - show: true, - title: '恢复草稿', - buttonText: '恢复草稿', - type: 1, - intentionObj, - submitData: res.data - } - }); - } else { - this.getUserInfo(intentionObj); - } - } else { - this.getUserInfo(intentionObj); - } - }, - - // 获取个人信息,填充个人信息材料至第一个申请人处,如有草稿则不执行 - async getUserInfo(intentionObj) { - let obj = {}, - locationObj = {}; - const res = await getUserInfoApi(); + const res = await caseRegisterSaveApi(params); $$.hideLoading(); if (res.type) { - this.data.userInfoVisible = true; - obj = { - trueName: res.data.trueName || '', - certiNo: res.data.idcard || '', - mobile: res.data.mobile || '', - address: ['prov', 'city', 'area', 'road', 'village'].map((x) => res.data[x]).join(''), - }; - ['prov', 'provName', 'city', 'cityName', 'area', 'areaName', 'road', 'roadName', 'village', 'villageName'].forEach((x) => { - locationObj[x] = res.data[x] || ''; - }); + Toast('提交成功'); } - this.data.submitData.plaintiffList[0] = { - perClass: '09_01001-1', - perClassName: '自然人', - id: $$.getBusinessId(), - ...obj - }; - this.userInfo = obj; + }, + + //选择纠纷类型 、跳转事项概况语音描述,跳转事项申请语音描述 + caseTypeGoPage(e) { + let url = e.currentTarget.dataset.url; + wx.navigateTo({ + url: url, + }); + }, + + //选择地址 + openmap: function (e) { + var that = this; + console.log('latitude') + wx.getLocation({ + type: 'gcj02', //返回可以用于wx.openLocation的经纬度 + success: function (res) { + wx.chooseLocation({ + success: function (res) { + that.setData({ + submitData: { + ...that.data.submitData, + addr: res.address, + lng: res.longitude, + lat: res.latitude, + } + }) + }, + fail: function (res) { + + }, + + }) + } + }) + }, + + delAddress() { this.setData({ - userInfoVisible: this.data.userInfoVisible, submitData: { ...this.data.submitData, - ...intentionObj, - ...locationObj, - id: $$.getBusinessId() - }, - popupMsg: { - show: false - }, - }); - }, - - // 获取选择人员 - async getPersonHistory() { - $$.showLoading(); - const res = await getPersonHistoryApi(); - $$.hideLoading(); - if (res.type) { - this.setData({ - popupSelect: { - show: true, - data: res.data || [] - } - }); - } - }, - - // 请求下拉框资源 - async getSelectOptionData() { - const res = await $$.commonRequest({ - url: `${$$.url.assets}selectOption.json`, - type: 'get' - }); - if (res) { - this.select.cardType = res.data.cardType || []; - this.select.caseCause = this.data.caseCause || []; - this.select.personClass = res.data.personClass || []; - } + addr: '', + lng: '', + lat: '' + } + }) }, // 获取省市区等地理资源 @@ -1192,41 +401,190 @@ } }, + // 请求下拉框资源 + async getSelectOptionData() { + const res = await $$.commonRequest({ + url: `${$$.url.assets}selectOption.json`, + type: 'get' + }); + if (res) { + this.select.cardType = res.data.cardType || []; + this.select.caseCause = this.data.caseCause || []; + this.select.personClass = res.data.personClass || []; + } + }, + + + // 获取个人信息 + async getUserInfo() { + $$.showLoading(); + const res = await getUserInfoApi(); + $$.hideLoading(); + if (res.type) { + let data = res.data || {} + this.setData({ + oneList: [{ + ...data, + perType: '15_020008-1', + perTypeName: '申请方当事人', + perClass: '09_01001-1', + perClassName: '自然人', + certiNo: data.idcard || '' + }] + }) + }; + }, + + // 自动添加申请人提醒 + oneAddMe(e) { + let formtype = e.currentTarget.dataset.formtype; + if (formtype === 'yes') { + this.getUserInfo() + } + this.setData({ + addMePlaintiff: false + }) + }, + + // 填写人员 + oneDelPerson(e) { + console.log('e', e); + let index = e.currentTarget.dataset.index; + let item = e.currentTarget.dataset.item; + + $$.showModal({ + title: '删除人员确认', + content: '确定删除当事人' + item.trueName + '吗?', + cancelText: '我再想想', + confirmText: '确定删除', + success: (res) => { + if (res.confirm) { + this.setData({ + oneList: this.data.oneList.filter((i, idx) => idx !== index) + }) + } + }, + }); + }, + + // 添加当事人 + oneAddPerson(e) { + let perType = e.currentTarget.dataset.pertype; + let perTypeName = e.currentTarget.dataset.pertypename; + if (!perType) { + this.setData({ + addPerson: true + }) + } else { + this.setData({ + addPerson: false + }) + wx.navigateTo({ + url: `../../pages/addPerson/index?perType=${perType}&perTypeName=${perTypeName}`, + }); + } + }, + + // 修改当事人 + oneEditPerson(e) { + let item = e.currentTarget.dataset.item; + let index = e.currentTarget.dataset.index; + wx.navigateTo({ + url: `../../pages/addPerson/index?data=${JSON.stringify(item)}&index=${index}`, + }); + }, + + // 关闭自定义弹窗 + addClosePopup(e) { + let key = e.currentTarget.dataset.key; + this.setData({ + [key]: false + }) + }, + + // 选择发生事件确定 + onInput(e) { + let key = e.currentTarget.dataset.key; + let value = e.detail; + this.setData({ + [key]: false, + submitData: { + ...this.data.submitData, + occurTime: value, + occurTimeName: $$.moment(value).format('YYYY-MM-DD'), + } + }) + }, + + /** * 生命周期函数--监听页面加载 */ - onLoad: function (options) { + onLoad: function () { this.getLocationData(); - this.getSelectOptionData(); - if (options.change) { - this.getCaseData(options.caseId, true); + let agreement = wx.getStorageSync('agreement'); + if (!agreement) { + this.getAgreement(); } else { - this.getDraftCase(options); + if (this.data.oneList?.length === 0) { + this.setData({ + addMePlaintiff: true + }) + } } + }, /** * 生命周期函数--监听页面显示 */ onShow: function () { - if (app.globalData.material.data.length !== 0) { - // 计算附件数量 - let num = 0; - app.globalData.material.data.forEach((x) => { - num = num + x.num; - }); - app.globalData.material.data = []; + if (this.data.oneData?.trueName) { + let list = this.data.oneList; + console.log('list', list); + console.log('this.data.editIndex', this.data.editIndex); + console.log('this.data.oneData', this.data.oneData); + if (this.data.editIndex) { + list[this.data.editIndex] = this.data.oneData; + } else { + list = list.concat(this.data.oneData) + } this.setData({ - materialNum: num - }); + oneList: list, + oneData: {}, + editIndex: false, + }) + } + + if (this.data.twoData?.title) { + this.setData({ + submitData: { + ...this.data.submitData, + caseType: this.data.twoData.value, + caseTypeName: this.data.twoData.title, + }, + twoData: {} + }) + } + if (this.data.twoValue) { + console.log('this.data.twoValue', this.data.twoValue); + console.log('this.data.twoKey', this.data.twoKey); + this.setData({ + submitData: { + ...this.data.submitData, + [this.data.twoKey]: this.data.twoValue + }, + twoValue: '', + twoKey: '' + }) } }, onHide: function () { - this.handleCheckSave(); + // this.handleCheckSave(); }, onUnload: function () { - this.handleCheckSave(); + // this.handleCheckSave(); }, }); \ No newline at end of file diff --git a/gz-wxparty/pages/register/index.json b/gz-wxparty/pages/register/index.json index 6d51ca3..64fa0e0 100644 --- a/gz-wxparty/pages/register/index.json +++ b/gz-wxparty/pages/register/index.json @@ -1,9 +1,10 @@ { - "navigationBarTitleText": "申请调解", - "usingComponents": { - "steps": "../../components/steps/index", - "mediate-detail": "../../components/mediate-detail/index", - "recording": "../../components/recording/index", - "ellipsis-text": "../../components/ellipsis-text/index" - } -} + "navigationBarTitleText": "反应诉求", + "usingComponents": { + "steps": "../../components/steps/index", + "mediate-detail": "../../components/mediate-detail/index", + "recording": "../../components/recording/index", + "textarea": "../../components/textarea/index", + "ellipsis-text": "../../components/ellipsis-text/index" + } +} \ No newline at end of file diff --git a/gz-wxparty/pages/register/index.wxml b/gz-wxparty/pages/register/index.wxml index f620ca7..27c5aee 100644 --- a/gz-wxparty/pages/register/index.wxml +++ b/gz-wxparty/pages/register/index.wxml @@ -6,226 +6,269 @@ <van-toast id="van-toast" /> <common-page bind:onCancelPicker="handleClosePopup" bind:onChangePicker="handleChangeColumns" bind:onClosePopup="handleClosePopup" bind:onConfirmPicker="handleConfirmPicker" popup="{{ popup }}"> - <!-- 步骤条 --> - <view class="steps"> - <steps stepsActive="{{ stepsActive }}" stepsData="{{ steps }}" stepsType="picture" /> - </view> - <!-- 未提交前 --> - <block wx:if="{{ stepsActive !== 2 }}"> - <!-- 填写申请 --> + + <!-- 未提交 --> + <block wx:if="{{ !saveStatus }}"> + <!-- 步骤条 --> + <view class="steps"> + <steps stepsActive="{{ stepsActive }}" stepsData="{{ steps }}" stepsType="picture" /> + </view> + + <!-- 填写人员--> <block wx:if="{{ stepsActive === 0 }}"> - <!-- 意向调解组织 or 意向调解员 --> - <view class="card" style="background: linear-gradient(95deg,rgba(173,198,255,0.50) 0%, rgba(214,228,255,0.80) 4%, rgba(214,228,255,0.55) 100%)" wx:if="{{ submitData.wantUserId || submitData.wantUnitId }}"> - <view class="cell"> - <view class="cell-title">意向{{ submitData.wantUserId ? '调解员' : '调解组织' }}</view> - <view class="cell-select">{{ submitData.wantUserId ? submitData.wantUserName : submitData.wantUnitName }}</view> - <view bind:tap="handleDeleteWant" class="wantUser-delete second-font">删除</view> + <view style="padding:24rpx"> + <view wx:for="{{oneList}}" data-item="{{ item }}" data-index="{{ index }}" wx:key="index"> + <view class='one-list' wx:if="{{item.perType==='15_020008-1'||item.perType==='24_00006-1'}}"> + <view bindtap="oneEditPerson" data-item="{{ item }}" data-index="{{ index }}" class="one-list-l green">申请方</view> + <view bindtap="oneEditPerson" data-item="{{ item }}" data-index="{{ index }}" class="one-list-r"> + <view class="one-list-r-t"> + <view class="one-list-text">{{item.trueName}}</view> + <view class="one-list-phone">{{item.mobile}}</view> + <view wx:if="{{item.perType==='24_00006-1'}}" class="one-list-tag">代理人</view> + </view> + <view class="one-list-r-b">{{item.perClassName}} | {{item.certiNo}} </view> + </view> + <view class="one-list-del"> + <image class="one-list-del-2" src="{{ imgUrl }}del_bg.png" mode="" /> + </view> + <view class="one-list-del-1" data-index="{{index}}" data-item="{{item}}" bindtap="oneDelPerson"> + <image class="one-list-del-1" src="{{ imgUrl }}del.png" mode="" /> + </view> + </view> + <view class='one-list' wx:else> + <view bindtap="oneEditPerson" data-item="{{ item }}" data-index="{{ index }}" class="one-list-l orange"><text>被申\n请方</text></view> + <view bindtap="oneEditPerson" data-item="{{ item }}" data-index="{{ index }}" class="one-list-r"> + <view class="one-list-r-t"> + <view class="one-list-text">{{item.trueName}}</view> + <view class="one-list-phone">{{item.mobile}}</view> + <view wx:if="{{item.perType==='24_00006-2'}}" class="one-list-tag-orange">代理人</view> + </view> + <view class="one-list-r-b">{{item.perClassName}} |{{item.certiNo}}</view> + </view> + <view class="one-list-del"> + <image class="one-list-del-2" src="{{ imgUrl }}del_bg.png" mode="" /> + </view> + <view class="one-list-del-1" data-index="{{index}}" data-item="{{item}}" bindtap="oneDelPerson"> + <image class="one-list-del-1" src="{{ imgUrl }}del.png" mode="" /> + </view> + </view> + </view> + <view class="party-oneAdd"> + <van-button bind:click="oneAddPerson" block custom-style="border: 1px dashed #1a6fb8; color:#1A6FB8" icon="{{ imgUrl }}add.png">添加当事人</van-button> + </view> + <view class="submitButton" catch:tap=""> + <view style="flex: 1;"> + <van-button bind:click="handleNext" block data-type="next" type="primary">下一步</van-button> + <view class="safeHeight" /> + </view> </view> </view> - <!-- 纠纷信息 --> - <view class="card" style="padding-bottom:32rpx"> - <view bindtap="handleShowPopup" class="cell" data-title="纠纷发生地" data-type="location"> - <view class="cell-title"> - 纠纷发生地 - <text class="cell-required">(必填)</text> - </view> - <view class="{{ !submitData.prov ? 'cell-placeholder' : '' }} cell-select">{{ submitData.prov ? wxs.showLocation(submitData) : '未选择' }}</view> - <view class="cell-arrow"> - <van-icon name="arrow" /> - </view> - </view> - <view class="cell2 cell-noPadding"> - <view class="cell-title-line">纠纷发生地详址</view> - <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0;" data-key="addr" placeholder="填写后优先推荐附近的调解组织" value="{{ submitData.addr }}" /> - </view> - <view bindtap="handleShowPopup" class="cell cell-noPadding" data-title="纠纷类型" data-type="caseCause"> - <view class="cell-title">纠纷类型</view> + </block> + + <!-- 描述纠纷 --> + <block wx:elif="{{stepsActive === 1}}"> + <view class="popupMsg-form"> + <view bindtap="caseTypeGoPage" data-url="../../pages/caseType/index" class="cell cell-item" data-title="纠纷类型" data-key="certiType" data-type="cardType"> + <view class="cell-title"><text><text class="cell-required">*</text> 纠纷类型</text></view> <view class="{{ !submitData.caseTypeName ? 'cell-placeholder' : '' }} cell-select">{{ submitData.caseTypeName ? submitData.caseTypeName : '未选择' }}</view> <view class="cell-arrow"> <van-icon name="arrow" /> </view> </view> - <block> - <view class="cell2 cell-noPadding"> - <view class="cell-title-line"> - 纠纷描述 - <text class="cell-required">(必填)</text> - </view> - <van-field autosize="{{ { maxHeight: 88, minHeight: 22 } }}" bind:change="handleChange" border="{{ false }}" custom-style="padding:0;" data-key="caseDes" placeholder="请简要描述纠纷发生的时间、地点及经过" type="textarea" value="{{ submitData.caseDes }}" /> - <!-- <view class="case"> - <view class="img-case_2"> - <image src="/img/case_1.png" class="img1"></image> - </view> - <view>您在纠纷描述中提到了租赁合同,但您并未上传对应材料,请核实并补充对应材料。</view> - </view> --> + <view bindtap="handleShowPopup" class="cell cell-item" data-title="纠纷发生时间" data-key="occurTime" data-type="occurTime"> + <view class="cell-title"><text><text class="cell-required">*</text> 纠纷发生时间</text></view> + <view class="{{ !submitData.occurTimeName ? 'cell-placeholder' : '' }} cell-select"> + {{ submitData.occurTimeName ? submitData.occurTimeName: '未选择' }} </view> - <recording bind:getwords="handleGetWords" bind:onVisible="handleVisibleRecording" data-type="caseDes" /> - </block> - <block> - <view class="cell2"> - <view class="cell-title-line"> - 调解请求 - <text class="cell-required">(必填)</text> - </view> - <van-field autosize="{{ { maxHeight: 88, minHeight: 22 } }}" bind:change="handleChange" bind:focus="handlecaseClaimFocus" border="{{ false }}" custom-style="padding:0;" data-key="caseClaim" placeholder="请逐条描述您的调解请求,如请求1...请求2..." placeholder-style="color: rgba(0, 0, 0, 0.5)" type="textarea" value="{{ submitData.caseClaim }}" /> - <view wx:if="{{tipData.caseList.length}}" class="case"> - <view style="display:'flex'"> - <view class="img-case_2"> - <image src="/img/case_1.png" class="img1"></image> - <view>请参考类案中的请求:</view> - </view> - <view> - 可能不合理或不完整的请求: - </view> - <view style="white-space: pre-line;" data-index="{{ index }}" data-item="{{ item }}" wx:for="{{tipData.caseList}}" wx:key="index">{{item}} - </view> - <view> - 类案中的请求: - </view> - <view data-index="{{ index }}" data-item="{{ item }}" wx:for="{{tipData.guideList}}" wx:key="index">{{item}} - </view> - </view> - </view> - <block wx:if="{{showCase}}"> - <view class="caseBox-content" catch:tap="_case"> - <view class="caseBox-dot">类案</view> - <!--【相似度80.3%】黑山县刘某某与张某某黑山县刘某某与张某某黑山县刘某某与张某某--> - <view class="caseBox-Item">{{similarity}}{{caseText}}</view> - <view class="caseBox-arrow"> - <van-icon name="arrow-down" size="8" wx:if="{{showDetail}}" /> - <van-icon name="arrow-up" size="8" wx:else /> - </view> - - </view> - <view wx:if="{{showDetail}}"> - <view style="display:flex;font-size:12px;justify-content: center;">{{caseTitle}}</view> - <view style="background-color: #fff;font-size: 12px;display: flex;">{{caseText}}</view> - </view> - - </block> - </view> - <recording bind:getwords="handleGetWords" bind:onVisible="handleVisibleRecording" data-type="caseClaim" /> - </block> - </view> - <!-- 申请/被申请人信息 --> - <view class="card" style="padding:16rpx 16rpx 16rpx 32rpx;"> - <!-- 申请人 --> - <block wx:for="{{ submitData.plaintiffList }}" wx:key="index"> - <view class="party"> - <view class="party-img party-img-shen">申请</view> - <view bind:tap="handleEditParty" class="party-content" data-edittype="edit" data-formtype="plaintiffList" data-index="{{index}}"> - <view class="party-content-title"> - <view class="party-content-title-name"> - <ellipsis-text content="{{ item.trueName }}" /> - </view> - <view class="party-content-title-phone">{{ item.mobile }}</view> - </view> - <view class="party-content-subTitle"> - <ellipsis-text content="{{ titleShow[item.perClass][0] }}{{ item.deputy ? ' | ' : '' }}{{ item.deputy || '' }}{{ item.certiNo ? ' | ' : '' }}{{ item.certiNo || '' }}" fontsize="24" /> - </view> - </view> - <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="plaintiffList">增加</view> - </view> - <!-- 代理人 --> - <view class="party" wx:if="{{ !!item.agent }}"> - <view class="party-img party-img-shen">申请</view> - <view bind:tap="handleEditParty" class="party-content" data-agent="{{true}}" data-edittype="edit" data-formtype="plaintiffList" data-index="{{index}}"> - <view class="party-content-title"> - <view class="party-content-title-name"> - <ellipsis-text content="{{ item.agent.trueName }}" /> - </view> - <view class="party-content-title-phone">{{ item.agent.mobile }}</view> - <view class="tag tag-cyan" style="margin-left:12rpx">代理人</view> - </view> - <view class="party-content-subTitle"> - <ellipsis-text content="代理对象 | {{ item.trueName }}" fontsize="24" /> - </view> - </view> - <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="plaintiffList">增加</view> - </view> - </block> - <!-- 新增申请人button --> - <block wx:if="{{ submitData.plaintiffList.length === 0 }}"> - <view class="party"> - <view class="party-img party-img-shen">申请</view> - <view class="party-noneAdd"> - <van-button bind:click="handleEditParty" block custom-style="border: 2rpx dashed rgba(0,0,0,0.20)" data-formtype="plaintiffList" icon="{{ imgUrl }}register-add-party.png">增加申请人信息</van-button> - </view> - </view> - </block> - <!-- 被申请人 --> - <block wx:for="{{ submitData.defendantList }}" wx:key="index"> - <view class="party"> - <view class="party-img party-img-bei">被申</view> - <view bind:tap="handleEditParty" class="party-content" data-edittype="edit" data-formtype="defendantList" data-index="{{index}}"> - <view class="party-content-title"> - <view class="party-content-title-name"> - <ellipsis-text content="{{ item.trueName }}" /> - </view> - <view class="party-content-title-phone">{{ item.mobile }}</view> - </view> - <view class="party-content-subTitle"> - <ellipsis-text content="{{ titleShow[item.perClass][0] }}{{ item.deputy ? ' | ' : '' }}{{ item.deputy || '' }}{{ item.certiNo ? ' | ' : '' }}{{ item.certiNo || '' }}" fontsize="24" /> - </view> - </view> - <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="defendantList">增加</view> - </view> - <!-- 代理人 --> - <view class="party" wx:if="{{ !!item.agent }}"> - <view class="party-img party-img-bei">被申</view> - <view bind:tap="handleEditParty" class="party-content" data-agent="{{true}}" data-edittype="edit" data-formtype="defendantList" data-index="{{index}}"> - <view class="party-content-title"> - <view class="party-content-title-name"> - <ellipsis-text content="{{ item.agent.trueName }}" /> - </view> - <view class="party-content-title-phone">{{ item.agent.mobile }}</view> - <view class="tag tag-orange" style="margin-left:12rpx">代理人</view> - </view> - <view class="party-content-subTitle"> - <ellipsis-text content="代理对象 | {{ item.trueName }}" fontsize="24" /> - </view> - </view> - <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="defendantList">增加</view> - </view> - </block> - <!-- 新增被申请人button --> - <block wx:if="{{ submitData.defendantList.length === 0 }}"> - <view class="party"> - <view class="party-img party-img-bei">被申</view> - <view class="party-noneAdd"> - <van-button bind:click="handleEditParty" block custom-style="border: 2rpx dashed rgba(0,0,0,0.20)" data-formtype="defendantList" icon="{{ imgUrl }}register-add-party.png">增加被申请人信息</van-button> - </view> - </view> - </block> - </view> - <!-- 纠纷材料 --> - <view class="card"> - <view bindtap="handleGoToMaterial" class="cell" data-title="纠纷发生地" data-type="location"> - <view class="cell-title">纠纷材料</view> - <view class="{{ !materialNum ? 'cell-placeholder' : '' }} cell-select">{{ materialNum ? materialNum + '份资料' : '未上传' }}</view> <view class="cell-arrow"> <van-icon name="arrow" /> </view> </view> + <view wx:if="{{!submitData.addr}}" bindtap="openmap" data-url="../../pages/caseType/index" class="cell cell-item" data-title="纠纷发生地" data-type="location"> + <view class="cell-title"><text><text class="cell-required">*</text> 纠纷发生地</text></view> + <view class="cell-placeholder cell-select">未选择</view> + <view wx:if="{{!submitData.addr}}" class="cell-arrow"> + <van-icon name="arrow" /> + </view> + </view> + <view wx:else class="cell-item" data-title="纠纷发生地" data-type="location"> + <view bindtap="openmap" class="cell-title"><text><text class="cell-required">*</text> 纠纷发生地</text></view> + <view class="two-addr"> + <view> + {{submitData.addr}} + </view> + <view bindtap="delAddress" class="two-addr-img"> + <image src="{{imgUrl}}address-del.png" mode="" /> + </view> + </view> + </view> + <view class="cell-item"> + <view class="cell-title1">涉及人数(人)</view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="peopleNum" input-align="right" placeholder="请填写" value="{{ submitData.peopleNum || '' }}" /> + </view> + </view> + <view class="cell-item"> + <view class="cell-title1">涉及金额(元)</view> + <view class="cell-select"> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-key="amount" input-align="right" placeholder="请填写" value="{{ submitData.amount || '' }}" /> + </view> + </view> + <view style="height: 16rpx;"></view> + <block> + <view class="cell-item"> + <view class="cell-title"><text><text class="cell-required">*</text> 事项概况</text></view> + <van-field custom-style="padding:0 20rpx;line-height:90rpx" autosize="{{ { maxHeight: 88, minHeight: 88 } }}" bind:change="handleChange" border="{{ false }}" maxlength='2000' data-key="caseDes" placeholder="请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过" type="textarea" value="{{ submitData.caseDes }}" /> + </view> + <view class="textarea-foot"> + <view class="textarea-limit">{{caseDesNum||0}}/2000字</view> + <view class="textarea-ability"> + <view class="textarea-img"> + <image src="{{imgUrl}}imgOcr.png" mode="" />识别图片 + </view> + <view style="padding: 0 8rpx;">|</view> + <view bindtap="caseTypeGoPage" data-url="../../pages/speechToText/index?type=caseDes" class="textarea-img"> + <image src="{{imgUrl}}voiceOcr.png" mode="" />语音描述 + </view> + </view> + </view> + </block> + <view style="height: 16rpx;"></view> + <block> + <view class="cell-item"> + <view class="cell-title"><text><text class="cell-required">*</text> 事项申请</text></view> + <van-field custom-style="padding:0 20rpx;line-height:90rpx" autosize="{{ { maxHeight: 88, minHeight: 88 } }}" bind:change="handleChange" border="{{ false }}" maxlength='500' data-key="caseClaim" placeholder="希望相关部门如何处理,建议分条描述,如请求1,请求2..." type="textarea" value="{{ submitData.caseClaim }}" /> + </view> + <view class="textarea-foot"> + <view class="textarea-limit">{{caseClaimNum||0}}/500字</view> + <view class="textarea-ability"> + <view class="textarea-img"> + <image src="{{imgUrl}}imgOcr.png" mode="" />识别图片 + </view> + <view style="padding: 0 8rpx;">|</view> + <view bindtap="caseTypeGoPage" data-url="../../pages/speechToText/index?type=caseClaim" class="textarea-img"> + <image src="{{imgUrl}}voiceOcr.png" mode="" />语音描述 + </view> + </view> + </view> + </block> + <view style="height: 16rpx;"></view> + <block> + <view style="padding-left: 32rpx;" class="cell-item"> + <view class="upload-title"> + 事件材料 + <image src="{{imgUrl}}upload-add.png" mode="" /> + </view> + <view class="upload-text"> + 说明:建议上传人员身份证及纠纷涉及的证件材料,代理人请上传身份证及授权委托书 + </view> + </view> + </block> + <view class="submitButton" catch:tap=""> + <view style="flex: 1;"> + <view class="two-button"> + <view class="two-button-flex1"> + <van-button bind:click="handleNext" block data-type="back">上一步</van-button> + </view> + <view class="two-button-flex2"> + <van-button bind:click="handleNext" block data-type="next" type="primary">下一步</van-button> + </view> + </view> + <view class="safeHeight" /> + </view> + </view> </view> </block> - <!-- 核实申请 --> - <block wx:if="{{ stepsActive === 1 }}"> - <mediate-detail caseData="{{ submitData }}" materialNum="{{ materialNum }}" pageType="3" /> + + <!-- 提交申请 --> + <block wx:elif="{{stepsActive === 2}}"> + <view class="popupMsg-form"> + <view class="three-tag"> + <van-tabs bind:click="threeTagChange" active="{{threeAvtice}}"> + <!-- 人员信息 --> + <van-tab title="人员信息" name="1"> + <view style="padding:24rpx"> + <view wx:for="{{oneList}}" data-item="{{ item }}" data-index="{{ index }}" wx:key="index"> + <view class='one-list' wx:if="{{item.perType==='15_020008-1'||item.perType==='24_00006-1'}}"> + <view class="one-list-l green">申请方</view> + <view class="one-list-r"> + <view class="one-list-r-t"> + <view class="one-list-text">{{item.trueName}}</view> + <view class="one-list-phone">{{item.mobile}}</view> + <view wx:if="{{item.perType==='24_00006-1'}}" class="one-list-tag">代理人</view> + </view> + <view class="one-list-r-b">{{item.perClassName}} | {{item.certiNo}} </view> + </view> + </view> + <view class='one-list' wx:else> + <view class="one-list-l orange"><text>被申\n请方</text></view> + <view class="one-list-r"> + <view class="one-list-r-t"> + <view class="one-list-text">{{item.trueName}}</view> + <view class="one-list-phone">{{item.mobile}}</view> + <view wx:if="{{item.perType==='24_00006-2'}}" class="one-list-tag-orange">代理人</view> + </view> + <view class="one-list-r-b">{{item.perClassName}} |{{item.certiNo}}</view> + </view> + </view> + </view> + </view> + </van-tab> + <van-tab title="纠纷信息" name="2"> + <view class="three-tag2"> + <view class="cell3"> + <view class="cell-title-placeholder">纠纷类型</view> + <view>{{ submitData.caseTypeName || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">纠纷发生时间</view> + <view>{{ submitData.occurTimeName || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">纠纷发生地点</view> + <view>{{ submitData.addr || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">涉及人数(人)</view> + <view>{{ submitData.peopleNum || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">涉及金额(元)</view> + <view>{{ submitData.amount || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">事项概况</view> + <view>{{ submitData.caseDes || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">事项申请</view> + <view>{{ submitData.caseClaim || '-' }}</view> + </view> + <!-- todo 人工智能提醒 --> + </view> + + </van-tab> + <van-tab title="事件材料" name="3">内容 3</van-tab> + </van-tabs> + </view> + + <view class="submitButton" catch:tap=""> + <view style="flex: 1;"> + <view class="two-button"> + <view class="two-button-flex1"> + <van-button bind:click="handleNext" block data-type="back">上一步</van-button> + </view> + <view class="two-button-flex2"> + <van-button bind:click="handleNext" block data-type="next" type="primary">提交申请</van-button> + </view> + </view> + <view class="safeHeight" /> + </view> + </view> + </view> </block> - <!-- 隔离出下层固定dom的高度便于page滚动 --> - <view class="height-none" catch:tap="_searchCase" /> - <!-- 按钮 --> - <view class="submitButton" catch:tap=""> - <view style="margin-right: 48rpx;" wx:if="{{ stepsActive === 1 }}"> - <van-button bind:click="handleNext" block custom-class="btn" custom-style="width:240rpx;" data-type="back" type="default">修改</van-button> - </view> - <view style="flex: 1;"> - <van-button bind:click="handleNext" block data-type="next" type="primary">{{ stepsActive === 1 ? '提交' : '预览申请' }}</van-button> - <view class="safeHeight" /> - </view> - </view> </block> + <!-- 已提交 --> <block wx:else> <view class="success"> @@ -245,107 +288,84 @@ </view> --> </view> </block> - <!-- 消息提醒 and 新增当事人form --> - <van-popup bind:close="handleClosePopupMsg" closeable custom-style="background-color:{{ popupMsg.partyTabActive === '1' ? '#e5e5e5' : '#ffffff'}}" position="bottom" round show="{{ popupMsg.show }}" title="{{ popupMsg.title || '' }}" zIndex="999"> - <view class="popupMsg-draft" wx:if="{{ popupMsg.type === 1 }}">检测到存在过往草稿申请记录,是否为您恢复?</view> - <!-- 新增当事人form --> - <view class="popupMsg" wx:else> - <view class="popupMsg-tab" style="padding-bottom:{{ popupMsg.partyTabActive === '2' ? 0 : undefind }}" wx:if="{{ popupMsg.partyTabActive }}"> - <van-tabs active="{{ popupMsg.partyTabActive }}" bind:click="handleChangeTab" disabled="{{ popupMsg.editType === 'edit' ? true : false }}" line-width="54rpx" nav-class="{{ popupMsg.partyTabActive === '1' ? 'popupMsg-nav-class' : 'popupMsg-nav-class2'}}" tab-active-class="tab-active-class"> - <van-tab name="1" title="当事人" /> - <van-tab name="2" title="代理人" /> - </van-tabs> - </view> - <view class="popupMsg-tab-card" wx:if="{{ popupMsg.partyTabActive === '1' }}"> - <view bind:tap="handleChangePerClass" class="popupMsg-tab-card-item {{ popupMsg.data.perClass === item.value ? 'popupMsg-tab-card-item-active' : '' }}" data-index="{{ index }}" data-item="{{ item }}" wx:for="{{ popupMsg.partyArr }}" wx:key="index"> - <view class="popupMsg-tab-card-item-bg" style="border-bottom-left-radius:{{ index === popupMsg.perClassIndex + 1 ? '20rpx' : '0' }};border-bottom-right-radius:{{ index === popupMsg.perClassIndex - 1 ? '20rpx' : '0' }};">{{ item.label }}</view> - </view> - </view> - <view class="popupMsg-form"> - <view class="cell"> - <view class="cell-title"> - {{ titleShow[popupMsg.data.perClass][1] }} - <text class="cell-required">(必填)</text> - </view> - <view class="cell-select"> - <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="trueName" input-align="right" placeholder="请输入{{ titleShow[popupMsg.data.perClass][2] }}" value="{{ popupMsg.data.trueName || '' }}" /> - </view> - <view bind:tap="handleVisiblePopupSelect" class="popupMsg-check" data-type="open">选择</view> - </view> - <view class="cell cell-noPadding" wx:if="{{ popupMsg.data.perClass !== '09_01001-1' && popupMsg.partyTabActive === '1' }}"> - <view class="cell-title"> - {{ titleShow[popupMsg.data.perClass][3] }} - <text class="cell-required">(必填)</text> - </view> - <view class="cell-select"> - <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="deputy" input-align="right" placeholder="请输入真实姓名" value="{{ popupMsg.data.deputy || '' }}" /> - </view> - </view> - <view class="cell cell-noPadding"> - <view class="cell-title"> - 手机号码 - <text wx:if="{{ popupMsg.type === 2 || popupMsg.partyTabActive === '2' }}" class="cell-required">(必填)</text> - </view> - <view class="cell-select"> - <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="mobile" input-align="right" placeholder="请输入常用的手机号码" value="{{ popupMsg.data.mobile || '' }}" /> - </view> - </view> - <view class="cell cell-noPadding"> - <view class="cell-title">身份证号码</view> - <view class="cell-select"> - <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="certiNo" input-align="right" placeholder="根据调解实名规定,需要填写此项" value="{{ popupMsg.data.certiNo || '' }}" /> - </view> - </view> - </view> - <view class="popupMsg-ocrButton"> - <van-button bind:click="handleOCR" block color="#F2F2F2" custom-style="color:rgba(0,0,0,85)" icon="{{ imgUrl }}camera.png" type="primary">拍照识别身份证</van-button> - </view> - <!-- 代理对象 --> - <view class="popupMsg-agent" wx:if="{{ popupMsg.partyTabActive === '2' }}"> - <view class="cell-title"> - 代理对象 - <text class="cell-required">(必填)</text> - </view> - <view class="popupMsg-agent-content"> - <view bind:tap="handleSelectAgent" class="popupMsg-agent-item {{ index === popupMsg.partyIndex ? 'popupMsg-agent-item-active' : '' }}" data-index="{{ index }}" wx:for="{{ submitData[popupMsg.type === 2 ? 'plaintiffList' : 'defendantList' ] }}" wx:if="{{ !!item.trueName }}" wx:key="index"> - <view>{{ item.trueName || '无' }}</view> - <van-icon name="success" wx:if="{{ index === popupMsg.partyIndex }}" /> - </view> - <block wx:if="{{ submitData[popupMsg.type === 2 ? 'plaintiffList' : 'defendantList' ].length === 0 }}"> - <van-empty class="popupMsg-agent-none" description="尚未添加当事人" /> - </block> - </view> - </view> - </view> - <view class="popupMsg-button"> - <view style="margin-right:48rpx" wx:if="{{ popupMsg.editType === 'edit' }}"> - <van-button bind:click="handleEditParty" block custom-class="btn btn-white" custom-style="width:240rpx;background-color:#f2f2f2;" data-edittype="delete" type="primary">删除</van-button> - </view> - <view style="flex:1"> - <van-button bind:click="handleClickPopupMsg" block type="primary">{{ popupMsg.buttonText }}</van-button> - <view class="safeHeight" /> - </view> - </view> - </van-popup> - <!-- 选择人员 --> - <van-popup bind:close="handleVisiblePopupSelect" data-type="close" round show="{{ popupSelect.show }}" zIndex="999"> - <view class="popupSelect"> - <scroll-view scroll-y="{{true}}" style="max-height:600rpx;padding:64rpx 0;"> - <view bind:tap="handleSelectPerson" class="popupSelect-item" data-index="{{ index }}" wx:for="{{ popupSelect.data }}" wx:key="index"> - <view class="popupSelect-item-content"> - <view>{{ item.trueName }}</view> - <view class="popupSelect-item-content-subTitle">{{ titleShow[item.perClass][0] }}{{ !!item.deputy ? ' | ' : '' }}{{ item.deputy || '' }} | {{ item.mobile }}</view> - </view> - <view class="popupSelect-item-icon" wx:if="{{ index === popupSelect.activeIndex }}"> - <van-icon name="success" size="20" /> - </view> - </view> - <van-empty description="暂无历史人员数据" wx:if="{{ popupSelect.data.length === 0 }}" /> +</common-page> + +<!-- 用户须知 --> +<van-popup class="popup-scroll-xz" round show="{{ popupVisible }}" z-index="990"> + <view class="popup-scroll"> + <view style='padding: 32rpx;'> + <view class="popup-scroll-head">广州解纷码<text class="public-color">用户须知</text></view> + <scroll-view bindscrolltolower="handlescrolltolower" style="height:980rpx" scroll-y> + <view>尊敬的用户,您好!</view> + <view>欢迎使用“广州解纷码”微信小程序,在使用广州解纷码提供的服务之前,请仔细阅读并理解以下条款。一旦您开始使用广州解纷码的服务,即表示您同意遵守以下所有规定:</view> + <view>1、个人信息保护</view> + <view>(1)我们承诺尊重并保护您的隐私。我们会按照相关法律法规的规定收集、使用和保护您的个人信息。</view> + <view>(2)在调解过程中,您提供的个人信息将仅用于解决您所涉及的纠纷,不会用于任何其他目的或被泄露给第三方,除非法律另有要求。</view> + <view>2、服务范围</view> + <view>(1)广州解纷码主要提供线上调解服务,包括但不限于在线咨询、申请事项进度查询等。</view> + <view>(2)平台不提供法律意见或代表任何一方参与法律诉讼过程。</view> + <view>3、用户行为规范</view> + <view>(1)用户应当诚实、准确地提供信息,并对所提供信息的真实性负责。</view> + <view>(2)用户不得上传或传播任何违法、侵犯他人权利的内容。</view> + <view>(3)用户在使用过程中应遵守国家法律法规和社会公德。</view> + <view>4、调解程序</view> + <view>(1)调解过程遵循自愿原则,双方均需同意参与调解才能启动程序。</view> + <view>(2)调解结果不具备强制执行力,但达成协议后,双方应自觉履行协议内容。</view> + <view>5、免责声明</view> + <view>(1)广州解纷码尽力提供准确的信息和服务,但不对调解结果承担任何法律责任。</view> + <view>(2)如有任何疑问或争议,建议咨询专业法律顾问。</view> + <view>6、知识产权声明</view> + <view>(1)广州解纷码的所有内容,包括但不限于文字、图片、音频、视频等,均受著作权法保护。</view> + <view>(2)未经广州解纷码书面许可,任何人不得复制、转载、改编或以其他方式使用上述内容。 通过点击“同意”按钮或继续使用广州解纷码的服务,即视为接受并同意上述所有条款。如果您不同意上述任何一项内容,将无法使用广州解纷码的相关服务。</view> </scroll-view> - <view class="popupSelect-button"> - <view bind:tap="handleVisiblePopupSelect" class="popupSelect-button-item" data-type="close">取消</view> - <view bind:tap="handleConfirmPerson" class="popupSelect-button-item">确定</view> - </view> </view> - </van-popup> -</common-page> \ No newline at end of file + </view> + <view class="popup-button"> + <van-button custom-style="border-radius:8px" disabled="{{stepText > 0}}" bind:click="handleAgree" block data-type="agree" round type="primary"> + 我已阅读并接受用户须知{{stepText>0?'('+stepText+'秒)':''}}</van-button> + </view> +</van-popup> + +<!-- 自动添加申请人提醒 --> +<van-popup class="one-add-me-tip" round show="{{ addMePlaintiff }}" z-index="990"> + <view class="one-add-me"> + <view class="one-add-me-title"> + 自动添加申请人提醒 + </view> + <view class="one-add-me-content"> + 是否将您自动登记为本次申请方的当事人? + </view> + <view class="one-add-me-button"> + <van-button type="primary" bind:click="oneAddMe" block round data-formtype="yes">是</van-button> + <view bindtap="oneAddMe" data-formtype="no"> 否 </view> + </view> + </view> +</van-popup> + +<!-- 添加当事人 --> +<van-popup class="one-add-person-tip" bind:close="addClosePopup" data-key='addPerson' round show="{{ addPerson }}" z-index="990"> + <view class="one-add-person"> + <view class="one-add-person-title">添加当事人</view> + <view class="one-add-person-flex"> + <text class="one-add-person-text">申请方当事人</text> + <van-button class="one-add-person-button" type="primary" bind:click="oneAddPerson" block data-perTypeName="申请方当事人" data-perType="15_020008-1">添加</van-button> + </view> + <view class="one-add-person-flex"> + <text class="one-add-person-text">申请方代理人</text> + <van-button class="one-add-person-button" type="primary" bind:click="oneAddPerson" block data-perTypeName="申请方代理人" data-perType="24_00006-1">添加</van-button> + </view> + <view class="one-add-person-flex"> + <text class="one-add-person-text">被申请方当事人</text> + <van-button class="one-add-person-button" type="primary" bind:click="oneAddPerson" block data-perTypeName="被申请方当事人" data-perType="15_020008-2">添加</van-button> + </view> + <view class="one-add-person-flex"> + <text class="one-add-person-text">被申请方代理人</text> + <van-button class="one-add-person-button" type="primary" bind:click="oneAddPerson" block data-perTypeName="被申请方代理人" data-perType="24_00006-2">添加</van-button> + </view> + </view> +</van-popup> + +<!-- 时间选择器 --> +<van-popup position="bottom" bind:close="addClosePopup" data-key='timePicker' show="{{timePicker}}" z-index="990"> + <van-datetime-picker type="date" value="{{ submitData.occurTime}}" data-key='timePicker' bind:confirm="onInput" max-date="{{ maxDate }}" /> +</van-popup> \ No newline at end of file diff --git a/gz-wxparty/pages/register/index.wxss b/gz-wxparty/pages/register/index.wxss index de0882a..cbd90dc 100644 --- a/gz-wxparty/pages/register/index.wxss +++ b/gz-wxparty/pages/register/index.wxss @@ -6,12 +6,448 @@ background-color: #ffffff; } +.one-list { + background: #fff; + padding: 24rpx; + display: flex; + position: relative; + gap: 8px; + margin-bottom: 12px; + border-radius: 8px; +} + +.one-list-l { + height: 96rpx; + width: 96rpx; + border-radius: 4px; + display: flex; + align-items: center; + justify-content: center; + color: #fff; + font-size: 28rpx; + text-align: center; +} + +.one-list-r-t { + display: flex; + gap: 8px; + font-size: 28rpx; + line-height: 44rpx; +} + +.one-list-phone { + color: rgba(23, 26, 29, 0.60); +} + +.one-list-tag { + font-size: 24rpx; + line-height: 40rpx; + border-radius: 2px; + background: #e6fffb; + color: #13C2C2; + padding: 0 8rpx; +} + +.one-list-tag-orange { + font-size: 24rpx; + line-height: 40rpx; + border-radius: 2px; + background: #FFF2E6; + color: #EF6C24; + padding: 0 8rpx; +} + +.one-list-r-b { + color: rgba(23, 26, 29, 0.60); + font-size: 24rpx; + line-height: 40rpx; + margin-top: 8rpx; +} + +.one-list-del { + position: absolute; + right: 0; + top: 0; + width: 44rpx; + height: 44rpx; +} + +.one-list-del-1 { + position: absolute; + right: 0; + top: 0; + width: 44rpx; + height: 44rpx; + display: flex; + justify-content: center; + align-items: center; + text-align: center; +} + +.one-list-del image { + width: 100%; + height: 100%; +} + +.one-list-del-1 image { + width: 28rpx; + height: 28rpx; +} + +.green { + background-color: #13C2C2; +} + +.orange { + background-color: #EF6C24; +} + +.one-add-me { + /* background-color: #fff; */ + text-align: center; + padding: 40rpx 32rpx 28rpx; +} + +.one-add-me-tip .van-popup--round { + width: 80%; +} + +.one-add-me-title { + font-size: 34rpx; + line-height: 50rpx; + margin-bottom: 24rpx; +} + +.one-add-me-content { + color: rgba(23, 26, 29, 0.60); + margin-bottom: 28rpx; +} + +.one-add-me-button { + display: flex; + flex-direction: column; + gap: 16rpx; +} + +.one-add-person-tip .van-popup--round { + width: 90%; +} + +.one-add-person { + text-align: center; + padding: 0rpx 32rpx; +} + +.one-add-person-flex { + display: flex; +} + +.one-add-person-tip { + position: relative; +} + +.one-add-person-icon { + position: absolute; + bottom: -40rpx; + z-index: 991; +} + +.one-add-person-title { + border-bottom: 1px dashed rgba(126, 134, 142, 0.24); + padding: 24rpx 0 16rpx; + margin-bottom: 32rpx; +} + +.one-add-person-flex { + background: #f2f2f6; + margin-bottom: 24rpx; + padding: 24rpx; + display: flex; + justify-content: space-between; + align-items: center; +} + +.one-add-person-text { + font-size: 32rpx; + line-height: 48rpx; +} + +.one-add-person-button .van-button { + height: 60rpx; +} + +.two-button { + display: flex; + justify-content: space-between; + width: 100%; + gap: 24px; +} + +.two-button-flex1 { + flex: 1; +} + +.two-button-flex2 { + flex: 2; +} + +.two-addr { + padding: 16rpx 20rpx; + background: #f2f3f5; + height: 98rpx; + border-radius: 4rpx; + display: flex; + justify-content: space-between; +} + +.two-addr-img { + height: 23px; + display: flex; + align-items: center; +} + +.two-addr-img image{ + width: 15px; + height: 15px; +} + +.three-tag { + margin-top: 16rpx; +} + +.three-tag .van-tabs__wrap { + height: 96rpx !important; +} + +.three-tag .van-tabs__nav { + height: 100%; +} + +.three-tag .van-tabs__scroll--line { + height: 100%; +} + +.three-tag .van-tab { + height: 100%; + line-height: 96rpx !important; +} + +.three-tag2 { + background-color: #fff; + margin-top: 16rpx; + padding: 24rpx 32rpx; +} + + +.textarea-foot { + display: flex; + justify-content: space-between; + background-color: #fff; + align-items: center; + padding-left: 32rpx; +} + +.textarea-limit { + font-size: 28rpx; + line-height: 44rpx; + color: rgba(23, 26, 29, 0.40); +} + +.textarea-ability { + display: flex; + align-items: center; + background-color: rgba(182, 221, 241, 0.46); + padding: 16rpx; + border-radius: 20px 0px 0px 0px; + color: var(--main-color); + font-weight: 400; +} + +.textarea-img { + display: flex; + align-items: center; + gap: 8rpx; +} + +.textarea-img image { + width: 28rpx; + height: 28rpx; +} + +.upload-title { + display: flex; + align-items: center; + justify-content: space-between; +} + +.upload-title image { + width: 32rpx; + height: 32rpx; +} + +.upload-text { + margin-top: 8rpx; + font-size: 28rpx; + line-height: 44rpx; + color: rgba(23, 26, 29, 0.40); +} + .card { background-color: #ffffff; margin: 0 var(--padding-my); margin-top: 16rpx; border-radius: var(--border-radius-card); padding: 0 32rpx; +} + +.cell-item { + padding: 24rpx 32rpx 24rpx 12rpx; + background-color: #fff; +} + +.cell-item-select {} + +.cell-idCard { + color: var(--main-color); + display: flex; + align-items: center; + font-weight: 400; +} + +.cell-phone .van-button { + color: var(--main-color); + border: none !important; + padding: 0 !important; +} + +.cell-idCard image { + width: 34rpx; + height: 32rpx; + margin-right: 8rpx; +} + +.cell-title { + margin-bottom: 8rpx; + display: flex; + justify-content: space-between; +} + +.cell-radio { + display: flex; + gap: 27rpx; +} + +.cell-title1 { + font-weight: 600; + font-size: 30rpx; + line-height: 46rpx; + padding-left: 20rpx; +} + +.cell-select { + padding: 0 20rpx; +} + +.cell-required { + color: #d1021c; + font-size: 30rpx; +} + +.cell-item .van-field__control--right { + text-align: left +} + +.popupMsg-form { + margin-top: 16rpx; + flex: 1; + margin-bottom: 162rpx; +} + +.person-type-select { + background-color: #fff; + +} + +.person-type-select-person { + padding: 24rpx 32rpx 16rpx; +} + +/* components/personTypes/index.wxss */ +.personTypes { + display: flex; + align-items: center; + background-color: #ffffff; + gap: 32rpx; + padding: 0 32rpx 32rpx; +} + +.personTypes-item { + position: relative; + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + color: rgba(23, 26, 29, 0.40); + border: 1px solid #E5E6EB; + border-radius: 12rpx; + padding: 18rpx 0 10rpx; + position: relative; +} + +.personTypes-item-active, +.personTypes-item-active .personTypes-item-icon { + color: var(--main-color); + border: 1px solid #1a6fb8; +} + + + +.personTypes-item-line {} + +.personTypes-item-hoverLine { + width: 168rpx; + border: 1px solid var(--main-color); +} + +.personTypes-item-line { + width: 168rpx; + border: 1px solid #E5E6EB; +} + +.personTypes-item-active .personTypes-item-number1 { + background-color: var(--main-color); + color: var(--white); +} + +.personTypes-item-round { + position: relative; + width: 60rpx; + height: 60rpx; + color: #86909C; + margin-bottom: 8rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.personTypes-item-round image { + width: 100%; + height: 100%; +} + +.personTypes-item-sueecss { + position: absolute; + right: 10rpx; + top: 10rpx; +} + +.personTypes-item-icon { + position: absolute; + z-index: 889; + top: 50%; + margin-top: -24rpx; + right: -88rpx; + color: #cccccc; } .party-add, @@ -22,10 +458,11 @@ color: var(--main-color); } -.party-noneAdd { + + +.party-oneAdd { flex: 1; - padding-left: 32rpx; - padding-right: 16rpx; + color: var(--main-color); } .popupMsg-draft { @@ -96,19 +533,6 @@ .popupMsg-tab-card-item-active .popupMsg-tab-card-item-bg { border-radius: 20rpx 20rpx 0px 0px; background-color: #ffffff; -} - -.popupMsg-form { - background-color: #ffffff; - padding: 8rpx 32rpx; -} - -.popupMsg-form .cell { - padding: 48rpx 0; -} - -.popupMsg-form .cell-noPadding { - margin-top: -48rpx; } .popupMsg-check { @@ -183,7 +607,7 @@ right: 0; display: flex; padding: 32rpx var(--padding-my); - background-color: var(--bg-color); + background-color: #fff; z-index: 99; } @@ -352,4 +776,51 @@ font-size: 12px; color: #d1021c; border-radius: 4px; +} + +.popup-scroll { + height: 1100rpx; + width: 100%; + background-color: #ffffff; +} + +.popup-scroll { + height: 1100rpx; + width: 100%; + background-color: #ffffff; +} + +.popup-scroll-xz .van-popup--round { + width: 100%; + border-radius: 0 !important; +} + +.popup-scroll-main { + display: flex; + flex-direction: column; +} + +.popup-scroll-body { + flex: 1; +} + +.popup-scroll-head { + text-align: center; + padding: 0 32rpx 16rpx; + border-bottom: 2rpx dashed rgba(126, 134, 142, 0.24); + margin-bottom: 24rpx; + font-size: 34rpx; +} + +.popup-button { + padding: 32rpx 32rpx 24rpx; + margin-top: 24rpx; + border-top: 1rpx solid #E5E6EB; +} + +.popup-button-no { + font-size: 28rpx; + text-align: center; + padding: 24rpx 0 0; + text-decoration: underline; } \ No newline at end of file diff --git a/gz-wxparty/pages/speechToText/index.js b/gz-wxparty/pages/speechToText/index.js new file mode 100644 index 0000000..58d241a --- /dev/null +++ b/gz-wxparty/pages/speechToText/index.js @@ -0,0 +1,175 @@ +// pages/speechToText/index.js +const $$ = require('../../utils/util'); +const app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + recordMannager: wx.getRecorderManager(), + data: { + imgUrl: $$.url.img, + key: '', + value: '', + showModal: false, //按住说话显示 + }, + + // 录音结束触发 + _endRecord(e) { + this._transferText(e); + }, + + touchStart(e) { + let that = this; + wx.getSetting({ + success(res) { + if (res.authSetting['scope.record'] === false) { + $$.hideLoading(); + $$.showModal({ + content: '抱歉!此功能需授权麦克风录音功能', + confirmText: '跳转授权', + success: (res) => { + if (res.confirm) { + wx.openSetting({ + success(res) { + if (res.authSetting['scope.record']) { + $$.showToast({ + title: '授权成功' + }); + } else { + $$.showToast({ + title: '授权失败' + }); + } + }, + }); + } + }, + }); + return false; + } + that.setData({ + showModal: true + }); + // 开始说话 + const options = { + duration: 60000, + sampleRate: 16000, + numberOfChannels: 1, + encodeBitRate: 96000, + format: 'pcm', + }; + that.recordMannager.start(options); + that.recordMannager.onStart(() => console.log('开始录音')); + that.recordMannager.onError((e) => { + console.log('onError', e); + $$.showToast({ + title: '抱歉!录音时间过短,请重新录入' + }); + that.setData({ + second: 60, + showModal: false + }); + }); + + }, + }); + }, + + touchEnd() { + let that = this; + that.recordMannager.onStop((e) => that._endRecord(e)); + that.recordMannager.stop(); + that.setData({ + showModal: false + }) + console.log('结束录音'); + }, + + + + // 语音转文字 + _transferText(e) { + console.log('开始识别', e); + $$.showLoading(); + let speakUrl = e.tempFilePath; + let that = this; + wx.uploadFile({ + url: `${$$.baseUrl}${$$.url.sys}/api/wechat/xfyun/speech`, + filePath: speakUrl, + name: 'fileNames', + header: { + Authorization: app.globalData.token + }, + complete(res) { + $$.hideLoading(); + if (res.errMsg === 'uploadFile:ok') { + const { + code, + data, + msg + } = JSON.parse(res.data); + if (code === '0' || code === 0) { + that.setData({ + value: that.data.value + data || '', + }); + } else { + $$.showToast({ + icon: 'error', + title: msg + }); + } + } else { + $$.showToast({ + icon: 'error', + title: '录音转写失败' + }); + } + }, + }); + }, + + // 表单修改 + handleChange(e) { + let key = e.currentTarget.dataset.key, + value = e.detail; + this.setData({ + value: value, + [key]: value.length + }); + }, + + // 下一步 or 上一步 + handleNext(e) { + // 获取当前页面栈 + var pages = getCurrentPages(); + + console.log('this.data.value', this.data.value); + console.log('this.data.key', this.data.key); + // 上一个页面 + var prevPage = pages[pages.length - 2]; + // 直接设置数据对象到上一页面的data中 + prevPage.setData({ + twoValue: this.data.value, + twoKey: this.data.key, + }); + wx.navigateBack({ + delta: 1, + }) + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let { + type + } = options + console.log('type', type); + this.setData({ + key: type + }) + }, +}) \ No newline at end of file diff --git a/gz-wxparty/pages/speechToText/index.json b/gz-wxparty/pages/speechToText/index.json new file mode 100644 index 0000000..3cc835c --- /dev/null +++ b/gz-wxparty/pages/speechToText/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "按住说话", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/speechToText/index.wxml b/gz-wxparty/pages/speechToText/index.wxml new file mode 100644 index 0000000..892925b --- /dev/null +++ b/gz-wxparty/pages/speechToText/index.wxml @@ -0,0 +1,79 @@ +<!--pages/speechToText/index.wxml--> +<block class="card"> + <view class="speechToText-main"> + <block wx:if="{{key==='caseDes'}}"> + <view class="cell-item"> + <view class="cell-title"><text><text class="cell-required">*</text>事项概况</text></view> + <van-field custom-style="padding:0 20rpx;line-height:90rpx; margin-bottom:32rpx" autosize="{{ { maxHeight: 470, minHeight: 470 } }}" bind:change="handleChange" border="{{ false }}" maxlength='2000' data-key="caseDesNum" placeholder="请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过" type="textarea" value="{{ value }}" /> + </view> + <view class="textarea-foot"> + <view class="textarea-limit">{{caseDesNum||0}}/2000字</view> + <view class="textarea-ability"> + <!-- <view bindtouchstart="touchStart" bindtouchend="touchEnd" class="textarea-img"> --> + <view bindtouchstart="touchStart" bindtouchend="touchEnd" class="textarea-img"> + <image src="{{imgUrl}}voiceOcr.png" mode="" />按住说话 + </view> + </view> + </view> + </block> + <block wx:else> + <view class="cell-item"> + <view class="cell-title"><text><text class="cell-required">*</text>事项申请</text></view> + <van-field custom-style="padding:0 20rpx;line-height:90rpx" autosize="{{ { maxHeight: 470, minHeight: 470 } }}" bind:change="handleChange" border="{{ false }}" maxlength='500' data-key="caseClaimNum" placeholder="希望相关部门如何处理,建议分条描述,如请求1,请求2..." type="textarea" value="{{ value }}" /> + </view> + <view class="textarea-foot"> + <view class="textarea-limit">{{caseClaimNum||0}}/500字</view> + <view class="textarea-ability"> + <view bindtouchstart="touchStart" bindtouchend="touchEnd" class="textarea-img"> + <image src="{{imgUrl}}voiceOcr.png" mode="" />按住说话 + </view> + </view> + </view> + </block> + <view wx:if="{{showModal}}" class="modal-card"> + <!-- <image class="modal-img" src="{{imgUrl}}speechToText.png" mode="" /> --> + <view class="recording"> + <!-- 语音动画 --> + <block> + <view class="time-box"> + <view class="time-box-top"> + <view class="hr hr1" /> + <view class="hr hr2" /> + <view class="hr hr3" /> + <view class="hr hr4" /> + <view class="hr hr5" /> + <view class="hr hr6" /> + <view class="hr hr7" /> + <view class="hr hr8" /> + <view class="hr hr9" /> + <view class="hr hr10" /> + </view> + <view class="time-box-bottom"> + <view class="hr hr1" /> + <view class="hr hr2" /> + <view class="hr hr3" /> + <view class="hr hr4" /> + <view class="hr hr5" /> + <view class="hr hr6" /> + <view class="hr hr7" /> + <view class="hr hr8" /> + <view class="hr hr9" /> + <view class="hr hr10" /> + </view> + </view> + <view class="recording-title">松开结束,上滑取消</view> + </block> + </view> + </view> + </view> + <view class="submitButton" catch:tap=""> + <view style="flex: 1;"> + <van-button bind:click="handleNext" block data-type="next" type="primary">保存</van-button> + <view class="safeHeight" /> + </view> + </view> + + <view class="modal"> + + </view> +</block> \ No newline at end of file diff --git a/gz-wxparty/pages/speechToText/index.wxss b/gz-wxparty/pages/speechToText/index.wxss new file mode 100644 index 0000000..6bed20c --- /dev/null +++ b/gz-wxparty/pages/speechToText/index.wxss @@ -0,0 +1,227 @@ +/* pages/speechToText/index.wxss */ + +.submitButton { + position: fixed; + bottom: 0; + left: 0; + right: 0; + display: flex; + padding: 32rpx var(--padding-my); + background-color: #fff; + z-index: 99; +} + +.speechToText-main { + position: relative; +} + +.cell-item { + padding: 24rpx 32rpx 24rpx 12rpx; + background-color: #fff; +} + +.cell-title { + margin-bottom: 8rpx; + display: flex; + justify-content: space-between; +} + +.cell-required { + color: #d1021c; + font-size: 30rpx; +} + +.textarea-foot { + display: flex; + justify-content: space-between; + background-color: #fff; + align-items: center; + padding-left: 32rpx; + /* margin-bottom: 96rpx; */ +} + +.textarea-limit { + font-size: 28rpx; + line-height: 44rpx; + color: rgba(23, 26, 29, 0.40); +} + +.textarea-ability { + display: flex; + align-items: center; + background-color: rgba(182, 221, 241, 0.46); + padding: 16rpx; + border-radius: 20px 0px 0px 0px; + color: var(--main-color); + font-weight: 400; +} + +.textarea-img { + display: flex; + align-items: center; + gap: 8rpx; +} + +.textarea-img image { + width: 28rpx; + height: 28rpx; +} + +.card { + display: flex; + flex-direction: column; +} + + +.modal-card { + position: absolute; + width: 200px; + height: 140px; + background: rgba(95, 166, 212, 0.80); + color: #fff; + border-radius: 4px; + top: 40%; + left: 23%; + text-align: center; +} + +.modal-img { + width: 144px; + height: 120px; +} + +.modal-title {} + +.time-box { + position: relative; + height: 120rpx; + left: 50%; + margin-left: -86rpx; +} + +.time-box-top { + position: absolute; + bottom: 50%; +} + +.time-box-bottom { + position: absolute; + top: 50%; + transform: rotateX(180deg); +} + +.hr { + background-color: red; + width: 10rpx; + height: 10rpx; + bottom: 0; + position: absolute; + background: #ffffff; + animation: bodong 0.5s infinite ease; + border-top-left-radius: 5rpx; + border-top-right-radius: 5rpx; +} + +.hr1 { + left: 0; + animation-delay: 1s; + animation-duration: 1s; +} + +.hr2 { + left: 18rpx; + animation-delay: 0.9s; + animation-duration: 0.9s; +} + +.hr3 { + left: 36rpx; + animation-delay: 0.8s; + animation-duration: 0.8s; +} + +.hr4 { + left: 54rpx; + animation-delay: 0.7s; + animation-duration: 0.7s; +} + +.hr5 { + left: 72rpx; + animation-delay: 0.6s; + animation-duration: 0.6s; +} + +.hr6 { + left: 90rpx; + animation-delay: 0.5s; + animation-duration: 0.5s; +} + +.hr7 { + left: 108rpx; + animation-delay: 0.7s; + animation-duration: 0.7s; +} + +.hr8 { + left: 126rpx; + animation-delay: 0.6s; + animation-duration: 0.6s; +} + +.hr9 { + left: 144rpx; + animation-delay: 0.8s; + animation-duration: 0.8s; +} + +.hr10 { + left: 162rpx; + animation-delay: 1s; + animation-duration: 1s; +} + +@keyframes bodong { + 0% { + height: 10rpx; + } + + 20% { + height: 20rpx; + } + + 30% { + height: 30rpx; + } + + 60% { + height: 60rpx; + } + + 80% { + height: 30rpx; + } + + 100% { + height: 10rpx; + } +} + +.recording { + position: absolute; + width: 350rpx; + padding: 48rpx 0; + top: 2%; + left: 50%; + margin-left: -175rpx; + text-align: center; + color: #ffffff; + font-size: 28rpx; +} + +.cell-phone .van-button { + color: var(--main-color); + border: none !important; + padding: 0 !important; +} \ No newline at end of file diff --git a/gz-wxparty/pages/ssimDetail/index.js b/gz-wxparty/pages/ssimDetail/index.js new file mode 100644 index 0000000..a80c471 --- /dev/null +++ b/gz-wxparty/pages/ssimDetail/index.js @@ -0,0 +1,51 @@ +// pages/ssimDetail/index.js +const $$ = require('../../utils/util'); + +function getByIdApi(param) { + return $$.request({ + url: 'ctUnit/getById', + type: 'get', + submitData: param || {}, + service: 'cust' + }) +} +Page({ + + /** + * 页面的初始数据 + */ + data: { + data: {}, + }, + + + // 获取纠纷案件详情 + async getById(data) { + $$.showLoading(); + const res = await getByIdApi({ + id: data.id + }); + $$.hideLoading(); + if (res.type) { + let data = res.data || {}; + this.setData({ + data + }); + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.getById(options); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + +}) \ No newline at end of file diff --git a/gz-wxparty/pages/ssimDetail/index.json b/gz-wxparty/pages/ssimDetail/index.json new file mode 100644 index 0000000..9e0f414 --- /dev/null +++ b/gz-wxparty/pages/ssimDetail/index.json @@ -0,0 +1,5 @@ +{ + "navigationBarTitleText": "综治中心详情", + "usingComponents": { + } +} \ No newline at end of file diff --git a/gz-wxparty/pages/ssimDetail/index.wxml b/gz-wxparty/pages/ssimDetail/index.wxml new file mode 100644 index 0000000..c6f7c0e --- /dev/null +++ b/gz-wxparty/pages/ssimDetail/index.wxml @@ -0,0 +1,28 @@ +<!--pages/ssimDetail/index.wxml--> +<common-page> + <view class="card"> + <view class="cell3"> + <view class="cell-title-placeholder">服务中心名称</view> + <view>{{ data.unitName || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">办公地址</view> + <view>{{ data.addr || '-' }}</view> + </view> + <map longitude="113.2038664" latitude="23.1622136" show-location="false" scale="16" style="width: 100%; height: 280rpx;"></map> + <view class="cell3"> + <view class="cell-title-placeholder">邮政编码</view> + <view>{{ data.postalCode || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">联系电话</view> + <view>{{ data.dutyMobile || '-' }}</view> + </view> + <view class="cell3"> + <view class="cell-title-placeholder">办公时间</view> + <view>{{data.workTimeWeek||'-'}}</view> + <view>{{data.workTimeAm||'-'}}</view> + <view>{{data.workTimePm||'-'}}</view> + </view> + </view> +</common-page> \ No newline at end of file diff --git a/gz-wxparty/pages/ssimDetail/index.wxss b/gz-wxparty/pages/ssimDetail/index.wxss new file mode 100644 index 0000000..f9a7396 --- /dev/null +++ b/gz-wxparty/pages/ssimDetail/index.wxss @@ -0,0 +1,16 @@ +/* pages/ssimDetail/index.wxss */ +.card { + padding: 24rpx 32rpx; + background-color: #ffffff; + border-radius: var(--border-radius-card); +} + +.cell3 { + margin-bottom: 16rpx; +} + +.cell-title-placeholder { + font-size: 28rpx; + line-height: 44rpx; + color: rgba(0, 0, 0, 0.5); +} \ No newline at end of file diff --git a/gz-wxparty/pages/ssimList/index.js b/gz-wxparty/pages/ssimList/index.js new file mode 100644 index 0000000..0c69b3f --- /dev/null +++ b/gz-wxparty/pages/ssimList/index.js @@ -0,0 +1,269 @@ +const $$ = require('../../utils/util'); +const app = getApp(); +import Toast from '../../components/vant/toast/toast'; + +function pageZzQueryApi(param) { + return $$.request({ + url: 'ctUnit/pageZzQuery', + type: 'get', + submitData: param || {}, + service: 'cust' + }) +} + +Page({ + /** + * 页面的初始数据 + */ + userInfo: {}, + location: [], // 省市区等地理资源 + data: { + imgUrl: $$.url.img, + search: { + prov: '', + provName: '', + city: '', + cityName: '', + area: '', + areaName: '', + road: '', + roadName: '', + keyword: '', + page: 1, + size: 10, + }, // 查询条件 + data: [], // 数据 + total: 0, // 总数 + popup: { + formtype: '', + index: 0, + }, // 下拉弹出框数据 + }, + + + + + + + + + + + // 下拉框选择确认 + handleConfirmPicker({ + detail + }) { + let type = this.data.popup.type, + value = detail.detail.value, + arr = []; + this.data.popup.visible = false; + if (type === 'caseCause') { + arr = ['caseType', 'caseTypeName']; + arr.forEach((x, t) => { + this.data.search[x] = value[0][t === 0 ? 'value' : 'label']; + }); + } else if (type === 'location') { + arr = [ + ['city', 'cityName'], + ['area', 'areaName'], + ['road', 'roadName'], + ]; + arr.forEach((x, t) => { + this.data.search[x[0]] = value[t]?.value || ''; + this.data.search[x[1]] = value[t]?.label || ''; + }); + } + this.setData({ + popup: this.data.popup, + search: this.data.search + }); + }, + + // 多行下拉选择时,省市区选择 + handleChangeColumns(e) { + if (this.data.popup.type === 'location') { + let selectData = $$.changeLocation(e, this.location, this.data.popup.selectData); + this.setData({ + popup: { + ...this.data.popup, + selectData + } + }); + } + }, + + // 下拉框选择开启 + handleShowPopup(e) { + let type = e.currentTarget.dataset.type; + let selectData = []; + if (type === 'location') { + if (this.location.length === 0) { + return false; + } + let selectOption = JSON.parse(JSON.stringify(this.location)); + let arr = $$.getLocationIndex(this.location, this.data.search); // 计算默认的市区县下标 + selectData = [{ + values: selectOption, + defaultIndex: arr[0] + }, + { + values: selectOption[arr[0]].children, + defaultIndex: arr[1] + }, + { + values: selectOption[arr[0]].children[arr[1]].children || [], + defaultIndex: arr[2] + }, + ]; + selectData.forEach((x) => { + x.values.forEach((y) => { + delete y.children; + }); + }); + } else { + let selectOption = this.select[type]; + selectData = [{ + values: selectOption, + defaultIndex: 0 + }]; + } + this.setData({ + popup: { + formtype: e.currentTarget.dataset.formtype, + index: e.currentTarget.dataset.index, + visible: true, + title: e.currentTarget.dataset.title, + type: type, + selectData: selectData, + }, + }); + }, + + // 关闭下拉框选择 + handleClosePopup() { + this.data.popup.visible = false; + this.setData({ + popup: this.data.popup + }); + }, + + searchButton() { + this.pageZzQuery(this.data.search) + }, + + async pageZzQuery(params, type) { + $$.showLoading(); + const res = await pageZzQueryApi(params); + $$.hideLoading(); + if (this.data.loading) { + this.setData({ + loading: false + }); + } + if (res.type) { + if (params.page === 1) { + this.data.data = res.data.content || []; + } else { + this.data.data = this.data.data.concat(res.data.content || []); + } + this.setData({ + search: params, + data: this.data.data, + total: res.data.totalElements || 0 + }); + if (type === 'onPullDownRefresh') { + $$.showToast({ + title: '已是最新记录', + duration: 1000 + }); + wx.stopPullDownRefresh(); + } + } + }, + + // 关闭底部弹窗 + handleClosePopupMsg() { + if (this.data.popupMsg.type === 1) { + this.getUserInfo(this.data.popupMsg.intentionObj); + } else { + this.setData({ + popupMsg: { + show: false + } + }); + } + }, + + // 滚动到底部获取案件 + handlescrolltolower() { + if (this.data.data.length >= this.data.total) { + return false; + } + if (!this.data.loading) { + this.data.loading = true; + this.setData({ + loading: this.data.loading + }); + let submitData = { + ...this.data.search + }; + submitData.page = submitData.page + 1; + this.pageZzQuery(submitData); + } + }, + + // 返回首页 + handleGoHomepage() { + if (this.data.changeVisible) { + wx.navigateBack({ + delta: 1, + }); + return false; + } + wx.reLaunch({ + url: '../../pages/homePage/index', + }); + }, + + // 获取省市区等地理资源 + async getLocationData() { + $$.showLoading(); + const res = await $$.commonRequest({ + url: `${$$.url.assets}locationSelect.json`, + type: 'get' + }); + $$.hideLoading(); + if (res) { + let location = []; + $$.province.forEach((x) => { + location.push(res[x][0]); + }); + this.location = location; + } + }, + + // 跳转详情 + _handleGoPage(e) { + let url = e.currentTarget.dataset.url; + let id = e.currentTarget.dataset.id; + wx.navigateTo({ + url: url + '?id=' + id, + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.pageZzQuery(this.data.search) + this.getLocationData(); + }, + + onShow: function () { + // this.pageZzQuery(this.data.search); + }, + + onHide: function () {}, + + onUnload: function () {}, +}); \ No newline at end of file diff --git a/gz-wxparty/pages/ssimList/index.json b/gz-wxparty/pages/ssimList/index.json new file mode 100644 index 0000000..1db4266 --- /dev/null +++ b/gz-wxparty/pages/ssimList/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "综治中心查询", + "usingComponents": {} +} \ No newline at end of file diff --git a/gz-wxparty/pages/ssimList/index.wxml b/gz-wxparty/pages/ssimList/index.wxml new file mode 100644 index 0000000..0e4dfb4 --- /dev/null +++ b/gz-wxparty/pages/ssimList/index.wxml @@ -0,0 +1,44 @@ +<van-toast id="van-toast" /> + +<common-page bind:onCancelPicker="handleClosePopup" bind:onChangePicker="handleChangeColumns" bind:onClosePopup="handleClosePopup" bind:onConfirmPicker="handleConfirmPicker" popup="{{ popup }}"> + <view class="ssimList"> + <!-- 综治中心查询 --> + <view class="card"> + <view class="cell"> + <view bindtap="handleShowPopup" data-type="location" class="cell-arrow cell-left"> + <view class="cell-left-l">{{ search.roadName ? search.roadName : '未选择' }}</view> + <van-icon name="arrow-down" /> + </view> + <view style="width:16rpx"></view> + <view class="cell-right"> + <van-icon name="search" /> + <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0;background-color:#f2f3f5" data-key="keyword" placeholder="请输入中心名称" value="{{ search.keyword }}" /> + <view style="color:#E5E6EB">|</view> + <view bindtap="searchButton" class="public-color">查询</view> + </view> + </view> + </view> + + + <!-- 列表 --> + <van-empty description="暂无数据" wx:if="{{ total === 0 }}" /> + <view class="ssim-scroll" wx:else> + <scroll-view bindscrolltolower="handlescrolltolower" scroll-y="true" style="height: 100%;"> + <view class="card-box" wx:for="{{ data }}" wx:key="index"> + <view class="card-list" bindtap="_handleGoPage" data-id="{{ item.id }}" data-url="../../pages/ssimDetail/index"> + <view class="card-title">{{item.unitName}}</view> + <view class="card-subTitle"><text class="card-subTitle-l">办公地址:</text>{{item.addr}}</view> + <view class="card-subTitle"><text class="card-subTitle-l">联系电话:</text>{{item.dutyMobile}}</view> + </view> + </view> + <block> + <van-divider contentPosition="center" custom-style="margin-top: 12px;" wx:if="{{ data.length >= total && data.length !== 0 }}">没有更多了</van-divider> + <view class="myMediate-scroll-loading" wx:if="{{ loading }}"> + <van-loading type="spinner" /> + </view> + </block> + </scroll-view> + </view> + <view class="safeHeight" /> + </view> +</common-page> \ No newline at end of file diff --git a/gz-wxparty/pages/ssimList/index.wxss b/gz-wxparty/pages/ssimList/index.wxss new file mode 100644 index 0000000..288193e --- /dev/null +++ b/gz-wxparty/pages/ssimList/index.wxss @@ -0,0 +1,77 @@ +@import '../../styles/public_components.wxss'; + +.ssimList { + height: 100%; + display: flex; + flex-direction: column; + position: absolute; + left: 0; + right: 0; +} + +.card { + background-color: #ffffff; + padding: 0 24rpx; +} + +.cell-left { + display: flex; + width: 28%; + justify-content: space-between; + align-items: center; + background: #f2f3f5; + padding: 12rpx 16rpx; + border-radius: 10rpx; +} + +.cell-left-l { + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: var(--font-size-md, 14px); +} + +.cell-right { + flex: 1; + display: flex; + justify-content: space-between; + align-items: center; + background: #f2f3f5; + padding: 12rpx 16rpx; + border-radius: 10rpx; + font-size: var(--font-size-md, 14px); +} + +.card-box { + padding: 24rpx 24rpx 0 24rpx; +} + +.card { + border-radius: 2px; + background-color: #fff; +} + +.card-list { + border-radius: 2px; + background-color: #fff; + padding: 24rpx +} + +.ssim-scroll { + flex: 1; + overflow: hidden; +} + +.card-title { + font-size: 30rpx; + line-height: 46rpx; +} + +.card-subTitle { + padding-top: 8rpx; +} + +.card-subTitle-l { + color: rgba(23, 26, 29, 0.60); +} \ No newline at end of file diff --git a/gz-wxparty/project.private.config.json b/gz-wxparty/project.private.config.json index 9014e9d..4e654b3 100644 --- a/gz-wxparty/project.private.config.json +++ b/gz-wxparty/project.private.config.json @@ -1,8 +1,9 @@ { - "projectname": "wx-party", + "projectname": "gz-wxparty", "setting": { "compileHotReLoad": true, - "urlCheck": false + "urlCheck": false, + "bigPackageSizeSupport": true }, "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "libVersion": "2.24.2" diff --git a/gz-wxparty/styles/public.wxss b/gz-wxparty/styles/public.wxss index ac2d23b..e39ee4b 100644 --- a/gz-wxparty/styles/public.wxss +++ b/gz-wxparty/styles/public.wxss @@ -1,252 +1,253 @@ page { - /* color */ - /* 主色 */ - --main-color: #d10202; - /* page背景色 */ - --bg-color: #f0f2f5; - /* 主色拓展 */ - --red-1: #ffeae6; - /* Color Palette */ - --black: #000; - --white: #fff; - --gray-1: #f7f8fa; - --gray-2: #f2f3f5; - --gray-3: #ebedf0; - --gray-4: #dcdee0; - --gray-5: #c8c9cc; - --gray-6: #969799; - --gray-7: #646566; - --gray-8: #323233; - --red: #ee0a24; - --blue: #1989fa; - --orange: #ff976a; - --orange-dark: #ed6a0c; - --orange-light: #fffbe8; - --green: #07c160; - /* font-color */ - --text-color: rgba(0, 0, 0, 0.85); - --second-text-color: rgba(0, 0, 0, 0.65); + /* color */ + /* 主色 */ + --main-color: #1A6FB8; + /* page背景色 */ + --bg-color: #f0f2f5; + /* 主色拓展 */ + --red-1: #ffeae6; + /* Color Palette */ + --black: #000; + --white: #fff; + --gray-1: rgba(255,255,255,0.60); + --gray-2: #f2f3f5; + --gray-3: #ebedf0; + --gray-4: #dcdee0; + --gray-5: #c8c9cc; + --gray-6: #969799; + --gray-7: #646566; + --gray-8: #323233; + --red: #ee0a24; + --blue: #1989fa; + --orange: #ff976a; + --orange-dark: #ed6a0c; + --orange-light: #fffbe8; + --green: #07c160; + /* font-color */ + --text-color: rgba(0, 0, 0, 0.85); + --second-text-color: rgba(0, 0, 0, 0.65); - /* font */ - --font-size-main: 28rpx; - --line-height-main: 44rpx; - --font-size-xs: 20rpx; - --font-size-sm: 24rpx; - --font-size-md: 28rpx; - --font-size-lg: 32rpx; - --font-weight-bold: 600; - --line-height-xs: 28rpx; - --line-height-sm: 36rpx; - --line-height-md: 44rpx; - --line-height-lg: 44rpx; - --base-font-family: system-ui; + /* font */ + --font-size-main: 30rpx; + --line-height-main: 46rpx; + --font-size-xs: 20rpx; + --font-size-sm: 24rpx; + --font-size-md: 30rpx; + --font-size-lg: 32rpx; + --font-weight-bold: 600; + --line-height-xs: 28rpx; + --line-height-sm: 36rpx; + --line-height-md: 44rpx; + --line-height-lg: 44rpx; + --base-font-family: system-ui; - /* Component Colors */ - --active-color: var(--gray-2); - --active-opacity: 0.7; - --disabled-opacity: 0.5; - --background-color: var(--gray-1); - --background-color-light: #fafafa; - --text-link-color: #576b95; + /* Component Colors */ + --active-color: var(--gray-2); + --active-opacity: 0.7; + --disabled-opacity: 0.5; + --background-color: var(--gray-1); + --background-color-light: #fafafa; + --text-link-color: #576b95; - /* Animation */ - --animation-duration-base: 0.3s; - --animation-duration-fast: 0.2s; + /* Animation */ + --animation-duration-base: 0.3s; + --animation-duration-fast: 0.2s; - /* padding */ - --padding-my: 20rpx; - --padding-base: 8rpx; - --padding-xs: 16rpx; - --padding-sm: 24rpx; - --padding-md: 32rpx; - --padding-lg: 48rpx; - --padding-xl: 64rpx; + /* padding */ + --padding-my: 32rpx; + --padding-base: 8rpx; + --padding-xs: 16rpx; + --padding-sm: 24rpx; + --padding-md: 32rpx; + --padding-lg: 48rpx; + --padding-xl: 64rpx; - /* Border */ - --border-color: rgba(0, 0, 0, 0.1); - --border-radius-card: 20rpx; - --border-radius-card-sm: 10rpx; - --border-width-base: 2rpx; - --border-radius-sm: 4rpx; - --border-radius-md: 8rpx; - --border-radius-lg: 16rpx; + /* Border */ + --border-color: rgba(0, 0, 0, 0.1); + --border-radius-card: 20rpx; + --border-radius-card-sm: 10rpx; + --border-width-base: 2rpx; + --border-radius-sm: 4rpx; + --border-radius-md: 8rpx; + --border-radius-lg: 16rpx; - /* Button */ - --button-mini-height: 44rpx; - --button-mini-min-width: 100rpx; - --button-mini-font-size: var(--font-size-xs); - --button-small-height: 60rpx; - --button-small-font-size: var(--font-size-sm); - --button-small-min-width: 120rpx; - --button-normal-font-size: var(--font-size-md); - --button-large-height: 100rpx; - --button-default-color: var(--text-color); - --button-default-height: 80rpx; - --button-default-font-size: var(--font-size-lg); - --button-default-background-color: var(--white); - --button-default-border-color: var(--border-color); - --button-primary-color: var(--white); - --button-primary-background-color: var(--main-color); - --button-primary-border-color: var(--main-color); - --button-info-color: var(--white); - --button-info-background-color: var(--blue); - --button-info-border-color: var(--blue); - --button-danger-color: var(--white); - --button-danger-background-color: var(--red); - --button-danger-border-color: var(--red); - --button-warning-color: var(--white); - --button-warning-background-color: var(--orange); - --button-warning-border-color: var(--orange); - --button-line-height: 44rpx; - --button-border-width: 2rpx; - --button-border-radius: var(--border-radius-md); - --button-round-border-radius: var(--border-radius-max); - --button-plain-background-color: var(--white); - --button-disabled-opacity: var(--disabled-opacity); + /* Button */ + --button-mini-height: 44rpx; + --button-mini-min-width: 100rpx; + --button-mini-font-size: var(--font-size-xs); + --button-small-height: 60rpx; + --button-small-font-size: var(--font-size-sm); + --button-small-min-width: 120rpx; + --button-normal-font-size: var(--font-size-md); + --button-large-height: 100rpx; + --button-default-color: var(--text-color); + --button-default-height: 80rpx; + --button-default-font-size: var(--font-size-lg); + --button-default-background-color: var(--white); + --button-default-border-color: var(--border-color); + --button-primary-color: var(--white); + --button-primary-background-color: var(--main-color); + --button-primary-border-color: var(--main-color); + --button-info-color: var(--white); + --button-info-background-color: var(--blue); + --button-info-border-color: var(--blue); + --button-danger-color: var(--white); + --button-danger-background-color: var(--red); + --button-danger-border-color: var(--red); + --button-warning-color: var(--white); + --button-warning-background-color: var(--orange); + --button-warning-border-color: var(--orange); + --button-line-height: 44rpx; + --button-border-width: 2rpx; + --button-border-radius: var(--border-radius-md); + --button-round-border-radius: var(--border-radius-max); + --button-plain-background-color: var(--white); + --button-disabled-opacity: var(--disabled-opacity); - /* Tabbar */ - --tabbar-height: 92rpx; - --tabbar-background-color: var(--white); + /* Tabbar */ + --tabbar-height: 92rpx; + --tabbar-background-color: var(--white); - /* TabbarItem */ - --tabbar-item-font-size: var(--font-size-sm); - --tabbar-item-text-color: var(--text-color); - --tabbar-item-active-color: var(--main-color); - --tabbar-item-line-height: 1; - --tabbar-item-icon-size: 36rpx; - --tabbar-item-margin-bottom: 8rpx; + /* TabbarItem */ + --tabbar-item-font-size: var(--font-size-sm); + --tabbar-item-text-color: var(--text-color); + --tabbar-item-active-color: var(--main-color); + --tabbar-item-line-height: 1; + --tabbar-item-icon-size: 36rpx; + --tabbar-item-margin-bottom: 8rpx; - /* Tab */ - --tab-text-color: var(--gray-7); - --tab-active-text-color: var(--text-color); - --tab-disabled-text-color: var(--gray-5); - --tab-font-size: var(--font-size-md); + /* Tab */ + --tab-text-color: var(--gray-7); + --tab-active-text-color: var(--text-color); + --tab-disabled-text-color: var(--gray-5); + --tab-font-size: var(--font-size-md); - /* Tabs */ - --tabs-default-color: var(--main-color); - --tabs-line-height: 48rpx; - --tabs-card-height: 60rpx; - --tabs-nav-background-color: var(--white); - --tabs-bottom-bar-height: 4rpx; - --tabs-bottom-bar-color: var(--tabs-default-color); + /* Tabs */ + --tabs-default-color: var(--main-color); + --tabs-line-height: 48rpx; + --tabs-card-height: 60rpx; + --tabs-nav-background-color: var(--white); + --tabs-bottom-bar-height: 4rpx; + --tabs-bottom-bar-color: var(--tabs-default-color); - /* Field */ - --field-label-color: var(--gray-7); - --field-input-text-color: var(--text-color); - --field-input-error-text-color: var(--red); - --field-input-disabled-text-color: var(--gray-5); - --field-placeholder-text-color: rgba(0, 0, 0, 0.5); - --field-icon-size: 32rpx; - --field-clear-icon-size: 32rpx; - --field-clear-icon-color: var(--gray-5); - --field-icon-container-color: var(--gray-6); - --field-error-message-color: var(--red); - --field-error-message-text-font-size: var(--font-size-sm); - --field-text-area-min-height: 36rpx; - --field-word-limit-color: var(--gray-7); - --field-word-limit-font-size: var(--font-size-sm); - --field-word-limit-line-height: 32rpx; - --field-word-num-full-color: var(--red); - --field-disabled-text-color: var(--gray-5); + /* Field */ + --field-label-color: var(--gray-7); + --field-input-text-color: var(--text-color); + --field-input-error-text-color: var(--red); + --field-input-disabled-text-color: var(--gray-5); + --field-placeholder-text-color: rgba(0, 0, 0, 0.5); + --field-icon-size: 32rpx; + --field-clear-icon-size: 32rpx; + --field-clear-icon-color: var(--gray-5); + --field-icon-container-color: var(--gray-6); + --field-error-message-color: var(--red); + --field-error-message-text-font-size: var(--font-size-sm); + --field-text-area-min-height: 36rpx; + --field-word-limit-color: var(--gray-7); + --field-word-limit-font-size: var(--font-size-sm); + --field-word-limit-line-height: 32rpx; + --field-word-num-full-color: var(--red); + --field-disabled-text-color: var(--gray-5); - /* Cell */ - --cell-font-size: var(--font-size-md); - --cell-line-height: var(--line-height-md); - --cell-vertical-padding: var(--padding-sm); - --cell-horizontal-padding: var(--padding-md); - --cell-text-color: var(--text-color); - --cell-background-color: var(--white); - --cell-border-color: var(--border-color); - --cell-active-color: var(--active-color); - --cell-required-color: var(--red); - --cell-label-color: var(--gray-6); - --cell-label-font-size: var(--font-size-sm); - --cell-label-line-height: 36rpx; - --cell-label-margin-top: 6rpx; - --cell-value-color: var(--gray-6); - --cell-icon-size: 32rpx; - --cell-right-icon-color: var(--gray-6); - --cell-large-vertical-padding: var(--padding-sm); - --cell-large-title-font-size: var(--font-size-lg); - --cell-large-value-font-size: var(--font-size-lg); - --cell-large-label-font-size: var(--font-size-md); + /* Cell */ + --cell-font-size: var(--font-size-md); + --cell-line-height: var(--line-height-md); + --cell-vertical-padding: var(--padding-sm); + --cell-horizontal-padding: var(--padding-md); + --cell-text-color: var(--text-color); + --cell-background-color: var(--white); + --cell-border-color: var(--border-color); + --cell-active-color: var(--active-color); + --cell-required-color: var(--red); + --cell-label-color: var(--gray-6); + --cell-label-font-size: var(--font-size-sm); + --cell-label-line-height: 36rpx; + --cell-label-margin-top: 6rpx; + --cell-value-color: var(--gray-6); + --cell-icon-size: 32rpx; + --cell-right-icon-color: var(--gray-6); + --cell-large-vertical-padding: var(--padding-sm); + --cell-large-title-font-size: var(--font-size-lg); + --cell-large-value-font-size: var(--font-size-lg); + --cell-large-label-font-size: var(--font-size-md); - /* CellGroup */ - --cell-group-background-color: var(--white); - --cell-group-title-color: var(--gray-6); - --cell-group-title-padding: var(--padding-md) var(--padding-md) var(--padding-xs); - --cell-group-title-font-size: var(--font-size-md); - --cell-group-title-line-height: 32rpx; - --cell-group-inset-padding: 0 var(--padding-my); - --cell-group-inset-border-radius: var(--border-radius-lg); - --cell-group-inset-title-padding: var(--padding-md) var(--padding-md) var(--padding-xs) var(--padding-xl); + /* CellGroup */ + --cell-group-background-color: var(--white); + --cell-group-title-color: var(--gray-6); + --cell-group-title-padding: var(--padding-md) var(--padding-md) var(--padding-xs); + --cell-group-title-font-size: var(--font-size-md); + --cell-group-title-line-height: 32rpx; + --cell-group-inset-padding: 0 var(--padding-my); + --cell-group-inset-border-radius: var(--border-radius-lg); + --cell-group-inset-title-padding: var(--padding-md) var(--padding-md) var(--padding-xs) var(--padding-xl); - /* Checkbox */ - --checkbox-size: 40rpx; - --checkbox-border-color: var(--gray-5); - --checkbox-transition-duration: 0.2s; - --checkbox-label-margin: 20rpx; - --checkbox-label-color: --text-color; - --checkbox-checked-icon-color: var(--main-color); - --checkbox-disabled-icon-color: var(--gray-5); - --checkbox-disabled-label-color: var(--gray-5); - --checkbox-disabled-background-color: var(--border-color); + /* Checkbox */ + --checkbox-size: 40rpx; + --checkbox-border-color: var(--gray-5); + --checkbox-transition-duration: 0.2s; + --checkbox-label-margin: 20rpx; + --checkbox-label-color: --text-color; + --checkbox-checked-icon-color: var(--main-color); + --checkbox-disabled-icon-color: var(--gray-5); + --checkbox-disabled-label-color: var(--gray-5); + --checkbox-disabled-background-color: var(--border-color); - /* Popup */ - --popup-background-color: var(--white); - --popup-round-border-radius: 20rpx; - --popup-close-icon-size: 36rpx; - --popup-close-icon-color: var(--black); - --popup-close-icon-margin: 32rpx; - --popup-close-icon-z-index: 1; + /* Popup */ + --popup-background-color: var(--white); + --popup-round-border-radius: 20rpx; + --popup-close-icon-size: 36rpx; + --popup-close-icon-color: var(--black); + --popup-close-icon-margin: 32rpx; + --popup-close-icon-z-index: 1; - /* Search */ - --search-background-color: #ffffff; - --search-padding: 16rpx var(--padding-my); - --search-input-height: 68rpx; - --search-label-padding: 0 10rpx; - --search-label-color: var(--text-color); - --search-label-font-size: var(--font-size-md); - --search-left-icon-color: var(--gray-6); - --search-action-padding: 0 var(--padding-xs); - --search-action-text-color: var(--text-color); - --search-action-font-size: var(--font-size-md); + /* Search */ + --search-background-color: #ffffff; + --search-padding: 16rpx var(--padding-my); + --search-input-height: 68rpx; + --search-label-padding: 0 10rpx; + --search-label-color: var(--text-color); + --search-label-font-size: var(--font-size-md); + --search-left-icon-color: var(--gray-6); + --search-action-padding: 0 var(--padding-xs); + --search-action-text-color: var(--text-color); + --search-action-font-size: var(--font-size-md); - /* Toast */ - --toast-max-width: 90%; - --toast-font-size: 28rpx; - --toast-text-color: var(--white); - --toast-line-height: 40rpx; - --toast-border-radius: var(--border-radius-lg); - --toast-background-color: var(--second-text-color); - --toast-icon-size: 72rpx; - --toast-text-min-width: 192rpx; - --toast-text-padding: var(--padding-xs) var(--padding-sm); - --toast-default-padding: var(--padding-md); - --toast-default-width: 176rpx; - --toast-default-min-height: 176rpx; + /* Toast */ + --toast-max-width: 90%; + --toast-font-size: 28rpx; + --toast-text-color: var(--white); + --toast-line-height: 40rpx; + --toast-border-radius: var(--border-radius-lg); + --toast-background-color: var(--second-text-color); + --toast-icon-size: 72rpx; + --toast-text-min-width: 192rpx; + --toast-text-padding: var(--padding-xs) var(--padding-sm); + --toast-default-padding: var(--padding-md); + --toast-default-width: 176rpx; + --toast-default-min-height: 176rpx; - /* Radio */ - --radio-size: 40rpx; - --radio-border-color: var(--gray-5); - --radio-transition-duration: 0.2s; - --radio-label-margin: 20rpx; - --radio-label-color: var(--text-color); - --radio-checked-icon-color: var(--main-color); - --radio-disabled-icon-color: var(--gray-5); - --radio-disabled-label-color: var(--gray-5); - --radio-disabled-background-color: var(--border-color); + /* Radio */ + --radio-size: 40rpx; + --radio-border-color: var(--gray-5); + --radio-transition-duration: 0.2s; + --radio-label-margin: 20rpx; + --radio-label-color: var(--text-color); + --radio-checked-icon-color: var(--main-color); + --radio-disabled-icon-color: var(--gray-5); + --radio-disabled-label-color: var(--gray-5); + --radio-disabled-background-color: var(--border-color); - /* Switch */ - --switch-width: 2em; - --switch-height: 1em; - --switch-node-size: 1em; - --switch-node-z-index: 1; - --switch-node-background-color: var(--white); - --switch-node-box-shadow: 0 6rpx 2rpx 0 rgba(0, 0, 0, 0.05), 0 4rpx 4rpx 0 rgba(0, 0, 0, 0.1), 0 6rpx 6rpx 0 rgba(0, 0, 0, 0.05); - --switch-background-color: var(--white); - --switch-on-background-color: var(--main-color); - --switch-transition-duration: 0.3s; - --switch-disabled-opacity: 0.4; - --switch-border: 2rpx solid rgba(0, 0, 0, 0.1); + /* Switch */ + --switch-width: 2em; + --switch-height: 1em; + --switch-node-size: 1em; + --switch-node-z-index: 1; + --switch-node-background-color: var(--white); + --switch-node-box-shadow: 0 6rpx 2rpx 0 rgba(0, 0, 0, 0.05), 0 4rpx 4rpx 0 rgba(0, 0, 0, 0.1), 0 6rpx 6rpx 0 rgba(0, 0, 0, 0.05); + --switch-background-color: var(--white); + --switch-on-background-color: var(--main-color); + --switch-transition-duration: 0.3s; + --switch-disabled-opacity: 0.4; + --switch-border: 2rpx solid rgba(0, 0, 0, 0.1); } + diff --git a/gz-wxparty/styles/public_components.wxss b/gz-wxparty/styles/public_components.wxss index c28106b..8dd6c51 100644 --- a/gz-wxparty/styles/public_components.wxss +++ b/gz-wxparty/styles/public_components.wxss @@ -106,8 +106,8 @@ .cell-title, .cell-title-line { - font-size: 28rpx; - line-height: 44rpx; + font-size: 30rpx; + line-height: 46rpx; font-weight: 600; } @@ -130,8 +130,8 @@ .cell-placeholder { flex: 1; - font-size: 28rpx; - line-height: 44rpx; + font-size: 30rpx; + line-height: 46rpx; color: rgba(0, 0, 0, 0.5); } diff --git a/gz-wxparty/utils/util.js b/gz-wxparty/utils/util.js index ff41e3d..492cb22 100644 --- a/gz-wxparty/utils/util.js +++ b/gz-wxparty/utils/util.js @@ -50,7 +50,7 @@ let baseUrl = isDebug ? api.url.debug : api.url.web; - let visitUrl = `${baseUrl}${api.url[service] || ''}/api/${v1 ? 'v1' : 'weChat'}/${url}`; + let visitUrl = `${baseUrl}${api.url[service] || ''}/api/${v1 ? 'v1' : 'wechat'}/${url}`; return new Promise((resolve, reject) => { wx.request({ @@ -234,7 +234,7 @@ return wx.showModal({ content: content, showCancel: showCancel, - confirmColor: '#d10202', + confirmColor: '#1A6FB8', title: title, cancelText: cancelText, confirmText: confirmText, @@ -434,7 +434,7 @@ return false; } let realStatus = wx.getStorageSync('userInfo')?.realStatus; - if (realStatus !== '1' && (type === 'realName' || type === 'all')) { + if (realStatus !== 1 && (type === 'realName' || type === 'all')) { if (direction !== 'bottom') { showModal({ content: '检测到您未进行实名认证,该操作需先进行实名认证,是否前往认证?', diff --git a/gz-wxparty/utils/wxs/util.wxs b/gz-wxparty/utils/wxs/util.wxs index 867b9fd..cefffe1 100644 --- a/gz-wxparty/utils/wxs/util.wxs +++ b/gz-wxparty/utils/wxs/util.wxs @@ -1,36 +1,37 @@ // 组合省市区街道展示 function showLocation(value) { - var villageName = value.villageName ? '/' + value.villageName : ''; - return value.provName + '/' + value.cityName + '/' + value.areaName + '/' + value.roadName + villageName; + var villageName = value.villageName ? '/' + value.villageName : ''; + // return value.provName + '/' + value.cityName + '/' + value.areaName + '/' + value.roadName + villageName; + return value.cityName + '/' + value.areaName + '/' + value.roadName + villageName; } // 判断文件类型 function fileType(value) { - var obj = { - '22_00017-0': '未分类', - '22_00017-1': '音频', - '22_00017-2': '视频', - '22_00017-3': '图片', - '22_00017-4': 'Word文档', - '22_00017-5': 'Excel文档', - '22_00017-6': 'PDF文件', - '22_00017-7': 'txt文本', - '22_00017-8': '压缩文件', - '22_00017-9': 'PPT文件', - '22_00017-99': '其它文件', - }; - return obj[value]; + var obj = { + '22_00017-0': '未分类', + '22_00017-1': '音频', + '22_00017-2': '视频', + '22_00017-3': '图片', + '22_00017-4': 'Word文档', + '22_00017-5': 'Excel文档', + '22_00017-6': 'PDF文件', + '22_00017-7': 'txt文本', + '22_00017-8': '压缩文件', + '22_00017-9': 'PPT文件', + '22_00017-99': '其它文件', + }; + return obj[value]; } // 字符串转变数组 function strArr(value) { - if (!value) { - return ['无']; - } - var arr = value.split(','); - return arr; + if (!value) { + return ['无']; + } + var arr = value.split(','); + return arr; } module.exports = { - showLocation: showLocation, - fileType: fileType, - strArr: strArr, -}; + showLocation: showLocation, + fileType: fileType, + strArr: strArr, +}; \ No newline at end of file -- Gitblit v1.8.0