├── README.md ├── descriptionImg ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png └── 6.png └── 小程序 ├── app.js ├── app.json ├── app.wxss ├── images ├── 124134975.jpg ├── KTV.png ├── banner1.jpg ├── banner2.png ├── chaxun.png ├── computer.png ├── del.png ├── detail-1.png ├── dianao.png ├── dingwei.png ├── fankui.png ├── fujin.png ├── gantan.png ├── home-ac.png ├── home.png ├── jiahao.png ├── jianjie.png ├── list-ac.png ├── list.png ├── logo.png ├── nextMonth.png ├── search.png ├── shiming.png ├── shoucang-1.png ├── shoucang-2.png ├── shoucang-ac.png ├── success.png ├── timg-1.jpg ├── tixian.png ├── touxiang.png ├── user-ac.png ├── user.png ├── wenhao.png ├── xiangji.png ├── yue.png ├── zhaomupng.png └── zhuoyou.png ├── libs └── qqmap-wx-jssdk.js ├── pages ├── detail │ ├── commentList │ │ ├── commentList.js │ │ ├── commentList.json │ │ ├── commentList.wxml │ │ └── commentList.wxss │ ├── detail.js │ ├── detail.json │ ├── detail.wxml │ ├── detail.wxss │ ├── invoice-2 │ │ ├── invoice-2.js │ │ ├── invoice-2.json │ │ ├── invoice-2.wxml │ │ └── invoice-2.wxss │ ├── invoice │ │ ├── invoice.js │ │ ├── invoice.json │ │ ├── invoice.wxml │ │ └── invoice.wxss │ ├── order │ │ ├── order.js │ │ ├── order.json │ │ ├── order.wxml │ │ └── order.wxss │ ├── orderCompletion │ │ ├── orderCompletion.js │ │ ├── orderCompletion.json │ │ ├── orderCompletion.wxml │ │ └── orderCompletion.wxss │ ├── pay │ │ ├── pay.js │ │ ├── pay.json │ │ ├── pay.wxml │ │ └── pay.wxss │ ├── reserve │ │ ├── reserve.js │ │ ├── reserve.json │ │ ├── reserve.wxml │ │ └── reserve.wxss │ └── viewOrder │ │ ├── viewOrder.js │ │ ├── viewOrder.json │ │ ├── viewOrder.wxml │ │ └── viewOrder.wxss ├── index │ ├── collection │ │ ├── collection.js │ │ ├── collection.json │ │ ├── collection.wxml │ │ └── collection.wxss │ ├── house │ │ ├── house.js │ │ ├── house.json │ │ ├── house.wxml │ │ └── house.wxss │ ├── index.js │ ├── index.wxml │ ├── index.wxss │ ├── quick │ │ ├── quick.js │ │ ├── quick.json │ │ ├── quick.wxml │ │ └── quick.wxss │ └── search │ │ ├── search.js │ │ ├── search.json │ │ ├── search.wxml │ │ └── search.wxss ├── list │ ├── comment │ │ ├── comment.js │ │ ├── comment.json │ │ ├── comment.wxml │ │ └── comment.wxss │ ├── list.js │ ├── list.json │ ├── list.wxml │ └── list.wxss ├── recruit │ ├── landlord_entrance │ │ ├── landlord_entrance.js │ │ ├── landlord_entrance.json │ │ ├── landlord_entrance.wxml │ │ └── landlord_entrance.wxss │ ├── recruit.js │ ├── recruit.json │ ├── recruit.wxml │ ├── recruit.wxss │ ├── release │ │ ├── release.js │ │ ├── release.json │ │ ├── release.wxml │ │ └── release.wxss │ └── submission │ │ ├── submission.js │ │ ├── submission.json │ │ ├── submission.wxml │ │ └── submission.wxss └── user │ ├── FAQ │ ├── FAQ.js │ ├── FAQ.json │ ├── FAQ.wxml │ └── FAQ.wxss │ ├── authentication │ ├── authentication.js │ ├── authentication.json │ ├── authentication.wxml │ ├── authentication.wxss │ └── face_detection │ │ ├── face_detection.js │ │ ├── face_detection.json │ │ ├── face_detection.wxml │ │ └── face_detection.wxss │ ├── company_presentation │ ├── company_presentation.js │ ├── company_presentation.json │ ├── company_presentation.wxml │ └── company_presentation.wxss │ ├── feedback │ ├── feedback.js │ ├── feedback.json │ ├── feedback.wxml │ └── feedback.wxss │ ├── information │ ├── information.js │ ├── information.json │ ├── information.wxml │ └── information.wxss │ ├── landlord_entrance │ ├── landlord_entrance.js │ ├── landlord_entrance.json │ ├── landlord_entrance.wxml │ └── landlord_entrance.wxss │ ├── money │ ├── money.js │ ├── money.json │ ├── money.wxml │ ├── money.wxss │ └── wallet_detail │ │ ├── wallet_detail.js │ │ ├── wallet_detail.json │ │ ├── wallet_detail.wxml │ │ └── wallet_detail.wxss │ ├── my-house │ ├── my-house.js │ ├── my-house.json │ ├── my-house.wxml │ └── my-house.wxss │ ├── user.js │ ├── user.json │ ├── user.wxml │ └── user.wxss ├── project.config.json ├── utils ├── av-weapp.js ├── md5.js ├── qqmap-wx-jssdk.js ├── qqmap-wx-jssdk.min.js ├── server.js └── util.js └── wxParse ├── html2json.js ├── htmlparser.js ├── showdown.js ├── wxDiscode.js ├── wxParse.js ├── wxParse.wxml └── wxParse.wxss /README.md: -------------------------------------------------------------------------------- 1 | # 项目描述 2 | 3 |

一个民宿主题的小程序,其主要功能有使用百度地图获取用户所在城市,搜索首字母等搜索城市,用户信息获取,多图片上传,日历等。初次接触小程序,还有诸多问题没有完善,希望通过学习能逐一解决。

