diff --git a/epdc-resident-mp-yushan/.cloudbase/container/debug.json b/epdc-resident-mp-yushan/.cloudbase/container/debug.json new file mode 100644 index 0000000..0d44458 --- /dev/null +++ b/epdc-resident-mp-yushan/.cloudbase/container/debug.json @@ -0,0 +1 @@ +{"containers":[],"config":{}} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/app.json b/epdc-resident-mp-yushan/app.json index 951e75f..b2d9133 100644 --- a/epdc-resident-mp-yushan/app.json +++ b/epdc-resident-mp-yushan/app.json @@ -1,298 +1,304 @@ { - "pages": [ - "pages/welcome/welcome", - "pages/index/index", - "pages/toRegister/toRegister", - "pages/heart/heart", - "pages/mine/mine", - "pages/association/association", - "pages/discussion/discussion", - "pages/toScan/toScan", - "pages/complete/complete", - "pages/formid/formid", - "pages/fromVirus/fromVirus", - "pages/register/register", - "pages/detail/detail", - "pages/fromVirus/detail/detail", - "pages/accept/accept", - "pages/gridLeaderRegister/gridLeaderRegister", - "pages/property/property" - ], - "requiredPrivateInfos": [ - "getLocation" - ], - "subPackages": [ - { - "root": "subpages/home", - "name": "home", - "pages": [ - "pages/webview/webview", - "pages/agreement/agreement", - "pages/notice/notice", - "pages/consultation/consultation", - "pages/info/info", - "pages/noticeDetail/noticeDetail", - "pages/newsDetail/newsDetail" - ] - }, - { - "root": "subpages/changegrid", - "name": "changeGrid", - "pages": [ - "pages/changeGrid/changeGrid" - ] - }, - { - "root": "subpages/association", - "name": "association", - "pages": [ - "pages/joinassociation/joinassociation", - "pages/createassociation/createassociation", - "pages/associationMember/associationMember", - "pages/associationDetail/associationDetail", - "pages/inviteFriend/inviteFriend", - "pages/incomingVerify/incomingVerify", - "pages/unpassAssociation/unpassAssociation", - "pages/topicList/topicList", - "pages/addTopic/addTopic", - "pages/topicDetail/topicDetail", - "pages/replyOrRemark/replyOrRemark", - "pages/changeToIssue/changeToIssue" - ] - }, - { - "root": "subpages/heart", - "pages": [ - "pages/heartDetail/heartDetail", - "pages/leaderboard/leaderboard", - "pages/myNews/myNews", - "pages/clockIn/clockIn", - "pages/volunteer/volunteer", - "pages/signed/signed", - "pages/refusedOrEndedDetail/refusedOrEndedDetail", - "pages/cancelDetail/cancelDetail", - "pages/joinVolunteerOrg/joinVolunteerOrg", - "pages/volunteerOrgList/volunteerOrgList", - "pages/moreList/moreList" - ] - }, - { - "root": "subpages/discussion", - "name": "discussion", - "pages": [ - "pages/addIssue/addIssue", - "pages/discussionDetail/discussionDetail", - "pages/publishEvaluation/publishEvaluation", - "pages/remarkOrReply/remarkOrReply", - "pages/searchDiscussion/searchDiscussion", - "pages/categoryList/categoryList", - "pages/activeApply/activeApply", - "pages/societyOrgActiveApply/societyOrgActiveApply" - ], - "plugins": { - "esuaEpdcMpPlugin": { - "version": "0.1.1", - "provider": "wxdd8530c5f4926766" - } - } - }, - { - "root": "subpages/mine", - "name": "mine", - "pages": [ - "pages/eventDetail/eventDetail", - "pages/company/company", - "pages/companyInfo/companyInfo", - "pages/inviteRecord/inviteRecord", - "pages/gridManage/gridManage" - ] - }, - { - "root": "subpages/integralCentre", - "name": "integralCentre", - "pages": [ + "pages": [ + "pages/welcome/welcome", "pages/index/index", - "pages/record/record", - "pages/noticeDetail/noticeDetail", - "pages/exchangeIndex/exchangeIndex" - ] - }, - { - "root": "subpages/property", - "name": "property", - "pages": [ - "pages/joinassociation/joinassociation", - "pages/createassociation/createassociation", - "pages/associationMember/associationMember", - "pages/associationDetail/associationDetail", - "pages/inviteFriend/inviteFriend", - "pages/incomingVerify/incomingVerify", - "pages/unpassAssociation/unpassAssociation", - "pages/topicList/topicList", - "pages/addTopic/addTopic", - "pages/topicDetail/topicDetail", - "pages/replyOrRemark/replyOrRemark", - "pages/changeToIssue/changeToIssue", - "pages/myTopic/myTopic" - ] - }, - { - "root": "subpages/safety", - "name": "safety", - "pages": [ - "pages/index/index", - "pages/newsDetail/newsDetail", - "pages/consultIndex/consultIndex", - "pages/consultantDetail/consultantDetail", - "pages/consultantList/consultantList", - "pages/myQuestion/myQuestion", - "pages/addQuestion/addQuestion" - ] - }, - { - "root": "subpages/education", - "name": "education", - "pages": [ - "pages/index/index", - "pages/hobby/hobby", - "pages/healthyLife/healthyLife", - "pages/class/class", - "pages/classDetail/classDetail" - ] - }, - { - "root": "subpages/extend", - "name": "extend", - "pages": [ - "pages/vaccines/vaccines", - "pages/epidemicControl/epidemicControl", - "pages/tripReport/tripReport", - "pages/moreList/moreList" - ] - }, - { - "root": "subpages/communityNews", - "name": "communityNews", - "pages": [ - "pages/index/index", - "pages/detail/detail" - ] - }, - { - "root": "subpages/status", - "name": "status", - "pages": [ - "pages/brightStatus/brightStatus" - ] - }, - { - "root": "subpages/gridArmy", - "name": "gridArmy", - "pages": [ - "pages/index/index", - "pages/communityList/communityList", - "pages/categoryList/categoryList" - ] - }, - { - "root": "subpages/workTodo", - "name": "workTodo", - "pages": [ - "pages/index/index", - "pages/list/index", + "pages/toRegister/toRegister", + "pages/heart/heart", + "pages/mine/mine", + "pages/association/association", + "pages/discussion/discussion", + "pages/toScan/toScan", + "pages/complete/complete", + "pages/formid/formid", + "pages/fromVirus/fromVirus", + "pages/register/register", "pages/detail/detail", - "pages/moduleList/moduleList" - ] - }, - { - "root": "subpages/submitAdvise", - "name": "submitAdvise", - "pages": [ - "pages/activeApply/activeApply", - "pages/moreList/moreList" - ] - }, - { - "root": "subpages/fingertipYushan", - "name": "fingertipYushan", - "pages": [ - "pages/index/index" - ] - }, - { - "root": "subpages/societyOrg", - "name": "societyOrg", - "pages": [ - "pages/orgList/orgList", - "pages/orgDetail/orgDetail", - "pages/memberManage/memberManage", - "pages/verifyMember/verifyMember", - "pages/joinOrg/joinOrg", - "pages/memberDetail/memberDetail" - ] + "pages/fromVirus/detail/detail", + "pages/accept/accept", + "pages/gridLeaderRegister/gridLeaderRegister", + "pages/property/property", + "pages/groupBuyDetail/groupBuyDetail", + "pages/mine/components/houseItem/houseItem", + "pages/mine/components/deleteHouse/deleteHouse" + ], + "requiredPrivateInfos": [ + "getLocation" + ], + "subPackages": [ + { + "root": "subpages/home", + "name": "home", + "pages": [ + "pages/webview/webview", + "pages/agreement/agreement", + "pages/notice/notice", + "pages/consultation/consultation", + "pages/info/info", + "pages/noticeDetail/noticeDetail", + "pages/newsDetail/newsDetail" + ] + }, + { + "root": "subpages/changegrid", + "name": "changeGrid", + "pages": [ + "pages/changeGrid/changeGrid" + ] + }, + { + "root": "subpages/association", + "name": "association", + "pages": [ + "pages/joinassociation/joinassociation", + "pages/createassociation/createassociation", + "pages/associationMember/associationMember", + "pages/associationDetail/associationDetail", + "pages/inviteFriend/inviteFriend", + "pages/incomingVerify/incomingVerify", + "pages/unpassAssociation/unpassAssociation", + "pages/topicList/topicList", + "pages/addTopic/addTopic", + "pages/topicDetail/topicDetail", + "pages/replyOrRemark/replyOrRemark", + "pages/changeToIssue/changeToIssue" + ] + }, + { + "root": "subpages/heart", + "pages": [ + "pages/heartDetail/heartDetail", + "pages/leaderboard/leaderboard", + "pages/myNews/myNews", + "pages/clockIn/clockIn", + "pages/volunteer/volunteer", + "pages/signed/signed", + "pages/refusedOrEndedDetail/refusedOrEndedDetail", + "pages/cancelDetail/cancelDetail", + "pages/joinVolunteerOrg/joinVolunteerOrg", + "pages/volunteerOrgList/volunteerOrgList", + "pages/moreList/moreList" + ] + }, + { + "root": "subpages/discussion", + "name": "discussion", + "pages": [ + "pages/addIssue/addIssue", + "pages/discussionDetail/discussionDetail", + "pages/publishEvaluation/publishEvaluation", + "pages/remarkOrReply/remarkOrReply", + "pages/searchDiscussion/searchDiscussion", + "pages/categoryList/categoryList", + "pages/activeApply/activeApply", + "pages/societyOrgActiveApply/societyOrgActiveApply" + ], + "plugins": { + "esuaEpdcMpPlugin": { + "version": "0.1.1", + "provider": "wxdd8530c5f4926766" + } + } + }, + { + "root": "subpages/mine", + "name": "mine", + "pages": [ + "pages/eventDetail/eventDetail", + "pages/company/company", + "pages/companyInfo/companyInfo", + "pages/inviteRecord/inviteRecord", + "pages/gridManage/gridManage" + ] + }, + { + "root": "subpages/integralCentre", + "name": "integralCentre", + "pages": [ + "pages/index/index", + "pages/record/record", + "pages/noticeDetail/noticeDetail", + "pages/exchangeIndex/exchangeIndex" + ] + }, + { + "root": "subpages/property", + "name": "property", + "pages": [ + "pages/joinassociation/joinassociation", + "pages/createassociation/createassociation", + "pages/associationMember/associationMember", + "pages/associationDetail/associationDetail", + "pages/inviteFriend/inviteFriend", + "pages/incomingVerify/incomingVerify", + "pages/unpassAssociation/unpassAssociation", + "pages/topicList/topicList", + "pages/addTopic/addTopic", + "pages/topicDetail/topicDetail", + "pages/replyOrRemark/replyOrRemark", + "pages/changeToIssue/changeToIssue", + "pages/myTopic/myTopic" + ] + }, + { + "root": "subpages/safety", + "name": "safety", + "pages": [ + "pages/index/index", + "pages/newsDetail/newsDetail", + "pages/consultIndex/consultIndex", + "pages/consultantDetail/consultantDetail", + "pages/consultantList/consultantList", + "pages/myQuestion/myQuestion", + "pages/addQuestion/addQuestion" + ] + }, + { + "root": "subpages/education", + "name": "education", + "pages": [ + "pages/index/index", + "pages/hobby/hobby", + "pages/healthyLife/healthyLife", + "pages/class/class", + "pages/classDetail/classDetail" + ] + }, + { + "root": "subpages/extend", + "name": "extend", + "pages": [ + "pages/vaccines/vaccines", + "pages/epidemicControl/epidemicControl", + "pages/tripReport/tripReport", + "pages/moreList/moreList" + ] + }, + { + "root": "subpages/communityNews", + "name": "communityNews", + "pages": [ + "pages/index/index", + "pages/detail/detail" + ] + }, + { + "root": "subpages/status", + "name": "status", + "pages": [ + "pages/brightStatus/brightStatus" + ] + }, + { + "root": "subpages/gridArmy", + "name": "gridArmy", + "pages": [ + "pages/index/index", + "pages/communityList/communityList", + "pages/categoryList/categoryList" + ] + }, + { + "root": "subpages/workTodo", + "name": "workTodo", + "pages": [ + "pages/index/index", + "pages/list/index", + "pages/detail/detail", + "pages/moduleList/moduleList" + ] + }, + { + "root": "subpages/submitAdvise", + "name": "submitAdvise", + "pages": [ + "pages/activeApply/activeApply", + "pages/moreList/moreList" + ] + }, + { + "root": "subpages/fingertipYushan", + "name": "fingertipYushan", + "pages": [ + "pages/index/index" + ] + }, + { + "root": "subpages/societyOrg", + "name": "societyOrg", + "pages": [ + "pages/orgList/orgList", + "pages/orgDetail/orgDetail", + "pages/memberManage/memberManage", + "pages/verifyMember/verifyMember", + "pages/joinOrg/joinOrg", + "pages/memberDetail/memberDetail" + ] + }, + { + "root": "subpages/family", + "name": "family", + "pages": [ + "pages/index/index", + "pages/bindFamily/bindFamily", + "pages/familyInfo/familyInfo", + "pages/noAccess/noAccess", + "pages/houseDetail/index", + "pages/addHouse/addHouse", + "pages/addGroupBuyPublish/addGroupBuyPublish" + ] + } + ], + "preloadRule": { + "pages/index/index": { + "network": "all", + "packages": [ + "subpages/changegrid", + "subpages/home" + ] + }, + "pages/discussion/discussion": { + "network": "all", + "packages": [ + "discussion" + ] + }, + "pages/association/association": { + "network": "all", + "packages": [ + "subpages/association" + ] + }, + "pages/mine/mine": { + "network": "all", + "packages": [ + "mine" + ] + }, + "pages/property/property": { + "network": "all", + "packages": [ + "subpages/property" + ] + } }, - { - "root": "subpages/family", - "name": "family", - "pages": [ - "pages/index/index", - "pages/bindFamily/bindFamily", - "pages/familyInfo/familyInfo", - "pages/noAccess/noAccess" - ] - } - ], - "preloadRule": { - "pages/index/index": { - "network": "all", - "packages": [ - "subpages/changegrid", - "subpages/home" - ] + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "WeChat", + "navigationBarTextStyle": "black" }, - "pages/discussion/discussion": { - "network": "all", - "packages": [ - "discussion" - ] + "usingComponents": { + "complete-info-dialog": "/components/completeInfoDialog/completeInfoDialog", + "load-more": "/components/loadMore/loadMore" }, - "pages/association/association": { - "network": "all", - "packages": [ - "subpages/association" - ] + "networkTimeout": { + "request": 60000 }, - "pages/mine/mine": { - "network": "all", - "packages": [ - "mine" - ] + "permission": { + "scope.userLocation": { + "desc": "现代榆山将获取您的位置信息" + } }, - "pages/property/property": { - "network": "all", - "packages": [ - "subpages/property" - ] - } - }, - "window": { - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "WeChat", - "navigationBarTextStyle": "black" - }, - "usingComponents": { - "complete-info-dialog": "/components/completeInfoDialog/completeInfoDialog", - "load-more": "/components/loadMore/loadMore" - }, - "networkTimeout": { - "request": 60000 - }, - "permission": { - "scope.userLocation": { - "desc": "现代榆山将获取您的位置信息" - } - }, - "sitemapLocation": "sitemap84.json", - "serviceProviderTicket": "BhBC8k6Lkgi+6uDaV2haUUUH7ZC81tEpXdNMtSxiPnrYRxkRxMu5f6gprJ5i+leAKUxHM1E5YWc3P9vtgTtu2BULafIVikYURVk=" + "sitemapLocation": "sitemap84.json", + "serviceProviderTicket": "BhBC8k6Lkgi+6uDaV2haUUUH7ZC81tEpXdNMtSxiPnrYRxkRxMu5f6gprJ5i+leAKUxHM1E5YWc3P9vtgTtu2BULafIVikYURVk=" } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/images/call.png b/epdc-resident-mp-yushan/images/call.png new file mode 100644 index 0000000..f3c7755 Binary files /dev/null and b/epdc-resident-mp-yushan/images/call.png differ diff --git a/epdc-resident-mp-yushan/images/family/down.png b/epdc-resident-mp-yushan/images/family/down.png new file mode 100644 index 0000000..f4d7d7d Binary files /dev/null and b/epdc-resident-mp-yushan/images/family/down.png differ diff --git a/epdc-resident-mp-yushan/images/family/plus.png b/epdc-resident-mp-yushan/images/family/plus.png new file mode 100644 index 0000000..69cd0b7 Binary files /dev/null and b/epdc-resident-mp-yushan/images/family/plus.png differ diff --git a/epdc-resident-mp-yushan/images/family/reply.png b/epdc-resident-mp-yushan/images/family/reply.png new file mode 100644 index 0000000..611fd0f Binary files /dev/null and b/epdc-resident-mp-yushan/images/family/reply.png differ diff --git a/epdc-resident-mp-yushan/images/family/sub.png b/epdc-resident-mp-yushan/images/family/sub.png new file mode 100644 index 0000000..4b6272c Binary files /dev/null and b/epdc-resident-mp-yushan/images/family/sub.png differ diff --git a/epdc-resident-mp-yushan/images/family/user.png b/epdc-resident-mp-yushan/images/family/user.png new file mode 100644 index 0000000..4fd3ac4 Binary files /dev/null and b/epdc-resident-mp-yushan/images/family/user.png differ diff --git a/epdc-resident-mp-yushan/images/home/jifen.png b/epdc-resident-mp-yushan/images/home/jifen.png new file mode 100644 index 0000000..ae8e8a9 Binary files /dev/null and b/epdc-resident-mp-yushan/images/home/jifen.png differ diff --git a/epdc-resident-mp-yushan/images/home/yhym.gif b/epdc-resident-mp-yushan/images/home/yhym.gif new file mode 100644 index 0000000..b2b7cf5 Binary files /dev/null and b/epdc-resident-mp-yushan/images/home/yhym.gif differ diff --git a/epdc-resident-mp-yushan/images/home/yhym.png b/epdc-resident-mp-yushan/images/home/yhym.png new file mode 100644 index 0000000..f96a811 Binary files /dev/null and b/epdc-resident-mp-yushan/images/home/yhym.png differ diff --git a/epdc-resident-mp-yushan/images/hswy.png b/epdc-resident-mp-yushan/images/hswy.png new file mode 100644 index 0000000..efab13e Binary files /dev/null and b/epdc-resident-mp-yushan/images/hswy.png differ diff --git a/epdc-resident-mp-yushan/images/icon_user.png b/epdc-resident-mp-yushan/images/icon_user.png new file mode 100644 index 0000000..ad7c6dc Binary files /dev/null and b/epdc-resident-mp-yushan/images/icon_user.png differ diff --git a/epdc-resident-mp-yushan/images/louzhang.png b/epdc-resident-mp-yushan/images/louzhang.png new file mode 100644 index 0000000..631f424 Binary files /dev/null and b/epdc-resident-mp-yushan/images/louzhang.png differ diff --git a/epdc-resident-mp-yushan/images/mine/delete.png b/epdc-resident-mp-yushan/images/mine/delete.png new file mode 100644 index 0000000..1b296b6 Binary files /dev/null and b/epdc-resident-mp-yushan/images/mine/delete.png differ diff --git a/epdc-resident-mp-yushan/images/mine/edit.png b/epdc-resident-mp-yushan/images/mine/edit.png new file mode 100644 index 0000000..b8a80b1 Binary files /dev/null and b/epdc-resident-mp-yushan/images/mine/edit.png differ diff --git a/epdc-resident-mp-yushan/images/mine/rmb.png b/epdc-resident-mp-yushan/images/mine/rmb.png new file mode 100644 index 0000000..7dcb8b9 Binary files /dev/null and b/epdc-resident-mp-yushan/images/mine/rmb.png differ diff --git a/epdc-resident-mp-yushan/images/rexian.png b/epdc-resident-mp-yushan/images/rexian.png new file mode 100644 index 0000000..ffa2929 Binary files /dev/null and b/epdc-resident-mp-yushan/images/rexian.png differ diff --git a/epdc-resident-mp-yushan/images/signed2.png b/epdc-resident-mp-yushan/images/signed2.png new file mode 100644 index 0000000..251b34b Binary files /dev/null and b/epdc-resident-mp-yushan/images/signed2.png differ diff --git a/epdc-resident-mp-yushan/images/unsignup.png b/epdc-resident-mp-yushan/images/unsignup.png new file mode 100644 index 0000000..91c2f51 Binary files /dev/null and b/epdc-resident-mp-yushan/images/unsignup.png differ diff --git a/epdc-resident-mp-yushan/images/yhym.gif b/epdc-resident-mp-yushan/images/yhym.gif new file mode 100644 index 0000000..b2b7cf5 Binary files /dev/null and b/epdc-resident-mp-yushan/images/yhym.gif differ diff --git a/epdc-resident-mp-yushan/images/youshi.png b/epdc-resident-mp-yushan/images/youshi.png new file mode 100644 index 0000000..5637ec5 Binary files /dev/null and b/epdc-resident-mp-yushan/images/youshi.png differ diff --git a/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.js b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.js new file mode 100644 index 0000000..1f2324f --- /dev/null +++ b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.js @@ -0,0 +1,66 @@ +// pages/groupBuyDetail/groupBuyDetail.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + console.log(options); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.json b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.json new file mode 100644 index 0000000..3304c94 --- /dev/null +++ b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "团购详情", + "usingComponents": { + "load-more": "/components/loadMore/loadMore", + "no-data": "/components/nodata/nodata", + "completeInfo-dialog": "/components/completeInfoDialog/completeInfoDialog" + } +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.wxml b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.wxml new file mode 100644 index 0000000..811655c --- /dev/null +++ b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.wxml @@ -0,0 +1,95 @@ + + + + + + {{details.groupBuyTitle}} + {{details.groupBuyContent}} + + + + + + 联系电话 + + {{details.groupBuyMobile}} + + + + + 价格 + + + 人数达到{{item.groupBuyNumber}}人团购价格为{{item.groupBuyPrice}}元/件 + + + + + 取货方式 + + {{details.pickupMethod == 1 ? '包邮到家' : '社区送达'}} + + + + 截止时间 + + {{details.groupBuyEndTime}} + + + + 报名人数 + + {{details.groupBuyNumber}} + + + + + + + + + + + + + + + 取消原因 + + {{details.cancelReason}} + + + + + + 结束团购 + + + + + 评价 + + + + + + {{item.nickname}} + {{item.evaluationTime}} + + + {{item.evaluationContent}} + + + + + + + + + + + + + + diff --git a/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.wxss b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.wxss new file mode 100644 index 0000000..f8ca48e --- /dev/null +++ b/epdc-resident-mp-yushan/pages/groupBuyDetail/groupBuyDetail.wxss @@ -0,0 +1,159 @@ +/* pages/groupBuyDetail/groupBuyDetail.wxss */ +page { + width: 100%; + height: auto; + overflow-y: auto; + background: #f7f7f7; +} + +.notice-detail { + margin-bottom: 20rpx; +} +.notice-detail .apply-item { + width: 100%; + background-color: white; + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; + padding: 40rpx 30rpx; + margin-top: 16rpx; + box-sizing: border-box; +} +.notice-detail .apply-item .item-title { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; +} +.notice-detail .apply-item .item-content { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #666666; + margin-top: 28rpx; +} +.notice-detail .apply-item .item-content .item-price { + margin-bottom: 10rpx; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; +} +.notice-detail .apply-item .image-box { + width: 690rpx; + display: flex; + justify-content: flex-start; + align-items: center; + margin-top: 30rpx; +} +.notice-detail .apply-item .image-box image { + width: 226rpx; + height: 150rpx; + border-radius: 10rpx; + margin-right: 8rpx; +} +.notice-detail .apply-item .item-mobile { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; +} +.notice-detail .apply-item .item-mobile .call-img { + width: 176rpx; + height: 76rpx; +} +.notice-detail .apply-item .item-mobile .call-img image{ + width: 100%; + height: 100%; +} +.notice-detail .apply-item .line { + width: 100%; + height: 1px; + background: #F2F2F2; + border-radius: 1px; + margin: 28rpx 0rpx; +} + +/* 评价列表 start */ +.evaluate-list { + background-color: #fff; + padding: 30rpx; + margin-bottom: 60rpx; +} +.evaluate-title { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + margin-bottom: 28rpx; +} +.evaluate-line { + height: 1px; + background-color: #DCDCDC; + margin: 30rpx 0; +} +.userbox { + display: flex; + justify-content: flex-start; + align-items: center; +} +.userbox .headlogo { + width: 54rpx; + height: 54rpx; + border-radius: 50%; +} +.userbox .userinfo { + margin-left: 12rpx; +} +.userbox .userinfo .nickname { + font-size: 26rpx; + font-family: PingFang SC; + font-weight: 400; + color: #333333; +} +.userbox .userinfo .time { + font-size: 20rpx; + font-family: PingFang SC; + font-weight: 500; + color: #999999; +} +.evaluate-content { + margin: 20rpx 0; +} +.evaluate-image { + display: flex; + justify-content: flex-start; + align-items: center; +} +.evaluate-image image { + width: 226rpx; + height: 150rpx; + margin-right: 12rpx; + border-radius: 10rpx; +} +/* 评价列表 end */ + +/* 结束团购 start */ +.submit { + width: 592rpx; + height: 116rpx; + position: relative; + margin: 78rpx auto 0rpx; +} +.submit .submit-bk { + width: 100%; + height: 100%; + position: absolute; + z-index: -1; +} +.submit .submit-text { + font-size: 34rpx; + font-family: PingFang SC; + font-weight: 500; + color: #FFFFFF; + height: 100rpx; + line-height: 100rpx; + text-align: center; +} +/* 结束团购 end */ \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/index/index.js b/epdc-resident-mp-yushan/pages/index/index.js index dcd0481..0c35816 100644 --- a/epdc-resident-mp-yushan/pages/index/index.js +++ b/epdc-resident-mp-yushan/pages/index/index.js @@ -29,18 +29,12 @@ Page({ communityNewsList: [], currentIndex: 0, moduleList: [ - // { - // icon: - // 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png', - // tip: '积分排名', - // module: 'pointRank', - // }, - { - icon:'../../images/my-home.png', - tip: '一户一码', - module: 'pointRank', - imgHeightFlag:true - }, + { + icon:'../../images/home/yhym.png', + tip: '一户一码', + module: 'house', + imgHeightFlag:true + }, { icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20220324/118ea106d9ed40978f3e23cc51b43119.png', @@ -48,18 +42,24 @@ Page({ tip: '指尖榆山', module: 'fingerYushan', }, + //志愿服务 { icon: - 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db945b5cc30147df80923f6c5928074f.png', - tip: '志愿服务', + '../../images/hswy.png', + tip: '红色物业', module: 'volunteerService', }, { - icon: - 'https://epdc-yushan.elinkservice.cn/files-pro/20220324/1083316800d948b4a8a4206dcb857722.png', - tip: '个人中心', - module: 'personalCenter', + icon:'../../images/home/jifen.png', + tip: '积分排名', + module: 'pointRank', }, + // { + // icon: + // 'https://epdc-yushan.elinkservice.cn/files-pro/20220324/1083316800d948b4a8a4206dcb857722.png', + // tip: '个人中心', + // module: 'personalCenter', + // }, // { // icon: // 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/ccbab2a8a4a847548a72972770009576.png', @@ -450,7 +450,7 @@ Page({ wx.navigateTo({ url: '/subpages/gridArmy/pages/communityList/communityList', }) - } else if (module === 'pointRank') { + } else if (module === 'house') { if (!this.data.identityNo) { wx.showToast({ title: '请先扫描房屋码,绑定家庭', @@ -480,9 +480,9 @@ Page({ // url: '/subpages/family/pages/index/index', // }) } else if (module === 'volunteerService') { - wx.navigateTo({ - url: '/pages/heart/heart', - }) + // wx.navigateTo({ + // url: '/pages/heart/heart', + // }) } else if (module === 'societyOrg') { wx.navigateTo({ url: '/subpages/societyOrg/pages/orgList/orgList', @@ -495,7 +495,11 @@ Page({ wx.navigateTo({ url: '/pages/mine/mine' }) - } + } else if (module === 'pointRank') { + wx.navigateTo({ + url: '/subpages/integralCentre/pages/index/index' + }) + } }, // 获取最新社区资讯 contentList() { @@ -639,7 +643,8 @@ Page({ tabList.push({ label: item.typeName, value: item.id }) }) this.setData({ - tabList: [...[{ label: '最新资讯', value: '' }], ...tabList], + // , ...tabList + tabList: [...[{ label: '最新资讯', value: '' }]], }) }) .catch((err) => { @@ -718,5 +723,10 @@ Page({ url: `/subpages/workTodo/pages/moduleList/moduleList?pid=1554022062541422594&typeCode=RDDB&name=风采录&style=2`, }) console.log('wwwww') + }, + navigateToMine(){ + wx.navigateTo({ + url: '/pages/mine/mine' + }) } }) diff --git a/epdc-resident-mp-yushan/pages/index/index.wxml b/epdc-resident-mp-yushan/pages/index/index.wxml index d150551..0831fc5 100644 --- a/epdc-resident-mp-yushan/pages/index/index.wxml +++ b/epdc-resident-mp-yushan/pages/index/index.wxml @@ -2,7 +2,13 @@ - + + 个人中心 + + + + + @@ -103,21 +109,21 @@ --> - + - - + + - + - + {{item.tip}} @@ -127,7 +133,8 @@ - + + {{item.label}} diff --git a/epdc-resident-mp-yushan/pages/index/index.wxss b/epdc-resident-mp-yushan/pages/index/index.wxss index 3449e4f..afbe46e 100644 --- a/epdc-resident-mp-yushan/pages/index/index.wxss +++ b/epdc-resident-mp-yushan/pages/index/index.wxss @@ -28,18 +28,36 @@ page { width: 100%; display: flex; align-items: center; - justify-content: center; + justify-content: space-between; color: rgba(255, 255, 255, 0.9); font-size: 32rpx; position: relative; z-index: 100; letter-spacing: 2rpx; } -.header .navigation image { +.header .navigation view { +width: 33%; +height: 100%; +display: flex; +align-items: center; +justify-content: center; +} +/* .header .navigation image { width: 150rpx; height: 50rpx; +} */ +.header .navigation .header-left { + justify-content: left; +} +.header .navigation hedaer-center image{ + width: 150rpx; + height: 50rpx; +} +.header .navigation .header-left image{ + width: 24rpx; + height: 30rpx; + margin: 0 14rpx 0 22rpx; } - .belong-grid { width: 100%; height: 70rpx; @@ -369,7 +387,27 @@ page { padding: 24rpx 20rpx 30rpx; background: #ffF; } - +.module-list .pointRank{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 13px; + padding: 30rpx; +} +.module-list .pointRank .icon { + width: 150rpx; + height: 150rpx; + } +.module-list .pointRank .icon image { + width: 100%; + height: 100%; + float: left; + } + .imgageRight{ + position: relative; + right: -8rpx; + } .module-list .module-item { display: flex; flex-direction: column; @@ -492,10 +530,10 @@ image { margin-right: 50rpx; } .module-list .module-item .icon .house_img { - width: 100% !important; - height: 90% !important; - position: relative; - top: 8rpx; + /* width: 150% ; + height: 150% ; */ + /* position: relative; + top: 8rpx; */ } .news-list .list-item .detail { diff --git a/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.js b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.js new file mode 100644 index 0000000..a21bd76 --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.js @@ -0,0 +1,82 @@ +// pages/mine/components/deleteHouse/deleteHouse.js +const api = require('../../../../utils/api') + +Page({ + + /** + * 页面的初始数据 + */ + data: { + id:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + id:options.id + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + handelClickClose(){ + wx.navigateBack() + }, + handelClickBack(){ + api.deleteHouse(this.data.id).then(res=>{ + if(res.code==0){ + wx.navigateBack() + } + }).catch(err=>{ + console.log(err); + }) + } +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.json b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.json new file mode 100644 index 0000000..0e2868e --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.json @@ -0,0 +1,5 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "删除房屋" + +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.wxml b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.wxml new file mode 100644 index 0000000..9bedfce --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.wxml @@ -0,0 +1,11 @@ + + + + 提示 + 确定删除此条房屋信息吗? + + + + + + diff --git a/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.wxss b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.wxss new file mode 100644 index 0000000..0e0384a --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/deleteHouse/deleteHouse.wxss @@ -0,0 +1,39 @@ +/* pages/mine/components/deleteHouse/deleteHouse.wxss */ +.message{ + background-color: #8c8c8c; + width: 100%; + height: 100%; + position: absolute; + display: flex; + justify-content: center; + align-items: center; + top: 0; + left: 0; +} +.message .message_center{ + margin: 0 auto; + background-color: #fff; + display: flex; + width: 80%; + flex-direction: column; + justify-content: space-around; + align-items: center; + padding: 20rpx 50rpx; +} +.message .message_center view{ + margin-top: 40rpx; +} +.message .message_center button{ + background-color: #a4adb3; + color: #fff; + margin-top: 40rpx; + width:180rpx; + height: 60rpx; + line-height: 60rpx; + font-size: 32rpx; + margin-left: 30rpx; +} +.btn_box{ + display: flex; + justify-content: space-around; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.js b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.js new file mode 100644 index 0000000..38b791d --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.js @@ -0,0 +1,44 @@ +const app = getApp() + +Component({ + data: { + imagesList: [], + btnList:[{btnName:'已售',imgUrl:'../../../../images/mine/rmb.png',type:'rmb'},{btnName:'删除',imgUrl:'../../../../images/mine/delete.png',type:'delete'},{btnName:'编辑',imgUrl:'../../../../images/mine/edit.png',type:'edit'},], + }, + properties: { + houseobj: { + type: Object, + value: {} + } + }, + methods: { + toDetail (e) { + this.triggerEvent('toHouseDetail',{ houseobj: this.data.houseobj}) + }, + previewImage (e) { + app.globalData.previewImage = true + wx.previewImage({ + urls: this.data.projectObj.images, + current: e.currentTarget.dataset.src + }) + }, + handelClickBtn(e){ + if(e.currentTarget.dataset.type == 'edit'){ + let str = encodeURIComponent(JSON.stringify(this.data.houseobj)) + wx.navigateTo({ + url: '/subpages/family/pages/addHouse/addHouse?name=编辑&houseobj='+str, + }) + }else if(e.currentTarget.dataset.type == 'delete'){ + wx.navigateTo({ + url: '/pages/mine/components/deleteHouse/deleteHouse?id=' + this.data.houseobj.id + }) + } else if(e.currentTarget.dataset.type == 'rmb'){ + console.log('点击已售'); + } + } + }, + observers:{ + 'houseobj':function(val){ + } + } +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.json b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.json new file mode 100644 index 0000000..bbde8dc --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.json @@ -0,0 +1,3 @@ +{ + "component": true + } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.wxml b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.wxml new file mode 100644 index 0000000..fde49d1 --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.wxml @@ -0,0 +1,34 @@ + + + + + + + + + + + {{houseobj.address}} + {{houseobj.houseStatusDisplay}} + + {{houseobj.createdData}} + + {{houseobj.price}} + + + {{houseobj.description}} + + + + + + + + + {{item.btnName}} + + + + + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.wxss b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.wxss new file mode 100644 index 0000000..f8927d8 --- /dev/null +++ b/epdc-resident-mp-yushan/pages/mine/components/houseItem/houseItem.wxss @@ -0,0 +1,95 @@ +.housePrice-list{ + background-color: #fff; + margin-top: 20rpx; +} +.housePrice-list .housePrice-content .housePrice-header{ + display: flex; + background-color: #fff; + box-sizing: border-box; + padding: 10rpx 20rpx; + border-radius: 5rpx 5rpx 0 0 ; +} +.housePrice-list .housePrice-content .housePrice-body{ + padding: 0 20rpx; +} +.housePrice-list .housePrice-content .housePrice-header image{ + width: 100rpx; + height: 100rpx; +} +.housePrice-list .housePrice-content .housePrice-header .housePrice-header-name { + display: flex; + flex-direction: column; + justify-content: center; + padding:0 0 0 20rpx; + flex: 1; +} +.housePrice-images{ + display: flex; + justify-content: left; + padding: 20rpx 20rpx 0rpx 0rpx; + background-color: #fff; + height: 230rpx; + margin: 0 30rpx; + border-radius: 0 0 5rpx 5rpx; +} +.housePrice-header-top{ + display: flex; + justify-content: space-between; + align-items: center; +} +.housePrice-header-top .tags{ + background-color: #fff0e2; + color:#ffa822 ; + padding: 0rpx 20rpx; + font-size: 24rpx; + border-radius: 8rpx; + box-sizing: border-box; + margin-left: 20rpx; + height: 40rpx; + line-height: 40rpx; +} +.housePrice-header-name .price{ + color: #e74636; +} +.housePrice-header-top .address { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + line-height: 63rpx; + max-width: 250rpx; +} + +.housePrice-header-top .date{ + color: #757775; + flex: 1; + text-align: right; + overflow: hidden; + height: 63rpx; + line-height: 63rpx; +} +.housePrice-images image{ + margin-left: 20rpx; + border-radius: 5rpx; + float: left; + height: 207rpx; + width: 202rpx; +} +.btn_view{ + width: 100%; + height: 100rpx; + display: flex; + align-items: center; + justify-content: space-around; + +} +.btn_view view{ + display: flex; + align-items: center; + /* height: 42rpx; + line-height: 42rpx; */ +} +.btn_view image{ + width: 32rpx; + height: 32rpx; + margin-right:20rpx ; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/mine.js b/epdc-resident-mp-yushan/pages/mine/mine.js index a8c7ec9..65ea7c9 100644 --- a/epdc-resident-mp-yushan/pages/mine/mine.js +++ b/epdc-resident-mp-yushan/pages/mine/mine.js @@ -11,6 +11,7 @@ Page({ issueList: [], projectList: [], topicList: [], + houseList:[], nomoreVisible: false, nomoreStatus: 'loading', preloadVisible: true, @@ -32,6 +33,7 @@ Page({ }) }, onShow() { + if (!app.globalData.previewImage) { this.data.pageNo = 1 this.data.pageSize = 10 @@ -46,6 +48,8 @@ Page({ this.getProjectList() } else if (this.data.selectedTabBar === 'topic') { this.getTopicList() + } else if (this.data.selectedTabBar === 'house') { + this.loadMoreHouseList() } } app.globalData.previewImage = false @@ -69,7 +73,10 @@ Page({ if (this.data.nomoreStatus === 'loading') { this.data.pageNo = this.data.pageNo + 1 this.loadMoreProjectList() - } else { + } else if (this.data.selectedTabBar === 'house') { + this.data.pageNo = this.data.pageNo + 1 + this.loadMoreHouseList() + } else{ this.setData({ nomoreVisible: true, }) @@ -93,10 +100,13 @@ Page({ this.getProjectList() } else if (e.currentTarget.dataset.type === 'topic') { this.getTopicList() + }else if (e.currentTarget.dataset.type === 'house'){ + this.loadMoreHouseList() } this.setData({ selectedTabBar: e.currentTarget.dataset.type, }) + console.log(this.data.selectedTabBar); }, // 获取 我的话题列表 getTopicList() { @@ -233,6 +243,22 @@ Page({ console.log(err) }) }, + // 获取 我的房屋列表 上拉加载 + loadMoreHouseList(){ + let parms = { + pageNum:this.data.pageNo, + pageSize:this.data.pageSize + } + api.getmypublishedlist(parms).then(res=>{ + this.setData({ + nomoreStatus: res.data.length === 10 ? 'loading' : 'none', + houseList:res.data.list, + preloadVisible: false, + }) + }).catch(err=>{ + console.log(err); + }) + }, // 获取用户信息 getUserInfo() { api @@ -354,4 +380,10 @@ Page({ }) } }, + toHouseDetail(e){ + let str = encodeURIComponent(JSON.stringify(e.detail.houseobj)) + wx.navigateTo({ + url: '/subpages/family/pages/houseDetail/index?houseObj='+str + }) + }, }) diff --git a/epdc-resident-mp-yushan/pages/mine/mine.json b/epdc-resident-mp-yushan/pages/mine/mine.json index 557dd86..83e1fa2 100644 --- a/epdc-resident-mp-yushan/pages/mine/mine.json +++ b/epdc-resident-mp-yushan/pages/mine/mine.json @@ -4,6 +4,7 @@ "issue-item": "./components/issueItem/issueItem", "preload-issue-item": "./components/preloadIssueItem/preloadIssueItem", "project-item": "./components/projectItem/projectItem", + "house-item": "./components/houseItem/houseItem", "preload-project-item": "./components/preloadProjectItem/preloadProjectItem", "topic-item": "./components/topicItem/topicItem", "preload-topic-item": "./components/preloadTopicItem/preloadTopicItem", diff --git a/epdc-resident-mp-yushan/pages/mine/mine.wxml b/epdc-resident-mp-yushan/pages/mine/mine.wxml index 0865e85..e796d74 100644 --- a/epdc-resident-mp-yushan/pages/mine/mine.wxml +++ b/epdc-resident-mp-yushan/pages/mine/mine.wxml @@ -50,7 +50,7 @@ 点亮徽章 - + @@ -65,7 +65,10 @@ 我的话题 - + + 我的房屋 + + @@ -113,6 +116,18 @@ 快到“左邻右舍”,到您的群里发布吧 + + + + + + + + + + 您还未发布房屋 + + \ No newline at end of file diff --git a/epdc-resident-mp-yushan/pages/mine/mine.wxss b/epdc-resident-mp-yushan/pages/mine/mine.wxss index f27f9b5..3584294 100644 --- a/epdc-resident-mp-yushan/pages/mine/mine.wxss +++ b/epdc-resident-mp-yushan/pages/mine/mine.wxss @@ -240,7 +240,10 @@ page { color: #F82525; font-weight: bolder; } - +.tab-bar .type.selected-house { + color: #F82525; + font-weight: bolder; + } .tab-bar .select-bar { position: absolute; bottom: 0; @@ -253,20 +256,23 @@ page { } .tab-bar .select-bar.selected-issue { - left: 11%; + left: 8%; transition: left 0.5s ease; } .tab-bar .select-bar.selected-project { - left: 44.5%; + left: 32%; transition: left 0.5s ease; } .tab-bar .select-bar.selected-topic { - left: 78%; + left: 57%; transition: left 0.5s ease; } - +.tab-bar .select-bar.selected-house { + left: 82%; + transition: left 0.5s ease; + } .issue-list { width: 100%; box-sizing: border-box; diff --git a/epdc-resident-mp-yushan/project.config.json b/epdc-resident-mp-yushan/project.config.json index dac41c9..177cbd4 100644 --- a/epdc-resident-mp-yushan/project.config.json +++ b/epdc-resident-mp-yushan/project.config.json @@ -40,7 +40,8 @@ "showES6CompileOption": false, "useCompilerPlugins": false, "ignoreUploadUnusedFiles": true, - "useStaticServer": true + "useStaticServer": true, + "minifyWXML": true }, "compileType": "miniprogram", "libVersion": "2.10.4", diff --git a/epdc-resident-mp-yushan/project.private.config.json b/epdc-resident-mp-yushan/project.private.config.json index c447c6a..a6ec375 100644 --- a/epdc-resident-mp-yushan/project.private.config.json +++ b/epdc-resident-mp-yushan/project.private.config.json @@ -56,9 +56,17 @@ "pathName": "subpages/extend/pages/epidemicControl/epidemicControl", "query": "", "scene": null + }, + { + "name": "", + "pathName": "subpages/appeal/pages/noAccess/noAccess", + "query": "", + "launchMode": "default", + "scene": null } ] } }, - "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html" + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "%25E7%258E%25B0%25E4%25BB%25A3%25E6%25A6%2586%25E5%25B1%25B1-%25E5%25B1%2585%25E6%25B0%2591%25E7%25AB%25AF" } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/family/images/icon_close.png b/epdc-resident-mp-yushan/subpages/family/images/icon_close.png new file mode 100644 index 0000000..17e1af6 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/family/images/icon_close.png differ diff --git a/epdc-resident-mp-yushan/subpages/family/images/ig_tianjiatupian@2x.png b/epdc-resident-mp-yushan/subpages/family/images/ig_tianjiatupian@2x.png new file mode 100644 index 0000000..e98db2e Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/family/images/ig_tianjiatupian@2x.png differ diff --git a/epdc-resident-mp-yushan/subpages/family/images/loading.gif b/epdc-resident-mp-yushan/subpages/family/images/loading.gif new file mode 100644 index 0000000..915c198 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/family/images/loading.gif differ diff --git a/epdc-resident-mp-yushan/subpages/family/images/submit-bk.png b/epdc-resident-mp-yushan/subpages/family/images/submit-bk.png new file mode 100644 index 0000000..c081477 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/family/images/submit-bk.png differ diff --git a/epdc-resident-mp-yushan/subpages/family/images/user.png b/epdc-resident-mp-yushan/subpages/family/images/user.png new file mode 100644 index 0000000..4fd3ac4 Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/family/images/user.png differ diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.js b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.js new file mode 100644 index 0000000..dfdc0fe --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.js @@ -0,0 +1,452 @@ +// subpages/heart/pages/groupBuyPublish/groupBuyPublish.js +import { $wuxActionSheet } from "../../../../dist/index" +import { getTimestamp } from '../../../../utils/common' +const api = require("../../utils/api") +const config = require("../../../../utils/config") + +Page({ + + /** + * 页面的初始数据 + */ + data: { + dialogVisible: false, //提示框 + showPicker: false, //是否显示底部时间选择器插件 + dataForm: { + id: '', //主键 更新时携带 + groupBuyTitle: '', //标题 + groupBuyContent: '', //内容 + groupBuyEndTime: '', //截止时间 + groupBuyMobile: '', //手机 + groupBuyPriceNumber: [ + { + groupBuyNumber: '', + groupBuyPrice: '' + } + ], //groupBuyNumber, groupBuyPrice 团购价格人数(最多五条) + groupBuyImg: [], //团购图片(最多三张) + pickupMethod: 0, //取货方式:1-包邮到家,2-社区送达 + }, + violationsCount: 0, //内容审核计数 + isConReview: false, //内容审核标志 + lock: false, //锁定发布按钮状态,防止连击 + uploadImageList: [], + imageId: 0, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + 'dataForm.id': options.id || '' + }) + if (options.id) { + this.initDataForm() + } + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + // onShareAppMessage: function () { + + // } + + onInputGroupBuyTitle (e) { + this.setData({ + 'dataForm.groupBuyTitle': e.detail.value + }) + }, + onInputGroupBuyNumber (e) { + let index = e.currentTarget.dataset.index + this.data.dataForm.groupBuyPriceNumber[index].groupBuyNumber = parseInt(e.detail.value) + this.setData({ + 'dataForm.groupBuyPriceNumber': this.data.dataForm.groupBuyPriceNumber + }) + }, + onInputGroupBuyPrice (e) { + let index = e.currentTarget.dataset.index + if (/^(\d?)+(\.\d{0,2})?$/.test(e.detail.value)) { + this.data.dataForm.groupBuyPriceNumber[index].groupBuyPrice = e.detail.value; + } else { + this.data.dataForm.groupBuyPriceNumber[index].groupBuyPrice = e.detail.value.substring(0, e.detail.value.length - 1); + } + this.setData({ + 'dataForm.groupBuyPriceNumber': this.data.dataForm.groupBuyPriceNumber + }) + }, + onInputGroupBuyMobile (e) { + this.setData({ + 'dataForm.groupBuyMobile': e.detail.value + }) + }, + onInputContent (e) { + this.setData({ + 'dataForm.groupBuyContent': e.detail.value + }) + }, + addPriceItem () { + this.data.dataForm.groupBuyPriceNumber.push({groupBuyNumber:'',groupBuyPrice:''}) + this.setData({ + 'dataForm.groupBuyPriceNumber': this.data.dataForm.groupBuyPriceNumber + }) + }, + minusPriceItem (e) { + let index = e.currentTarget.dataset.index + this.data.dataForm.groupBuyPriceNumber.splice(index, 1) + this.setData({ + 'dataForm.groupBuyPriceNumber': this.data.dataForm.groupBuyPriceNumber + }) + }, + pickerCancel () { + console.log('取消日期选择') + this.setData({ + showPicker: false, + 'dataForm.groupBuyEndTime': '' + }) + }, + pickerConfirm (e) { + console.log('选择日期', e.detail.time) + if (e.detail.time < getTimestamp()) { + this.showToast("截止时间应该大于当前时间") + } else { + this.setData({ + showPicker: false, + 'dataForm.groupBuyEndTime': e.detail.time + }) + } + }, + //日期选择插件显示入口 + selectTime (e) { + this.data.showPicker = !this.data.showPicker + this.setData({ + showPicker: this.data.showPicker, + 'dataForm.groupBuyEndTime': this.data.dataForm.groupBuyEndTime || getTimestamp() + }) + }, + //选择取货方式 + pickupMethodChange (e) { + this.setData({ + 'dataForm.pickupMethod': parseInt(e.detail.value) + }) + }, + //发布 + submitApply () { + if (this.data.lock) { + return false + } + console.log(this.data.dataForm.pickupMethod) + if (!this.data.dataForm.groupBuyTitle.trim('')) { + this.showToast("请填标题") + return false + } + if (this.data.dataForm.groupBuyTitle.length>50) { + this.showToast("标题限制在50字以内") + return false + } + if (!this.data.dataForm.pickupMethod) { + this.showToast("请选择取货方式") + return false + } + if (!this.data.dataForm.groupBuyEndTime) { + this.showToast("请填写截止时间") + return false + } + if (!this.data.dataForm.groupBuyContent.trim('')) { + this.showToast("请填写团购内容") + return false + } + if (this.data.dataForm.groupBuyContent.length>500) { + this.showToast("团购内容限制在500字以内") + return false + } + if (!this.data.dataForm.groupBuyPriceNumber[0].groupBuyNumber || !this.data.dataForm.groupBuyPriceNumber[0].groupBuyPrice) { + this.showToast("至少填写一条价格说明") + return false + } + if (!this.data.dataForm.groupBuyMobile.trim('')) { + this.showToast("请填写联系电话") + return false + } + if (this.data.dataForm.groupBuyMobile.length>20) { + this.showToast("联系电话限制在20字以内") + return false + } + wx.showLoading({ + title: "发布中", + }) + const imagesList = [] + if (this.data.uploadImageList.length > 0) { + const isUploadDown = this.data.uploadImageList.some(item => !item.uploaded) + if (isUploadDown) { + wx.showToast({ + title: "请等待图片上传完成", + icon: "none", + duration: 1000 + }) + return false + } + } + if (this.data.uploadImageList.length > 0) { + this.data.uploadImageList.forEach(item => { + imagesList.push(item.ossUrl) + }) + } + this.data.dataForm.groupBuyPriceNumber.forEach(item => { + item.groupBuyPrice = parseFloat(item.groupBuyPrice) + }) + this.setData({ + lock: true + }) + const para = { ...this.data.dataForm } + para.isConReview = this.data.isConReview + para.groupBuyImg = imagesList + console.log('submit', para) + let that = this + api.groupBuyUpdate(para).then(res => { + this.setData({ + lock: false + }) + if(res.code == 0) { + wx.hideLoading() + this.setData({ + dialogVisible: !this.data.dialogVisible, + 'dataForm.groupBuyTitle': '', + violationsCount: 0, + isConReview: false + }) + } else if (res.code == 533) { + wx.hideLoading() + this.data.violationsCount++ + console.log(this.data.violationsCount) + if (this.data.violationsCount == 1){ + wx.showToast({ + title: res.msg, + icon: "none", + duration: 2000 + }) + } else if (this.data.violationsCount == 2) { + wx.hideLoading() + wx.showModal({ + title: '提示', + content: '您提交的内容再次被判定为违规,您确定是否要提交?', + success (res) { + if (res.confirm) { + console.log('用户点击确定') + that.data.isConReview = true + that.submitApply() + } else if (res.cancel) { + console.log('用户点击取消') + that.setData({ + violationsCount: 0, + isConReview: false + }) + } + } + }) + } + } + }).catch(err => { + console.log('err',err) + wx.hideLoading() + this.setData({ + lock: false + }) + }) + }, + + initDataForm () { + wx.showLoading({ + title: '加载中...' + }) + api.getGroupBuyDetail(this.data.dataForm.id).then(res => { + wx.hideLoading() + res.data.groupBuyImg.forEach( (item, index) => { + let ob = { + imageId: index, + ossUrl: item, + imgUrl: item, + uploaded: true + } + this.data.uploadImageList.push(ob) + }) + this.setData({ + dataForm: res.data, + uploadImageList: this.data.uploadImageList + }) + console.log(this.data.uploadImageList) + }) + }, + + //简化提示 + showToast (title) { + wx.showToast({ + title: title, + icon: "none", + duration: 2000 + }) + }, + + // 关闭弹框 + closeDialog () { + wx.navigateBack({ + delta: 1 + }) + }, + // 弹框确定按钮 + confirmDialog () { + wx.navigateBack({ + delta: 1 + }) + }, + + // 删除选中的图片 + deleteImage (e) { + console.log(e.currentTarget.dataset.imageid); + + const index = this.data.uploadImageList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid) + if (index > -1) { + this.data.uploadImageList.splice(index, 1) + this.setData({ + uploadImageList: this.data.uploadImageList + }) + } + }, + // 选择图片 上传弹窗 - 上传图片方式 - 选择图片 - 上传图片 - 回调赋值 + chooseImage () { + const _this = this + $wuxActionSheet().showSheet({ + buttons: [ + { text: "拍照" }, + { text: "从相册中获取" }, + ], + className: "dialog-class", + buttonClicked (index) { + if (index === 0) { + wx.chooseImage({ + count: 1, + sizeType: ["original", "compressed"], + sourceType: ["camera"], + success (res) { + const uploadImageList = [..._this.data.uploadImageList] + uploadImageList.push({ + uploaded: false, + ossUrl: "", + imgUrl: res.tempFilePaths[0], + imageId: ++_this.data.imageId + }) + _this.setData({ + uploadImageList + }) + wx.uploadFile({ + url: `${config.BASEURL()}group/topic/upload`, + filePath: res.tempFilePaths[0], + name: "file", + header: { + "Content-type": "multipart/form-data" + }, + success (fileRes){ + uploadImageList[uploadImageList.length - 1].uploaded = true + uploadImageList[uploadImageList.length - 1].ossUrl = JSON.parse(fileRes.data).data + _this.setData({ + uploadImageList + }) + } + }) + + } + }) + } else if (index === 1) { + wx.chooseImage({ + count: 3 - _this.data.uploadImageList.length, + sizeType: ["original", "compressed"], + sourceType: ["album"], + success (res) { + const uploadImageList = [] + const endIndex = _this.data.uploadImageList.length + res.tempFilePaths.forEach(item => { + uploadImageList.push({ + uploaded: false, + ossUrl: "", + imgUrl: item, + imageId: ++_this.data.imageId + }) + }) + _this.setData({ + uploadImageList: [..._this.data.uploadImageList,...uploadImageList] + }) + uploadImageList.forEach((item, index) => { + return (function (index) { + wx.uploadFile({ + url: `${config.BASEURL()}group/topic/upload`, + filePath: res.tempFilePaths[index], + name: "file", + header: { + "Content-type": "multipart/form-data" + }, + success (fileRes){ + uploadImageList[index].uploaded = true + uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data + _this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex) + _this.setData({ + uploadImageList: [..._this.data.uploadImageList, ...uploadImageList] + }) + } + }) + })(index) + }) + } + }) + } + console.log(this.data.imageId); + return true + }, + cancelText: "取消", + cancel () {}, + destructiveButtonClicked () {}, + }) + }, +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.json b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.json new file mode 100644 index 0000000..34d49cf --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "发布", + "usingComponents": { + "date-time-picker": "../../../../components/DateTimePicker/index", + "wux-actionsheet": "../../../../dist/actionsheet/index" + } + } \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxml b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxml new file mode 100644 index 0000000..29d6fb6 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxml @@ -0,0 +1,67 @@ + + + + + 标题 + + + + + 内容 + + + + + + + + + + + + 价格 + + 人数达到 + + 人团购价格为 + + 元/件 + + + + + + + 取货方式 + + 包邮到家 + 社区送达 + + + + 截止时间 + {{dataForm.groupBuyEndTime||'请选择时间'}} + + + 联系电话 + + + + + + 发布 + + + + + + + + + + diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxss b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxss new file mode 100644 index 0000000..a931a65 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxss @@ -0,0 +1,189 @@ +/* subpages/family/pages/addGroupBuyPublish/addGroupBuyPublish.wxss */ +page { + width: 100%; + overflow-y: auto; + background: #f7f7f7; +} +.content { + position: relative; + overflow: hidden; +} +.content .my-apply-img { + position: absolute; + right: -10rpx; + top: 16rpx; +} +.content .my-apply-img image { + width: 208rpx; + height: 76rpx; +} +.content .apply-item { + width: 100%; + min-height: 170rpx; + background-color: white; + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; + padding: 0rpx 30rpx; + margin-top: 16rpx; + box-sizing: border-box; +} +.content .text-item { + height: 220rpx; +} +.content .apply-item .item-title { + height: 50rpx; + line-height: 50rpx; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + color: #333333; + margin-bottom: 28rpx; +} +.content .apply-item .price-item { + display: flex; + margin-bottom: 20rpx; +} +.content .apply-item .price-item input { + width: 110rpx; + height: 44rpx; + line-height: 44rpx; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #666666; + text-align: center; + border-bottom: 1px solid #BFBFBF; +} +.content .apply-item .price-item .add { + height: 42rpx; + width: 42rpx; + margin-left: 20rpx; +} +.content .apply-item .price-item .add image { + width: 100%; + height: 100%; +} +.content .apply-item .price-item .tip { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; +} +.content .apply-item .item-content, .select-time { + width: 100%; + height: 44rpx; + line-height: 44rpx; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #666666; +} +.content .apply-item .text-content { + font-weight: 400; + height: 280rpx; + margin-bottom: 20rpx; +} +.text-length { + position: absolute; + right: 0rpx; + bottom: -60rpx; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 400; + color: #999999; +} +.submit { + width: 592rpx; + height: 116rpx; + position: relative; + margin: 78rpx auto 0rpx; +} +.submit .submit-bk { + width: 100%; + height: 100%; + position: absolute; + z-index: -1; +} +.submit .submit-text { + font-size: 34rpx; + font-family: PingFang SC; + font-weight: 500; + color: #FFFFFF; + height: 100rpx; + line-height: 100rpx; + text-align: center; +} + +.time-group { + width: 100%; + display: flex; + justify-content: space-around; + align-items: center; +} +.time-group .select-time { + width: 304rpx; + height: 50rpx; + /* background: #F7F7F7; */ + border-radius: 25rpx; + display: flex; + justify-content: center; + align-items: center; + font-size: 24rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; +} +.time-group .select-time image { + width: 26rpx; + height: 26rpx; + opacity: 0.76; + margin-right: 20rpx; +} + +.image-list { + width: 100%; + display: grid; + grid-template-columns: 214rpx 214rpx 214rpx; + grid-template-rows: 214rpx; + grid-gap: 17rpx; + height: 214rpx; + margin-bottom: 40rpx; +} +.image-list .image-item { + width: 100%; + height: 100%; + position: relative; +} +.image-list image { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 8rpx; +} +.image-list .image-item .loading { + position: absolute; + left: 25%; + top: 25%; + width: 50%; + height: 50%; +} +.image-list .image-item .close { + position: absolute; + top: -10rpx; + right: -10rpx; + width: 40rpx; + height: 40rpx; +} + +.apply-item .radio-group { + height: 100%; + display: flex; + align-items: center; + color: #999; + font-size: 28rpx; + } +.apply-item .radio-group radio + radio { + margin-left: 20rpx; +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.js b/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.js new file mode 100644 index 0000000..ad73eae --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.js @@ -0,0 +1,430 @@ +// subpages/family/pages/addHouse/addHouse.js +import { $wuxActionSheet } from "../../../../dist/index" +const api = require("../../utils/api") +const config = require("../../../../utils/config") + +Page({ + + /** + * 页面的初始数据 + */ + data: { + houseTypeList:['住宅','办公','门头'], + dataForm:{ + houseType:'',//房屋用途 + houseModel:'',//户型 + insideArea:'',//套内面积 + area:'',//面积 + floor:'',//楼层 + price:'',//价格 + orientation:"",//朝向 + hasElevator:'',//电梯 0无 1有 + description:'',//房屋描述 + houseStatus:'',//房屋状态1在售 2在租 + contact:'',//联系方式 + address:'',//地址 + }, + dtList:['无','有'], + houseStatusList:['在售','在租'], + message:true, + photoList: [], + imageId: 0, + messageContent:"" + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + if (options.name=='编辑') { + let decodeObj = decodeURIComponent(options.houseobj) + let obj = JSON.parse(decodeObj) + let arr = [] + obj.photoList.forEach((item,index)=>{ + arr.push({ + imgUrl:item, + ossUrl:item, + uploaded:true, + imageId:index+1 + }) + }) + this.setData({ + dataForm:obj, + photoList:arr + }) + } + wx.setNavigationBarTitle({ + title: options.name, + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + handleChangehouseType(e){ + this.setData({ + 'dataForm.houseType': e.detail.value=='0'?'1': e.detail.value=='1'?'2':'3' + }) + console.log(this.data.dataForm.houseType,'房屋用途'); + }, + handelClickSave(){ + + }, + handelClickBack(){ + this.setData({ + message:true, + dataForm:{ + houseType:'', + houseModel:'', + insideArea:'', + area:'', + floor:'', + price:'', + orientation:"", + hasElevator:'', + description:'', + houseStatus:'', + contact:'', + address:'', + }, + photoList:[] + }) + }, + handelToFamily(){ + wx.navigateBack() + }, + // 删除选中的图片 + deleteImage (e) { + console.log(e.currentTarget.dataset.imageid); + console.log(this.data.photoList); + const index = this.data.photoList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid) + if (index > -1) { + this.data.photoList.splice(index, 1) + this.setData({ + photoList: this.data.photoList + }) + } + }, + bindHouseModelInput(e){ + this.setData({ + 'dataForm.houseModel':e.detail.value + }) + }, + bindInsideAreaInput(e){ + this.setData({ + 'dataForm.insideArea':e.detail.value + }) + }, + bindAreaInput(e){ + this.setData({ + 'dataForm.area':e.detail.value + }) + }, + bindFloorInput(e){ + this.setData({ + 'dataForm.floor':e.detail.value + }) + }, + bindPriceInput(e){ + this.setData({ + 'dataForm.price':e.detail.value + }) + }, + bindOrientationInput(e){ + this.setData({ + 'dataForm.orientation':e.detail.value + }) + }, + bindOrientationInput(e){ + this.setData({ + 'dataForm.orientation':e.detail.value + }) + }, + handleChangeHasElevator(e){ + console.log(e.detail.value); + this.setData({ + 'dataForm.hasElevator':e.detail.value + }) + console.log(this.data.dataForm.hasElevator,'电梯下拉'); + }, + bindDescriptionInput(e){ + this.setData({ + 'dataForm.description':e.detail.value + }) + }, + bindContactInput(e){ + this.setData({ + 'dataForm.contact':e.detail.value + }) + }, + bindAddressInput(e){ + this.setData({ + 'dataForm.address':e.detail.value + }) + }, + handleChangeHouseStatus(e){ + // console.log(e.detail.value); + this.setData({ + 'dataForm.houseStatus':e.detail.value=='0'?'1':'2' + }) + console.log(this.data.dataForm.houseStatus,'房屋状态下拉'); + }, + // 选择图片 上传弹窗 - 上传图片方式 - 选择图片 - 上传图片 - 回调赋值 + chooseImage () { + const _this = this + $wuxActionSheet().showSheet({ + buttons: [ + { text: "拍照" }, + { text: "从相册中获取" }, + ], + className: "dialog-class", + buttonClicked (index) { + if (index === 0) { + wx.chooseImage({ + count: 1, + sizeType: ["original", "compressed"], + sourceType: ["camera"], + success (res) { + const photoList = [..._this.data.photoList] + photoList.push({ + uploaded: false, + ossUrl: "", + imgUrl: res.tempFilePaths[0], + imageId: ++_this.data.imageId + }) + _this.setData({ + photoList + }) + wx.uploadFile({ + url: `${config.BASEURL()}group/topic/upload`, + filePath: res.tempFilePaths[0], + name: "file", + header: { + "Content-type": "multipart/form-data" + }, + success (fileRes){ + photoList[photoList.length - 1].uploaded = true + photoList[photoList.length - 1].ossUrl = JSON.parse(fileRes.data).data + _this.setData({ + photoList + }) + } + }) + + } + }) + } else if (index === 1) { + wx.chooseImage({ + count: 3 - _this.data.photoList.length, + sizeType: ["original", "compressed"], + sourceType: ["album"], + success (res) { + const photoList = [] + const endIndex = _this.data.photoList.length + res.tempFilePaths.forEach(item => { + photoList.push({ + uploaded: false, + ossUrl: "", + imgUrl: item, + imageId: ++_this.data.imageId + }) + }) + _this.setData({ + photoList: [..._this.data.photoList,...photoList] + }) + photoList.forEach((item, index) => { + return (function (index) { + wx.uploadFile({ + url: `${config.BASEURL()}group/topic/upload`, + filePath: res.tempFilePaths[index], + name: "file", + header: { + "Content-type": "multipart/form-data" + }, + success (fileRes){ + photoList[index].uploaded = true + photoList[index].ossUrl = JSON.parse(fileRes.data).data + _this.data.photoList = _this.data.photoList.slice(0, endIndex) + _this.setData({ + photoList: [..._this.data.photoList, ...photoList] + }) + } + }) + })(index) + }) + } + }) + } + return true + }, + cancelText: "取消", + cancel () {}, + destructiveButtonClicked () {}, + }) + }, + showToast (title) { + wx.showToast({ + title: title, + icon: "none", + duration: 2000 + }) + }, + submitHouse () { + if (!this.data.dataForm.houseType) { + this.showToast("请选择房屋用途") + return false + } + if (!this.data.dataForm.houseModel.trim('')) { + this.showToast("请填写户型") + return false + } + if (!this.data.dataForm.area.trim('')) { + this.showToast("请填写面积") + return false + } + if (!this.data.dataForm.insideArea.trim('')) { + this.showToast("请填写套内面积") + return false + } + if (!this.data.dataForm.floor.trim('')) { + this.showToast("请填写楼层") + return false + } + if (!this.data.dataForm.price.trim('')) { + this.showToast("请填写价格") + return false + } + if (!this.data.dataForm.orientation.trim('')) { + this.showToast("请填写朝向") + return false + } + if (!this.data.dataForm.hasElevator) { + this.showToast("请选择是否有电梯") + return false + } + if (!this.data.dataForm.description.trim('')) { + this.showToast("请填写房屋描述") + return false + } + if (this.data.dataForm.description.length>50) { + this.showToast("房屋描述在50字以内") + return false + } + if(this.data.photoList.length>3){ + this.showToast("最多上传三张图片") + return false + } + + if (!this.data.dataForm.contact.trim('')) { + this.showToast("请填写联系电话") + return false + } + if (this.data.dataForm.contact.length>20) { + this.showToast("联系电话限制在20字以内") + return false + } + if (!this.data.dataForm.address.trim('')) { + this.showToast("请填写地址") + return false + } + wx.showLoading({ + title: "发布中", + }) + const imagesList = [] + if (this.data.photoList.length > 0) { + const isUploadDown = this.data.photoList.some(item => !item.uploaded) + if (isUploadDown) { + wx.showToast({ + title: "请等待图片上传完成", + icon: "none", + duration: 1000 + }) + return false + } + } + if (this.data.photoList.length > 0) { + this.data.photoList.forEach(item => { + imagesList.push(item.ossUrl) + }) + } + console.log(imagesList); + const para = { ...this.data.dataForm } + para.photoList = imagesList + console.log('submit', para) + let that = this + console.log(this.options); + if(this.options.name == '编辑'){ + api.updataHouseInfo(para).then(res => { + if(res.code == 0) { + wx.hideLoading() + this.setData({ + message:false, + messageContent:'房屋信息已保存!' + }) + } + }).catch(err => { + console.log('err',err) + wx.hideLoading() + }) + }else{ + api.addHouseInfo(para).then(res => { + if(res.code == 0) { + wx.hideLoading() + this.setData({ + message:false, + messageContent:'您的卖房信息已提交成功,待审核通过后进行发布,在个人中心我的房屋中查看进度。' + }) + } + }).catch(err => { + console.log('err',err) + wx.hideLoading() + }) + } + + }, +}) \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.json b/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.json new file mode 100644 index 0000000..b54b90e --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "wux-actionsheet": "../../../../dist/actionsheet/index" + } +} \ No newline at end of file diff --git a/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.wxml b/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.wxml new file mode 100644 index 0000000..0d51693 --- /dev/null +++ b/epdc-resident-mp-yushan/subpages/family/pages/addHouse/addHouse.wxml @@ -0,0 +1,154 @@ + + + + + + 房屋用途 + + + + + {{dataForm.houseType == '1'?'住宅':dataForm.houseType == '2'?'办公':dataForm.houseType == '3'?'门头':'请选择房屋用途'}} + + + + + + + + 户型 + + + + + + + + + 面积 + + + + + + + + + 套内面积 + + + + + + + + + 楼层 + + + + + + + + + 价格 + + + + + + + + 朝向 + + + + + + + + 电梯 + + + + + + {{dataForm.hasElevator=='0'?'无':dataForm.hasElevator=='1'?'有':'请选择是否有电梯'}} + + + + + + + + + 房屋描述 + + +