4 | 5 | ![image](https://github.com/mirror29/homestay/blob/master/descriptionImg/1.png)         6 | ![image](https://github.com/mirror29/homestay/blob/master/descriptionImg/2.png)         7 | ![image](https://github.com/mirror29/homestay/blob/master/descriptionImg/3.png)         8 | ![image](https://github.com/mirror29/homestay/blob/master/descriptionImg/5.png)         9 | ![image](https://github.com/mirror29/homestay/blob/master/descriptionImg/4.png)         10 | ![image](https://github.com/mirror29/homestay/blob/master/descriptionImg/6.png)         11 | -------------------------------------------------------------------------------- /descriptionImg/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/descriptionImg/1.png -------------------------------------------------------------------------------- /descriptionImg/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/descriptionImg/2.png -------------------------------------------------------------------------------- /descriptionImg/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/descriptionImg/3.png -------------------------------------------------------------------------------- /descriptionImg/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/descriptionImg/4.png -------------------------------------------------------------------------------- /descriptionImg/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/descriptionImg/5.png -------------------------------------------------------------------------------- /descriptionImg/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/descriptionImg/6.png -------------------------------------------------------------------------------- /小程序/app.js: -------------------------------------------------------------------------------- 1 | 2 | var server = require('./utils/server'); 3 | var md5 = require('./utils/md5.js'); 4 | 5 | // 授权登录 6 | App({ 7 | onLaunch: function () { 8 | // auto login via SDK 9 | var that = this; 10 | //AV.User.loginWithWeapp(); 11 | 12 | 13 | // 设备信息 14 | wx.getSystemInfo({ 15 | success: function (res) { 16 | that.screenWidth = res.windowWidth; 17 | that.pixelRatio = res.pixelRatio; 18 | } 19 | }); 20 | }, 21 | getOpenId: function (cb) { 22 | wx.login({ 23 | success: function (res) { 24 | if (res.code) { 25 | //发起网络请求 26 | wx.request({ 27 | url: 'https://wj.antyiz.xyz/sendappid?appid=wx33395ae3c08b6132&secret=2bb68ab8005322261b9facc9c9621284&js_code=' + res.code + '&grant_type=authorization_code', 28 | data: { 29 | code: res.code 30 | }, 31 | success: function (response) { 32 | // 获取openId 33 | var openId = response.data.openid; 34 | // TODO 缓存 openId 35 | var app = getApp(); 36 | var that = app; 37 | that.globalData.openid = openId; 38 | 39 | //验证是否关联openid 40 | 41 | typeof cb == "function" && cb() 42 | 43 | } 44 | }) 45 | } else { 46 | console.log('获取用户登录态失败!' + res.errMsg) 47 | } 48 | } 49 | }); 50 | }, 51 | 52 | //多张图片上传 53 | chooseImg: function uploadimg(data){ 54 | var that= this, 55 | i=data.i ? data.i : 0,//当前上传的哪张图片 56 | success=data.success ? data.success : 0,//上传成功的个数 57 | fail=data.fail ? data.fail : 0;//上传失败的个数 58 | wx.uploadFile({ 59 | url: data.url, 60 | filePath: data.path[i], 61 | name: 'file',//这里根据自己的实际情况改 62 | formData: null,//这里是上传图片时一起上传的数据 63 | success: (resp) => { 64 | success++;//图片上传成功,图片上传成功的变量+1 65 | console.log(resp) 66 | console.log(i); 67 | //这里可能有BUG,失败也会执行这里,所以这里应该是后台返回过来的状态码为成功时,这里的success才+1 68 | }, 69 | fail: (res) => { 70 | fail++;//图片上传失败,图片上传失败的变量+1 71 | console.log('fail:' + i + "fail:" + fail); 72 | }, 73 | complete: () => { 74 | console.log(i); 75 | i++;//这个图片执行完上传后,开始上传下一张 76 | if (i == data.path.length) { //当图片传完时,停止调用 77 | console.log('执行完毕'); 78 | console.log('成功:' + success + " 失败:" + fail); 79 | } else {//若图片还没有传完,则继续调用函数 80 | console.log(i); 81 | data.i = i; 82 | data.success = success; 83 | data.fail = fail; 84 | that.uploadimg(data); 85 | } 86 | 87 | } 88 | }); 89 | }, 90 | 91 | register:function(cb){ 92 | var app = this; 93 | this.getUserInfo(function () { 94 | var openId = app.globalData.openid; 95 | var userInfo = app.globalData.userInfo; 96 | var country = userInfo.country; 97 | var city = userInfo.city; 98 | var gender = userInfo.gender; 99 | var nick_name = userInfo.nickName; 100 | var province = userInfo.province; 101 | var avatarUrl = userInfo.avatarUrl; 102 | server.getJSON('/User/register?open_id=' + openId + "&country=" + country + "&gender=" + gender + "&nick_name=" + nick_name + "&province=" + province + "&city=" + city + "&head_pic=" + avatarUrl,function(res){ 103 | app.globalData.userInfo = res.data.res 104 | 105 | typeof cb == "function" && cb() 106 | }); 107 | 108 | }) 109 | }, 110 | getUserInfo:function(cb){ 111 | var that = this 112 | if(this.globalData.userInfo){ 113 | typeof cb == "function" && cb(this.globalData.userInfo) 114 | }else{ 115 | //调用登录接口 116 | wx.login({ 117 | success: function () { 118 | wx.getUserInfo({ 119 | success: function (res) { 120 | that.globalData.userInfo = res.userInfo 121 | typeof cb == "function" && cb(that.globalData.userInfo) 122 | } 123 | }) 124 | } 125 | }) 126 | } 127 | }, 128 | 129 | globalData: { 130 | 'openid': null, 131 | 'userInfo':null, 132 | 'login':false 133 | } 134 | }) 135 | -------------------------------------------------------------------------------- /小程序/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages":[ 3 | "pages/index/index", 4 | "pages/user/user", 5 | "pages/list/list", 6 | "pages/index/house/house", 7 | "pages/index/search/search", 8 | "pages/index/quick/quick", 9 | "pages/index/collection/collection", 10 | "pages/detail/detail", 11 | "pages/recruit/recruit", 12 | "pages/detail/order/order", 13 | "pages/detail/commentList/commentList", 14 | "pages/detail/viewOrder/viewOrder", 15 | "pages/detail/invoice/invoice", 16 | "pages/detail/orderCompletion/orderCompletion", 17 | "pages/user/information/information", 18 | "pages/user/authentication/authentication", 19 | "pages/user/authentication/face_detection/face_detection", 20 | "pages/user/money/money", 21 | "pages/user/money/wallet_detail/wallet_detail", 22 | "pages/user/company_presentation/company_presentation", 23 | "pages/user/feedback/feedback", 24 | "pages/user/FAQ/FAQ", 25 | "pages/user/landlord_entrance/landlord_entrance", 26 | "pages/detail/invoice-2/invoice-2", 27 | "pages/detail/reserve/reserve", 28 | "pages/recruit/submission/submission", 29 | "pages/recruit/release/release", 30 | "pages/user/my-house/my-house", 31 | "pages/recruit/landlord_entrance/landlord_entrance", 32 | "pages/list/comment/comment", 33 | "pages/detail/pay/pay" 34 | ], 35 | "window":{ 36 | "backgroundTextStyle":"light", 37 | "navigationBarBackgroundColor": "#54BF6C", 38 | "navigationBarTitleText": "顽家", 39 | "navigationBarTextStyle":"#fff" 40 | }, 41 | "tabBar": { 42 | "color": "#707070", 43 | "selectedColor": "#54BF6C", 44 | "borderStyle": "white", 45 | "list": [ 46 | { 47 | "selectedIconPath": "images/home-ac.png", 48 | "iconPath": "images/home.png", 49 | "pagePath": "pages/index/index", 50 | "text": "首页" 51 | }, 52 | { 53 | "selectedIconPath": "images/list-ac.png", 54 | "iconPath": "images/list.png", 55 | "pagePath": "pages/list/list", 56 | "text": "订单" 57 | }, 58 | { 59 | "selectedIconPath": "images/user-ac.png", 60 | "iconPath": "images/user.png", 61 | "pagePath": "pages/user/user", 62 | "text": "我的" 63 | } 64 | ] 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /小程序/app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | .container { 3 | height: 100%; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: space-between; 8 | padding: 200rpx 0; 9 | box-sizing: border-box; 10 | } 11 | 12 | @font-face { 13 | font-family: 'iconfont'; /* project id 677761 */ 14 | src: url('//at.alicdn.com/t/font_677761_4o0opt89hbmx6r.eot'); 15 | src: url('//at.alicdn.com/t/font_677761_4o0opt89hbmx6r.eot?#iefix') format('embedded-opentype'), 16 | url('//at.alicdn.com/t/font_677761_4o0opt89hbmx6r.woff') format('woff'), 17 | url('//at.alicdn.com/t/font_677761_4o0opt89hbmx6r.ttf') format('truetype'), 18 | url('//at.alicdn.com/t/font_677761_4o0opt89hbmx6r.svg#iconfont') format('svg'); 19 | } 20 | 21 | .iconfont { 22 | font-family:"iconfont" !important; 23 | font-size:16px; 24 | font-style:normal; 25 | -webkit-font-smoothing: antialiased; 26 | -moz-osx-font-smoothing: grayscale; 27 | } 28 | 29 | .icon-shiming:before { content: "\e621"; } 30 | 31 | .icon-dingdan:before { content: "\e627"; } 32 | 33 | .icon-fankui:before { content: "\e625"; } 34 | 35 | .icon-biaoqian-:before { content: "\e663"; } 36 | 37 | .icon-bingxiang:before { content: "\e60c"; } 38 | 39 | .icon-chaxun:before { content: "\e9df"; } 40 | 41 | .icon-service:before { content: "\e622"; } 42 | 43 | .icon-shouye:before { content: "\e605"; } 44 | 45 | .icon-shanchu:before { content: "\e645"; } 46 | 47 | .icon-gongsijianjie:before { content: "\e61b"; } 48 | 49 | .icon-sousuo:before { content: "\e600"; } 50 | 51 | .icon-jubao:before { content: "\e83e"; } 52 | 53 | .icon-wenhao:before { content: "\e721"; } -------------------------------------------------------------------------------- /小程序/images/124134975.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/124134975.jpg -------------------------------------------------------------------------------- /小程序/images/KTV.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/KTV.png -------------------------------------------------------------------------------- /小程序/images/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/banner1.jpg -------------------------------------------------------------------------------- /小程序/images/banner2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/banner2.png -------------------------------------------------------------------------------- /小程序/images/chaxun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/chaxun.png -------------------------------------------------------------------------------- /小程序/images/computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/computer.png -------------------------------------------------------------------------------- /小程序/images/del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/del.png -------------------------------------------------------------------------------- /小程序/images/detail-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/detail-1.png -------------------------------------------------------------------------------- /小程序/images/dianao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/dianao.png -------------------------------------------------------------------------------- /小程序/images/dingwei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/dingwei.png -------------------------------------------------------------------------------- /小程序/images/fankui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/fankui.png -------------------------------------------------------------------------------- /小程序/images/fujin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/fujin.png -------------------------------------------------------------------------------- /小程序/images/gantan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/gantan.png -------------------------------------------------------------------------------- /小程序/images/home-ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/home-ac.png -------------------------------------------------------------------------------- /小程序/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/home.png -------------------------------------------------------------------------------- /小程序/images/jiahao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/jiahao.png -------------------------------------------------------------------------------- /小程序/images/jianjie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/jianjie.png -------------------------------------------------------------------------------- /小程序/images/list-ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/list-ac.png -------------------------------------------------------------------------------- /小程序/images/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/list.png -------------------------------------------------------------------------------- /小程序/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/logo.png -------------------------------------------------------------------------------- /小程序/images/nextMonth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/nextMonth.png -------------------------------------------------------------------------------- /小程序/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/search.png -------------------------------------------------------------------------------- /小程序/images/shiming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/shiming.png -------------------------------------------------------------------------------- /小程序/images/shoucang-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/shoucang-1.png -------------------------------------------------------------------------------- /小程序/images/shoucang-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/shoucang-2.png -------------------------------------------------------------------------------- /小程序/images/shoucang-ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/shoucang-ac.png -------------------------------------------------------------------------------- /小程序/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/success.png -------------------------------------------------------------------------------- /小程序/images/timg-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/timg-1.jpg -------------------------------------------------------------------------------- /小程序/images/tixian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/tixian.png -------------------------------------------------------------------------------- /小程序/images/touxiang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/touxiang.png -------------------------------------------------------------------------------- /小程序/images/user-ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/user-ac.png -------------------------------------------------------------------------------- /小程序/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/user.png -------------------------------------------------------------------------------- /小程序/images/wenhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/wenhao.png -------------------------------------------------------------------------------- /小程序/images/xiangji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/xiangji.png -------------------------------------------------------------------------------- /小程序/images/yue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/yue.png -------------------------------------------------------------------------------- /小程序/images/zhaomupng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/zhaomupng.png -------------------------------------------------------------------------------- /小程序/images/zhuoyou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mirror29/homestay/fc138d92c771f430ea1be05ff9167b01cec1685a/小程序/images/zhuoyou.png -------------------------------------------------------------------------------- /小程序/pages/detail/commentList/commentList.js: -------------------------------------------------------------------------------- 1 | // pages/detail/commentList/commentList.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/commentList/commentList.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "全部评价" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/commentList/commentList.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 电竞选手 8 | 9 | 10 | 2018-05-31 11 | 12 | 13 | 14 | 15 | 作为一位顾客,我用亲身经历发自内心的觉得,环境整洁,房间布局堪称完美,优雅又不失情调,服务周到,让人无比舒心。给我营造了一种家的感觉,无论大处到小处都是那么无懈可击,价格也很合理。 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 电竞选手 32 | 33 | 34 | 2018-05-31 35 | 36 | 37 | 38 | 39 | 作为一位顾客,我用亲身经历发自内心的觉得,环境整洁,房间布局堪称完美,优雅又不失情调,服务周到,让人无比舒心。给我营造了一种家的感觉,无论大处到小处都是那么无懈可击,价格也很合理。 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 电竞选手 56 | 57 | 58 | 2018-05-31 59 | 60 | 61 | 62 | 63 | 作为一位顾客,我用亲身经历发自内心的觉得,环境整洁,房间布局堪称完美,优雅又不失情调,服务周到,让人无比舒心。给我营造了一种家的感觉,无论大处到小处都是那么无懈可击,价格也很合理。 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /小程序/pages/detail/commentList/commentList.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/commentList/commentList.wxss */ 2 | .commentList-con{ 3 | margin: 20rpx; 4 | } 5 | 6 | .detail-comment-li{ 7 | border-bottom: 5rpx solid #f0f0f0; 8 | margin-top: 20rpx; 9 | } 10 | .detail-comment-tit{ 11 | display: flex; 12 | justify-content: space-between; 13 | } 14 | .detail-comment-tit-left{ 15 | display: flex; 16 | } 17 | .detail-comment-tit-left image{ 18 | height: 84rpx; 19 | width: 84rpx; 20 | border-radius: 50%; 21 | } 22 | .detail-comment-tit-right text{ 23 | font-size: 28rpx; 24 | color: #707070; 25 | margin: 50rpx 15rpx; 26 | } 27 | .detail-comment-tit-left text{ 28 | margin: 15rpx 0 0 15rpx; 29 | } 30 | .detail-comment-con{ 31 | margin: 10rpx; 32 | } 33 | .detail-comment-text{ 34 | font-size: 32rpx; 35 | } 36 | .detail-comment-img{ 37 | display: flex; 38 | flex-wrap: wrap; 39 | margin-top: 10rpx; 40 | } 41 | .detail-comment-img image{ 42 | height: 200rpx; 43 | width: 200rpx; 44 | border-radius: 10rpx; 45 | margin: 8rpx 15rpx; 46 | } -------------------------------------------------------------------------------- /小程序/pages/detail/detail.js: -------------------------------------------------------------------------------- 1 | 2 | let chooseYear = null; 3 | let chooseMonth = null; 4 | const conf = { 5 | data: { 6 | hasEmptyGrid: false, 7 | showPicker: false, 8 | imgUrls: [ 9 | '/images/banner1.jpg', 10 | '/images/banner2.png', 11 | ], 12 | indicatorDots: true, 13 | autoplay: true, 14 | interval: 2000, 15 | duration: 1200, 16 | scrollTop: 100 17 | }, 18 | onLoad() { 19 | const date = new Date(); 20 | const curYear = date.getFullYear(); 21 | const curMonth = date.getMonth() + 1; 22 | const weeksCh = ['日', '一', '二', '三', '四', '五', '六']; 23 | this.calculateEmptyGrids(curYear, curMonth); 24 | this.calculateDays(curYear, curMonth); 25 | this.setData({ 26 | curYear, 27 | curMonth, 28 | weeksCh 29 | }); 30 | }, 31 | getThisMonthDays(year, month) { 32 | return new Date(year, month, 0).getDate(); 33 | }, 34 | getFirstDayOfWeek(year, month) { 35 | return new Date(Date.UTC(year, month - 1, 1)).getDay(); 36 | }, 37 | calculateEmptyGrids(year, month) { 38 | const firstDayOfWeek = this.getFirstDayOfWeek(year, month); 39 | let empytGrids = []; 40 | if (firstDayOfWeek > 0) { 41 | for (let i = 0; i < firstDayOfWeek; i++) { 42 | empytGrids.push(i); 43 | } 44 | this.setData({ 45 | hasEmptyGrid: true, 46 | empytGrids 47 | }); 48 | } else { 49 | this.setData({ 50 | hasEmptyGrid: false, 51 | empytGrids: [] 52 | }); 53 | } 54 | }, 55 | calculateDays(year, month) { 56 | let days = []; 57 | 58 | const thisMonthDays = this.getThisMonthDays(year, month); 59 | 60 | for (let i = 1; i <= thisMonthDays; i++) { 61 | days.push({ 62 | day: i, 63 | choosed: false 64 | }); 65 | } 66 | 67 | this.setData({ 68 | days 69 | }); 70 | }, 71 | handleCalendar(e) { 72 | const handle = e.currentTarget.dataset.handle; 73 | const curYear = this.data.curYear; 74 | const curMonth = this.data.curMonth; 75 | if (handle === 'prev') { 76 | let newMonth = curMonth - 1; 77 | let newYear = curYear; 78 | if (newMonth < 1) { 79 | newYear = curYear - 1; 80 | newMonth = 12; 81 | } 82 | 83 | this.calculateDays(newYear, newMonth); 84 | this.calculateEmptyGrids(newYear, newMonth); 85 | 86 | this.setData({ 87 | curYear: newYear, 88 | curMonth: newMonth 89 | }); 90 | } else { 91 | let newMonth = curMonth + 1; 92 | let newYear = curYear; 93 | if (newMonth > 12) { 94 | newYear = curYear + 1; 95 | newMonth = 1; 96 | } 97 | 98 | this.calculateDays(newYear, newMonth); 99 | this.calculateEmptyGrids(newYear, newMonth); 100 | 101 | this.setData({ 102 | curYear: newYear, 103 | curMonth: newMonth 104 | }); 105 | } 106 | }, 107 | tapDayItem(e) { 108 | const idx = e.currentTarget.dataset.idx; 109 | const days = this.data.days; 110 | days[idx].choosed = !days[idx].choosed; 111 | this.setData({ 112 | days, 113 | }); 114 | }, 115 | chooseYearAndMonth() { 116 | const curYear = this.data.curYear; 117 | const curMonth = this.data.curMonth; 118 | let pickerYear = []; 119 | let pickerMonth = []; 120 | for (let i = 1900; i <= 2100; i++) { 121 | pickerYear.push(i); 122 | } 123 | for (let i = 1; i <= 12; i++) { 124 | pickerMonth.push(i); 125 | } 126 | const idxYear = pickerYear.indexOf(curYear); 127 | const idxMonth = pickerMonth.indexOf(curMonth); 128 | this.setData({ 129 | pickerValue: [idxYear, idxMonth], 130 | pickerYear, 131 | pickerMonth, 132 | showPicker: true, 133 | }); 134 | }, 135 | pickerChange(e) { 136 | const val = e.detail.value; 137 | chooseYear = this.data.pickerYear[val[0]]; 138 | chooseMonth = this.data.pickerMonth[val[1]]; 139 | }, 140 | tapPickerBtn(e) { 141 | const type = e.currentTarget.dataset.type; 142 | const o = { 143 | showPicker: false, 144 | }; 145 | if (type === 'confirm') { 146 | o.curYear = chooseYear; 147 | o.curMonth = chooseMonth; 148 | this.calculateEmptyGrids(chooseYear, chooseMonth); 149 | this.calculateDays(chooseYear, chooseMonth); 150 | } 151 | 152 | this.setData(o); 153 | }, 154 | showService: function () { 155 | wx.makePhoneCall({ 156 | phoneNumber: '0851-85966273' //仅为示例,并非真实的电话号码 157 | }) 158 | }, 159 | showReserve:function(){ 160 | wx.navigateTo({ 161 | url: '../detail/order/order', 162 | }) 163 | }, 164 | showCommentList: function () { 165 | wx.navigateTo({ 166 | url: '../detail/commentList/commentList', 167 | }) 168 | }, 169 | }; 170 | 171 | Page(conf); 172 | -------------------------------------------------------------------------------- /小程序/pages/detail/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "房源详情" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/invoice-2/invoice-2.js: -------------------------------------------------------------------------------- 1 | // pages/invoice/invoice.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | showOrderCompletion: function () { 11 | wx.navigateTo({ 12 | url: '../detail/orderCompletion/orderCompletion', 13 | }) 14 | }, 15 | backIndex: function () { 16 | wx.switchTab({ 17 | url: '../../../pages/index/index' 18 | }) 19 | }, 20 | backList: function () { 21 | wx.navigateBack({ 22 | delta: 2 23 | }) 24 | }, 25 | /** 26 | * 生命周期函数--监听页面加载 27 | */ 28 | onLoad: function (options) { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面初次渲染完成 34 | */ 35 | onReady: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面显示 41 | */ 42 | onShow: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面隐藏 48 | */ 49 | onHide: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 生命周期函数--监听页面卸载 55 | */ 56 | onUnload: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 页面相关事件处理函数--监听用户下拉动作 62 | */ 63 | onPullDownRefresh: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 页面上拉触底事件的处理函数 69 | */ 70 | onReachBottom: function () { 71 | 72 | }, 73 | 74 | /** 75 | * 用户点击右上角分享 76 | */ 77 | onShareAppMessage: function () { 78 | 79 | } 80 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/invoice-2/invoice-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "发票" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/invoice-2/invoice-2.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 发票填写完成 8 | 9 | 将在1~2个工作日内为您寄出 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /小程序/pages/detail/invoice-2/invoice-2.wxss: -------------------------------------------------------------------------------- 1 | /* pages/invoice/invoice.wxss */ 2 | .whole-page{ 3 | margin-top: 160rpx; 4 | } 5 | 6 | .picture{ 7 | width: 100%; 8 | height: 144rpx; 9 | text-align:center; 10 | } 11 | 12 | .complete{ 13 | width: 144rpx; 14 | height: 144rpx; 15 | } 16 | 17 | .writte-words{ 18 | font-size: 32rpx; 19 | text-align:center; 20 | margin-top: 50rpx; 21 | } 22 | 23 | .button-1{ 24 | display: flex; 25 | justify-content:space-around; 26 | margin-top: 50rpx; 27 | } 28 | 29 | .next-step-1{ 30 | font-size:28rpx; 31 | border: 1rpx solid #54BF6C; 32 | width: 234rpx; 33 | color: #54BF6C; 34 | background: #fff; 35 | } 36 | 37 | .date{ 38 | font-size: 28rpx; 39 | color: #707070; 40 | } 41 | 42 | .date1{ 43 | margin-top: 50rpx; 44 | } -------------------------------------------------------------------------------- /小程序/pages/detail/invoice/invoice.js: -------------------------------------------------------------------------------- 1 | // pages/detail/invoice/invoice.js 2 | var app = getApp() 3 | Page({ 4 | data: { 5 | /** 6 | * 页面配置 7 | */ 8 | winWidth: 0, 9 | winHeight: 0, 10 | // tab切换 11 | currentTab: 0, 12 | region: ['广东省', '广州市', '海珠区'], 13 | }, 14 | bindRegionChange: function (e) { 15 | console.log('picker发送选择改变,携带值为', e.detail.value) 16 | this.setData({ 17 | region: e.detail.value 18 | }) 19 | }, 20 | onLoad: function () { 21 | var that = this; 22 | 23 | /** 24 | * 获取系统信息 25 | */ 26 | wx.getSystemInfo({ 27 | 28 | success: function (res) { 29 | that.setData({ 30 | winWidth: res.windowWidth, 31 | winHeight: res.windowHeight 32 | }); 33 | } 34 | 35 | }); 36 | }, 37 | /** 38 | * 滑动切换tab 39 | */ 40 | bindChange: function (e) { 41 | 42 | var that = this; 43 | that.setData({ currentTab: e.detail.current }); 44 | 45 | }, 46 | bindChange2: function (e) { 47 | 48 | var that = this; 49 | that.setData({ currentTab2: e.detail.current }); 50 | 51 | }, 52 | /** 53 | * 点击tab切换 54 | */ 55 | swichNav: function (e) { 56 | 57 | var that = this; 58 | 59 | if (this.data.currentTab === e.target.dataset.current) { 60 | return false; 61 | } else { 62 | that.setData({ 63 | currentTab: e.target.dataset.current 64 | }) 65 | } 66 | }, 67 | swichNav2: function (e) { 68 | 69 | var that = this; 70 | 71 | if (this.data.currentTab2 === e.target.dataset.current) { 72 | return false; 73 | } else { 74 | that.setData({ 75 | currentTab2: e.target.dataset.current 76 | }) 77 | } 78 | }, 79 | showInvoice2:function(){ 80 | wx.navigateTo({ 81 | url: '../invoice-2/invoice-2', 82 | }) 83 | } 84 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/invoice/invoice.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "发票" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/invoice/invoice.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/invoice/invoice.wxss */ 2 | .swiper-tab{ 3 | width: 100%; 4 | text-align: center; 5 | line-height: 80rpx; 6 | } 7 | .swiper-tab-list{ 8 | font-size: 32rpx; 9 | display: inline-block; 10 | width: 33.33%; 11 | color: #777777; 12 | } 13 | .on{ 14 | color: #FF9800; 15 | border-bottom: 5rpx solid #FF9800;} 16 | 17 | .swiper-box{ display: block; height: 100%; width: 100%; overflow: hidden; } 18 | 19 | /* 选项卡内容 */ 20 | .invoice-con{ 21 | background-color: #f0f0f0; 22 | height: 100%; 23 | width: 100%; 24 | position: fixed; 25 | } 26 | 27 | .invoice-li{ 28 | background-color: #fff; 29 | border-radius: 5px; 30 | margin: 20rpx; 31 | padding:20rpx; 32 | box-shadow: 1px 2px 0px 0px rgba(223, 223, 223, 1); 33 | border: 1px solid rgba(255, 255, 255, 1); 34 | } 35 | 36 | .invoice-li-1{ 37 | border-bottom:5rpx solid #f0f0f0; 38 | padding: 10rpx; 39 | display: flex; 40 | justify-content: space-between; 41 | } 42 | 43 | .invoice-li-1 input{ 44 | font-size: 32rpx; 45 | } 46 | 47 | .invoice-li-2{ 48 | padding: 10rpx; 49 | display: flex; 50 | justify-content: space-between; 51 | } 52 | 53 | .invoice-li-2 input{ 54 | font-size: 32rpx; 55 | } 56 | 57 | .invoice-text-left{ 58 | margin-right: 40rpx; 59 | } 60 | 61 | .text-price{ 62 | color: #FF9800; 63 | } 64 | 65 | .swiper-tab2{ 66 | display: flex; 67 | } 68 | 69 | .group{ 70 | display: flex; 71 | margin-right: 30rpx; 72 | } 73 | .group text{ 74 | font-size: 32rpx; 75 | margin-right: 40rpx; 76 | } 77 | 78 | .picker{ 79 | display: flex; 80 | justify-content: space-between; 81 | } 82 | 83 | .invoice-explain{ 84 | display: flex; 85 | justify-content: center; 86 | margin-top: 10rpx; 87 | padding: 0 10rpx; 88 | } 89 | .invoice-explain image{ 90 | height: 40rpx; 91 | width: 40rpx; 92 | margin-right: 10rpx; 93 | margin-top: 15rpx; 94 | } 95 | .invoice-explain text{ 96 | color: #868686; 97 | font-size: 28rpx; 98 | } 99 | .invoice-btn{ 100 | background-color: #54BF6C; 101 | display: flex; 102 | justify-content: center; 103 | color: #ffffff; 104 | width: 100%; 105 | padding: 20rpx 0; 106 | } -------------------------------------------------------------------------------- /小程序/pages/detail/order/order.js: -------------------------------------------------------------------------------- 1 | // pages/detail/order/order.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | array: ['1人', '2人', '3人', '4人', '5人', '6人', '7人', '8人'] 9 | }, 10 | 11 | bindPickerChange: function (e) { 12 | console.log('picker发送选择改变,携带值为', e.detail.value) 13 | this.setData({ 14 | index: e.detail.value 15 | }) 16 | }, 17 | bindDateChange: function (e) { 18 | console.log('picker发送选择改变,携带值为', e.detail.value) 19 | this.setData({ 20 | date: e.detail.value 21 | }) 22 | }, 23 | bindDateChange2: function (e) { 24 | console.log('picker发送选择改变,携带值为', e.detail.value) 25 | this.setData({ 26 | date2: e.detail.value 27 | }) 28 | }, 29 | showReserve:function(){ 30 | wx.navigateTo({ 31 | url: '../reserve/reserve', 32 | }) 33 | }, 34 | showDetails: function (e) { 35 | wx.navigateTo({ 36 | url: '../detail' 37 | }) 38 | }, 39 | 40 | /** 41 | * 生命周期函数--监听页面加载 42 | */ 43 | onLoad: function (options) { 44 | 45 | }, 46 | 47 | /** 48 | * 生命周期函数--监听页面初次渲染完成 49 | */ 50 | onReady: function () { 51 | 52 | }, 53 | 54 | /** 55 | * 生命周期函数--监听页面显示 56 | */ 57 | onShow: function () { 58 | 59 | }, 60 | 61 | /** 62 | * 生命周期函数--监听页面隐藏 63 | */ 64 | onHide: function () { 65 | 66 | }, 67 | 68 | /** 69 | * 生命周期函数--监听页面卸载 70 | */ 71 | onUnload: function () { 72 | 73 | }, 74 | 75 | /** 76 | * 页面相关事件处理函数--监听用户下拉动作 77 | */ 78 | onPullDownRefresh: function () { 79 | 80 | }, 81 | 82 | /** 83 | * 页面上拉触底事件的处理函数 84 | */ 85 | onReachBottom: function () { 86 | 87 | }, 88 | 89 | /** 90 | * 用户点击右上角分享 91 | */ 92 | onShareAppMessage: function () { 93 | 94 | } 95 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/order/order.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "确认订单" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/order/order.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 花果园半山小镇 8 | 9 | ¥ 329 10 | 天/晚 11 | 12 | 13 | 14 | 15 | 16 | 共2晚 17 | 18 | 19 | 20 | 21 | 22 | 23 | 订单状态 24 | 待付款 25 | 26 | 27 | 28 | 29 | 入住时间 30 | {{date}} > 31 | 32 | 33 | 34 | 35 | 36 | 离店时间 37 | {{date2}} > 38 | 39 | 40 | 41 | 42 | 43 | 入住人数 44 | {{array[index]}} > 45 | 46 | 47 | 48 | 49 | 联系人姓名 50 | 51 | 52 | 53 | 54 | 联系人电话 55 | 56 | 57 | 58 | 59 | 需付房费 60 | 658 元 61 | 62 | 63 | 64 | 需付房费 65 | 500 元 66 | 67 | 68 | 69 | 70 | 71 | 72 | 共计: 73 | ¥ 1158 74 | 75 | 76 | 确认提交 77 | 78 | -------------------------------------------------------------------------------- /小程序/pages/detail/order/order.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/order/order.wxss */ 2 | .order-head{ 3 | margin: 20rpx; 4 | padding:10rpx 20rpx 20rpx 20rpx; 5 | border-bottom: 5rpx solid #f0f0f0; 6 | display: flex; 7 | justify-content: space-between; 8 | } 9 | 10 | .order-head-left{ 11 | display: flex; 12 | } 13 | 14 | .order-head-left view{ 15 | margin-left: 20rpx; 16 | } 17 | 18 | .order-head-left image{ 19 | height: 160rpx; 20 | width: 160rpx; 21 | border-radius: 10rpx; 22 | } 23 | 24 | .order-head-left-text { 25 | margin-top: 60rpx; 26 | } 27 | 28 | .order-head-left-text text{ 29 | margin:10rpx; 30 | font-size: 36rpx; 31 | } 32 | 33 | .order-head-left-text1{ 34 | color: #FF9800; 35 | } 36 | 37 | .order-head-right{ 38 | display: flex; 39 | flex-direction: column; 40 | } 41 | 42 | .order-head-right image{ 43 | height: 60rpx; 44 | width: 60rpx; 45 | } 46 | 47 | .order-head-right text{ 48 | margin-top: 60rpx; 49 | color: #41ADBD; 50 | font-size: 32rpx; 51 | } 52 | 53 | /* 订单列表 */ 54 | .order-con{ 55 | margin: 20rpx; 56 | } 57 | 58 | .order-li{ 59 | padding: 20rpx 10rpx; 60 | border-bottom: 5rpx solid #f0f0f0; 61 | display: flex; 62 | justify-content: space-between; 63 | } 64 | 65 | /* 底部按钮 */ 66 | .order-foot{ 67 | display: flex; 68 | position: fixed; 69 | bottom: 0; 70 | left: 0; 71 | right: 0; 72 | } 73 | 74 | .order-foot view{ 75 | width: 50%; 76 | display: flex; 77 | justify-content: center; 78 | padding: 20rpx 0; 79 | } 80 | 81 | .order-foot-left-text1{ 82 | font-size: 32rpx; 83 | margin-top: 8rpx; 84 | } 85 | 86 | .order-foot-left-text2{ 87 | color: #FF9800; 88 | font-size: 44rpx; 89 | margin: 0 10rpx; 90 | } 91 | 92 | .order-foot-right{ 93 | background-color: #54BF6C; 94 | } 95 | 96 | .order-foot-right text{ 97 | color: #ffffff; 98 | } -------------------------------------------------------------------------------- /小程序/pages/detail/orderCompletion/orderCompletion.js: -------------------------------------------------------------------------------- 1 | // pages/detail/orderCompletion/orderCompletion.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | switch1Change: function (e) { 12 | 13 | wx.navigateTo({ 14 | url: '../invoice/invoice', 15 | success: function(res) {}, 16 | fail: function(res) {}, 17 | complete: function(res) {}, 18 | }) 19 | 20 | console.log('switch1 发生 change 事件,携带值为', e.detail.value) 21 | }, 22 | 23 | showDetails: function (e) { 24 | wx.navigateTo({ 25 | url: '../detail' 26 | }) 27 | }, 28 | 29 | /** 30 | * 生命周期函数--监听页面加载 31 | */ 32 | onLoad: function (options) { 33 | 34 | }, 35 | 36 | /** 37 | * 生命周期函数--监听页面初次渲染完成 38 | */ 39 | onReady: function () { 40 | 41 | }, 42 | 43 | /** 44 | * 生命周期函数--监听页面显示 45 | */ 46 | onShow: function () { 47 | 48 | }, 49 | 50 | /** 51 | * 生命周期函数--监听页面隐藏 52 | */ 53 | onHide: function () { 54 | 55 | }, 56 | 57 | /** 58 | * 生命周期函数--监听页面卸载 59 | */ 60 | onUnload: function () { 61 | 62 | }, 63 | 64 | /** 65 | * 页面相关事件处理函数--监听用户下拉动作 66 | */ 67 | onPullDownRefresh: function () { 68 | 69 | }, 70 | 71 | /** 72 | * 页面上拉触底事件的处理函数 73 | */ 74 | onReachBottom: function () { 75 | 76 | }, 77 | 78 | /** 79 | * 用户点击右上角分享 80 | */ 81 | onShareAppMessage: function () { 82 | 83 | } 84 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/orderCompletion/orderCompletion.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "订单完成" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/orderCompletion/orderCompletion.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 花果园半山小镇 7 | 8 | ¥ 329 9 | 天/晚 10 | 11 | 12 | 13 | 14 | 15 | 共2晚 16 | 17 | 18 | 19 | 20 | 21 | 22 | 订单状态 23 | 已完成 24 | 25 | 26 | 入住时间 27 | 6月1日 28 | 29 | 30 | 离店时间 31 | 6月3日 32 | 33 | 34 | 入住人数 35 | 3人 36 | 37 | 38 | 联系人姓名 39 | 李先生 40 | 41 | 42 | 联系人姓名 43 | 138 8888 8888 44 | 45 | 46 | 订单总价(含押金) 47 | 1158 元 48 | 49 | 50 | 订单编号 51 | 16584368456115584 52 | 53 | 54 | 我要开票 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /小程序/pages/detail/orderCompletion/orderCompletion.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/orderCompletion/orderCompletion.wxss */ 2 | .order-head{ 3 | margin: 20rpx; 4 | padding:10rpx 20rpx 20rpx 20rpx; 5 | border-bottom: 5rpx solid #f0f0f0; 6 | display: flex; 7 | justify-content: space-between; 8 | } 9 | 10 | .order-head-left{ 11 | display: flex; 12 | } 13 | 14 | .order-head-left view{ 15 | margin-left: 20rpx; 16 | } 17 | 18 | .order-head-left image{ 19 | height: 160rpx; 20 | width: 160rpx; 21 | border-radius: 10rpx; 22 | } 23 | 24 | .order-head-left-text { 25 | margin-top: 60rpx; 26 | } 27 | 28 | .order-head-left-text text{ 29 | margin:10rpx; 30 | font-size: 36rpx; 31 | } 32 | 33 | .order-head-left-text1{ 34 | color: #FF9800; 35 | } 36 | 37 | .order-head-right{ 38 | display: flex; 39 | flex-direction: column; 40 | } 41 | 42 | .order-head-right image{ 43 | height: 60rpx; 44 | width: 60rpx; 45 | } 46 | 47 | .order-head-right text{ 48 | margin-top: 60rpx; 49 | color: #41ADBD; 50 | font-size: 32rpx; 51 | } 52 | 53 | /* 订单列表 */ 54 | .order-con{ 55 | margin: 20rpx; 56 | } 57 | 58 | .order-li{ 59 | padding: 20rpx 10rpx; 60 | border-bottom: 5rpx solid #f0f0f0; 61 | display: flex; 62 | justify-content: space-between; 63 | } -------------------------------------------------------------------------------- /小程序/pages/detail/pay/pay.js: -------------------------------------------------------------------------------- 1 | // pages/detail/pay/pay.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | showReserve: function () { 12 | wx.navigateTo({ 13 | url: '../reserve/reserve', 14 | }) 15 | }, 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function (options) { 20 | 21 | }, 22 | 23 | /** 24 | * 生命周期函数--监听页面初次渲染完成 25 | */ 26 | onReady: function () { 27 | 28 | }, 29 | 30 | /** 31 | * 生命周期函数--监听页面显示 32 | */ 33 | onShow: function () { 34 | 35 | }, 36 | 37 | /** 38 | * 生命周期函数--监听页面隐藏 39 | */ 40 | onHide: function () { 41 | 42 | }, 43 | 44 | /** 45 | * 生命周期函数--监听页面卸载 46 | */ 47 | onUnload: function () { 48 | 49 | }, 50 | 51 | /** 52 | * 页面相关事件处理函数--监听用户下拉动作 53 | */ 54 | onPullDownRefresh: function () { 55 | 56 | }, 57 | 58 | /** 59 | * 页面上拉触底事件的处理函数 60 | */ 61 | onReachBottom: function () { 62 | 63 | }, 64 | 65 | /** 66 | * 用户点击右上角分享 67 | */ 68 | onShareAppMessage: function () { 69 | 70 | } 71 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/pay/pay.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "立即支付" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/pay/pay.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 花果园半山小镇 8 | 9 | ¥ 329 10 | 天/晚 11 | 12 | 13 | 14 | 15 | 16 | 共2晚 17 | 18 | 19 | 20 | 21 | 22 | 23 | 订单状态 24 | 待付款 25 | 26 | 27 | 28 | 入住时间 29 | 6月1日 30 | 31 | 32 | 33 | 离店时间 34 | 6月3日 35 | 36 | 37 | 38 | 入住人数 39 | 3人 40 | 41 | 42 | 43 | 联系人姓名 44 | 李先生 45 | 46 | 47 | 48 | 联系人电话 49 | 138 8888 8888 50 | 51 | 52 | 53 | 需付房费 54 | 658 元 55 | 56 | 57 | 58 | 需付房费 59 | 500 元 60 | 61 | 62 | 63 | 64 | 65 | 66 | 共计: 67 | ¥ 1158 68 | 69 | 70 | 立即支付 71 | 72 | -------------------------------------------------------------------------------- /小程序/pages/detail/pay/pay.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/pay/pay.wxss */ 2 | .order-head{ 3 | margin: 20rpx; 4 | padding:10rpx 20rpx 20rpx 20rpx; 5 | border-bottom: 5rpx solid #f0f0f0; 6 | display: flex; 7 | justify-content: space-between; 8 | } 9 | 10 | .order-head-left{ 11 | display: flex; 12 | } 13 | 14 | .order-head-left view{ 15 | margin-left: 20rpx; 16 | } 17 | 18 | .order-head-left image{ 19 | height: 160rpx; 20 | width: 160rpx; 21 | border-radius: 10rpx; 22 | } 23 | 24 | .order-head-left-text { 25 | margin-top: 60rpx; 26 | } 27 | 28 | .order-head-left-text text{ 29 | margin:10rpx; 30 | font-size: 36rpx; 31 | } 32 | 33 | .order-head-left-text1{ 34 | color: #FF9800; 35 | } 36 | 37 | .order-head-right{ 38 | display: flex; 39 | flex-direction: column; 40 | } 41 | 42 | .order-head-right image{ 43 | height: 60rpx; 44 | width: 60rpx; 45 | } 46 | 47 | .order-head-right text{ 48 | margin-top: 60rpx; 49 | color: #41ADBD; 50 | font-size: 32rpx; 51 | } 52 | 53 | /* 订单列表 */ 54 | .order-con{ 55 | margin: 20rpx; 56 | } 57 | 58 | .order-li{ 59 | padding: 20rpx 10rpx; 60 | border-bottom: 5rpx solid #f0f0f0; 61 | display: flex; 62 | justify-content: space-between; 63 | } 64 | 65 | /* 底部按钮 */ 66 | .order-foot{ 67 | display: flex; 68 | position: fixed; 69 | bottom: 0; 70 | left: 0; 71 | right: 0; 72 | } 73 | 74 | .order-foot view{ 75 | width: 50%; 76 | display: flex; 77 | justify-content: center; 78 | padding: 20rpx 0; 79 | } 80 | 81 | .order-foot-left-text1{ 82 | font-size: 32rpx; 83 | margin-top: 8rpx; 84 | } 85 | 86 | .order-foot-left-text2{ 87 | color: #FF9800; 88 | font-size: 44rpx; 89 | margin: 0 10rpx; 90 | } 91 | 92 | .order-foot-right{ 93 | background-color: #54BF6C; 94 | } 95 | 96 | .order-foot-right text{ 97 | color: #ffffff; 98 | } -------------------------------------------------------------------------------- /小程序/pages/detail/reserve/reserve.js: -------------------------------------------------------------------------------- 1 | // pages/reserve/reserve.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | backIndex: function () { 11 | wx.switchTab({ 12 | url: '../../../pages/index/index' 13 | }) 14 | }, 15 | showViewOrder: function () { 16 | wx.navigateTo({ 17 | url: '../../detail/viewOrder/viewOrder', 18 | }) 19 | }, 20 | 21 | /** 22 | * 生命周期函数--监听页面加载 23 | */ 24 | onLoad: function (options) { 25 | 26 | }, 27 | 28 | /** 29 | * 生命周期函数--监听页面初次渲染完成 30 | */ 31 | onReady: function () { 32 | 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面显示 37 | */ 38 | onShow: function () { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面隐藏 44 | */ 45 | onHide: function () { 46 | 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面卸载 51 | */ 52 | onUnload: function () { 53 | 54 | }, 55 | 56 | /** 57 | * 页面相关事件处理函数--监听用户下拉动作 58 | */ 59 | onPullDownRefresh: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 页面上拉触底事件的处理函数 65 | */ 66 | onReachBottom: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 用户点击右上角分享 72 | */ 73 | onShareAppMessage: function () { 74 | 75 | } 76 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/reserve/reserve.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "预定成功" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/reserve/reserve.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 您已成功预定 花果园半山小镇 8 | 9 | 2018年6月1日-2018年6月3日(共两晚) 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /小程序/pages/detail/reserve/reserve.wxss: -------------------------------------------------------------------------------- 1 | /* pages/reserve/reserve.wxss */ 2 | .whole-page{ 3 | margin-top: 160rpx; 4 | } 5 | 6 | .picture{ 7 | width: 100%; 8 | height: 144rpx; 9 | text-align:center; 10 | } 11 | 12 | .complete{ 13 | width: 144rpx; 14 | height: 144rpx; 15 | } 16 | 17 | .writte-words{ 18 | font-size: 32rpx; 19 | text-align:center; 20 | margin-top: 50rpx; 21 | } 22 | 23 | .button-1{ 24 | display: flex; 25 | justify-content:space-around; 26 | margin-top: 50rpx; 27 | } 28 | 29 | .next-step-1{ 30 | font-size:28rpx; 31 | border: 1rpx solid #54BF6C; 32 | width: 234rpx; 33 | color: #54BF6C; 34 | background: #fff; 35 | } 36 | 37 | .date{ 38 | font-size: 28rpx; 39 | color: #707070; 40 | } 41 | 42 | .date1{ 43 | margin-top: 50rpx; 44 | } -------------------------------------------------------------------------------- /小程序/pages/detail/viewOrder/viewOrder.js: -------------------------------------------------------------------------------- 1 | // pages/detail/viewOrder/viewOrder.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | markers: [{ 9 | id: 0, 10 | latitude: 23.099994, 11 | longitude: 113.324520, 12 | width: 50, 13 | height: 50 14 | }], 15 | 16 | }, 17 | showDetails: function (e) { 18 | wx.navigateTo({ 19 | url: '../detail' 20 | }) 21 | }, 22 | 23 | regionchange(e) { 24 | console.log(e.type) 25 | }, 26 | markertap(e) { 27 | console.log(e.markerId) 28 | }, 29 | controltap(e) { 30 | console.log(e.controlId) 31 | }, 32 | 33 | /** 34 | * 生命周期函数--监听页面加载 35 | */ 36 | onLoad: function (options) { 37 | 38 | }, 39 | 40 | /** 41 | * 生命周期函数--监听页面初次渲染完成 42 | */ 43 | onReady: function () { 44 | 45 | }, 46 | 47 | /** 48 | * 生命周期函数--监听页面显示 49 | */ 50 | onShow: function () { 51 | 52 | }, 53 | 54 | /** 55 | * 生命周期函数--监听页面隐藏 56 | */ 57 | onHide: function () { 58 | 59 | }, 60 | 61 | /** 62 | * 生命周期函数--监听页面卸载 63 | */ 64 | onUnload: function () { 65 | 66 | }, 67 | 68 | /** 69 | * 页面相关事件处理函数--监听用户下拉动作 70 | */ 71 | onPullDownRefresh: function () { 72 | 73 | }, 74 | 75 | /** 76 | * 页面上拉触底事件的处理函数 77 | */ 78 | onReachBottom: function () { 79 | 80 | }, 81 | 82 | /** 83 | * 用户点击右上角分享 84 | */ 85 | onShareAppMessage: function () { 86 | 87 | } 88 | }) -------------------------------------------------------------------------------- /小程序/pages/detail/viewOrder/viewOrder.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "查看订单" 3 | } -------------------------------------------------------------------------------- /小程序/pages/detail/viewOrder/viewOrder.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 花果园半山小镇 7 | 8 | ¥ 329 9 | 天/晚 10 | 11 | 12 | 13 | 14 | 15 | 共2晚 16 | 17 | 18 | 19 | 20 | 21 | 22 | 订单状态 23 | 待入住 24 | 25 | 26 | 入住时间 27 | 6月1日 28 | 29 | 30 | 离店时间 31 | 6月3日 32 | 33 | 34 | 入住人数 35 | 3人 36 | 37 | 38 | 联系人姓名 39 | 李先生 40 | 41 | 42 | 联系人姓名 43 | 138 8888 8888 44 | 45 | 46 | 订单总价(含押金) 47 | 1158 元 48 | 49 | 50 | 订单编号 51 | 16584368456115584 52 | 53 | 54 | 地址 55 | 花果园X区1栋1单元... 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /小程序/pages/detail/viewOrder/viewOrder.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/viewOrder/viewOrder.wxss */ 2 | .order-head{ 3 | margin: 20rpx; 4 | padding:10rpx 20rpx 20rpx 20rpx; 5 | border-bottom: 5rpx solid #f0f0f0; 6 | display: flex; 7 | justify-content: space-between; 8 | } 9 | 10 | .order-head-left{ 11 | display: flex; 12 | } 13 | 14 | .order-head-left view{ 15 | margin-left: 20rpx; 16 | } 17 | 18 | .order-head-left image{ 19 | height: 160rpx; 20 | width: 160rpx; 21 | border-radius: 10rpx; 22 | } 23 | 24 | .order-head-left-text { 25 | margin-top: 60rpx; 26 | } 27 | 28 | .order-head-left-text text{ 29 | margin:10rpx; 30 | font-size: 36rpx; 31 | } 32 | 33 | .order-head-left-text1{ 34 | color: #FF9800; 35 | } 36 | 37 | .order-head-right{ 38 | display: flex; 39 | flex-direction: column; 40 | } 41 | 42 | .order-head-right image{ 43 | height: 60rpx; 44 | width: 60rpx; 45 | } 46 | 47 | .order-head-right text{ 48 | margin-top: 60rpx; 49 | color: #41ADBD; 50 | font-size: 32rpx; 51 | } 52 | 53 | /* 订单列表 */ 54 | .order-con{ 55 | margin: 20rpx; 56 | } 57 | 58 | .order-li{ 59 | padding: 20rpx 10rpx; 60 | border-bottom: 5rpx solid #f0f0f0; 61 | display: flex; 62 | justify-content: space-between; 63 | } 64 | -------------------------------------------------------------------------------- /小程序/pages/index/collection/collection.js: -------------------------------------------------------------------------------- 1 | // pages/index/collection/collection.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /小程序/pages/index/collection/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "我的收藏" 3 | } -------------------------------------------------------------------------------- /小程序/pages/index/collection/collection.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 花果园半山小镇 12 | 13 | 14 | 15 | 16 | 17 | 距我2.5公里 18 | 19 | 20 | ¥ 329 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 花果园半山小镇 34 | 35 | 36 | 37 | 38 | 39 | 距我2.5公里 40 | 41 | 42 | ¥ 329 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 花果园半山小镇 56 | 57 | 58 | 59 | 60 | 61 | 距我2.5公里 62 | 63 | 64 | ¥ 329 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /小程序/pages/index/collection/collection.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/collection/collection.wxss */ 2 | .collection-con{ 3 | background-color: #f0f0f0; 4 | padding: 10rpx 15rpx; 5 | margin-top: 20rpx; 6 | } 7 | 8 | .recommend-img image{ 9 | width: 100%; 10 | border-radius: 5px; 11 | height: 340rpx; 12 | } 13 | 14 | .recommend-city-li{ 15 | margin-top: 20rpx; 16 | } 17 | 18 | .recommend-city-li-foot{ 19 | background-color: #fff; 20 | border-radius: 5px; 21 | padding: 30rpx 20rpx 20rpx 20rpx; 22 | margin-top: -20rpx; 23 | box-shadow: 1px 2px 0px 0px rgba(223, 223, 223, 1); 24 | border: 1px solid rgba(255, 255, 255, 1); 25 | } 26 | 27 | .recommend-city-li-foot1{ 28 | display: flex; 29 | justify-content: space-between; 30 | } 31 | 32 | .recommend-city-li-foot1 image{ 33 | height: 44rpx; 34 | width: 44rpx; 35 | } 36 | 37 | .recommend-city-li-foot2{ 38 | display: flex; 39 | justify-content: space-between; 40 | margin-top: 20rpx; 41 | } 42 | 43 | .recommend-city-li-foot2 image{ 44 | width: 60rpx; 45 | height: 60rpx; 46 | margin-right: 30rpx; 47 | } 48 | 49 | .recommend-left{ 50 | display: flex; 51 | } 52 | 53 | .recommend-left text{ 54 | font-size: 28rpx; 55 | margin-top: 10rpx; 56 | } 57 | 58 | .recommend-right text{ 59 | color: #FF9800; 60 | font-size: 44rpx; 61 | } -------------------------------------------------------------------------------- /小程序/pages/index/house/house.js: -------------------------------------------------------------------------------- 1 | // pages/index/house/house.js 2 | 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | array: ['距离最近', '价格升序', '价格降序'], 10 | array2: ['电竞房', '桌游房', 'KTV房'], 11 | region: ['广东省', '广州市', '海珠区'], 12 | currentCity: '' 13 | }, 14 | bindPickerChange: function (e) { 15 | console.log('picker发送选择改变,携带值为', e.detail.value) 16 | this.setData({ 17 | index: e.detail.value 18 | }) 19 | }, 20 | bindPickerChange2: function (e) { 21 | console.log('picker发送选择改变,携带值为', e.detail.value) 22 | this.setData({ 23 | index: e.detail.value 24 | }) 25 | }, 26 | bindRegionChange: function (e) { 27 | console.log('picker发送选择改变,携带值为', e.detail.value) 28 | this.setData({ 29 | region: e.detail.value 30 | }) 31 | }, 32 | showSearch: function () { 33 | wx.navigateTo({ 34 | url: '../search/search', 35 | }) 36 | }, 37 | 38 | /** 39 | * 生命周期函数--监听页面加载 40 | */ 41 | 42 | //预加载内容 43 | 44 | onLoad: function (options) { 45 | this.getLocation(); 46 | }, 47 | 48 | getLocation: function () { //获取坐标所在城市 49 | var page = this 50 | wx.getLocation({ 51 | type: 'wgs84', //默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 52 | success: function (res) { 53 | // success 54 | var longitude = res.longitude 55 | var latitude = res.latitude 56 | page.loadCity(longitude, latitude) 57 | } 58 | }) 59 | }, 60 | loadCity: function (longitude, latitude) { 61 | var page = this 62 | wx.request({ 63 | url: 'https://api.map.baidu.com/geocoder/v2/?ak=3O5npSesdKTG2auEsfQeXujGYZfNkgj1&location=' + latitude + ',' + longitude + '&output=json', 64 | data: {}, 65 | header: { 66 | 'Content-Type': 'application/json' 67 | }, 68 | success: function (res) { 69 | // success 70 | console.log(res); 71 | var city = res.data.result.addressComponent.city; 72 | page.setData({ currentCity: city }); 73 | }, 74 | fail: function () { 75 | page.setData({ currentCity: "获取定位失败" }); 76 | }, 77 | 78 | }) 79 | }, 80 | /** 81 | * 生命周期函数--监听页面初次渲染完成 82 | */ 83 | onReady: function () { 84 | 85 | }, 86 | 87 | /** 88 | * 生命周期函数--监听页面显示 89 | */ 90 | onShow: function () { 91 | 92 | }, 93 | 94 | /** 95 | * 生命周期函数--监听页面隐藏 96 | */ 97 | onHide: function () { 98 | 99 | }, 100 | 101 | /** 102 | * 生命周期函数--监听页面卸载 103 | */ 104 | onUnload: function () { 105 | 106 | }, 107 | 108 | /** 109 | * 页面相关事件处理函数--监听用户下拉动作 110 | */ 111 | onPullDownRefresh: function () { 112 | 113 | }, 114 | 115 | /** 116 | * 页面上拉触底事件的处理函数 117 | */ 118 | onReachBottom: function () { 119 | 120 | }, 121 | 122 | /** 123 | * 用户点击右上角分享 124 | */ 125 | onShareAppMessage: function () { 126 | 127 | } 128 | }) -------------------------------------------------------------------------------- /小程序/pages/index/house/house.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "房源列表" 3 | } -------------------------------------------------------------------------------- /小程序/pages/index/house/house.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{item}} 7 | 8 | 9 | 切换城市 10 | 11 | 12 | 13 | 14 | 15 | 16 | 排序 17 | 18 | 19 | 分类 20 | 21 | 22 | 区域筛选 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 花果园半山小镇 36 | 37 | 38 | 39 | 40 | 41 | 距我2.5公里 42 | 43 | 44 | ¥ 329 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 花果园半山小镇 58 | 59 | 60 | 61 | 62 | 63 | 距我2.5公里 64 | 65 | 66 | ¥ 329 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 花果园半山小镇 80 | 81 | 82 | 83 | 84 | 85 | 距我2.5公里 86 | 87 | 88 | ¥ 329 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /小程序/pages/index/house/house.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/house/house.wxss */ 2 | .house-city{ 3 | display: flex; 4 | justify-content: space-between; 5 | margin: 10rpx 30rpx; 6 | padding-bottom: 10rpx; 7 | align-items: baseline; 8 | } 9 | 10 | .house-city .city-left{ 11 | display: flex; 12 | } 13 | 14 | .city-left text{ 15 | color: #EF811D; 16 | font-size: 28rpx; 17 | margin-top: 18rpx; 18 | } 19 | 20 | .house-city image{ 21 | height: 55rpx; 22 | width: 60rpx; 23 | margin-right: 12rpx; 24 | } 25 | 26 | .city-right text{ 27 | font-size: 28rpx; 28 | color: #868686; 29 | } 30 | 31 | /* 排序等 */ 32 | .house-head{ 33 | display: flex; 34 | justify-content: center; 35 | border-top: 1px solid #C3C3C3; 36 | padding-top: 15rpx; 37 | } 38 | 39 | .house-head view{ 40 | display: flex; 41 | justify-content: center; 42 | } 43 | 44 | .house-head text{ 45 | display: flex; 46 | justify-content: center; 47 | margin: 0 80rpx; 48 | font-size: 30rpx; 49 | } 50 | 51 | .head-1,.head-2{ 52 | border-right: 1px solid #C3C3C3; 53 | } 54 | 55 | /* 房源列表 */ 56 | .house-con{ 57 | background-color: #f0f0f0; 58 | padding: 10rpx 15rpx; 59 | margin-top: 20rpx; 60 | } 61 | 62 | .recommend-img image{ 63 | width: 100%; 64 | border-radius: 5px; 65 | height: 340rpx; 66 | } 67 | 68 | .recommend-city-li{ 69 | margin-top: 20rpx; 70 | } 71 | 72 | .recommend-city-li-foot{ 73 | background-color: #fff; 74 | border-radius: 5px; 75 | padding: 30rpx 20rpx 20rpx 20rpx; 76 | margin-top: -20rpx; 77 | box-shadow: 1px 2px 0px 0px rgba(223, 223, 223, 1); 78 | border: 1px solid rgba(255, 255, 255, 1); 79 | } 80 | 81 | .recommend-city-li-foot1{ 82 | display: flex; 83 | justify-content: space-between; 84 | } 85 | 86 | .recommend-city-li-foot1 image{ 87 | height: 44rpx; 88 | width: 44rpx; 89 | } 90 | 91 | .recommend-city-li-foot2{ 92 | display: flex; 93 | justify-content: space-between; 94 | margin-top: 20rpx; 95 | } 96 | 97 | .recommend-city-li-foot2 image{ 98 | width: 60rpx; 99 | height: 60rpx; 100 | margin-right: 30rpx; 101 | } 102 | 103 | .recommend-left{ 104 | display: flex; 105 | } 106 | 107 | .recommend-left text{ 108 | font-size: 28rpx; 109 | margin-top: 10rpx; 110 | } 111 | 112 | .recommend-right text{ 113 | color: #FF9800; 114 | font-size: 44rpx; 115 | } 116 | 117 | -------------------------------------------------------------------------------- /小程序/pages/index/index.js: -------------------------------------------------------------------------------- 1 | //index.js 2 | //获取应用实例 3 | const app = getApp() 4 | 5 | Page({ 6 | data: { 7 | imgUrls: [ 8 | '/images/banner1.jpg', 9 | '/images/banner2.png', 10 | ], 11 | indicatorDots: true, 12 | autoplay: true, 13 | interval: 2000, 14 | duration: 1200, 15 | scrollTop: 100, 16 | houseList:[ 17 | { 18 | topImg:'/images/banner2.png', 19 | name: '花果园半山小镇', 20 | collectImg:'/images/shoucang-2.png', 21 | collectImg2: '/images/shoucang-1.png', 22 | classifyImg:'/images/dianao.png', 23 | distance:'距我2.5公里', 24 | price:'¥ 329' 25 | }, 26 | { 27 | topImg: '/images/banner2.png', 28 | name: '花果园半山小镇', 29 | collectImg: '/images/shoucang-2.png', 30 | collectImg2: '/images/shoucang-1.png', 31 | classifyImg: '/images/zhuoyou.png', 32 | distance: '距我2.5公里', 33 | price: '¥ 329' 34 | }, 35 | { 36 | topImg: '/images/banner2.png', 37 | name: '花果园半山小镇', 38 | collectImg: '/images/shoucang-2.png', 39 | collectImg2: '/images/shoucang-1.png', 40 | classifyImg: '/images/KTV.png', 41 | distance: '距我2.5公里', 42 | price: '¥ 329' 43 | } 44 | ], 45 | colleceted:false 46 | }, 47 | onLoad: function () { 48 | if (app.globalData.userInfo) { 49 | this.setData({ 50 | userInfo: app.globalData.userInfo, 51 | hasUserInfo: true 52 | }) 53 | } else if (this.data.canIUse){ 54 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 55 | // 所以此处加入 callback 以防止这种情况 56 | app.userInfoReadyCallback = res => { 57 | this.setData({ 58 | userInfo: res.userInfo, 59 | hasUserInfo: true 60 | }) 61 | } 62 | } else { 63 | // 在没有 open-type=getUserInfo 版本的兼容处理 64 | wx.getUserInfo({ 65 | success: res => { 66 | app.globalData.userInfo = res.userInfo 67 | this.setData({ 68 | userInfo: res.userInfo, 69 | hasUserInfo: true 70 | }) 71 | } 72 | }) 73 | } 74 | 75 | }, 76 | // 收藏切换 77 | onCollectionTap:function(){ 78 | var that = this; 79 | var type = that.data.type === 'true' ? 'false' : 'true'; 80 | that.setData({ 81 | colleceted: type 82 | }); 83 | }, 84 | 85 | getUserInfo: function(e) { 86 | console.log(e) 87 | app.globalData.userInfo = e.detail.userInfo 88 | this.setData({ 89 | userInfo: e.detail.userInfo, 90 | hasUserInfo: true 91 | }) 92 | }, 93 | upper: function (e) { 94 | console.log(e) 95 | }, 96 | lower: function (e) { 97 | console.log(e) 98 | }, 99 | scroll: function (e) { 100 | console.log(e) 101 | }, 102 | tap: function (e) { 103 | for (var i = 0; i < order.length; ++i) { 104 | if (order[i] === this.data.toView) { 105 | this.setData({ 106 | toView: order[i + 1] 107 | }) 108 | break 109 | } 110 | } 111 | }, 112 | tapMove: function (e) { 113 | this.setData({ 114 | scrollTop: this.data.scrollTop + 10 115 | }) 116 | }, 117 | showHouse:function(){ 118 | wx.navigateTo({ 119 | url: '../index/house/house', 120 | }) 121 | }, 122 | showSearch: function () { 123 | wx.navigateTo({ 124 | url: '../index/search/search', 125 | }) 126 | }, 127 | showQuick: function () { 128 | wx.navigateTo({ 129 | url: '../index/quick/quick', 130 | }) 131 | }, 132 | showCollection: function () { 133 | wx.navigateTo({ 134 | url: '../index/collection/collection', 135 | }) 136 | }, 137 | showDetail: function () { 138 | wx.navigateTo({ 139 | url: '../detail/detail', 140 | }) 141 | }, 142 | showRecruit: function () { 143 | wx.navigateTo({ 144 | url: '../recruit/recruit', 145 | }) 146 | }, 147 | }) 148 | -------------------------------------------------------------------------------- /小程序/pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 请搜索您的目的地 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 附近房源 24 | 25 | 26 | 27 | 快捷找房 28 | 29 | 30 | 31 | 房东招募 32 | 33 | 34 | 35 | 我的收藏 36 | 37 | 38 | 39 | 40 | 41 | 42 | 推荐城市 43 | 大家都爱去这些地方~~~ 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 推荐房源 67 | 最优质的房源都在这里~~ 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | {{item.name}} 79 | 80 | 81 | 82 | 83 | 84 | 85 | {{item.distance}} 86 | 87 | 88 | {{item.price}} 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /小程序/pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | /**index.wxss**/ 2 | .search{ 3 | background-color: #f0f0f0; 4 | display: flex; 5 | justify-content: center; 6 | padding: 15rpx 0; 7 | } 8 | 9 | .search view{ 10 | background-color: #fff; 11 | border-radius: 5px; 12 | width: 80%; 13 | padding: 6rpx 30rpx; 14 | } 15 | 16 | .search .search-text-1{ 17 | font-size: 32rpx; 18 | margin-left: 8rpx; 19 | color: #707070; 20 | } 21 | 22 | /* banner */ 23 | .banner image{ 24 | width: 100%; 25 | } 26 | 27 | .classify { 28 | display: flex; 29 | justify-content: space-between; 30 | margin: 20rpx 30rpx; 31 | } 32 | 33 | .classify view{ 34 | display: flex; 35 | flex-direction: column; 36 | } 37 | 38 | .classify view image{ 39 | width: 70rpx; 40 | height: 70rpx; 41 | margin-left: 20rpx; 42 | } 43 | 44 | .classify view text{ 45 | font-size: 32rpx; 46 | } 47 | 48 | /* 推荐城市 */ 49 | .recommend-city{ 50 | margin: 20rpx; 51 | } 52 | 53 | .recommend-tit{ 54 | display: flex; 55 | flex-direction: column; 56 | } 57 | 58 | .recommend-tit text{ 59 | display: flex; 60 | justify-content: center; 61 | } 62 | 63 | .recommend-tit .recommend-text1{ 64 | color: #41ADBD; 65 | font-size: 40rpx; 66 | } 67 | 68 | .recommend-tit .recommend-text2{ 69 | color: #898888; 70 | font-size: 28rpx; 71 | } 72 | 73 | .recommend-con{ 74 | margin: 20rpx 0; 75 | } 76 | 77 | .scroll-view_H{ 78 | width: 100%; 79 | white-space: nowrap; 80 | } 81 | 82 | .scroll-view-item_H{ 83 | width: 350rpx; 84 | height: 100px; 85 | display: inline-block; 86 | } 87 | 88 | .scroll-view-item_H image{ 89 | width: 95%; 90 | height: 240rpx; 91 | border-radius: 5rpx; 92 | } 93 | 94 | /* 推荐房源 */ 95 | .recommend-city-con{ 96 | background-color: #f0f0f0; 97 | padding: 10rpx 15rpx; 98 | margin-top: 20rpx; 99 | } 100 | 101 | .recommend-img image{ 102 | width: 100%; 103 | border-radius: 5px; 104 | height: 340rpx; 105 | } 106 | 107 | .recommend-city-li{ 108 | margin-top: 20rpx; 109 | } 110 | 111 | .recommend-city-li-foot{ 112 | background-color: #fff; 113 | border-radius: 5px; 114 | padding: 30rpx 20rpx 20rpx 20rpx; 115 | margin-top: -20rpx; 116 | box-shadow: 1px 2px 0px 0px rgba(223, 223, 223, 1); 117 | border: 1px solid rgba(255, 255, 255, 1); 118 | } 119 | 120 | .recommend-city-li-foot1{ 121 | display: flex; 122 | justify-content: space-between; 123 | } 124 | 125 | .recommend-city-li-foot1 image{ 126 | height: 44rpx; 127 | width: 44rpx; 128 | } 129 | 130 | .recommend-city-li-foot2{ 131 | display: flex; 132 | justify-content: space-between; 133 | margin-top: 20rpx; 134 | } 135 | 136 | .recommend-city-li-foot2 image{ 137 | width: 60rpx; 138 | height: 60rpx; 139 | margin-right: 30rpx; 140 | } 141 | 142 | .recommend-left{ 143 | display: flex; 144 | } 145 | 146 | .recommend-left text{ 147 | font-size: 28rpx; 148 | margin-top: 10rpx; 149 | } 150 | 151 | .recommend-right text{ 152 | color: #FF9800; 153 | font-size: 44rpx; 154 | } 155 | 156 | .index-btn{ 157 | width: 40%; 158 | color: #41ADBD; 159 | margin: 20rpx auto; 160 | border: none; 161 | font-size: 30rpx; 162 | background-color: #fff; 163 | } -------------------------------------------------------------------------------- /小程序/pages/index/quick/quick.js: -------------------------------------------------------------------------------- 1 | // pages/index/quick/quick.js 2 | var id; 3 | 4 | Page({ 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | region: [''], 10 | array: ['电竞房', '桌游房', 'KTV房', ], 11 | isChecked: false, 12 | array2: ['距离最近','价格降序','价格升序'], 13 | id: 0, //进入页面时,默认选择第0个,如果不需要默认选中,注释掉就可以了 14 | }, 15 | bindRegionChange: function (e) { 16 | console.log('picker发送选择改变,携带值为', e.detail.value) 17 | this.setData({ 18 | region: e.detail.value 19 | }) 20 | }, 21 | bindPickerChange: function (e) { 22 | console.log('picker发送选择改变,携带值为', e.detail.value) 23 | this.setData({ 24 | index: e.detail.value 25 | }) 26 | }, 27 | bindDateChange: function (e) { 28 | console.log('picker发送选择改变,携带值为', e.detail.value) 29 | this.setData({ 30 | date: e.detail.value 31 | }) 32 | }, 33 | bindDateChange2: function (e) { 34 | console.log('picker发送选择改变,携带值为', e.detail.value) 35 | this.setData({ 36 | date2: e.detail.value 37 | }) 38 | }, 39 | choseTxtColor: function (e) { 40 | var id = e.currentTarget.dataset.id; //获取自定义的ID值 41 | this.setData({ 42 | id: id 43 | }) 44 | }, 45 | showHouse: function () { 46 | wx.navigateTo({ 47 | url: '../house/house', 48 | }) 49 | }, 50 | 51 | 52 | /** 53 | * 生命周期函数--监听页面加载 54 | */ 55 | onLoad: function (options) { 56 | 57 | }, 58 | 59 | /** 60 | * 生命周期函数--监听页面初次渲染完成 61 | */ 62 | onReady: function () { 63 | 64 | }, 65 | 66 | /** 67 | * 生命周期函数--监听页面显示 68 | */ 69 | onShow: function () { 70 | 71 | }, 72 | 73 | /** 74 | * 生命周期函数--监听页面隐藏 75 | */ 76 | onHide: function () { 77 | 78 | }, 79 | 80 | /** 81 | * 生命周期函数--监听页面卸载 82 | */ 83 | onUnload: function () { 84 | 85 | }, 86 | 87 | /** 88 | * 页面相关事件处理函数--监听用户下拉动作 89 | */ 90 | onPullDownRefresh: function () { 91 | 92 | }, 93 | 94 | /** 95 | * 页面上拉触底事件的处理函数 96 | */ 97 | onReachBottom: function () { 98 | 99 | }, 100 | 101 | /** 102 | * 用户点击右上角分享 103 | */ 104 | onShareAppMessage: function () { 105 | 106 | } 107 | }) -------------------------------------------------------------------------------- /小程序/pages/index/quick/quick.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "快捷找房" 3 | } -------------------------------------------------------------------------------- /小程序/pages/index/quick/quick.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 请选择城市 7 | {{region[0]}} {{region[1]}} {{region[2]}} > 8 | 9 | 10 | 11 | 12 | 13 | 请选择分类 14 | {{array[index]}} > 15 | 16 | 17 | 18 | 19 | 20 | 入住时间 21 | {{date}} > 22 | 23 | 24 | 25 | 26 | 27 | 离店时间 28 | {{date2}} > 29 | 30 | 31 | 32 | 33 | 请选择价格区间 34 | 35 | 36 | 37 | 38 | 39 | 其他 40 | 41 | 42 | 43 | {{item}} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /小程序/pages/index/quick/quick.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/quick/quick.wxss */ 2 | .quick-con{ 3 | margin-top: 20rpx; 4 | padding: 20rpx; 5 | } 6 | 7 | .picker{ 8 | padding: 20rpx 30rpx; 9 | display: flex; 10 | justify-content: space-between; 11 | border-bottom: 5rpx solid #f0f0f0; 12 | } 13 | 14 | .picker text{ 15 | font-size: 32rpx; 16 | color: #363636; 17 | } 18 | 19 | .body-view{ 20 | padding: 20rpx 30rpx; 21 | border-bottom: 5rpx solid #f0f0f0; 22 | } 23 | 24 | .body-view text{ 25 | font-size: 32rpx; 26 | color: #363636; 27 | } 28 | 29 | .body-view slider{ 30 | padding: 15rpx 0; 31 | } 32 | 33 | .chose-txt{ 34 | border-radius: 6px; 35 | font-size: 26rpx; 36 | width: 27.5%; 37 | margin: 5px; 38 | float: left; 39 | padding: 10rpx; 40 | } 41 | .chose-p{ 42 | line-height: 18px; 43 | width: 100%; 44 | text-align: center; 45 | float: left; 46 | } 47 | 48 | .other{ 49 | padding: 20rpx 30rpx; 50 | } 51 | 52 | .other-text{ 53 | font-size: 34rpx; 54 | color: #363636; 55 | } 56 | 57 | .other-btn{ 58 | display: flex; 59 | justify-content: space-between; 60 | margin: 20rpx auto; 61 | } 62 | 63 | .quick-con button{ 64 | width: 50%; 65 | margin: 20rpx auto; 66 | font-size: 34rpx; 67 | } 68 | -------------------------------------------------------------------------------- /小程序/pages/index/search/search.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "搜索" 3 | } -------------------------------------------------------------------------------- /小程序/pages/index/search/search.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{item.cityName}} 9 | 10 | 11 | 12 | 13 | {{item.cityName}} 14 | {{item.cityName}} 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /小程序/pages/index/search/search.wxss: -------------------------------------------------------------------------------- 1 | /* pages/index/search/search.wxss */ 2 | .a-z{ 3 | width: 35rpx; 4 | position: fixed; 5 | top: 112rpx; 6 | text-align: center; 7 | right: 5rpx; 8 | color: #3399CC; 9 | font-size: 30rpx; 10 | /* border: 1rpx solid #3399CC; */ 11 | margin-top: 20rpx; 12 | margin-right: 20rpx; 13 | } 14 | 15 | 16 | .city-item-content { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: center; 20 | margin-top: 110rpx; 21 | background-color: #FFFFFF; 22 | } 23 | 24 | .city-item { 25 | background: #fff; 26 | /* margin-top: 5rpx; */ 27 | width: 80%; 28 | padding-left: 5%; 29 | margin-left: 5%; 30 | height: 90rpx; 31 | font-size: 36rpx; 32 | line-height: 100rpx; 33 | border-bottom: 1rpx solid #CCCCCC; 34 | /* border:1rpx solid red; */ 35 | } 36 | 37 | .city-item-A-Z{ 38 | width: 100%; 39 | height: 40rpx; 40 | font-size: 30rpx; 41 | padding: 8rpx 10%; 42 | background-color: #EEEEEE; 43 | border-top: 1rpx solid #CCCCCC; 44 | margin-top: -1rpx; 45 | 46 | } 47 | 48 | 49 | .search-box { 50 | top: 0; 51 | position: fixed; 52 | width: 100%; 53 | /* left:5%; */ 54 | height: 110rpx; 55 | font-size: 30rpx; 56 | background-color: #fff; 57 | } 58 | 59 | .search-input { 60 | height: 70rpx; 61 | line-height: 60rpx; 62 | width: 80%; 63 | margin-left: 7.5%; 64 | border-radius: 20rpx; 65 | border: 1rpx solid #CCCCCC; 66 | background: #fff; 67 | margin-top: 20rpx; 68 | padding-left: 5%; 69 | } 70 | 71 | .search-input-placeholder { 72 | text-align: center; 73 | } -------------------------------------------------------------------------------- /小程序/pages/list/comment/comment.js: -------------------------------------------------------------------------------- 1 | var app = getApp(); 2 | Page({ 3 | data: { 4 | pics: [] 5 | }, 6 | 7 | backList: function () { 8 | wx.navigateBack({ 9 | delta: 1 10 | }) 11 | }, 12 | 13 | choose: function () {//这里是选取图片的方法 14 | var that = this, 15 | pics = this.data.pics; 16 | 17 | wx.chooseImage({ 18 | count: 6 - pics.length, // 最多可以选择的图片张数,默认9 19 | sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 20 | sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 21 | success: function (res) { 22 | var imgsrc = res.tempFilePaths; 23 | pics = pics.concat(imgsrc); 24 | console.log(pics); 25 | that.setData({ 26 | pics: pics 27 | }); 28 | }, 29 | fail: function () { 30 | // fail 31 | }, 32 | complete: function () { 33 | // complete 34 | } 35 | }) 36 | 37 | }, 38 | 39 | uploadimg: function () {//这里触发图片上传的方法 40 | var pics = this.data.pics; 41 | this.uploadimg({ 42 | url: 'https://........',//这里是你图片上传的接口 43 | path: pics//这里是选取的图片的地址数组 44 | }); 45 | }, 46 | onLoad: function (options) { 47 | 48 | } 49 | 50 | }) -------------------------------------------------------------------------------- /小程序/pages/list/comment/comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "用户评价" 3 | } -------------------------------------------------------------------------------- /小程序/pages/list/comment/comment.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 花果园半山小镇 7 | 8 | 9 | 2018年6月1日-2018年6月3日 10 | 11 | 12 | (共2晚) 13 | ¥1158 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 上传图片 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 确认评价 36 | 37 | -------------------------------------------------------------------------------- /小程序/pages/list/comment/comment.wxss: -------------------------------------------------------------------------------- 1 | /* pages/comment/comment.wxss */ 2 | .pending-payment{ 3 | font-size: 30rpx; 4 | margin: 30rpx 20rpx; 5 | display: flex; 6 | justify-content:space-around; 7 | border-bottom: 5rpx solid #ccc; 8 | height: 180rpx; 9 | padding-top: 10rpx; 10 | background: #fff; 11 | padding-bottom: 20rpx; 12 | } 13 | 14 | .picture-1{ 15 | width: 180rpx; 16 | height: 168rpx; 17 | border-radius: 10rpx; 18 | } 19 | 20 | .High-line-6{ 21 | font-size: 32rpx; 22 | } 23 | 24 | .payment-2{ 25 | color: #ccc; 26 | font-size: 24rpx; 27 | } 28 | 29 | .payment-3{ 30 | display: flex; 31 | justify-content:space-around; 32 | } 33 | 34 | .payment-5{ 35 | color: rgba(255,152,0,1); 36 | padding-left: 5rpx; 37 | font-size: 40rpx; 38 | } 39 | 40 | .High-line{ 41 | line-height:2em; 42 | } 43 | 44 | .High-line-1{ 45 | display: flex; 46 | flex-direction:column; 47 | line-height:3.5em; 48 | } 49 | 50 | .input-box-1{ 51 | font-size: 28rpx; 52 | height: 228rpx; 53 | width: 610rpx; 54 | border: 1rpx solid #ccc; 55 | border-radius: 10rpx; 56 | margin: 30rpx 50rpx; 57 | padding: 20rpx 20rpx; 58 | } 59 | 60 | .Upload-text{ 61 | margin-left: 50rpx; 62 | } 63 | 64 | .picture{ 65 | flex-direction: row; 66 | margin: 20rpx 50rpx; 67 | line-height:2.2em; 68 | letter-spacing:2.5; 69 | display: flex; 70 | flex-wrap:wrap; 71 | } 72 | 73 | .picture-2{ 74 | width: 180rpx; 75 | height: 168rpx; 76 | border-radius: 10rpx; 77 | margin:12rpx 18rpx; 78 | } 79 | 80 | .upload{ 81 | width: 176rpx; 82 | height: 164rpx; 83 | border:1rpx solid #ccc; 84 | border-radius: 10rpx; 85 | margin:12rpx 18rpx; 86 | } 87 | 88 | .upload-1{ 89 | width: 60rpx; 90 | height: 60rpx; 91 | padding-top: 55rpx; 92 | padding-left: 59rpx; 93 | } 94 | 95 | .bottom-1{ 96 | background: #54BF6C; 97 | color: #fff; 98 | text-align:center; 99 | width: 100%; 100 | padding-top: 30rpx; 101 | padding-bottom: 30rpx; 102 | font-size: 32rpx; 103 | position:fixed; 104 | bottom: 0rpx; 105 | } -------------------------------------------------------------------------------- /小程序/pages/list/list.js: -------------------------------------------------------------------------------- 1 | // pages/list/list.js 2 | var app = getApp(); 3 | Page({ 4 | data: { 5 | winHeight: "",//窗口高度 6 | currentTab: 0, //预设当前项的值 7 | scrollLeft: 0, //tab标题的滚动条位置 8 | listData:[ 9 | { 10 | name: '花果园半山小镇', 11 | time: '2018年6月1日-2018年6月3日', 12 | night: '(共2晚)', 13 | price: '¥1158', 14 | img:'/images/banner2.png', 15 | btn:'待付款', 16 | delImg:'/images/del.png' 17 | } 18 | ], 19 | listData1: [ 20 | { 21 | name: '花果园半山小镇', 22 | time: '2018年6月1日-2018年6月3日', 23 | night: '(共2晚)', 24 | price: '¥1158', 25 | img: '/images/banner2.png', 26 | btn: '待入住', 27 | delImg: '/images/del.png' 28 | } 29 | ], 30 | listData2: [ 31 | { 32 | name: '花果园半山小镇', 33 | time: '2018年6月1日-2018年6月3日', 34 | night: '(共2晚)', 35 | price: '¥1158', 36 | img: '/images/banner2.png', 37 | btn: '待评价', 38 | delImg: '/images/del.png' 39 | } 40 | ], 41 | listData3: [ 42 | { 43 | name: '花果园半山小镇', 44 | time: '2018年6月1日-2018年6月3日', 45 | night: '(共2晚)', 46 | price: '¥1158', 47 | img: '/images/banner2.png', 48 | btn: '已完成', 49 | delImg: '/images/del.png' 50 | } 51 | ], 52 | }, 53 | 54 | showDetails: function (e) { 55 | wx.navigateTo({ 56 | url: '../detail/detail' 57 | }) 58 | }, 59 | 60 | showPay: function () { 61 | wx.navigateTo({ 62 | url: '../detail/pay/pay', 63 | }) 64 | }, 65 | 66 | showViewOrder:function(){ 67 | wx.navigateTo({ 68 | url: '../detail/viewOrder/viewOrder', 69 | }) 70 | }, 71 | 72 | showOrderCompletion: function () { 73 | wx.navigateTo({ 74 | url: '../detail/orderCompletion/orderCompletion', 75 | }) 76 | }, 77 | showComment: function () { 78 | wx.navigateTo({ 79 | url: '../list/comment/comment', 80 | }) 81 | }, 82 | delList:function(e){ //删除订单 83 | // console.log(e.currentTarget.dataset.index) 84 | var n = e.currentTarget.dataset.index; 85 | 86 | var list = this.data.listData; 87 | list.splice(n,1); 88 | 89 | this.setData({ 90 | listData:list 91 | }) 92 | }, 93 | delList1: function (e) { //删除订单 94 | // console.log(e.currentTarget.dataset.index) 95 | var n = e.currentTarget.dataset.index; 96 | 97 | var list = this.data.listData2; 98 | list.splice(n, 1); 99 | 100 | this.setData({ 101 | listData2: list 102 | }) 103 | }, 104 | delList2: function (e) { //删除订单 105 | // console.log(e.currentTarget.dataset.index) 106 | var n = e.currentTarget.dataset.index; 107 | 108 | var list = this.data.listData3; 109 | list.splice(n, 1); 110 | 111 | this.setData({ 112 | listData3: list 113 | }) 114 | }, 115 | 116 | // 滚动切换标签样式 117 | switchTab: function (e) { 118 | this.setData({ 119 | currentTab: e.detail.current 120 | }); 121 | this.checkCor(); 122 | }, 123 | // 点击标题切换当前页时改变样式 124 | swichNav: function (e) { 125 | var cur = e.target.dataset.current; 126 | if (this.data.currentTaB == cur) { return false; } 127 | else { 128 | this.setData({ 129 | currentTab: cur 130 | }) 131 | } 132 | }, 133 | //判断当前滚动超过一屏时,设置tab标题滚动条。 134 | checkCor: function () { 135 | if (this.data.currentTab > 4) { 136 | this.setData({ 137 | scrollLeft: 200 138 | }) 139 | } else { 140 | this.setData({ 141 | scrollLeft: 0 142 | }) 143 | } 144 | }, 145 | onLoad: function () { 146 | var that = this; 147 | // 高度自适应 148 | wx.getSystemInfo({ 149 | success: function (res) { 150 | var clientHeight = res.windowHeight, 151 | clientWidth = res.windowWidth, 152 | rpxR = 750 / clientWidth; 153 | var calc = clientHeight * rpxR - 180; 154 | console.log(calc) 155 | that.setData({ 156 | winHeight: calc 157 | }); 158 | } 159 | }); 160 | }, 161 | footerTap: app.footerTap 162 | }) -------------------------------------------------------------------------------- /小程序/pages/list/list.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "我的订单" 3 | } -------------------------------------------------------------------------------- /小程序/pages/list/list.wxss: -------------------------------------------------------------------------------- 1 | /* pages/list/list.wxss */ 2 | .swiper-tab{ 3 | width: 100%; 4 | text-align: center; 5 | line-height: 80rpx; 6 | } 7 | .swiper-tab-list{ 8 | font-size: 32rpx; 9 | display: inline-block; 10 | width: 20%; 11 | color: #777777; 12 | } 13 | .on{ 14 | color: #FF9800; 15 | border-bottom: 5rpx solid #FF9800;} 16 | 17 | .swiper-box{ display: block; height: 100%; width: 100%; overflow: hidden; } 18 | 19 | /* 选项卡 */ 20 | 21 | .order-1{ 22 | background: #0c0; 23 | height: 60rpx; 24 | text-align:center; 25 | color: #fff; 26 | font-size: 36rpx; 27 | padding-top: 20rpx; 28 | } 29 | 30 | .tab-item{ 31 | font-size: 28rpx; 32 | width: 20%; 33 | color: #000; 34 | display: flex; 35 | justify-content: center; 36 | padding-bottom: 12rpx; 37 | } 38 | 39 | 40 | .tab-item.active{ 41 | color: #FF9800; 42 | border-bottom: 2px solid #FF9800; 43 | } 44 | 45 | .tab-item.active:after{ 46 | content: ""; 47 | display: block; 48 | height: 4rpx; 49 | width: 110rpx; 50 | background: #474646; 51 | position: absolute; 52 | bottom: 0; 53 | left: 5rpx; 54 | border-radius: 16rpx; 55 | } 56 | 57 | .pending-payment{ 58 | font-size: 30rpx; 59 | margin:20rpx; 60 | display: flex; 61 | justify-content:space-around; 62 | border-top: 0rpx; 63 | border-radius: 10rpx; 64 | height: 180rpx; 65 | padding-top: 15rpx; 66 | background: #fff; 67 | left: 9px; 68 | box-shadow: 1px 2px 0px 0px rgba(218, 218, 218, 1); 69 | border: 1px solid rgba(255, 255, 255, 0); 70 | } 71 | 72 | .picture-1{ 73 | width: 180rpx; 74 | height: 168rpx; 75 | border-radius: 10rpx; 76 | } 77 | 78 | .picture-2{ 79 | width: 40rpx; 80 | height: 40rpx; 81 | padding-left: 80rpx; 82 | padding-bottom: 28rpx; 83 | } 84 | 85 | .High-line-6{ 86 | font-size: 32rpx; 87 | } 88 | 89 | .payment-2{ 90 | color: #ccc; 91 | font-size: 24rpx; 92 | } 93 | 94 | .payment-3{ 95 | display: flex; 96 | justify-content:space-around; 97 | } 98 | 99 | .payment-5{ 100 | color: rgba(255,152,0,1); 101 | padding-left: 5rpx; 102 | font-size: 40rpx; 103 | } 104 | 105 | .High-line{ 106 | line-height:2em; 107 | } 108 | 109 | .High-line-1{ 110 | display: flex; 111 | flex-direction:column; 112 | line-height:3.5em; 113 | } 114 | 115 | .button-1{ 116 | color: #41ADBD; 117 | font-size: 24rpx; 118 | border: 1px solid #41ADBD; 119 | background: #fff; 120 | } 121 | 122 | .utton-1{ 123 | margin-bottom: 0rpx; 124 | } 125 | 126 | .quantu{ 127 | background: #F0F0F0; 128 | } 129 | 130 | .scrollbar-0{ 131 | background: #FFF; 132 | padding-top: 30rpx; 133 | } 134 | 135 | .High-line-7{ 136 | padding-top: 106rpx; 137 | } 138 | 139 | .button-3{ 140 | color: #30C02F; 141 | font-size: 24rpx; 142 | border: 1px solid #30C02F; 143 | background: #fff; 144 | } 145 | 146 | .button-4{ 147 | color: #E24E54; 148 | font-size: 24rpx; 149 | border: 1px solid #E24E54; 150 | background: #fff; 151 | } 152 | 153 | .button-5{ 154 | color: #666666; 155 | font-size: 24rpx; 156 | border: 1px solid #666666; 157 | background: #fff; 158 | } 159 | -------------------------------------------------------------------------------- /小程序/pages/recruit/landlord_entrance/landlord_entrance.js: -------------------------------------------------------------------------------- 1 | // pages/user/landlord_entrance/landlord_entrance.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /小程序/pages/recruit/landlord_entrance/landlord_entrance.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "实名认证" 3 | } -------------------------------------------------------------------------------- /小程序/pages/recruit/landlord_entrance/landlord_entrance.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 请先进行实名认证 8 | 9 | 10 | -------------------------------------------------------------------------------- /小程序/pages/recruit/landlord_entrance/landlord_entrance.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/landlord_entrance/landlord_entrance.wxss */ 2 | /* 房东入口:请先进行实名认证 */ 3 | 4 | /* --start-- */ 5 | .name-detection-view { 6 | text-align: center; 7 | } 8 | .name-detection-img { 9 | width: 175rpx; 10 | height: 175rpx; 11 | margin-top: 200rpx; 12 | } 13 | .name-detection-tex-view { 14 | margin-top: 30rpx; 15 | } 16 | .name-detection-text { 17 | font-size: 37rpx; 18 | } 19 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/recruit/recruit.js: -------------------------------------------------------------------------------- 1 | // pages/recruit/recruit.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | showRelease:function(){ 12 | wx.navigateTo({ 13 | url: '../recruit/release/release', 14 | }) 15 | }, 16 | 17 | /** 18 | * 生命周期函数--监听页面加载 19 | */ 20 | onLoad: function (options) { 21 | 22 | }, 23 | 24 | /** 25 | * 生命周期函数--监听页面初次渲染完成 26 | */ 27 | onReady: function () { 28 | 29 | }, 30 | 31 | /** 32 | * 生命周期函数--监听页面显示 33 | */ 34 | onShow: function () { 35 | 36 | }, 37 | 38 | /** 39 | * 生命周期函数--监听页面隐藏 40 | */ 41 | onHide: function () { 42 | 43 | }, 44 | 45 | /** 46 | * 生命周期函数--监听页面卸载 47 | */ 48 | onUnload: function () { 49 | 50 | }, 51 | 52 | /** 53 | * 页面相关事件处理函数--监听用户下拉动作 54 | */ 55 | onPullDownRefresh: function () { 56 | 57 | }, 58 | 59 | /** 60 | * 页面上拉触底事件的处理函数 61 | */ 62 | onReachBottom: function () { 63 | 64 | }, 65 | 66 | /** 67 | * 用户点击右上角分享 68 | */ 69 | onShareAppMessage: function () { 70 | 71 | } 72 | }) -------------------------------------------------------------------------------- /小程序/pages/recruit/recruit.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "房东招募" 3 | } -------------------------------------------------------------------------------- /小程序/pages/recruit/recruit.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 姓名: 7 | 8 | 9 | 10 | 11 | 12 | 手机号: 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 验证码: 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /小程序/pages/recruit/recruit.wxss: -------------------------------------------------------------------------------- 1 | /* pages/recruit/recruit.wxss */ 2 | .background{ 3 | width: 100%; 4 | height: 100%; 5 | background: #F0F0F0; 6 | position: fixed; 7 | z-index: -999; 8 | } 9 | 10 | .full-name{ 11 | width: 100%; 12 | background: #fff; 13 | display: flex; 14 | justify-content:space-around; 15 | padding-top:20rpx; 16 | border-bottom: 7rpx solid #F0F0F0; 17 | } 18 | 19 | .full-name-1{ 20 | font-size: 32rpx; 21 | padding-top:15rpx; 22 | padding-bottom: 35rpx; 23 | padding-left: 20rpx; 24 | } 25 | 26 | .input-box-1{ 27 | font-size: 28rpx; 28 | background: #fff; 29 | padding-top: 20rpx; 30 | padding-left: 20rpx; 31 | height: 50rpx; 32 | width: 280rpx; 33 | margin-right: 216rpx; 34 | } 35 | 36 | .full-name2{ 37 | width: 100%; 38 | background: #fff; 39 | display: flex; 40 | justify-content:space-around; 41 | padding-top:20rpx; 42 | border-bottom: 7rpx solid #F0F0F0; 43 | } 44 | 45 | .full-name-1-1{ 46 | font-size: 32rpx; 47 | padding-top:15rpx; 48 | padding-bottom: 35rpx; 49 | padding-left: 30rpx; 50 | } 51 | 52 | .input-box-1-1{ 53 | font-size: 28rpx; 54 | background: #fff; 55 | padding-top: 20rpx; 56 | padding-left: 20rpx; 57 | height: 50rpx; 58 | width: 280rpx; 59 | margin-right: 6rpx; 60 | } 61 | 62 | .house0{ 63 | margin-bottom:15rpx; 64 | margin-right: 5rxp; 65 | } 66 | 67 | .house{ 68 | font-size: 28rpx; 69 | background: #54BF6C; 70 | color: #fff; 71 | margin: 0rpx; 72 | padding-top: 5rpx; 73 | } 74 | 75 | .full-name3{ 76 | width: 100%; 77 | background: #fff; 78 | display: flex; 79 | justify-content:space-around; 80 | padding-top:20rpx; 81 | border-bottom: 7rpx solid #F0F0F0; 82 | } 83 | 84 | .input-box-1-2{ 85 | font-size: 28rpx; 86 | background: #fff; 87 | padding-top: 20rpx; 88 | padding-left: 20rpx; 89 | height: 50rpx; 90 | width: 280rpx; 91 | margin-right: 235rpx; 92 | } 93 | 94 | .full-name-1-2{ 95 | font-size: 32rpx; 96 | padding-top:15rpx; 97 | padding-bottom: 35rpx; 98 | padding-left: 35rpx; 99 | } 100 | 101 | .frame{ 102 | padding-top:80rpx; 103 | } 104 | 105 | .next-step{ 106 | position:absolute; 107 | bottom: 0rpx; 108 | } 109 | 110 | .next-step-1{ 111 | background: #54BF6C; 112 | color: #fff; 113 | font-size: 36rpx; 114 | border-radius: 0rpx; 115 | width: 750rpx; 116 | } -------------------------------------------------------------------------------- /小程序/pages/recruit/release/release.js: -------------------------------------------------------------------------------- 1 | // pages/release/release.js 2 | var server = require('../../../utils/server'); 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | region: ['广东省', '广州市', '海珠区'], 10 | isChecked: false, 11 | array2: ['毛坯', '简装', '精装'], 12 | id: 0, //进入页面时,默认选择第0个,如果不需要默认选中,注释掉就可以了 13 | }, 14 | choseTxtColor: function (e) { 15 | var id = e.currentTarget.dataset.id; //获取自定义的ID值 16 | this.setData({ 17 | id: id 18 | }) 19 | }, 20 | bindRegionChange: function (e) { 21 | console.log('picker发送选择改变,携带值为', e.detail.value) 22 | this.setData({ 23 | region: e.detail.value 24 | }) 25 | }, 26 | showSubmission: function () { 27 | wx.navigateTo({ 28 | url: '../submission/submission', 29 | }) 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面加载 34 | */ 35 | onLoad: function (options) { 36 | server.getJSON("getPlanPhone", function (json) { 37 | //console.log(json.msg); 38 | var issuccess = json.data.success; 39 | if (issuccess == true){ 40 | var phone = json.data.data[0].plannumber; 41 | console.log(phone); 42 | } 43 | }); 44 | 45 | // wx.request({ 46 | // url: 'https://wj.antyiz.xyz/api/landlordApply', //仅为示例,并非真实的接口地址 47 | // data: {}, 48 | // header: { 49 | // 'content-type': 'application/json' // 默认值 50 | // }, 51 | // success: function (res) { 52 | // console.log(res) 53 | // } 54 | // }) 55 | }, 56 | }) -------------------------------------------------------------------------------- /小程序/pages/recruit/release/release.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "发布房源" 3 | } -------------------------------------------------------------------------------- /小程序/pages/recruit/release/release.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 请选择城市 8 | {{region[0]}} {{region[1]}} {{region[2]}} > 9 | 10 | 11 | 12 | 请输入详细地址 13 | 14 | 15 | 装修情况 16 | 17 | 18 | 19 | {{item}} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 产权面积 27 | 28 | 29 | 30 | 31 | 32 | 33 | 联系人 34 | 35 | 36 | 37 | 38 | 联系电话 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /小程序/pages/recruit/release/release.wxss: -------------------------------------------------------------------------------- 1 | /* pages/release/release.wxss */ 2 | .background{ 3 | width: 100%; 4 | height: 100%; 5 | background: #F0F0F0; 6 | position: fixed; 7 | z-index: -999; 8 | } 9 | 10 | .frame{ 11 | padding-top:80rpx; 12 | } 13 | 14 | .picker{ 15 | padding: 20rpx 30rpx; 16 | display: flex; 17 | justify-content: space-between; 18 | border-bottom: 5rpx solid #f0f0f0; 19 | font-size: 32rpx; 20 | background: #fff; 21 | } 22 | 23 | .other-btn{ 24 | display: flex; 25 | justify-content: space-between; 26 | margin: 0rpx 20rpx; 27 | margin-bottom: 15rpx; 28 | } 29 | .chose-txt{ 30 | border-radius: 6px; 31 | font-size: 26rpx; 32 | width: 27.5%; 33 | margin: 0rpx 10px; 34 | float: left; 35 | padding: 10rpx 40rpx; 36 | border: 1rpx dashed #ccc; 37 | } 38 | .chose-p{ 39 | line-height: 18px; 40 | width: 100%; 41 | text-align: center; 42 | float: left; 43 | } 44 | 45 | .detailed-window{ 46 | background: #fff; 47 | padding-top: 20rpx; 48 | } 49 | 50 | .detailed{ 51 | font-size: 32rpx; 52 | padding-left: 30rpx; 53 | } 54 | 55 | .input-box { 56 | font-size: 28rpx; 57 | padding: 20rpx; 58 | border: 1rpx solid #f0f0f0; 59 | margin:20rpx 30rpx; 60 | width: 645rpx; 61 | height: 200rpx; 62 | } 63 | 64 | .situation{ 65 | font-size: 32rpx; 66 | padding-left: 30rpx; 67 | padding-top: 5rpx; 68 | } 69 | 70 | .option{ 71 | display: flex; 72 | justify-content:space-around; 73 | } 74 | 75 | .full-name5{ 76 | width: 100%; 77 | background: #fff; 78 | display: flex; 79 | justify-content:space-around; 80 | padding-top:20rpx; 81 | border-top: 7rpx solid #F0F0F0; 82 | } 83 | 84 | .input-box-1-4{ 85 | font-size: 28rpx; 86 | background: #fff; 87 | padding-top: 20rpx; 88 | padding-left: 20rpx; 89 | height: 50rpx; 90 | width: 280rpx; 91 | margin-right: 150rpx; 92 | } 93 | 94 | .full-name-1-4{ 95 | font-size: 32rpx; 96 | padding-top:15rpx; 97 | padding-bottom: 35rpx; 98 | padding-left: 35rpx; 99 | } 100 | 101 | .input-box5{ 102 | padding-left: 50rpx; 103 | } 104 | 105 | .square{ 106 | font-size: 28rpx; 107 | margin-right: 50rpx; 108 | padding-top: 10rpx; 109 | } 110 | 111 | .full-name4{ 112 | width: 100%; 113 | background: #fff; 114 | display: flex; 115 | justify-content:space-around; 116 | padding-top:20rpx; 117 | border-top: 7rpx solid #F0F0F0; 118 | } 119 | 120 | .input-box-1-3{ 121 | font-size: 28rpx; 122 | background: #fff; 123 | padding-top: 20rpx; 124 | padding-left: 20rpx; 125 | height: 50rpx; 126 | width: 280rpx; 127 | margin-right: 235rpx; 128 | } 129 | 130 | .full-name-1-3{ 131 | font-size: 32rpx; 132 | padding-top:15rpx; 133 | padding-bottom: 35rpx; 134 | padding-left: 35rpx; 135 | } 136 | 137 | .input-box4{ 138 | padding-left: 80rpx; 139 | } 140 | 141 | .full-name3{ 142 | width: 100%; 143 | background: #fff; 144 | display: flex; 145 | justify-content:space-around; 146 | padding-top:20rpx; 147 | border-top: 7rpx solid #F0F0F0; 148 | } 149 | 150 | .input-box-1-2{ 151 | font-size: 28rpx; 152 | background: #fff; 153 | padding-top: 20rpx; 154 | padding-left: 20rpx; 155 | height: 50rpx; 156 | width: 280rpx; 157 | margin-right: 235rpx; 158 | } 159 | 160 | .full-name-1-2{ 161 | font-size: 32rpx; 162 | padding-top:15rpx; 163 | padding-bottom: 35rpx; 164 | padding-left: 35rpx; 165 | } 166 | 167 | .input-box3{ 168 | padding-left: 50rpx; 169 | } 170 | 171 | .next-step{ 172 | position:absolute; 173 | bottom: 0rpx; 174 | 175 | } 176 | 177 | .next-step-1{ 178 | background: #54BF6C; 179 | color: #fff; 180 | font-size: 36rpx; 181 | border-radius: 0rpx; 182 | width: 750rpx; 183 | } -------------------------------------------------------------------------------- /小程序/pages/recruit/submission/submission.js: -------------------------------------------------------------------------------- 1 | // pages/submission/submission.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | backRelease:function(){ 11 | wx.navigateBack({ 12 | delta: 1 13 | }) 14 | }, 15 | backIndex:function(){ 16 | wx.switchTab({ 17 | url: '../../../pages/index/index' 18 | }) 19 | }, 20 | 21 | /** 22 | * 生命周期函数--监听页面加载 23 | */ 24 | onLoad: function (options) { 25 | 26 | }, 27 | 28 | /** 29 | * 生命周期函数--监听页面初次渲染完成 30 | */ 31 | onReady: function () { 32 | 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面显示 37 | */ 38 | onShow: function () { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面隐藏 44 | */ 45 | onHide: function () { 46 | 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面卸载 51 | */ 52 | onUnload: function () { 53 | 54 | }, 55 | 56 | /** 57 | * 页面相关事件处理函数--监听用户下拉动作 58 | */ 59 | onPullDownRefresh: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 页面上拉触底事件的处理函数 65 | */ 66 | onReachBottom: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 用户点击右上角分享 72 | */ 73 | onShareAppMessage: function () { 74 | 75 | } 76 | }) -------------------------------------------------------------------------------- /小程序/pages/recruit/submission/submission.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "房东招募" 3 | } -------------------------------------------------------------------------------- /小程序/pages/recruit/submission/submission.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 已提交申请,请耐心等待客服审核 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /小程序/pages/recruit/submission/submission.wxss: -------------------------------------------------------------------------------- 1 | /* pages/submission/submission.wxss */ 2 | .whole-page{ 3 | margin-top: 180rpx; 4 | } 5 | 6 | .picture{ 7 | width: 100%; 8 | height: 144rpx; 9 | text-align:center; 10 | } 11 | 12 | .complete{ 13 | width: 144rpx; 14 | height: 144rpx; 15 | } 16 | 17 | .writte-words{ 18 | font-size: 32rpx; 19 | text-align:center; 20 | margin-top: 50rpx; 21 | } 22 | 23 | .button-1{ 24 | display: flex; 25 | justify-content:space-around; 26 | margin-top: 100rpx; 27 | } 28 | 29 | .next-step-1{ 30 | font-size:28rpx; 31 | border: 1rpx solid #54BF6C; 32 | width: 234rpx; 33 | color: #54BF6C; 34 | background: #fff; 35 | } 36 | -------------------------------------------------------------------------------- /小程序/pages/user/FAQ/FAQ.js: -------------------------------------------------------------------------------- 1 | // pages/user/FAQ/FAQ.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | phone: [], 9 | content: [ 10 | { 11 | id: '01', 12 | title: '顽家小程序里面的房源都是真实的吗?会不会出现图片和展示房源不符合的呢?~', 13 | contents: '请您放心,在所有展示的房源中,房源均是实景拍摄。', 14 | shows: false, 15 | }, 16 | { 17 | id: '02', 18 | title: '支付后如何发出去?', 19 | contents: '发猜数包的人设置问题和答案,只有提交的答案和出题答案一致才可以得到红包', 20 | shows: false 21 | }, 22 | { 23 | id: '03', 24 | title: '好友可以转发我的猜数红包吗?', 25 | contents: '发猜数包的人设置问题和答案,只有提交的答案和出题答案一致才可以得到红包', 26 | shows: false 27 | }, 28 | { 29 | id: '04', 30 | title: '发猜数红包会收取服务费吗?', 31 | contents: '发猜数包的人设置问题和答案,只有提交的答案和出题答案一致才可以得到红包', 32 | shows: false 33 | }, 34 | { 35 | id: '05', 36 | title: '顽家小程序里面的房源都是真实的吗?会不会出现图片和展示房源不符合的呢?~', 37 | contents: '请您放心,在所有展示的房源中,房源均是实景拍摄。', 38 | shows: false, 39 | }, 40 | { 41 | id: '06', 42 | title: '支付后如何发出去?', 43 | contents: '发猜数包的人设置问题和答案,只有提交的答案和出题答案一致才可以得到红包', 44 | shows: false 45 | } 46 | ] 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面加载 51 | */ 52 | onLoad: function (options) { 53 | this.getdata(); 54 | }, 55 | 56 | /** 57 | * 生命周期函数--监听页面初次渲染完成 58 | */ 59 | onReady: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 生命周期函数--监听页面显示 65 | */ 66 | onShow: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 生命周期函数--监听页面隐藏 72 | */ 73 | onHide: function () { 74 | 75 | }, 76 | 77 | /** 78 | * 生命周期函数--监听页面卸载 79 | */ 80 | onUnload: function () { 81 | 82 | }, 83 | 84 | /** 85 | * 页面相关事件处理函数--监听用户下拉动作 86 | */ 87 | onPullDownRefresh: function () { 88 | 89 | }, 90 | 91 | /** 92 | * 页面上拉触底事件的处理函数 93 | */ 94 | onReachBottom: function () { 95 | 96 | }, 97 | 98 | /** 99 | * 用户点击右上角分享 100 | */ 101 | onShareAppMessage: function () { 102 | 103 | }, 104 | 105 | /** 106 | * 常见问题——问题展开/隐藏 107 | */ 108 | showHide(e) { 109 | var contentFor = this.data.content; 110 | for (var i = 0; i < contentFor.length; i++) { 111 |   if (e.currentTarget.dataset.changeid == contentFor[i].id) { 112 |     var printPrice = "content[" + i + "].shows"; 113 |     if (this.data.content[i].shows) { 114 |       this.setData({ 115 |         [printPrice]: false 116 |       }); 117 |     } else { 118 |       this.setData({ 119 |         [printPrice]: true 120 |       }); 121 |     } 122 |   } else { 123 |       var printPrice1 = "content[" + i + "].shows"; 124 |       this.setData({ 125 |         [printPrice1]: false 126 |       }); 127 |     } 128 |   } 129 | }, 130 | getdata: function () { //定义函数名称 131 | var that = this; // 这个地方非常重要,重置data{}里数据时候setData方法的this应为以及函数的this, 如果在下方的sucess直接写this就变成了wx.request()的this了 132 | wx.request({ 133 | url: 'https://wj.antyiz.xyz/api/getPlanPhone', //请求地址 134 | data: { //发送给后台的数据 135 | plannumber: '' 136 | }, 137 | header: { //请求头 138 | 'content-type': 'application/json' // 默认值 139 | }, 140 | method: "GET", //get为默认方法/POST 141 | success: function (res) { 142 | console.log(res.data) //res.data相当于ajax里面的data,为后台返回的数据 143 | that.setData({ //如果在sucess直接写this就变成了wx.request()的this了.必须为getdata函数的this,不然无法重置调用函数 144 | phone: res.data 145 | }) 146 | }, 147 | fail: function (err) { },//请求失败 148 | complete: function () { }//请求完成后执行的函数 149 | }) 150 | } 151 | }) -------------------------------------------------------------------------------- /小程序/pages/user/FAQ/FAQ.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "常见问题"} -------------------------------------------------------------------------------- /小程序/pages/user/FAQ/FAQ.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 亲爱的用户您好,您来到这里肯定是出了问题,小顽妹会努力帮您解决问题~ 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Q 18 | {{item.title}} 19 | 20 | 21 | 22 | 23 | A 24 | {{item.contents}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 没有您想了解的问题?请拨打客服电话 34 | {{item[0].plannumber}} 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /小程序/pages/user/FAQ/FAQ.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/FAQ/FAQ.wxss */ 2 | /* 常见问题 */ 3 | 4 | /* --start-- */ 5 | .FAQ-view { 6 | background: #f0f0f0; 7 | } 8 | 9 | /* 小顽妹描述 */ 10 | .user-hello-view { 11 | width: 100%; 12 | display: flex; 13 | justify-content: center; 14 | } 15 | .user-hello { 16 | font-size: 28rpx; 17 | width: 70%; 18 | line-height: 40rpx; 19 | margin-top: 20rpx; 20 | } 21 | 22 | /* 问题item */ 23 | .question-item { 24 | background: #fff; 25 | border-radius: 12rpx; 26 | box-shadow: 3rpx 3rpx 3rpx 3rpx #dad9d9; 27 | font-size: 32rpx; 28 | margin-left: 20rpx; 29 | margin-right: 20rpx; 30 | margin-top: 20rpx; 31 | padding-bottom: 20rpx; 32 | } 33 | /* 提问内容 */ 34 | .question-content { 35 | display: flex; 36 | flex-direction: row; 37 | margin-right: 30rpx; 38 | } 39 | .question-icon-Q { 40 | background-color: #41adbd; 41 | width: 60rpx; 42 | height: 52rpx; 43 | text-align: center; 44 | border-radius: 12rpx; 45 | padding-top: 5rpx; 46 | margin: 30rpx; 47 | color: #fff; 48 | } 49 | .question-content-title { 50 | width: 85%; 51 | margin-top: 30rpx; 52 | } 53 | /* 回答内容 */ 54 | .answer-content { 55 | display: flex; 56 | flex-direction: row; 57 | margin-right: 30rpx; 58 | width: 80%; 59 | margin-left: 100rpx; 60 | } 61 | .answer-icon-A { 62 | background-color: #e24e54; 63 | width: 60rpx; 64 | height: 52rpx; 65 | text-align: center; 66 | border-radius: 12rpx; 67 | margin: 20rpx; 68 | padding-top: 10rpx; 69 | color: #fff; 70 | } 71 | .answer-content-text { 72 | width: 85%; 73 | margin-top: 10rpx; 74 | margin-bottom: 10rpx; 75 | } 76 | 77 | /* 拨打客服电话 */ 78 | .telephone-view { 79 | text-align: center; 80 | display: flex; 81 | flex-direction: column; 82 | margin-top: 50rpx; 83 | } 84 | .telephone-text { 85 | font-size: 32rpx; 86 | } 87 | .telephone-number { 88 | font-size: 46rpx; 89 | color: #4bb1c0; 90 | margin-top: 30rpx; 91 | } 92 | /* --end-- */ 93 | -------------------------------------------------------------------------------- /小程序/pages/user/authentication/authentication.js: -------------------------------------------------------------------------------- 1 | // pages/user/authentication/authentication.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 跳转到人脸识别 69 | */ 70 | showFaceDetection: function () { 71 | wx.navigateTo({ 72 | url: '../../user/authentication/face_detection/face_detection', 73 | }) 74 | } 75 | }) -------------------------------------------------------------------------------- /小程序/pages/user/authentication/authentication.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "实名认证" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/authentication/authentication.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 请拍摄身份证正面 16 | 照片面 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 请拍摄身份证反面 26 | 国徽面 27 | 28 | 29 | 30 | 31 | 32 | 拍摄时请确保身份证边框完整,字迹清晰,亮度均衡 33 | 34 | 35 | (仅用于公安审核) 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /小程序/pages/user/authentication/authentication.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/authentication/authentication.wxss */ 2 | /* 页面:实名认证 */ 3 | 4 | /* --start-- */ 5 | 6 | /* 身份证视图 */ 7 | .identity-card-view { 8 | text-align: center; 9 | } 10 | .identity-card-photo-body { 11 | text-align: center; 12 | } 13 | .photo-container-view { 14 | text-align: center; 15 | display: flex; 16 | flex-direction: row; 17 | justify-content: center; 18 | } 19 | .photo-container { 20 | width: 606rpx; 21 | line-height: 367rpx; 22 | margin-top: 50rpx; 23 | border: 6rpx solid #41adbd; 24 | border-style: dotted; 25 | border-radius: 11rpx; 26 | } 27 | .xiangji-icon { 28 | width: 103rpx; 29 | height: 103rpx; 30 | vertical-align: middle; 31 | } 32 | .identity-card-text { 33 | padding-top: 40rpx; 34 | } 35 | .explain-text-0 { 36 | font-size: 37rpx; 37 | } 38 | .explain-text-1 { 39 | color: #41adbd; 40 | font-size: 32rpx; 41 | margin-left: 80rpx; 42 | } 43 | /* 拍摄说明 */ 44 | .take-photo-text-view { 45 | line-height: 30rpx; 46 | } 47 | .take-photo-text0 { 48 | font-size: 30rpx; 49 | } 50 | .take-photo-text1-view { 51 | padding-top: 30rpx; 52 | } 53 | .take-photo-text1 { 54 | font-size: 30rpx; 55 | padding-bottom: 110rpx; 56 | } 57 | 58 | /* 按钮:下一步,刷个脸吧 */ 59 | .face-btn { 60 | background: #54bf6c; 61 | color: #fff; 62 | border-radius: 0; 63 | font-size: 37rpx; 64 | border:none; 65 | margin-top: 100rpx; 66 | position: fixed; 67 | bottom: 0; 68 | left: 0; 69 | right: 0; 70 | } 71 | 72 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/authentication/face_detection/face_detection.js: -------------------------------------------------------------------------------- 1 | // pages/user/authentication/face_detection/face_detection.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | backUser: function () { 11 | wx.navigateBack({ 12 | delta: 2 13 | }) 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function (options) { 20 | 21 | }, 22 | 23 | /** 24 | * 生命周期函数--监听页面初次渲染完成 25 | */ 26 | onReady: function () { 27 | 28 | }, 29 | 30 | /** 31 | * 生命周期函数--监听页面显示 32 | */ 33 | onShow: function () { 34 | 35 | }, 36 | 37 | /** 38 | * 生命周期函数--监听页面隐藏 39 | */ 40 | onHide: function () { 41 | 42 | }, 43 | 44 | /** 45 | * 生命周期函数--监听页面卸载 46 | */ 47 | onUnload: function () { 48 | 49 | }, 50 | 51 | /** 52 | * 页面相关事件处理函数--监听用户下拉动作 53 | */ 54 | onPullDownRefresh: function () { 55 | 56 | }, 57 | 58 | /** 59 | * 页面上拉触底事件的处理函数 60 | */ 61 | onReachBottom: function () { 62 | 63 | }, 64 | 65 | /** 66 | * 用户点击右上角分享 67 | */ 68 | onShareAppMessage: function () { 69 | 70 | } 71 | }) -------------------------------------------------------------------------------- /小程序/pages/user/authentication/face_detection/face_detection.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "人脸识别"} -------------------------------------------------------------------------------- /小程序/pages/user/authentication/face_detection/face_detection.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 将拍摄您本人人脸,请确保正对手机,光线充足 13 | 14 | 15 | 16 | 张* 17 | 522*************49 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /小程序/pages/user/authentication/face_detection/face_detection.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/authentication/face_detection/face_detection.wxss */ 2 | /* 页面:人脸识别 */ 3 | 4 | /* --start-- */ 5 | 6 | .face-detection-view { 7 | text-align: center; 8 | position: relative; 9 | } 10 | .face-detection-body { 11 | margin-top: 200rpx; 12 | } 13 | 14 | /* 人脸框 */ 15 | .person-face-img { 16 | border-radius: 50%; 17 | width: 278rpx; 18 | height: 278rpx; 19 | } 20 | 21 | /* 拍摄说明 & 身份信息*/ 22 | .take-photo-text-view { 23 | margin-top: 30rpx; 24 | } 25 | .take-photo-text { 26 | font-size: 30rpx; 27 | } 28 | .identity-card-number { 29 | margin-left: 50rpx; 30 | } 31 | 32 | /* 相机 */ 33 | .start-detection-view { 34 | display: flex; 35 | flex-direction: row; 36 | justify-content: center; 37 | margin-top: 100rpx; 38 | } 39 | .start-detection { 40 | border: 1rpx solid #41adbd; 41 | border-radius: 50%; 42 | width: 130rpx; 43 | line-height: 130rpx; 44 | } 45 | .start-detection-img { 46 | width: 103rpx; 47 | height: 103rpx; 48 | vertical-align: middle; 49 | overflow: hidden; 50 | padding-bottom: 10rpx; 51 | } 52 | 53 | /* 按钮:完成验证 */ 54 | .success-detection { 55 | font-size: 37rpx; 56 | background: #54bf6c; 57 | color: #fff; 58 | position: fixed; 59 | bottom: 0; 60 | width: 100%; 61 | } 62 | 63 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/company_presentation/company_presentation.js: -------------------------------------------------------------------------------- 1 | // pages/user/company_presentation/company_presentation.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /小程序/pages/user/company_presentation/company_presentation.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "公司简介" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/company_presentation/company_presentation.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 顽家 10 | 顽家服务于所有闲置不动产,升级现有住宿品质,打造全新高品质的旅游出行、日常聚会等国内具有开创性的品质提升服务平台 ,我们希望让用户用原来的订房价格体验到更高的品质住宿。 我们做了什么? 我们让闲置物业有效利用,让得到更好住宿体验,让所有人都有机会成为0风险房东,解决每个城市租赁上税问题。公司布局以贵阳为总部,5年内布局15个以上省直属分公司团队。 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /小程序/pages/user/company_presentation/company_presentation.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/company_presentation/company_presentation.wxss */ 2 | /* 公司简介 */ 3 | 4 | /* --start-- */ 5 | .company-logo-view { 6 | text-align: center; 7 | border-bottom: 5rpx solid #f0f0f0; 8 | } 9 | .company-logo-img { 10 | width: 311rpx; 11 | height:107rpx; 12 | padding-top: 30rpx; 13 | padding-bottom:30rpx; 14 | } 15 | /* 公司文字简介 */ 16 | .company-content { 17 | display: flex; 18 | flex-direction: column; 19 | font-size: 32rpx; 20 | margin-top: 30rpx; 21 | padding-left: 50rpx; 22 | padding-right: 50rpx; 23 | } 24 | .company-content-text-1 { 25 | color: #2DA8BD; 26 | } 27 | .company-content-text-2 { 28 | margin-top: 30rpx; 29 | } 30 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/feedback/feedback.js: -------------------------------------------------------------------------------- 1 | // pages/user/feedback/feedback.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | backUser: function () { 11 | wx.navigateBack({ 12 | delta: 1 13 | }) 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function (options) { 20 | 21 | }, 22 | 23 | /** 24 | * 生命周期函数--监听页面初次渲染完成 25 | */ 26 | onReady: function () { 27 | 28 | }, 29 | 30 | /** 31 | * 生命周期函数--监听页面显示 32 | */ 33 | onShow: function () { 34 | 35 | }, 36 | 37 | /** 38 | * 生命周期函数--监听页面隐藏 39 | */ 40 | onHide: function () { 41 | 42 | }, 43 | 44 | /** 45 | * 生命周期函数--监听页面卸载 46 | */ 47 | onUnload: function () { 48 | 49 | }, 50 | 51 | /** 52 | * 页面相关事件处理函数--监听用户下拉动作 53 | */ 54 | onPullDownRefresh: function () { 55 | 56 | }, 57 | 58 | /** 59 | * 页面上拉触底事件的处理函数 60 | */ 61 | onReachBottom: function () { 62 | 63 | }, 64 | 65 | /** 66 | * 用户点击右上角分享 67 | */ 68 | onShareAppMessage: function () { 69 | 70 | } 71 | }) -------------------------------------------------------------------------------- /小程序/pages/user/feedback/feedback.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "用户反馈" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/feedback/feedback.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 13 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /小程序/pages/user/feedback/feedback.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/feedback/feedback.wxss */ 2 | /* 用户反馈 */ 3 | 4 | /* --start-- */ 5 | .user-feedback-view { 6 | background: #f0f0f0; 7 | position: fixed; 8 | height: 100%; 9 | width: 100%; 10 | } 11 | .user-feedback-body { 12 | margin-left: 30rpx; 13 | margin-right: 30rpx; 14 | } 15 | /* textarea */ 16 | .textarea-content-view { 17 | background: #fff; 18 | margin-bottom: 30rpx; 19 | margin-top: 50rpx; 20 | border-radius: 11rpx; 21 | border: 3rpx solid #e4e4e4; 22 | padding: 30rpx; 23 | } 24 | .textarea-content-view textarea{ 25 | width: 100%; 26 | } 27 | .textarea-placeholder-class { 28 | font-size: 32rpx; 29 | } 30 | /* 字体大小 */ 31 | .feedback-font-size { 32 | font-size: 32rpx; 33 | } 34 | .feedback-font-size2 { 35 | font-size: 28rpx; 36 | line-height: 20rpx; 37 | color: #828282; 38 | } 39 | /* 姓名 & 手机号 input样式*/ 40 | .feedback-input-view { 41 | background: #fff; 42 | display: flex; 43 | overflow: hidden; 44 | border: 3rpx solid #e4e4e4; 45 | border-radius: 11rpx; 46 | line-height: 93rpx; 47 | padding-left: 40rpx; 48 | margin-top: 30rpx; 49 | } 50 | .feedback-input { 51 | height: 93rpx; 52 | padding-left: 30rpx; 53 | } 54 | 55 | /* 按钮:提交建议 */ 56 | .submit-suggest { 57 | background-color: #54bf6c; 58 | color: #fff; 59 | font-size: 37rpx; 60 | position: fixed; 61 | bottom: 0; 62 | width: 100%; 63 | } 64 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/information/information.js: -------------------------------------------------------------------------------- 1 | // pages/user/information/information.js 2 | const app = getApp() 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | userInfo: {}, 11 | hasUserInfo: false, 12 | canIUse: wx.canIUse('button.open-type.getUserInfo') 13 | }, 14 | backUser: function () { 15 | wx.navigateBack({ 16 | delta: 1 17 | }) 18 | }, 19 | 20 | /** 21 | * 生命周期函数--监听页面加载 22 | */ 23 | onLoad: function () { 24 | if (app.globalData.userInfo) { 25 | this.setData({ 26 | userInfo: app.globalData.userInfo, 27 | hasUserInfo: true 28 | }) 29 | } else if (this.data.canIUse) { 30 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 31 | // 所以此处加入 callback 以防止这种情况 32 | app.userInfoReadyCallback = res => { 33 | this.setData({ 34 | userInfo: res.userInfo, 35 | hasUserInfo: true 36 | }) 37 | } 38 | } else { 39 | // 在没有 open-type=getUserInfo 版本的兼容处理 40 | wx.getUserInfo({ 41 | success: res => { 42 | app.globalData.userInfo = res.userInfo 43 | this.setData({ 44 | userInfo: res.userInfo, 45 | hasUserInfo: true 46 | }) 47 | } 48 | }) 49 | } 50 | }, 51 | getUserInfo: function (e) { 52 | console.log(e) 53 | app.globalData.userInfo = e.detail.userInfo 54 | this.setData({ 55 | userInfo: e.detail.userInfo, 56 | hasUserInfo: true 57 | }) 58 | }, 59 | 60 | /** 61 | * 生命周期函数--监听页面初次渲染完成 62 | */ 63 | onReady: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 生命周期函数--监听页面显示 69 | */ 70 | onShow: function () { 71 | 72 | }, 73 | 74 | /** 75 | * 生命周期函数--监听页面隐藏 76 | */ 77 | onHide: function () { 78 | 79 | }, 80 | 81 | /** 82 | * 生命周期函数--监听页面卸载 83 | */ 84 | onUnload: function () { 85 | 86 | }, 87 | 88 | /** 89 | * 页面相关事件处理函数--监听用户下拉动作 90 | */ 91 | onPullDownRefresh: function () { 92 | 93 | }, 94 | 95 | /** 96 | * 页面上拉触底事件的处理函数 97 | */ 98 | onReachBottom: function () { 99 | 100 | }, 101 | 102 | /** 103 | * 用户点击右上角分享 104 | */ 105 | onShareAppMessage: function () { 106 | 107 | } 108 | }) -------------------------------------------------------------------------------- /小程序/pages/user/information/information.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "个人资料" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/information/information.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |   像: 9 | 10 | 11 | 12 | 13 |   称: 14 | {{userInfo.nickName}} 15 | 16 | 17 | 18 |   别: 19 | 20 | 21 | 22 | 23 |   名: 24 | 25 | 26 | 27 | 28 | 29 |   话: 30 | 31 | 32 | 33 | 34 | 保存 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /小程序/pages/user/information/information.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/information/information.wxss */ 2 | /* 个人资料 */ 3 | /* --start-- */ 4 | .user-information { 5 | position: fixed; 6 | height: 100%; 7 | width: 100%; 8 | background-color: #f0f0f0; 9 | } 10 | .user-information-body { 11 | margin-top: 80rpx; 12 | } 13 | .flex-view { 14 | display: flex; 15 | flex-direction: row; 16 | background-color: #fff; 17 | margin-bottom: 5rpx; 18 | line-height: 100rpx; 19 | padding: 10rpx 50rpx; 20 | position: relative; 21 | font-size: 32rpx; 22 | text-align: right; 23 | } 24 | .flex-view input { 25 | vertical-align: middle; 26 | width: 100%; 27 | height: 100rpx; 28 | } 29 | .input-content-fender { 30 | padding-right: 30rpx; 31 | } 32 | /* 头像 */ 33 | .user-head image { 34 | border-radius: 50%; 35 | width: 100rpx; 36 | height: 100rpx; 37 | position: fixed; 38 | right: 0; 39 | margin-right: 50rpx; 40 | } 41 | 42 | /* 昵称 */ 43 | .user-nickname-text { 44 | position: fixed; 45 | right: 0; 46 | margin-right: 50rpx; 47 | } 48 | 49 | .information-btn{ 50 | display: flex; 51 | justify-content: center; 52 | background-color: #54BF6C; 53 | color: #ffffff; 54 | padding: 20rpx 0; 55 | position: fixed; 56 | bottom: 0; 57 | left: 0; 58 | right: 0; 59 | } 60 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/landlord_entrance/landlord_entrance.js: -------------------------------------------------------------------------------- 1 | // pages/user/landlord_entrance/landlord_entrance.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /小程序/pages/user/landlord_entrance/landlord_entrance.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "实名认证" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/landlord_entrance/landlord_entrance.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 请先进行实名认证 8 | 9 | 10 | -------------------------------------------------------------------------------- /小程序/pages/user/landlord_entrance/landlord_entrance.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/landlord_entrance/landlord_entrance.wxss */ 2 | /* 房东入口:请先进行实名认证 */ 3 | 4 | /* --start-- */ 5 | .name-detection-view { 6 | text-align: center; 7 | } 8 | .name-detection-img { 9 | width: 175rpx; 10 | height: 175rpx; 11 | margin-top: 200rpx; 12 | } 13 | .name-detection-tex-view { 14 | margin-top: 30rpx; 15 | } 16 | .name-detection-text { 17 | font-size: 37rpx; 18 | } 19 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/money/money.js: -------------------------------------------------------------------------------- 1 | // pages/user/money/money.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 钱包明细——钱包明细 69 | */ 70 | walletDetail: function () { 71 | wx.navigateTo({ 72 | url: '../../user/money/wallet_detail/wallet_detail', 73 | }) 74 | }, 75 | }) -------------------------------------------------------------------------------- /小程序/pages/user/money/money.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "提现"} -------------------------------------------------------------------------------- /小程序/pages/user/money/money.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 钱包明细 7 | 8 | 9 | 10 | 11 | 12 | ¥0.00 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /小程序/pages/user/money/money.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/money/money.wxss */ 2 | /* 我的钱包——提现 */ 3 | 4 | /* --start-- */ 5 | .my-money { 6 | text-align: center; 7 | display: flex; 8 | flex-direction: column; 9 | } 10 | .my-money image{ 11 | width: 126rpx; 12 | height: 110rpx; 13 | } 14 | /* 钱包明细 */ 15 | .money-detail { 16 | text-align: right; 17 | padding: 30rpx 0rpx 50rpx 0rpx; 18 | border-bottom: 5rpx solid #f0f0f0; 19 | margin: 0rpx 50rpx; 20 | } 21 | .money-detail text { 22 | font-size: 32rpx; 23 | color: #666666; 24 | } 25 | /* 金额数量 */ 26 | .moeny-count { 27 | text-align: center; 28 | padding: 50rpx 0rpx 50rpx 0rpx; 29 | border-bottom: 5rpx solid #f0f0f0; 30 | margin: 0rpx 50rpx; 31 | } 32 | .moeny-count view { 33 | padding-top: 50rpx; 34 | } 35 | .moeny-count text{ 36 | font-size: 65rpx; 37 | color: #ff9800; 38 | } 39 | /* 按钮:押金提现 */ 40 | .my-money button{ 41 | width: 50%; 42 | background-color: #54bf6c; 43 | color: #fff; 44 | font-size: 32rpx; 45 | margin-top: 80rpx; 46 | } 47 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/money/wallet_detail/wallet_detail.js: -------------------------------------------------------------------------------- 1 | // pages/user/money/wallet_detail/wallet_detail.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /小程序/pages/user/money/wallet_detail/wallet_detail.json: -------------------------------------------------------------------------------- 1 | {"navigationBarTitleText": "收益明细"} -------------------------------------------------------------------------------- /小程序/pages/user/money/wallet_detail/wallet_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 提现 9 | 10 | 2018-06-01 11 | 09:30:30 12 | 13 | 14 | 15 | -500.00 16 | 17 | 18 | 19 | 20 | 21 | 22 | 押金 23 | 24 | 2018-06-01 25 | 09:30:30 26 | 27 | 28 | 29 | +500.00 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /小程序/pages/user/money/wallet_detail/wallet_detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/money/wallet_detail/wallet_detail.wxss */ 2 | /* 钱包明细 */ 3 | 4 | /* --start-- */ 5 | .money-detail-item { 6 | border-bottom: 5rpx solid #f0f0f0; 7 | padding: 30rpx 50rpx; 8 | display: flex; 9 | flex-direction: row; 10 | position: relative; 11 | } 12 | .money-count-view { 13 | position: fixed; 14 | right: 0; 15 | margin-right:50rpx; 16 | margin-top: 20rpx; 17 | } 18 | .money-count-view text { 19 | font-size: 42rpx; 20 | font-weight:500; 21 | } 22 | .deposit-money-count text { 23 | color: #259b24; 24 | } 25 | .time-view { 26 | padding-top: 20rpx; 27 | } 28 | .time-view text { 29 | font-size: 32rpx; 30 | } 31 | .title-view { 32 | font-size: 37rpx; 33 | font-weight: 600; 34 | } 35 | .time-text { 36 | margin-left: 20rpx; 37 | } 38 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/pages/user/my-house/my-house.js: -------------------------------------------------------------------------------- 1 | // pages/my-house/my-house.js 2 | let chooseYear = null; 3 | let chooseMonth = null; 4 | const conf = { 5 | data: { 6 | hasEmptyGrid: false, 7 | showPicker: false, 8 | imgUrls: [ 9 | '/images/banner1.jpg', 10 | '/images/banner2.png', 11 | ], 12 | indicatorDots: true, 13 | autoplay: true, 14 | interval: 2000, 15 | duration: 1200, 16 | scrollTop: 100 17 | }, 18 | onLoad() { 19 | const date = new Date(); 20 | const curYear = date.getFullYear(); 21 | const curMonth = date.getMonth() + 1; 22 | const weeksCh = ['日', '一', '二', '三', '四', '五', '六']; 23 | this.calculateEmptyGrids(curYear, curMonth); 24 | this.calculateDays(curYear, curMonth); 25 | this.setData({ 26 | curYear, 27 | curMonth, 28 | weeksCh 29 | }); 30 | }, 31 | getThisMonthDays(year, month) { 32 | return new Date(year, month, 0).getDate(); 33 | }, 34 | getFirstDayOfWeek(year, month) { 35 | return new Date(Date.UTC(year, month - 1, 1)).getDay(); 36 | }, 37 | calculateEmptyGrids(year, month) { 38 | const firstDayOfWeek = this.getFirstDayOfWeek(year, month); 39 | let empytGrids = []; 40 | if (firstDayOfWeek > 0) { 41 | for (let i = 0; i < firstDayOfWeek; i++) { 42 | empytGrids.push(i); 43 | } 44 | this.setData({ 45 | hasEmptyGrid: true, 46 | empytGrids 47 | }); 48 | } else { 49 | this.setData({ 50 | hasEmptyGrid: false, 51 | empytGrids: [] 52 | }); 53 | } 54 | }, 55 | calculateDays(year, month) { 56 | let days = []; 57 | 58 | const thisMonthDays = this.getThisMonthDays(year, month); 59 | 60 | for (let i = 1; i <= thisMonthDays; i++) { 61 | days.push({ 62 | day: i, 63 | choosed: false 64 | }); 65 | } 66 | 67 | this.setData({ 68 | days 69 | }); 70 | }, 71 | handleCalendar(e) { 72 | const handle = e.currentTarget.dataset.handle; 73 | const curYear = this.data.curYear; 74 | const curMonth = this.data.curMonth; 75 | if (handle === 'prev') { 76 | let newMonth = curMonth - 1; 77 | let newYear = curYear; 78 | if (newMonth < 1) { 79 | newYear = curYear - 1; 80 | newMonth = 12; 81 | } 82 | 83 | this.calculateDays(newYear, newMonth); 84 | this.calculateEmptyGrids(newYear, newMonth); 85 | 86 | this.setData({ 87 | curYear: newYear, 88 | curMonth: newMonth 89 | }); 90 | } else { 91 | let newMonth = curMonth + 1; 92 | let newYear = curYear; 93 | if (newMonth > 12) { 94 | newYear = curYear + 1; 95 | newMonth = 1; 96 | } 97 | 98 | this.calculateDays(newYear, newMonth); 99 | this.calculateEmptyGrids(newYear, newMonth); 100 | 101 | this.setData({ 102 | curYear: newYear, 103 | curMonth: newMonth 104 | }); 105 | } 106 | }, 107 | tapDayItem(e) { 108 | const idx = e.currentTarget.dataset.idx; 109 | const days = this.data.days; 110 | days[idx].choosed = !days[idx].choosed; 111 | this.setData({ 112 | days, 113 | }); 114 | }, 115 | chooseYearAndMonth() { 116 | const curYear = this.data.curYear; 117 | const curMonth = this.data.curMonth; 118 | let pickerYear = []; 119 | let pickerMonth = []; 120 | for (let i = 1900; i <= 2100; i++) { 121 | pickerYear.push(i); 122 | } 123 | for (let i = 1; i <= 12; i++) { 124 | pickerMonth.push(i); 125 | } 126 | const idxYear = pickerYear.indexOf(curYear); 127 | const idxMonth = pickerMonth.indexOf(curMonth); 128 | this.setData({ 129 | pickerValue: [idxYear, idxMonth], 130 | pickerYear, 131 | pickerMonth, 132 | showPicker: true, 133 | }); 134 | }, 135 | pickerChange(e) { 136 | const val = e.detail.value; 137 | chooseYear = this.data.pickerYear[val[0]]; 138 | chooseMonth = this.data.pickerMonth[val[1]]; 139 | }, 140 | tapPickerBtn(e) { 141 | const type = e.currentTarget.dataset.type; 142 | const o = { 143 | showPicker: false, 144 | }; 145 | if (type === 'confirm') { 146 | o.curYear = chooseYear; 147 | o.curMonth = chooseMonth; 148 | this.calculateEmptyGrids(chooseYear, chooseMonth); 149 | this.calculateDays(chooseYear, chooseMonth); 150 | } 151 | 152 | this.setData(o); 153 | }, 154 | }; 155 | 156 | Page(conf); 157 | -------------------------------------------------------------------------------- /小程序/pages/user/my-house/my-house.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "我的房源" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/my-house/my-house.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 花果园半山小镇1栋1单元 12 | 13 | 14 | 15 | 16 | 17 | 18 | 贵阳市 19 | 20 | 21 | 累积收益 22 | 23 | 24 | ¥1158 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {{curYear || "--"}} 年 {{curMonth || "--"}} 月 37 | 38 | 39 | 40 | 41 | 42 | {{item}} 43 | 44 | 45 | 46 | 47 | 48 | 入住中 49 | {{item.day}} 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /小程序/pages/user/my-house/my-house.wxss: -------------------------------------------------------------------------------- 1 | /* pages/my-house/my-house.wxss */ 2 | .banner image{ 3 | width: 100%; 4 | } 5 | 6 | .room-1{ 7 | width: 100%; 8 | height: 380rpx; 9 | } 10 | 11 | .big-word{ 12 | font-size: 36rpx; 13 | text-align:center; 14 | } 15 | 16 | .location{ 17 | width: 50rpx; 18 | height: 50rpx; 19 | margin-left: 30rpx; 20 | } 21 | 22 | .location-1{ 23 | margin-top: 10rpx; 24 | } 25 | 26 | .city{ 27 | color: #666666; 28 | font-size: 28rpx; 29 | margin-left: 30rpx; 30 | } 31 | 32 | .city-1{ 33 | padding-top: 10rpx; 34 | } 35 | 36 | .profit{ 37 | font-size: 28rpx; 38 | margin-left: 90rpx; 39 | margin-top:0rpx; 40 | } 41 | 42 | .profit-1{ 43 | padding-top: 10rpx; 44 | } 45 | 46 | .money{ 47 | font-size: 36rpx; 48 | color: #FF9800; 49 | margin-left: 30rpx; 50 | } 51 | 52 | .money-1{ 53 | padding-top: 15rpx; 54 | } 55 | 56 | .profit-2{ 57 | display: flex; 58 | margin-left: 80rpx; 59 | } 60 | 61 | /* */ 62 | .detail-data{ 63 | border-bottom: 5rpx solid #f0f0f0; 64 | padding-bottom: 10rpx; 65 | } 66 | 67 | .box { 68 | display: flex; 69 | flex-direction: column; 70 | } 71 | 72 | .box-lr { 73 | flex-direction: row; 74 | } 75 | 76 | .box-rl { 77 | flex-direction: row-reverse; 78 | } 79 | 80 | .box-tb { 81 | flex-direction: column; 82 | } 83 | 84 | .box-bt { 85 | flex-direction: column-reverse; 86 | } 87 | 88 | .box-pack-center { 89 | justify-content: center; 90 | } 91 | 92 | .box-pack-start { 93 | justify-content: flex-start; 94 | } 95 | 96 | .box-pack-end { 97 | justify-content: flex-end; 98 | } 99 | 100 | .box-pack-between { 101 | justify-content: space-between; 102 | } 103 | 104 | .box-pack-around { 105 | justify-content: space-around; 106 | } 107 | 108 | .box-align-center { 109 | align-items: center; 110 | } 111 | 112 | .box-align-start { 113 | align-items: flex-start; 114 | } 115 | 116 | .box-align-end { 117 | align-items: flex-end; 118 | } 119 | 120 | .self-align-center { 121 | align-self: center; 122 | margin: 0 auto; 123 | } 124 | 125 | .self-align-start { 126 | align-self: flex-start; 127 | } 128 | 129 | .self-align-end { 130 | align-self: flex-end; 131 | } 132 | 133 | .self-align-stretch { 134 | align-self: stretch; 135 | } 136 | 137 | .box-wrap { 138 | flex-wrap: wrap; 139 | } 140 | 141 | .box-nowrap { 142 | flex-wrap: nowrap; 143 | } 144 | 145 | .flex { 146 | flex-grow: 1; 147 | } 148 | 149 | .shrink { 150 | flex-shrink: 1; 151 | } 152 | 153 | .bg { 154 | background-image: linear-gradient(to bottom, #faefe7, #ffcbd7); 155 | overflow: hidden; 156 | } 157 | 158 | .brown-color { 159 | color: #784344; 160 | } 161 | 162 | .pink-color { 163 | color: #ff629a; 164 | } 165 | 166 | .white-color { 167 | color: #fff; 168 | } 169 | 170 | .fs24 { 171 | font-size: 24rpx; 172 | } 173 | 174 | .fs28 { 175 | font-size: 28rpx; 176 | } 177 | 178 | .fs32 { 179 | font-size: 32rpx; 180 | } 181 | 182 | .fs36 { 183 | font-size: 36rpx; 184 | } 185 | 186 | .top-handle { 187 | height: 80rpx; 188 | } 189 | 190 | .top-handle view{ 191 | color: #363636; 192 | } 193 | 194 | .prev { 195 | text-align: right; 196 | height: 80rpx; 197 | } 198 | 199 | .next { 200 | height: 80rpx; 201 | } 202 | 203 | .prev-handle { 204 | width: 80rpx; 205 | height: 100%; 206 | } 207 | 208 | .next-handle { 209 | width: 80rpx; 210 | height: 100%; 211 | } 212 | 213 | .date-area { 214 | width: 50%; 215 | height: 80rpx; 216 | text-align: center; 217 | } 218 | 219 | .weeks { 220 | height: 50rpx; 221 | line-height: 50rpx; 222 | border-bottom: 5rpx solid #f0f0f0; 223 | margin: 10rpx 20rpx; 224 | padding-bottom: 10rpx; 225 | } 226 | 227 | .week { 228 | text-align: center; 229 | color: #363636; 230 | } 231 | 232 | .grid { 233 | width: 107.1428571429rpx; 234 | margin: 10rpx 0; 235 | } 236 | 237 | .day { 238 | width: 60rpx; 239 | height: 60rpx; 240 | color: #363636; 241 | font-size: 26rpx; 242 | font-weight: 200; 243 | } 244 | 245 | .border-radius { 246 | border-radius: 50%; 247 | position: relative; 248 | left: 0; 249 | top: 0; 250 | color: #fff; 251 | } 252 | 253 | .pink-bg { 254 | background-color: #41ADBD; 255 | } 256 | 257 | .purple-bg { 258 | background-color: #41ADBD; 259 | } 260 | 261 | .right-triangle::after { 262 | content: ""; 263 | display: block; 264 | width: 0; 265 | height: 0; 266 | border: 15rpx solid transparent; 267 | border-left-color: #ff629a; 268 | position: absolute; 269 | right: -22rpx; 270 | top: 18rpx; 271 | } 272 | 273 | .left-triangle::before { 274 | content: ""; 275 | display: block; 276 | width: 0; 277 | height: 0; 278 | border: 15rpx solid transparent; 279 | border-right-color: #ff629a; 280 | position: absolute; 281 | left: -22rpx; 282 | top: 18rpx; 283 | } 284 | 285 | .tips { 286 | text-align: center; 287 | margin-top: 20rpx; 288 | margin-bottom: 20rpx; 289 | } 290 | 291 | .types { 292 | background-color: #ffedf4; 293 | height: 50rpx; 294 | } 295 | 296 | .types-desc { 297 | padding: 0 20rpx; 298 | } 299 | 300 | .type-name { 301 | margin-top: 50rpx; 302 | margin-bottom: 30rpx; 303 | } 304 | 305 | .type-desc { 306 | padding: 0 35rpx; 307 | line-height: 38rpx; 308 | } 309 | 310 | .explain { 311 | border-top: 1px solid #eee; 312 | width: 90%; 313 | margin: 20rpx 5% 20rpx 5%; 314 | padding: 20rpx 0; 315 | } 316 | 317 | .explain-title { 318 | font-weight: bold; 319 | margin-bottom: 15rpx; 320 | } 321 | 322 | .explain-item { 323 | padding: 8rpx 20rpx; 324 | color: #fff; 325 | } 326 | 327 | .left-border-radius { 328 | border-top-left-radius: 20rpx; 329 | border-bottom-left-radius: 20rpx; 330 | } 331 | 332 | .right-border-radius { 333 | border-top-right-radius: 20rpx; 334 | border-bottom-right-radius: 20rpx; 335 | } 336 | 337 | .picker-btns { 338 | height: 120rpx; 339 | line-height: 120rpx; 340 | border-bottom: 1rpx solid #ff7ca0; 341 | } 342 | 343 | .picker-confirm { 344 | margin-right: 50rpx; 345 | } 346 | 347 | .picker-cancel { 348 | margin-left: 50rpx; 349 | } 350 | 351 | .picker-view { 352 | color: #ff7ca0; 353 | text-align: center; 354 | } 355 | 356 | .text-top{ 357 | color: #E24E54; 358 | font-size: 24rpx; 359 | } 360 | 361 | .text-foot{ 362 | color: #FF9800; 363 | font-size: 24rpx; 364 | } 365 | -------------------------------------------------------------------------------- /小程序/pages/user/user.js: -------------------------------------------------------------------------------- 1 | // pages/user/user.js 2 | const app = getApp() 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | userInfo: {}, 11 | hasUserInfo: false, 12 | canIUse: wx.canIUse('button.open-type.getUserInfo'), 13 | type: '房东' 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function () { 20 | if (app.globalData.userInfo) { 21 | this.setData({ 22 | userInfo: app.globalData.userInfo, 23 | hasUserInfo: true 24 | }) 25 | } else if (this.data.canIUse) { 26 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 27 | // 所以此处加入 callback 以防止这种情况 28 | app.userInfoReadyCallback = res => { 29 | this.setData({ 30 | userInfo: res.userInfo, 31 | hasUserInfo: true 32 | }) 33 | } 34 | } else { 35 | // 在没有 open-type=getUserInfo 版本的兼容处理 36 | wx.getUserInfo({ 37 | success: res => { 38 | app.globalData.userInfo = res.userInfo 39 | this.setData({ 40 | userInfo: res.userInfo, 41 | hasUserInfo: true 42 | }) 43 | } 44 | }) 45 | } 46 | }, 47 | getUserInfo: function (e) { 48 | console.log(e) 49 | app.globalData.userInfo = e.detail.userInfo 50 | this.setData({ 51 | userInfo: e.detail.userInfo, 52 | hasUserInfo: true 53 | }) 54 | }, 55 | 56 | toggle: function (e) { 57 | var that = this; 58 | var type = that.data.type === '用户' ? '房东' : '用户'; 59 | that.setData({ 60 | type: type 61 | }); 62 | }, 63 | showModal: function () { 64 | wx.showModal({ 65 | showCancel: false, 66 | title: '收益须知', 67 | content: '每月15日为订单结算日,届时会将您的本月收益打至您的银行账户', 68 | success: function (res) { 69 | if (res.confirm) { 70 | console.log('用户点击确定') 71 | } 72 | } 73 | }) 74 | }, 75 | showMyHouse:function(){ 76 | wx.navigateTo({ 77 | url: '../user/my-house/my-house', 78 | }) 79 | }, 80 | 81 | /** 82 | * 生命周期函数--监听页面初次渲染完成 83 | */ 84 | onReady: function () { 85 | 86 | }, 87 | 88 | /** 89 | * 生命周期函数--监听页面显示 90 | */ 91 | onShow: function () { 92 | 93 | }, 94 | 95 | /** 96 | * 生命周期函数--监听页面隐藏 97 | */ 98 | onHide: function () { 99 | 100 | }, 101 | 102 | /** 103 | * 生命周期函数--监听页面卸载 104 | */ 105 | onUnload: function () { 106 | 107 | }, 108 | 109 | /** 110 | * 页面相关事件处理函数--监听用户下拉动作 111 | */ 112 | onPullDownRefresh: function () { 113 | 114 | }, 115 | 116 | /** 117 | * 页面上拉触底事件的处理函数 118 | */ 119 | onReachBottom: function () { 120 | 121 | }, 122 | 123 | /** 124 | * 用户点击右上角分享 125 | */ 126 | onShareAppMessage: function () { 127 | 128 | }, 129 | 130 | /** 131 | * 用户头像-个人资料 132 | */ 133 | showPersonalData: function () { 134 | wx.navigateTo({ 135 | url: '../user/information/information', 136 | }) 137 | }, 138 | /** 139 | * 实名认证——实名认证 140 | */ 141 | showAuthentication: function() { 142 | wx.navigateTo({ 143 | url: '../user/authentication/authentication', 144 | }) 145 | }, 146 | 147 | /** 148 | * 我的钱包-提现 149 | */ 150 | showWallet: function () { 151 | wx.navigateTo({ 152 | url: '../user/money/money', 153 | }) 154 | }, 155 | 156 | /** 157 | * 切换为房东——请先进行实名认证 158 | */ 159 | nameDetection: function () { 160 | wx.navigateTo({ 161 | url: '../user/landlord_entrance/landlord_entrance', 162 | }) 163 | }, 164 | 165 | // 切换为房东 166 | showLandlord:function(){ 167 | wx.switchTab({ 168 | url: '../landlord/landlord', 169 | }) 170 | }, 171 | 172 | /** 173 | * 公司简介-公司简介 174 | */ 175 | showPresentation:function () { 176 | wx.navigateTo({ 177 | url: '../user/company_presentation/company_presentation', 178 | }) 179 | }, 180 | 181 | /** 182 | * 用户反馈-用户反馈 183 | */ 184 | showFeedback: function () { 185 | wx.navigateTo({ 186 | url: '../user/feedback/feedback', 187 | }) 188 | }, 189 | 190 | /** 191 | * 常见问题-常见问题 192 | */ 193 | showFAQ: function () { 194 | wx.navigateTo({ 195 | url: '../user/FAQ/FAQ', 196 | }) 197 | }, 198 | 199 | // 添加房源 200 | addHouse:function(){ 201 | wx.navigateTo({ 202 | url: '../recruit/release/release', 203 | }) 204 | }, 205 | 206 | // 房东收益明细 207 | showWallet2:function(){ 208 | wx.navigateTo({ 209 | url: '../user/money/wallet_detail/wallet_detail', 210 | }) 211 | } 212 | }) -------------------------------------------------------------------------------- /小程序/pages/user/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "我的" 3 | } -------------------------------------------------------------------------------- /小程序/pages/user/user.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | {{userInfo.nickName}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 实名认证 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 我的钱包 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 公司简介 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 用户反馈 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 常见问题 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | {{userInfo.nickName}} 73 | 74 | 75 | 76 | 收益:5000元 77 | 78 | 收益明细 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 花果园半山小镇 90 | 91 | 92 | 2018年6月1日-2018年6月3日 93 | 94 | 95 | 订单号:1648484841115 96 | 97 | 98 | 99 | 100 | 待付款 101 | (共2晚) 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 花果园半山小镇 110 | 111 | 112 | 2018年6月1日-2018年6月3日 113 | 114 | 115 | 订单号:1648484841115 116 | 117 | 118 | 119 | 120 | 待入住 121 | (共2晚) 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 花果园半山小镇 130 | 131 | 132 | 2018年6月1日-2018年6月3日 133 | 134 | 135 | 订单号:1648484841115 136 | 137 | 138 | 139 | 140 | 已完成 141 | (共2晚) 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /小程序/pages/user/user.wxss: -------------------------------------------------------------------------------- 1 | /* pages/user/user.wxss */ 2 | /* 我的 */ 3 | 4 | /* --start-- */ 5 | /* 头部 */ 6 | .user-head-bg { 7 | height: 500rpx; 8 | } 9 | .head-bg-img { 10 | width: 100%; 11 | height: 341rpx; 12 | opacity: 0.6; 13 | } 14 | .head-and-name { 15 | text-align: center; 16 | margin-top: -15%; 17 | position: relative; 18 | } 19 | .user-head-img { 20 | width: 178rpx; 21 | height: 178rpx; 22 | border-radius: 50%; 23 | } 24 | .user-name { 25 | font-size: 32rpx; 26 | } 27 | 28 | /* 菜单 */ 29 | .grid-menu { 30 | display: flex; 31 | flex-direction: row; 32 | flex-wrap: wrap; 33 | box-sizing: border-box; 34 | margin-top: 20rpx; 35 | margin-left: 40rpx; 36 | margin-right: 40rpx; 37 | align-content: center; 38 | } 39 | .menu-item { 40 | text-align: center; 41 | width: 33%; 42 | border-bottom: 8rpx solid #f0f0f0; 43 | } 44 | .menu-item-body { 45 | margin-bottom: 20rpx; 46 | margin-top: 20rpx; 47 | padding-top: 30rpx; 48 | padding-bottom: 30rpx; 49 | border-right: 8rpx solid #f0f0f0; 50 | } 51 | .company-presentation { 52 | border-right: none; 53 | } 54 | .user-feedback { 55 | border-bottom: none; 56 | } 57 | .FAQ { 58 | border-bottom: none; 59 | } 60 | .menu-img { 61 | width: 75rpx; 62 | height: 75rpx; 63 | } 64 | .menu-name { 65 | font-size: 32rpx; 66 | } 67 | 68 | /* 房东界面 */ 69 | .Photo-1{ 70 | width: 100%; 71 | height: 292rpx; 72 | margin: 0px; 73 | opacity:0.6 74 | } 75 | 76 | .Photo-2{ 77 | width: 178rpx; 78 | height: 178rpx; 79 | margin: 0px; 80 | border-radius: 100rpx; 81 | position:absolute; 82 | top: 239rpx; 83 | left: 286rpx; 84 | } 85 | 86 | .Typeface{ 87 | font-size: 36rpx; 88 | color: red; 89 | margin-left: 20rpx; 90 | margin-top:-100rpx; 91 | } 92 | 93 | .house-1{ 94 | position:absolute; 95 | top: 360rpx; 96 | right: 10rpx; 97 | } 98 | 99 | .house{ 100 | width: 210rpx; 101 | background: #54BF6C; 102 | color: #fff; 103 | font-size: 28rpx; 104 | margin-right: 20rpx; 105 | } 106 | 107 | .Typeface-1{ 108 | font-size: 24rpx; 109 | } 110 | 111 | .Prompt{ 112 | width: 46rpx; 113 | height: 36rpx; 114 | margin-left: 90rpx; 115 | } 116 | 117 | .Typeface-2{ 118 | font-size: 28rpx; 119 | color: #FF9800; 120 | margin-top: 80rpx; 121 | } 122 | 123 | .landlord-infor{ 124 | display: flex; 125 | justify-content: center; 126 | } 127 | 128 | .landlord-head-left{ 129 | position: absolute; 130 | top: 350rpx; 131 | } 132 | 133 | .Middle{ 134 | margin-left: 20rpx; 135 | margin-top: 30rpx; 136 | display: flex; 137 | justify-content: flex-start; 138 | } 139 | 140 | .pending-payment{ 141 | font-size: 30rpx; 142 | margin: 15rpx 20rpx; 143 | display: flex; 144 | justify-content:space-around; 145 | box-shadow: 1px 2px 0px 0px rgba(218, 218, 218, 1); 146 | border: 1px solid #f0f0f0; 147 | border-radius: 10rpx; 148 | height: 180rpx; 149 | padding-top: 15rpx; 150 | background: #fff; 151 | } 152 | 153 | .picture-1{ 154 | width: 180rpx; 155 | height: 168rpx; 156 | border-radius: 10rpx; 157 | } 158 | 159 | .High-line{ 160 | line-height:2em; 161 | } 162 | 163 | .High-line-6{ 164 | font-size: 32rpx; 165 | } 166 | 167 | .payment-2{ 168 | color: #999; 169 | font-size: 24rpx; 170 | } 171 | 172 | .High-line-1{ 173 | display: flex; 174 | flex-direction:column; 175 | padding-top: 10rpx; 176 | } 177 | 178 | .utton-1{ 179 | margin-bottom: 0rpx; 180 | display: flex; 181 | flex-direction:column; 182 | } 183 | 184 | .button-1{ 185 | color: #41ADBD; 186 | font-size: 24rpx; 187 | } 188 | 189 | .Nights{ 190 | color: #999; 191 | font-size: 24rpx; 192 | margin-top: 30rpx; 193 | } 194 | 195 | .button-4{ 196 | color: #ccc; 197 | font-size: 24rpx; 198 | } 199 | 200 | .button-5{ 201 | color: #54BF6C; 202 | font-size: 24rpx; 203 | } 204 | 205 | .switch{ 206 | background: #999; 207 | width: 256rpx; 208 | font-size: 28rpx; 209 | color: #fff; 210 | } 211 | 212 | .switch-1{ 213 | margin-top: 30rpx; 214 | margin-bottom:20rpx; 215 | } 216 | 217 | 218 | /* 切换为房东 按钮 */ 219 | .convert-btn { 220 | width: 300rpx; 221 | font-size: 30rpx; 222 | background-color: #54BF6C; 223 | color: #fff; 224 | border-radius: 9rpx; 225 | } 226 | 227 | /* --end-- */ -------------------------------------------------------------------------------- /小程序/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件。", 3 | "setting": { 4 | "urlCheck": true, 5 | "es6": true, 6 | "postcss": true, 7 | "minified": true, 8 | "newFeature": true 9 | }, 10 | "compileType": "miniprogram", 11 | "libVersion": "1.9.94", 12 | "appid": "wx33395ae3c08b6132", 13 | "projectname": "wx%E9%A1%BD%E5%AE%B6", 14 | "isGameTourist": false, 15 | "condition": { 16 | "search": { 17 | "current": -1, 18 | "list": [] 19 | }, 20 | "conversation": { 21 | "current": -1, 22 | "list": [] 23 | }, 24 | "game": { 25 | "currentL": -1, 26 | "list": [] 27 | }, 28 | "miniprogram": { 29 | "current": -1, 30 | "list": [] 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /小程序/utils/qqmap-wx-jssdk.min.js: -------------------------------------------------------------------------------- 1 | var _createClass=function(){function a(e,c){for(var b=0;b { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : '0' + n 15 | } 16 | 17 | module.exports = { 18 | formatTime: formatTime 19 | } 20 | -------------------------------------------------------------------------------- /小程序/wxParse/htmlparser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser 4 | * 5 | * author: Di (微信小程序开发工程师) 6 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) 7 | * 垂直微信小程序开发交流社区 8 | * 9 | * github地址: https://github.com/icindy/wxParse 10 | * 11 | * for: 微信小程序富文本解析 12 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 13 | */ 14 | // Regular Expressions for parsing tags and attributes 15 | var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, 16 | endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/, 17 | attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; 18 | 19 | // Empty Elements - HTML 5 20 | var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"); 21 | 22 | // Block Elements - HTML 5 23 | var block = makeMap("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"); 24 | 25 | // Inline Elements - HTML 5 26 | var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"); 27 | 28 | // Elements that you can, intentionally, leave open 29 | // (and which close themselves) 30 | var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); 31 | 32 | // Attributes that have their values filled in disabled="disabled" 33 | var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"); 34 | 35 | // Special Elements (can contain anything) 36 | var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block"); 37 | 38 | function HTMLParser(html, handler) { 39 | var index, chars, match, stack = [], last = html; 40 | stack.last = function () { 41 | return this[this.length - 1]; 42 | }; 43 | 44 | while (html) { 45 | chars = true; 46 | 47 | // Make sure we're not in a script or style element 48 | if (!stack.last() || !special[stack.last()]) { 49 | 50 | // Comment 51 | if (html.indexOf(""); 53 | 54 | if (index >= 0) { 55 | if (handler.comment) 56 | handler.comment(html.substring(4, index)); 57 | html = html.substring(index + 3); 58 | chars = false; 59 | } 60 | 61 | // end tag 62 | } else if (html.indexOf("]*>"), function (all, text) { 100 | text = text.replace(/|/g, "$1$2"); 101 | if (handler.chars) 102 | handler.chars(text); 103 | 104 | return ""; 105 | }); 106 | 107 | 108 | parseEndTag("", stack.last()); 109 | } 110 | 111 | if (html == last) 112 | throw "Parse Error: " + html; 113 | last = html; 114 | } 115 | 116 | // Clean up any remaining tags 117 | parseEndTag(); 118 | 119 | function parseStartTag(tag, tagName, rest, unary) { 120 | tagName = tagName.toLowerCase(); 121 | 122 | if (block[tagName]) { 123 | while (stack.last() && inline[stack.last()]) { 124 | parseEndTag("", stack.last()); 125 | } 126 | } 127 | 128 | if (closeSelf[tagName] && stack.last() == tagName) { 129 | parseEndTag("", tagName); 130 | } 131 | 132 | unary = empty[tagName] || !!unary; 133 | 134 | if (!unary) 135 | stack.push(tagName); 136 | 137 | if (handler.start) { 138 | var attrs = []; 139 | 140 | rest.replace(attr, function (match, name) { 141 | var value = arguments[2] ? arguments[2] : 142 | arguments[3] ? arguments[3] : 143 | arguments[4] ? arguments[4] : 144 | fillAttrs[name] ? name : ""; 145 | 146 | attrs.push({ 147 | name: name, 148 | value: value, 149 | escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //" 150 | }); 151 | }); 152 | 153 | if (handler.start) { 154 | handler.start(tagName, attrs, unary); 155 | } 156 | 157 | } 158 | } 159 | 160 | function parseEndTag(tag, tagName) { 161 | // If no tag name is provided, clean shop 162 | if (!tagName) 163 | var pos = 0; 164 | 165 | // Find the closest opened tag of the same type 166 | else { 167 | tagName = tagName.toLowerCase(); 168 | for (var pos = stack.length - 1; pos >= 0; pos--) 169 | if (stack[pos] == tagName) 170 | break; 171 | } 172 | if (pos >= 0) { 173 | // Close all the open elements, up the stack 174 | for (var i = stack.length - 1; i >= pos; i--) 175 | if (handler.end) 176 | handler.end(stack[i]); 177 | 178 | // Remove the open elements from the stack 179 | stack.length = pos; 180 | } 181 | } 182 | }; 183 | 184 | 185 | function makeMap(str) { 186 | var obj = {}, items = str.split(","); 187 | for (var i = 0; i < items.length; i++) 188 | obj[items[i]] = true; 189 | return obj; 190 | } 191 | 192 | module.exports = HTMLParser; 193 | -------------------------------------------------------------------------------- /小程序/wxParse/wxDiscode.js: -------------------------------------------------------------------------------- 1 | // HTML 支持的数学符号 2 | function strNumDiscode(str){ 3 | str = str.replace(/∀/g, '∀'); 4 | str = str.replace(/∂/g, '∂'); 5 | str = str.replace(/&exists;/g, '∃'); 6 | str = str.replace(/∅/g, '∅'); 7 | str = str.replace(/∇/g, '∇'); 8 | str = str.replace(/∈/g, '∈'); 9 | str = str.replace(/∉/g, '∉'); 10 | str = str.replace(/∋/g, '∋'); 11 | str = str.replace(/∏/g, '∏'); 12 | str = str.replace(/∑/g, '∑'); 13 | str = str.replace(/−/g, '−'); 14 | str = str.replace(/∗/g, '∗'); 15 | str = str.replace(/√/g, '√'); 16 | str = str.replace(/∝/g, '∝'); 17 | str = str.replace(/∞/g, '∞'); 18 | str = str.replace(/∠/g, '∠'); 19 | str = str.replace(/∧/g, '∧'); 20 | str = str.replace(/∨/g, '∨'); 21 | str = str.replace(/∩/g, '∩'); 22 | str = str.replace(/∩/g, '∪'); 23 | str = str.replace(/∫/g, '∫'); 24 | str = str.replace(/∴/g, '∴'); 25 | str = str.replace(/∼/g, '∼'); 26 | str = str.replace(/≅/g, '≅'); 27 | str = str.replace(/≈/g, '≈'); 28 | str = str.replace(/≠/g, '≠'); 29 | str = str.replace(/≤/g, '≤'); 30 | str = str.replace(/≥/g, '≥'); 31 | str = str.replace(/⊂/g, '⊂'); 32 | str = str.replace(/⊃/g, '⊃'); 33 | str = str.replace(/⊄/g, '⊄'); 34 | str = str.replace(/⊆/g, '⊆'); 35 | str = str.replace(/⊇/g, '⊇'); 36 | str = str.replace(/⊕/g, '⊕'); 37 | str = str.replace(/⊗/g, '⊗'); 38 | str = str.replace(/⊥/g, '⊥'); 39 | str = str.replace(/⋅/g, '⋅'); 40 | return str; 41 | } 42 | 43 | //HTML 支持的希腊字母 44 | function strGreeceDiscode(str){ 45 | str = str.replace(/Α/g, 'Α'); 46 | str = str.replace(/Β/g, 'Β'); 47 | str = str.replace(/Γ/g, 'Γ'); 48 | str = str.replace(/Δ/g, 'Δ'); 49 | str = str.replace(/Ε/g, 'Ε'); 50 | str = str.replace(/Ζ/g, 'Ζ'); 51 | str = str.replace(/Η/g, 'Η'); 52 | str = str.replace(/Θ/g, 'Θ'); 53 | str = str.replace(/Ι/g, 'Ι'); 54 | str = str.replace(/Κ/g, 'Κ'); 55 | str = str.replace(/Λ/g, 'Λ'); 56 | str = str.replace(/Μ/g, 'Μ'); 57 | str = str.replace(/Ν/g, 'Ν'); 58 | str = str.replace(/Ξ/g, 'Ν'); 59 | str = str.replace(/Ο/g, 'Ο'); 60 | str = str.replace(/Π/g, 'Π'); 61 | str = str.replace(/Ρ/g, 'Ρ'); 62 | str = str.replace(/Σ/g, 'Σ'); 63 | str = str.replace(/Τ/g, 'Τ'); 64 | str = str.replace(/Υ/g, 'Υ'); 65 | str = str.replace(/Φ/g, 'Φ'); 66 | str = str.replace(/Χ/g, 'Χ'); 67 | str = str.replace(/Ψ/g, 'Ψ'); 68 | str = str.replace(/Ω/g, 'Ω'); 69 | 70 | str = str.replace(/α/g, 'α'); 71 | str = str.replace(/β/g, 'β'); 72 | str = str.replace(/γ/g, 'γ'); 73 | str = str.replace(/δ/g, 'δ'); 74 | str = str.replace(/ε/g, 'ε'); 75 | str = str.replace(/ζ/g, 'ζ'); 76 | str = str.replace(/η/g, 'η'); 77 | str = str.replace(/θ/g, 'θ'); 78 | str = str.replace(/ι/g, 'ι'); 79 | str = str.replace(/κ/g, 'κ'); 80 | str = str.replace(/λ/g, 'λ'); 81 | str = str.replace(/μ/g, 'μ'); 82 | str = str.replace(/ν/g, 'ν'); 83 | str = str.replace(/ξ/g, 'ξ'); 84 | str = str.replace(/ο/g, 'ο'); 85 | str = str.replace(/π/g, 'π'); 86 | str = str.replace(/ρ/g, 'ρ'); 87 | str = str.replace(/ς/g, 'ς'); 88 | str = str.replace(/σ/g, 'σ'); 89 | str = str.replace(/τ/g, 'τ'); 90 | str = str.replace(/υ/g, 'υ'); 91 | str = str.replace(/φ/g, 'φ'); 92 | str = str.replace(/χ/g, 'χ'); 93 | str = str.replace(/ψ/g, 'ψ'); 94 | str = str.replace(/ω/g, 'ω'); 95 | str = str.replace(/ϑ/g, 'ϑ'); 96 | str = str.replace(/ϒ/g, 'ϒ'); 97 | str = str.replace(/ϖ/g, 'ϖ'); 98 | str = str.replace(/·/g, '·'); 99 | return str; 100 | } 101 | 102 | // 103 | 104 | function strcharacterDiscode(str){ 105 | // 加入常用解析 106 | str = str.replace(/ /g, ' '); 107 | str = str.replace(/"/g, "'"); 108 | str = str.replace(/&/g, '&'); 109 | // str = str.replace(/</g, '‹'); 110 | // str = str.replace(/>/g, '›'); 111 | 112 | str = str.replace(/</g, '<'); 113 | str = str.replace(/>/g, '>'); 114 | 115 | return str; 116 | } 117 | 118 | // HTML 支持的其他实体 119 | function strOtherDiscode(str){ 120 | str = str.replace(/Œ/g, 'Œ'); 121 | str = str.replace(/œ/g, 'œ'); 122 | str = str.replace(/Š/g, 'Š'); 123 | str = str.replace(/š/g, 'š'); 124 | str = str.replace(/Ÿ/g, 'Ÿ'); 125 | str = str.replace(/ƒ/g, 'ƒ'); 126 | str = str.replace(/ˆ/g, 'ˆ'); 127 | str = str.replace(/˜/g, '˜'); 128 | str = str.replace(/ /g, ''); 129 | str = str.replace(/ /g, ''); 130 | str = str.replace(/ /g, ''); 131 | str = str.replace(/‌/g, ''); 132 | str = str.replace(/‍/g, ''); 133 | str = str.replace(/‎/g, ''); 134 | str = str.replace(/‏/g, ''); 135 | str = str.replace(/–/g, '–'); 136 | str = str.replace(/—/g, '—'); 137 | str = str.replace(/‘/g, '‘'); 138 | str = str.replace(/’/g, '’'); 139 | str = str.replace(/‚/g, '‚'); 140 | str = str.replace(/“/g, '“'); 141 | str = str.replace(/”/g, '”'); 142 | str = str.replace(/„/g, '„'); 143 | str = str.replace(/†/g, '†'); 144 | str = str.replace(/‡/g, '‡'); 145 | str = str.replace(/•/g, '•'); 146 | str = str.replace(/…/g, '…'); 147 | str = str.replace(/‰/g, '‰'); 148 | str = str.replace(/′/g, '′'); 149 | str = str.replace(/″/g, '″'); 150 | str = str.replace(/‹/g, '‹'); 151 | str = str.replace(/›/g, '›'); 152 | str = str.replace(/‾/g, '‾'); 153 | str = str.replace(/€/g, '€'); 154 | str = str.replace(/™/g, '™'); 155 | 156 | str = str.replace(/←/g, '←'); 157 | str = str.replace(/↑/g, '↑'); 158 | str = str.replace(/→/g, '→'); 159 | str = str.replace(/↓/g, '↓'); 160 | str = str.replace(/↔/g, '↔'); 161 | str = str.replace(/↵/g, '↵'); 162 | str = str.replace(/⌈/g, '⌈'); 163 | str = str.replace(/⌉/g, '⌉'); 164 | 165 | str = str.replace(/⌊/g, '⌊'); 166 | str = str.replace(/⌋/g, '⌋'); 167 | str = str.replace(/◊/g, '◊'); 168 | str = str.replace(/♠/g, '♠'); 169 | str = str.replace(/♣/g, '♣'); 170 | str = str.replace(/♥/g, '♥'); 171 | 172 | str = str.replace(/♦/g, '♦'); 173 | 174 | return str; 175 | } 176 | 177 | function strMoreDiscode(str){ 178 | str = str.replace(/\r\n/g,""); 179 | str = str.replace(/\n/g,""); 180 | 181 | str = str.replace(/code/g,"wxxxcode-style"); 182 | return str; 183 | } 184 | 185 | function strDiscode(str){ 186 | str = strNumDiscode(str); 187 | str = strGreeceDiscode(str); 188 | str = strcharacterDiscode(str); 189 | str = strOtherDiscode(str); 190 | str = strMoreDiscode(str); 191 | return str; 192 | } 193 | function urlToHttpUrl(url,rep){ 194 | 195 | var patt1 = new RegExp("^//"); 196 | var result = patt1.test(url); 197 | if(result){ 198 | url = rep+":"+url; 199 | } 200 | return url; 201 | } 202 | 203 | module.exports = { 204 | strDiscode:strDiscode, 205 | urlToHttpUrl:urlToHttpUrl 206 | } -------------------------------------------------------------------------------- /小程序/wxParse/wxParse.js: -------------------------------------------------------------------------------- 1 | /** 2 | * author: Di (微信小程序开发工程师) 3 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) 4 | * 垂直微信小程序开发交流社区 5 | * 6 | * github地址: https://github.com/icindy/wxParse 7 | * 8 | * for: 微信小程序富文本解析 9 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 10 | */ 11 | 12 | /** 13 | * utils函数引入 14 | **/ 15 | import showdown from './showdown.js'; 16 | import HtmlToJson from './html2json.js'; 17 | /** 18 | * 配置及公有属性 19 | **/ 20 | /** 21 | * 主函数入口区 22 | **/ 23 | function wxParse(bindName = 'wxParseData', type='html', data='
数据不能为空
', target,imagePadding) { 24 | var that = target; 25 | var transData = {};//存放转化后的数据 26 | if (type == 'html') { 27 | transData = HtmlToJson.html2json(data, bindName); 28 | console.log(JSON.stringify(transData, ' ', ' ')); 29 | } else if (type == 'md' || type == 'markdown') { 30 | var converter = new showdown.Converter(); 31 | var html = converter.makeHtml(data); 32 | transData = HtmlToJson.html2json(html, bindName); 33 | console.log(JSON.stringify(transData, ' ', ' ')); 34 | } 35 | transData.view = {}; 36 | transData.view.imagePadding = 0; 37 | if(typeof(imagePadding) != 'undefined'){ 38 | transData.view.imagePadding = imagePadding 39 | } 40 | var bindData = {}; 41 | bindData[bindName] = transData; 42 | that.setData(bindData) 43 | that.wxParseImgLoad = wxParseImgLoad; 44 | that.wxParseImgTap = wxParseImgTap; 45 | } 46 | // 图片点击事件 47 | function wxParseImgTap(e) { 48 | var that = this; 49 | var nowImgUrl = e.target.dataset.src; 50 | var tagFrom = e.target.dataset.from; 51 | if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) { 52 | wx.previewImage({ 53 | current: nowImgUrl, // 当前显示图片的http链接 54 | urls: that.data[tagFrom].imageUrls // 需要预览的图片http链接列表 55 | }) 56 | } 57 | } 58 | 59 | /** 60 | * 图片视觉宽高计算函数区 61 | **/ 62 | function wxParseImgLoad(e) { 63 | var that = this; 64 | var tagFrom = e.target.dataset.from; 65 | var idx = e.target.dataset.idx; 66 | if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) { 67 | calMoreImageInfo(e, idx, that, tagFrom) 68 | } 69 | } 70 | // 假循环获取计算图片视觉最佳宽高 71 | function calMoreImageInfo(e, idx, that, bindName) { 72 | var temData = that.data[bindName]; 73 | if (temData.images.length == 0) { 74 | return; 75 | } 76 | var temImages = temData.images; 77 | //因为无法获取view宽度 需要自定义padding进行计算,稍后处理 78 | var recal = wxAutoImageCal(e.detail.width, e.detail.height,that,bindName); 79 | temImages[idx].width = recal.imageWidth; 80 | temImages[idx].height = recal.imageheight; 81 | temData.images = temImages; 82 | var bindData = {}; 83 | bindData[bindName] = temData; 84 | that.setData(bindData); 85 | } 86 | 87 | // 计算视觉优先的图片宽高 88 | function wxAutoImageCal(originalWidth, originalHeight,that,bindName) { 89 | //获取图片的原始长宽 90 | var windowWidth = 0, windowHeight = 0; 91 | var autoWidth = 0, autoHeight = 0; 92 | var results = {}; 93 | wx.getSystemInfo({ 94 | success: function (res) { 95 | var padding = that.data[bindName].view.imagePadding; 96 | windowWidth = res.windowWidth-2*padding; 97 | windowHeight = res.windowHeight; 98 | //判断按照那种方式进行缩放 99 | console.log("windowWidth" + windowWidth); 100 | if (originalWidth > windowWidth) {//在图片width大于手机屏幕width时候 101 | autoWidth = windowWidth; 102 | console.log("autoWidth" + autoWidth); 103 | autoHeight = (autoWidth * originalHeight) / originalWidth; 104 | console.log("autoHeight" + autoHeight); 105 | results.imageWidth = autoWidth; 106 | results.imageheight = autoHeight; 107 | } else {//否则展示原来的数据 108 | results.imageWidth = originalWidth; 109 | results.imageheight = originalHeight; 110 | } 111 | } 112 | }) 113 | return results; 114 | } 115 | 116 | function wxParseTemArray(temArrayName,bindNameReg,total,that){ 117 | var array = []; 118 | var temData = that.data; 119 | var obj = null; 120 | for(var i = 0; i < total; i++){ 121 | var simArr = temData[bindNameReg+i].nodes; 122 | array.push(simArr); 123 | } 124 | 125 | temArrayName = temArrayName || 'wxParseTemArray'; 126 | obj = JSON.parse('{"'+ temArrayName +'":""}'); 127 | obj[temArrayName] = array; 128 | that.setData(obj); 129 | } 130 | 131 | /** 132 | * 配置emojis 133 | * 134 | */ 135 | 136 | function emojisInit(reg='',baseSrc="/wxParse/emojis/",emojis){ 137 | HtmlToJson.emojisInit(reg,baseSrc,emojis); 138 | } 139 | 140 | module.exports = { 141 | wxParse: wxParse, 142 | wxParseTemArray:wxParseTemArray, 143 | emojisInit:emojisInit 144 | } 145 | 146 | 147 | -------------------------------------------------------------------------------- /小程序/wxParse/wxParse.wxss: -------------------------------------------------------------------------------- 1 | 2 | .wxParse{ 3 | margin: 0 5px; 4 | font-family: Helvetica,sans-serif; 5 | font-size: 28rpx; 6 | color: #666; 7 | line-height: 1.8; 8 | } 9 | view{ 10 | word-break:break-all; overflow:auto; 11 | } 12 | .wxParse-inline{ 13 | display: inline; 14 | margin: 0; 15 | padding: 0; 16 | } 17 | /*//标题 */ 18 | .wxParse-div{margin: 0;padding: 0;} 19 | .wxParse-h1{ font-size:2em; margin: .67em 0 } 20 | .wxParse-h2{ font-size:1.5em; margin: .75em 0 } 21 | .wxParse-h3{ font-size:1.17em; margin: .83em 0 } 22 | .wxParse-h4{ margin: 1.12em 0} 23 | .wxParse-h5 { font-size:.83em; margin: 1.5em 0 } 24 | .wxParse-h6{ font-size:.75em; margin: 1.67em 0 } 25 | 26 | .wxParse-h1 { 27 | font-size: 18px; 28 | font-weight: 400; 29 | margin-bottom: .9em; 30 | } 31 | .wxParse-h2 { 32 | font-size: 16px; 33 | font-weight: 400; 34 | margin-bottom: .34em; 35 | } 36 | .wxParse-h3 { 37 | font-weight: 400; 38 | font-size: 15px; 39 | margin-bottom: .34em; 40 | } 41 | .wxParse-h4 { 42 | font-weight: 400; 43 | font-size: 14px; 44 | margin-bottom: .24em; 45 | } 46 | .wxParse-h5 { 47 | font-weight: 400; 48 | font-size: 13px; 49 | margin-bottom: .14em; 50 | } 51 | .wxParse-h6 { 52 | font-weight: 400; 53 | font-size: 12px; 54 | margin-bottom: .04em; 55 | } 56 | 57 | .wxParse-h1, .wxParse-h2, .wxParse-h3, .wxParse-h4, .wxParse-h5, .wxParse-h6, .wxParse-b, .wxParse-strong { font-weight: bolder } 58 | 59 | .wxParse-i,.wxParse-cite,.wxParse-em,.wxParse-var,.wxParse-address{font-style:italic} 60 | .wxParse-pre,.wxParse-tt,.wxParse-code,.wxParse-kbd,.wxParse-samp{font-family:monospace} 61 | .wxParse-pre{white-space:pre} 62 | .wxParse-big{font-size:1.17em} 63 | .wxParse-small,.wxParse-sub,.wxParse-sup{font-size:.83em} 64 | .wxParse-sub{vertical-align:sub} 65 | .wxParse-sup{vertical-align:super} 66 | .wxParse-s,.wxParse-strike,.wxParse-del{text-decoration:line-through} 67 | /*wxparse-自定义个性化的css样式*/ 68 | /*增加video的css样式*/ 69 | .wxParse-strong,.wxParse-s{display: inline} 70 | .wxParse-a{ 71 | color: deepskyblue; 72 | word-break:break-all; 73 | overflow:auto; 74 | } 75 | 76 | .wxParse-video{ 77 | text-align: center; 78 | margin: 10px 0; 79 | } 80 | 81 | .wxParse-video-video{ 82 | width:100%; 83 | } 84 | 85 | .wxParse-img{ 86 | background-color: #efefef; 87 | overflow: hidden; 88 | } 89 | 90 | .wxParse-blockquote { 91 | margin: 0; 92 | padding:10px 0 10px 5px; 93 | font-family:Courier, Calibri,"宋体"; 94 | background:#f5f5f5; 95 | border-left: 3px solid #dbdbdb; 96 | } 97 | 98 | .wxParse-code,.wxParse-wxxxcode-style{ 99 | display: inline; 100 | background:#f5f5f5; 101 | } 102 | .wxParse-ul{ 103 | margin: 20rpx 10rpx; 104 | } 105 | 106 | .wxParse-li,.wxParse-li-inner{ 107 | display: flex; 108 | align-items: baseline; 109 | margin: 10rpx 0; 110 | } 111 | .wxParse-li-text{ 112 | 113 | align-items: center; 114 | line-height: 20px; 115 | } 116 | 117 | .wxParse-li-circle{ 118 | display: inline-flex; 119 | width: 5px; 120 | height: 5px; 121 | background-color: #333; 122 | margin-right: 5px; 123 | } 124 | 125 | .wxParse-li-square{ 126 | display: inline-flex; 127 | width: 10rpx; 128 | height: 10rpx; 129 | background-color: #333; 130 | margin-right: 5px; 131 | } 132 | .wxParse-li-ring{ 133 | display: inline-flex; 134 | width: 10rpx; 135 | height: 10rpx; 136 | border: 2rpx solid #333; 137 | border-radius: 50%; 138 | background-color: #fff; 139 | margin-right: 5px; 140 | } 141 | 142 | /*.wxParse-table{ 143 | width: 100%; 144 | height: 400px; 145 | } 146 | .wxParse-thead,.wxParse-tfoot,.wxParse-tr{ 147 | display: flex; 148 | flex-direction: row; 149 | } 150 | .wxParse-th,.wxParse-td{ 151 | display: flex; 152 | width: 580px; 153 | overflow: auto; 154 | }*/ 155 | 156 | .wxParse-u { 157 | text-decoration: underline; 158 | } 159 | .wxParse-hide{ 160 | display: none; 161 | } 162 | .WxEmojiView{ 163 | align-items: center; 164 | } 165 | .wxEmoji{ 166 | width: 16px; 167 | height:16px; 168 | } 169 | .wxParse-tr{ 170 | display: flex; 171 | border-right:1px solid #e0e0e0; 172 | border-bottom:1px solid #e0e0e0; 173 | } 174 | .wxParse-th, 175 | .wxParse-td{ 176 | flex:1; 177 | padding:5px; 178 | font-size:28rpx; 179 | border-left:1px solid #e0e0e0; 180 | word-break: break-all; 181 | } 182 | .wxParse-td:last{ 183 | border-top:1px solid #e0e0e0; 184 | } 185 | .wxParse-th{ 186 | background:#f0f0f0; 187 | border-top:1px solid #e0e0e0; 188 | } 189 | 190 | --------------------------------------------------------------------------------