作者 吴孟雨

登录注册

正在显示 52 个修改的文件 包含 1956 行增加81 行删除
1 //app.js 1 //app.js
2 App({ 2 App({
  3 + onShow() {
  4 + console.log('app-onshow');
  5 + // 查看是否授权
  6 + wx.getSetting({
  7 + success(res) {
  8 + if (res.authSetting['scope.userInfo']) {
  9 + console.log('授权过到首页');
  10 + wx.navigateTo({
  11 + url: '/pages/index/index', //跳转到授权页面
  12 + });
  13 + } else {
  14 + console.log('授权失效到授权页');
  15 + wx.navigateTo({
  16 + url: '/pages/get-user-info/get-user-info', //跳转到授权页面
  17 + })
  18 + }
  19 + }
  20 + })
  21 + },
3 onLaunch: function () { 22 onLaunch: function () {
  23 + console.log('app-onLaunch');
4 // 展示本地存储能力 24 // 展示本地存储能力
5 - var logs = wx.getStorageSync('logs') || []  
6 - logs.unshift(Date.now())  
7 - wx.setStorageSync('logs', logs)  
8 - 25 + // var logs = wx.getStorageSync('logs') || []
  26 + // logs.unshift(Date.now())
  27 + // wx.setStorageSync('logs', logs)
  28 + const self = this;
  29 + wx.getUserInfo({
  30 + success: function (user) {
  31 + // console.log(user);
9 // 登录 32 // 登录
  33 + let url = '/portal/Login/getToken';
10 wx.login({ 34 wx.login({
11 - success: res => {  
12 - // 发送 res.code 到后台换取 openId, sessionKey, unionId  
13 - } 35 + success: function (res) {
  36 + console.log('获取code', res);
  37 + self.post(url, {
  38 + code: res.code,
  39 + user_nickname: user.userInfo.nickName,
  40 + avatar: user.userInfo.avatarUrl
  41 + }, {}).then((ret) => {
  42 + console.log('获取token', ret);
  43 + wx.setStorageSync('token', ret.data.token);
  44 + self.globalData.userInfo = user.userInfo;
  45 + setTimeout(function () {
  46 + wx.navigateBack({delta:1})
  47 + },200)
14 }) 48 })
15 - // 获取用户信息  
16 - wx.getSetting({  
17 - success: res => {  
18 - if (res.authSetting['scope.userInfo']) {  
19 - // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框  
20 - wx.getUserInfo({  
21 - success: res => {  
22 - // 可以将 res 发送给后台解码出 unionId  
23 - this.globalData.userInfo = res.userInfo 49 + },
  50 + fail: function (res) {
  51 + },
  52 + complete: function (res) {
  53 + },
  54 + });
  55 + }
  56 + });
24 57
25 - // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回  
26 - // 所以此处加入 callback 以防止这种情况  
27 - if (this.userInfoReadyCallback) {  
28 - this.userInfoReadyCallback(res) 58 + // 获取用户信息
  59 + },
  60 + post: function (url, data, headerParams) {
  61 + /**
  62 + * 自定义post函数,返回Promise
  63 + * +-------------------
  64 + * @param {String} url 接口网址
  65 + * @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32}
  66 + * +-------------------
  67 + * @return {Promise} promise 返回promise供后续操作
  68 + */
  69 + // wx.showLoading({
  70 + // title: '加载中',
  71 + // })
  72 + wx.showNavigationBarLoading()
  73 + // wx.showToast({
  74 + // title: '加载中',
  75 + // icon:'none',
  76 + // })
  77 + var promise = new Promise((resolve, reject) => {
  78 + //init
  79 + let that = this;
  80 + let postData = data;
  81 + let baseUrl = 'http://wmatchrd.com/api';
  82 + //网络请求
  83 + let header = {
  84 + 'content-type': 'application/x-www-form-urlencoded'
  85 + }
  86 + header = Object.assign(header, headerParams)
  87 + wx.request({
  88 + url: baseUrl + url,
  89 + data: postData,
  90 + method: 'POST',
  91 + header: header,
  92 + success: function (res) {//返回取得的数据
  93 + console.log('返回取得的数据res', res);
  94 + if(res.data.code === 1){
  95 + resolve(res.data);
  96 + }else if (res.data.code == '20000') {
  97 + console.log('20000');
  98 + resolve(res.data.data);
  99 + } else if (res.data.data.code == '10001') { //未获取授权
  100 + console.log('10001');
  101 + wx.showModal({
  102 + title: '提示',
  103 + content: res.data.data.msg,
  104 + showCancel: false,
  105 + success: function (res) {
  106 + if (res.confirm) {
  107 + // wx.removeStorageSync('token');
  108 + wx.navigateTo({
  109 + url: '/pages/index/index',
  110 + })
29 } 111 }
30 } 112 }
  113 + });
  114 + resolve(res.data.data);
  115 + } else if (res.data.data.code == '30000') {
  116 + resolve(res.data);
  117 + } else if (res.data.data.code == '40001') {//返回错误提示信息
  118 + console.log(555);
  119 + wx.showModal({
  120 + title: '提示',
  121 + content: res.data.data.msg,
  122 + showCancel: false,
  123 + success: function (res) {
  124 + if (res.confirm) {
  125 + // wx.removeStorageSync('token');
  126 + // wx.navigateTo({
  127 + // url: '/pages/start/start',
  128 + // })
  129 + }
  130 + }
  131 + });
  132 + resolve(res.data.msg);
  133 + } else if (res.data.code == '40000') {
  134 + console.log(333);
  135 + // wx.showModal({
  136 + // title: '提示',
  137 + // content: res.data.data.msg,
  138 + // showCancel: false,
  139 + // success: function (res) { }
  140 + // });
  141 + resolve(res.data.data);
  142 + } else if (res.data.data.code == '40106') {
  143 + console.log('重复绑定');
  144 + resolve(res.data.data);
  145 + } else if (res.data.data.code == '40107') {
  146 + console.log('手机号已注册');
  147 + resolve(res.data.data);
  148 + } else if (res.data.data.code == '40111') {
  149 + console.log('新旧密码不能相同');
  150 + resolve(res.data.data);
  151 + } else {
  152 + console.log('222');
  153 + console.log(res.data);
  154 + wx.showModal({
  155 + title: '提示',
  156 + content: res.data.data.msg,
  157 + showCancel: false,
31 }) 158 })
  159 + reject(res.data)
32 } 160 }
  161 + setTimeout(function () {
  162 + // wx.hideLoading()
  163 + // wx.hideToast()
  164 + wx.hideNavigationBarLoading()
  165 + }, 500)
  166 + },
  167 + error: function (e) {
  168 + reject('网络出错');
  169 + // wx.hideLoading()
  170 + wx.hideNavigationBarLoading()
33 } 171 }
34 }) 172 })
  173 + });
  174 + return promise;
35 }, 175 },
36 //获取当前日期 176 //获取当前日期
37 nowDate() { 177 nowDate() {
1 { 1 {
2 "pages": [ 2 "pages": [
  3 + "pages/my/my",
  4 + "pages/order/order",
3 "pages/spell-list/spell-list", 5 "pages/spell-list/spell-list",
4 "pages/index/index", 6 "pages/index/index",
5 "pages/logs/logs", 7 "pages/logs/logs",
6 - "pages/order/order",  
7 - "pages/my/my",  
8 - "pages/search/search" 8 + "pages/search/search",
  9 + "pages/index/type-detail/type-detail",
  10 + "pages/index/tandian-list/tandian-list",
  11 + "pages/index/notice-detail/notice-detail",
  12 + "pages/my/edit-info/edit-info",
  13 + "pages/get-user-info/get-user-info"
9 ], 14 ],
10 "window": { 15 "window": {
11 "backgroundTextStyle": "light", 16 "backgroundTextStyle": "light",
1 -/**app.wxss**/  
2 -  
3 1
4 @font-face {font-family: "iconfont"; 2 @font-face {font-family: "iconfont";
5 - src: url('//at.alicdn.com/t/font_961048_s4pm998br9.eot?t=1545469706627'); /* IE9*/  
6 - src: url('//at.alicdn.com/t/font_961048_s4pm998br9.eot?t=1545469706627#iefix') format('embedded-opentype'), /* IE6-IE8 */  
7 - url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAW8AAsAAAAACEQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkgvY21hcAAAAYAAAABdAAABnLOMGw1nbHlmAAAB4AAAAdEAAAH8ozr8/mhlYWQAAAO0AAAALwAAADYTp4QZaGhlYQAAA+QAAAAcAAAAJAfeA4VobXR4AAAEAAAAAA4AAAAQEAAAAGxvY2EAAAQQAAAACgAAAAoBEgBsbWF4cAAABBwAAAAfAAAAIAETAGluYW1lAAAEPAAAAUUAAAJtPlT+fXBvc3QAAAWEAAAAOAAAAEkByYdDeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMTyzZW7438AQw9zA0AAUZgTJAQDhrAwgeJztkLENgDAMBM9JQBFCyiKUiC7LpGLyrBEcm4IheOss+2W5eGABonIoCeRGmGrqivmRzfzEpXvWCtDppdcxvpNJ7CLrFPyDrPzarZ/vFmdqjmVZHPOrgzwKvxJaAAAAeJwtj89r03AYxt/nm+ZHbZukpiZ21tiuXTLXLcM1S1Ybh1pjUZmHIVsPRYgwcIKM6kXZrjvqXVDwIjIQ/Cum05N48Q/wIDs5cOfMb6vv4eH58PK+PA+B+Ah9FpFINAU3C5kR+tX0ID2o7mOdGyxViTJEJ2+FXSGhHFnUoEtEsJkKD0G4jFBlNpbhuB5CD5OSLOlWFoEuyK6j8/2CaZk6o0ag1rrXp6Wy1ihdXrP8x4+u5S6anT/hizcvw+EQBownrw8Pk8R7vvvMS5iP2d6VSimKJzQtQu/pg7lasjVjnd1uR1F7O93fSX+hvINOOjw6eoj85nyrNb+ZHo8q8TYnr4QvwhbN0gJdpbs04InNwLIh16WRqsxxZWkcuVh3gjAww7F2RmltTJ2pLdYkuaiCQxj4bpGfFWVpTM4/knit4D+x35Pdylwzc4sBgiiGK4OZj/0957SIWHHcSm9aND1z8dxX29cNIb2PQfqOdQFNnlB03GDfGMsqtXwB3H8HSqfKYoEhBvuZETJKr/3pc2vDa7byAvj7Vvm2h2P/ZkHJsKU7MmMsb8SVbg8/0v6Fe6oISV2t4gNYuhE3jbykaGvnscdxtb6S4/+09Qre4y+fKmCQAAAAeJxjYGRgYADiX5Z3f8fz23xl4GZhAIEbLgpcCPr/TBYG5nwgl4OBCSQKACnWCWAAeJxjYGRgYG7438AQw8IAAkCSkQEVsAAARwoCbXicY2FgYGBBwgAAsAARAAAAAAAAABQAbAD+AAB4nGNgZGBgYGGIZWBlAAEmIOYCQgaG/2A+AwASPgF9AHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgIWRiZGZkYWRlYErsagov1w3Jb88jyMnPzmxJDM/j704IzEvOaOUgQEArdEKjw==') format('woff'),  
8 - url('//at.alicdn.com/t/font_961048_s4pm998br9.ttf?t=1545469706627') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/  
9 - url('//at.alicdn.com/t/font_961048_s4pm998br9.svg?t=1545469706627#iconfont') format('svg'); /* iOS 4.1- */ 3 + src: url('//at.alicdn.com/t/font_961048_caegm9j8598.eot?t=1545649309238'); /* IE9*/
  4 + src: url('//at.alicdn.com/t/font_961048_caegm9j8598.eot?t=1545649309238#iefix') format('embedded-opentype'), /* IE6-IE8 */
  5 + url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAaQAAsAAAAACVAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkgvY21hcAAAAYAAAABpAAABssnxnXFnbHlmAAAB7AAAAn8AAALQUrMnWmhlYWQAAARsAAAALwAAADYTrP8/aGhlYQAABJwAAAAcAAAAJAfeA4ZobXR4AAAEuAAAAA4AAAAUFAAAAGxvY2EAAATIAAAADAAAAAwBEgHUbWF4cAAABNQAAAAeAAAAIAEUAGluYW1lAAAE9AAAAUUAAAJtPlT+fXBvc3QAAAY8AAAAUwAAAGiAcQCneJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMTyzZW7438AQw9zA0AAUZgTJAQDhrAwgeJztkcENgCAQBOcEjTEmlkADtmBiQb4s+trQheNhES4Zwm0WHgswAknsIoPdGFWXXGt+Yml+5tS8MDMwOL558eN54HvuMuVioXTSXb1lE7/Wtp99yrW9QD2px6D+iJegZY4AewGhjBa/AAAAeJwtkU9ME0EYxefNtLtbKdvW1l2LtbQUusifJaVlF2wtYK1tJWhCDFQlyJqAgjEEvSggkiCe0IM3EyUmxhgSE+PNu0GRk3gxnD0YTpLIeXFanMPL9zIzX97Lj4Dww8o0Q5yENEFzQaQE5Yi9aW9GNjDCB3RHCHEQcvCarTCL1BCVNJIEIQhTGToMMwtTpmFkEdd0mDoaBFHwqi4YXiZqcS+/71RUxUtJoyFHc2ebhaCnMXB6WE3dme6vOaWk/5pPXz0zZ2fhh//uy91dy9IfrNzXLZpCW+FMKJDJ13k8GRTu3WiPWjMt6vH5nkymZ97eWLB/I7iAtD27t3cL7qmOZLJjyt6vVOJtDl6wb2yGtJFO0kcuklGeWDHUMMSYUFGZxjVRqEb2xeKGaShmVdOVtGE0HYt2RQXRJ4Mb00hpPv7NJwpVFz90Aq9l/Hf0T0Mu1N7qKFGAOZ3m4GjLh/J6/KgTeSmuhQrNTkVXuk5shVNeP7PHMGq/pTnAI9ZJXpyj3yl1SVF3Lfj8AwgcCTprKfKgvxzMIRV6vnxNTuitSTcDX58MXtCxnzpfKzlo94BIKXX786FcAT/tcv1l2QlBHorgPag9kW/1uwXJM3wS69wOxQZr+D7PSAjvUGX6mS2xIvGTJk40W2EKNcDxeSA0dHCecS0LURB5z3pem5Ps0qEJjBPnD2WIOlRFzVaga9wplLzZcShK7/KiS3E9Wu5tgWMnf82BWPrh7enFtM/PPq2u1tPxUmmcVvVKfSLRB/QlEr2UsgLbXmsb0SaW5iRpbmny0tW17eflxwO563M3JxfGIqXYk4+M2VtFi1KrWLQAS4oA/Xrn4QqO/R/GH4weAHicY2BkYGAA4kylCa/i+W2+MnCzMIDADbe7cxH0/5ksDMz5QC4HAxNIFAA55Ar+AHicY2BkYGBu+N/AEMPCAAJAkpEBFbACAEcLAm54nGNhYGBgQcMAAQQAFQAAAAAAAAAUAGwA/gFoeJxjYGRgYGBliAViEGACYi4gZGD4D+YzAAASWQF+AAB4nGWPTU7DMBCFX/oHpBKqqGCH5AViASj9EatuWFRq911036ZOmyqJI8et1ANwHo7ACTgC3IA78EgnmzaWx9+8eWNPANzgBx6O3y33kT1cMjtyDRe4F65TfxBukF+Em2jjVbhF/U3YxzOmwm10YXmD17hi9oR3YQ8dfAjXcI1P4Tr1L+EG+Vu4iTv8CrfQ8erCPuZeV7iNRy/2x1YvnF6p5UHFockikzm/gple75KFrdLqnGtbxCZTg6BfSVOdaVvdU+zXQ+ciFVmTqgmrOkmMyq3Z6tAFG+fyUa8XiR6EJuVYY/62xgKOcQWFJQ6MMUIYZIjK6Og7VWb0r7FDwl57Vj3N53RbFNT/c4UBAvTPXFO6stJ5Ok+BPV8bUnV0K27LnpQ0kV7NSRKyQl7WtlRC6gE2ZVeOEXpc0Yk/KGdI/wAJWm7IAAAAeJxtyFEKgCAMgOHNssIzdIUOtTRyEBtYonj6hF77+J9+MPBx8M+iwQFHtDiBo5S0bEGLLJd6elhlviOJj3kNLGc5uNcit6w7k1Ymqf0DvKjMFokA') format('woff'),
  6 + url('//at.alicdn.com/t/font_961048_caegm9j8598.ttf?t=1545649309238') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
  7 + url('//at.alicdn.com/t/font_961048_caegm9j8598.svg?t=1545649309238#iconfont') format('svg'); /* iOS 4.1- */
10 } 8 }
11 9
12 .iconfont { 10 .iconfont {
@@ -23,5 +21,4 @@ @@ -23,5 +21,4 @@
23 21
24 .icon-shanchu:before { content: "\e60f"; } 22 .icon-shanchu:before { content: "\e60f"; }
25 23
26 -  
27 - 24 +.icon-dingweiweizhizuobiaoxianxing:before { content: "\e61f"; }
  1 +/*弹框样式*/
  2 +.modal_box {
  3 + width: 100%;
  4 + height: 100%;
  5 + position: fixed;
  6 + top: 0;
  7 + left: 0;
  8 + z-index: 10;
  9 + background: rgba(0,0,0,0.3);
  10 +}
  11 +.input-box {
  12 + width: 80%;
  13 + /* height: 1100rpx; */
  14 + background: #ffffff;
  15 + display: flex;
  16 + align-items: center;
  17 + flex-direction: column;
  18 + z-index:999;
  19 + position: fixed;
  20 + top: 48%;
  21 + left: 50%;
  22 + transform: translate(-50%,-50%);
  23 + padding: 46rpx 88rpx;
  24 + -webkit-box-sizing: border-box;
  25 + -moz-box-sizing: border-box;
  26 + box-sizing: border-box;
  27 + border-radius: 40rpx;
  28 +}
  29 +.input-box image {
  30 + width: 110rpx;
  31 + height: 110rpx;
  32 + border-radius: 50%;
  33 + margin-bottom: 34rpx;
  34 +}
  35 +.input-box .title {
  36 + color: #333333;
  37 + font-size: 36rpx;
  38 + margin-bottom: 16rpx;
  39 +}
  40 +.input-box .tips {
  41 + color: #333333;
  42 + font-size: 24rpx;
  43 + margin-bottom: 26rpx;
  44 +}
  45 +.input-box .answer-btn {
  46 + width: 100%;
  47 + height: 66rpx;
  48 + background-color: #323232;
  49 + border-radius: 6rpx;
  50 + color:#E2C8B1;
  51 + font-size: 30rpx;
  52 + text-align: center;
  53 + line-height: 66rpx;
  54 + margin-top: 16rpx;
  55 +}
  56 +.release-btn-box {
  57 + background-color: transparent;
  58 + display: flex;
  59 + align-items: center;
  60 + justify-content: center;
  61 + position: fixed;
  62 + top: 70%;
  63 + left: 50%;
  64 + transform: translate(-50%,0);
  65 + -webkit-box-sizing: border-box;
  66 + -moz-box-sizing: border-box;
  67 + box-sizing: border-box;
  68 + z-index: 999;
  69 +}
  70 +.release-btn-box .left-btn, .release-btn-box .right-btn {
  71 + display: flex;
  72 + flex-direction: column;
  73 + align-items: center;
  74 + margin-right: 84rpx;
  75 +}
  76 +.release-btn-box .right-btn {
  77 + margin-right: 0;
  78 +}
  79 +.release-btn-box image {
  80 + width: 100rpx;
  81 + height: 100rpx;
  82 + border-radius: 50%;
  83 + margin-bottom: 22rpx;
  84 +}
  85 +.release-btn-box .text {
  86 + color: #ffffff;
  87 + font-size: 26rpx;
  88 +}
  1 +// pages/get-user-info/get-user-info.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {},
  9 + //获取授权
  10 + login(e) {
  11 + console.log('e', e);
  12 + let url = '/portal/Login/getToken';
  13 + wx.login({
  14 + success: function (res) {
  15 + console.log('获取code', res);
  16 + app.post(url, {
  17 + code: res.code,
  18 + user_nickname: e.detail.userInfo.nickName,
  19 + avatar: e.detail.userInfo.avatarUrl
  20 + }, {}).then((ret) => {
  21 + console.log('获取token', ret);
  22 + wx.setStorageSync('token', ret.token);
  23 + wx.showToast({title:'登录成功',icon:'success'});
  24 + app.globalData.userInfo = e.detail.userInfo;
  25 + setTimeout(function () {
  26 + wx.navigateBack({delta:1})
  27 + },200)
  28 + })
  29 + },
  30 + fail: function (res) {
  31 + },
  32 + complete: function (res) {
  33 + },
  34 + });
  35 + },
  36 + /**
  37 + * 生命周期函数--监听页面加载
  38 + */
  39 + onLoad: function (options) {
  40 +
  41 + },
  42 +
  43 + /**
  44 + * 生命周期函数--监听页面初次渲染完成
  45 + */
  46 + onReady: function () {
  47 +
  48 + },
  49 +
  50 + /**
  51 + * 生命周期函数--监听页面显示
  52 + */
  53 + onShow: function () {
  54 + },
  55 +
  56 + /**
  57 + * 生命周期函数--监听页面隐藏
  58 + */
  59 + onHide: function () {
  60 +
  61 + },
  62 +
  63 + /**
  64 + * 生命周期函数--监听页面卸载
  65 + */
  66 + onUnload: function () {
  67 +
  68 + },
  69 +
  70 + /**
  71 + * 页面相关事件处理函数--监听用户下拉动作
  72 + */
  73 + onPullDownRefresh: function () {
  74 +
  75 + },
  76 +
  77 + /**
  78 + * 页面上拉触底事件的处理函数
  79 + */
  80 + onReachBottom: function () {
  81 +
  82 + },
  83 +
  84 + /**
  85 + * 用户点击右上角分享
  86 + */
  87 + onShareAppMessage: function () {
  88 +
  89 + }
  90 +})
  1 +{
  2 + "navigationBarTitleText": "火柴西路"
  3 +}
  1 +<!--pages/get-user-info/get-user-info.wxml-->
  2 +<view class="content">
  3 + <view class="title">火柴西路将获取您的微信头像,昵称等信息</view>
  4 + <button class="btn" open-type="getUserInfo" bindgetuserinfo="login">登录</button>
  5 +</view>
  1 +/* pages/get-user-info/get-user-info.wxss */
  2 +.content {
  3 + display: flex;
  4 + flex-direction: column;
  5 + align-items: center;
  6 + justify-content: center;
  7 +}
  8 +.content .title {
  9 + color: #666666;
  10 + font-size: 28rpx;
  11 +}
@@ -20,24 +20,52 @@ Page({ @@ -20,24 +20,52 @@ Page({
20 {src: '../../images/wutaiju@2x.png', text: '舞台剧'}, 20 {src: '../../images/wutaiju@2x.png', text: '舞台剧'},
21 ], 21 ],
22 banner: [{image: '../../images/banner.png'}, {image: '../../images/b1@2x (1).png'}, {image: '../../images/b1@2x (2).png'}, {image: '../../images/banner.png'}], 22 banner: [{image: '../../images/banner.png'}, {image: '../../images/b1@2x (1).png'}, {image: '../../images/b1@2x (2).png'}, {image: '../../images/banner.png'}],
23 - currentBannerIndex:0,  
24 - tabcurrent: {tab: 0,bubble: ''},  
25 - noticeList:[{url:'',name:'https://github.com/wux-weapp/wux-weapp'},  
26 - {url:'',name:'北京首展11奥拉维尔·埃利亚松北京首展北京首展11奥拉维尔·埃利亚松北京首展'},  
27 - {url:'',name:'https://github.com/wux-weapp/wux-weapphttps://github.com/wux-weapp/wux-weapp'},  
28 - {url:'',name:'奥拉维尔'},  
29 - {url:'',name:'奥拉维尔https://github.com/wux-weapp/wux-weapp'},  
30 - {url:'',name:'奥拉维尔·埃利亚松北京首展https://github.com/wux-weapp/wux-weapp'}, 23 + currentBannerIndex: 0,
  24 + tabcurrent: {tab: 0, bubble: ''},
  25 + noticeList: [{url: '', name: 'https://github.com/wux-weapp/wux-weapp'},
  26 + {url: '', name: '北京首展11奥拉维尔·埃利亚松北京首展北京首展11奥拉维尔·埃利亚松北京首展'},
  27 + {url: '', name: 'https://github.com/wux-weapp/wux-weapphttps://github.com/wux-weapp/wux-weapp'},
  28 + {url: '', name: '奥拉维尔'},
  29 + {url: '', name: '奥拉维尔https://github.com/wux-weapp/wux-weapp'},
  30 + {url: '', name: '奥拉维尔·埃利亚松北京首展https://github.com/wux-weapp/wux-weapp'},
31 ], 31 ],
  32 + is_showAnswer: false,
  33 + is_showUserInfo: false,
  34 + is_answer: true,
32 35
33 motto: 'Hello World', 36 motto: 'Hello World',
34 userInfo: {}, 37 userInfo: {},
35 hasUserInfo: false, 38 hasUserInfo: false,
36 canIUse: wx.canIUse('button.open-type.getUserInfo') 39 canIUse: wx.canIUse('button.open-type.getUserInfo')
37 }, 40 },
38 - onClick() { 41 + disableScroll() {
  42 + },
  43 + handleBackground() {
  44 + console.log('dianji');
  45 + this.setData({is_showAnswer: false, is_showUserInfo: false,})
  46 + },
  47 + //进入分类详情
  48 + goTypeDetail() {
39 wx.navigateTo({ 49 wx.navigateTo({
40 - url: '/pages/search/search', 50 + url: '/pages/index/type-detail/type-detail',
  51 + })
  52 + },
  53 + //进入公告详情
  54 + goNotice() {
  55 + wx.navigateTo({
  56 + url: '/pages/index/notice-detail/notice-detail',
  57 + })
  58 + },
  59 + //查看更多
  60 + goMore() {
  61 + wx.navigateTo({
  62 + url: '/pages/index/tandian-list/tandian-list',
  63 + })
  64 + },
  65 + //进入拼餐详情
  66 + goSpellDetail() {
  67 + wx.navigateTo({
  68 + url: '/pages/index/spell-detail/spell-detail',
41 }) 69 })
42 }, 70 },
43 //搜索 71 //搜索
@@ -46,7 +74,7 @@ Page({ @@ -46,7 +74,7 @@ Page({
46 url: '/pages/search/search', 74 url: '/pages/search/search',
47 }) 75 })
48 }, 76 },
49 - bannerChange(e){ 77 + bannerChange(e) {
50 // console.log(e,'current', current); 78 // console.log(e,'current', current);
51 const current = e.detail.current; 79 const current = e.detail.current;
52 this.setData({currentBannerIndex: current}) 80 this.setData({currentBannerIndex: current})
@@ -118,17 +146,17 @@ Page({ @@ -118,17 +146,17 @@ Page({
118 }, 146 },
119 //发布按钮 147 //发布按钮
120 release(e) { 148 release(e) {
121 - let that = this;  
122 - that.setData({  
123 - releasepopup: true  
124 - })  
125 - },  
126 - //取消发布弹窗  
127 - cancelPopup() {  
128 - let that = this;  
129 - that.setData({  
130 - releasepopup: false  
131 - }) 149 + console.log('发布');
  150 + const self = this;
  151 + if (!self.data.is_answer) {
  152 + self.setData({
  153 + is_showAnswer: true
  154 + });
  155 + } else {
  156 + self.setData({
  157 + is_showUserInfo: true
  158 + });
  159 + }
132 }, 160 },
133 //订单-导航 161 //订单-导航
134 wish(e) { 162 wish(e) {
@@ -164,4 +192,8 @@ Page({ @@ -164,4 +192,8 @@ Page({
164 }) 192 })
165 } 193 }
166 }, 194 },
167 -}) 195 + onShow() {
  196 + console.log('index-show');
  197 + console.log(app.globalData.userInfo);
  198 + },
  199 +});
@@ -25,10 +25,10 @@ @@ -25,10 +25,10 @@
25 </swiper> 25 </swiper>
26 </view> 26 </view>
27 27
28 - <!--导航--> 28 + <!--分类导航-->
29 <view class="padding-box"> 29 <view class="padding-box">
30 <view class="navigator-box"> 30 <view class="navigator-box">
31 - <view class="img-box" wx:for="{{images}}" wx:key="index"> 31 + <view class="img-box" wx:for="{{images}}" wx:key="index" bindtap="goTypeDetail" data-index="{{index}}">
32 <image src="{{item.src}}"></image> 32 <image src="{{item.src}}"></image>
33 <view class="text">{{item.text}}</view> 33 <view class="text">{{item.text}}</view>
34 </view> 34 </view>
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 <view class="right-item"> 47 <view class="right-item">
48 <block wx:for-index="idx" wx:for='{{noticeList}}' wx:key="index" > 48 <block wx:for-index="idx" wx:for='{{noticeList}}' wx:key="index" >
49 <swiper-item> 49 <swiper-item>
50 - <view class='content-item' bindtap="onClick"> 50 + <view class='content-item' bindtap="goNotice">
51 <text>{{item.name}}</text> 51 <text>{{item.name}}</text>
52 </view> 52 </view>
53 </swiper-item> 53 </swiper-item>
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <image src="../../images/tandian@2x.png"></image> 62 <image src="../../images/tandian@2x.png"></image>
63 <text>探店途中</text> 63 <text>探店途中</text>
64 </view> 64 </view>
65 - <view class="right"> 65 + <view class="right" bindtap="goMore">
66 <text>查看更多</text> 66 <text>查看更多</text>
67 <image src="../../images/arrow@2x.png"></image> 67 <image src="../../images/arrow@2x.png"></image>
68 </view> 68 </view>
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 previous-margin="50rpx" next-margin="50rpx" bindchange="bannerChange" current="{{index}}"> 83 previous-margin="50rpx" next-margin="50rpx" bindchange="bannerChange" current="{{index}}">
84 <block wx:for="{{banner}}" wx:key="index"> 84 <block wx:for="{{banner}}" wx:key="index">
85 <swiper-item> 85 <swiper-item>
86 - <div class="fix pl5 pr5 box_bb"> 86 + <div class="fix pl5 pr5 box_bb" bindtap="goSpellDetail">
87 <!--<navigator url="">--> 87 <!--<navigator url="">-->
88 <image class="banner mt10 {{currentBannerIndex==index?'active':''}}" src="{{item.image}}" mode="aspectFill" /> 88 <image class="banner mt10 {{currentBannerIndex==index?'active':''}}" src="{{item.image}}" mode="aspectFill" />
89 <text>Opera Bombana 2018.4.28</text> 89 <text>Opera Bombana 2018.4.28</text>
@@ -124,4 +124,31 @@ @@ -124,4 +124,31 @@
124 <!--</block>--> 124 <!--</block>-->
125 <!--</swiper>--> 125 <!--</swiper>-->
126 <!--</view>--> 126 <!--</view>-->
  127 + <!--去答题弹框-->
  128 + <view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
  129 + <image class="sorry-img" src="../../images/sorry@2x.png"></image>
  130 + <view class="title">目前只对</view>
  131 + <view class="title">首批会员开放发布功能</view>
  132 + <view class="tips">答题后可能获得第一批次入场卷</view>
  133 + <view class="answer-btn">答题</view>
  134 + </view>
  135 + <view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
  136 + <!--去完善个人信息弹框-->
  137 + <view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
  138 + <image class="sorry-img" src="../../images/user_info@2x.png"></image>
  139 + <view class="title">为了更好的体验</view>
  140 + <view class="title">请先完善个人信息</view>
  141 + <view class="answer-btn">完成</view>
  142 + </view>
  143 + <view class="release-btn-box" wx:if="{{is_showUserInfo}}">
  144 + <view class="left-btn">
  145 + <image src="../../images/pincan@2x.png"></image>
  146 + <view class="text">发布拼餐</view>
  147 + </view>
  148 + <view class="right-btn">
  149 + <image src="../../images/pinhuodong@2x.png"></image>
  150 + <view class="text">发布拼活动</view>
  151 + </view>
  152 + </view>
  153 + <view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
127 </view> 154 </view>
@@ -473,3 +473,92 @@ swiper { @@ -473,3 +473,92 @@ swiper {
473 line-height: 100rpx; 473 line-height: 100rpx;
474 color: #999; 474 color: #999;
475 } 475 }
  476 +
  477 +/*弹框样式*/
  478 +.modal_box {
  479 + width: 100%;
  480 + height: 100%;
  481 + position: fixed;
  482 + top: 0;
  483 + left: 0;
  484 + z-index: 10;
  485 + background: rgba(0,0,0,0.3);
  486 +}
  487 +.input-box {
  488 + width: 80%;
  489 + /* height: 1100rpx; */
  490 + background: #ffffff;
  491 + display: flex;
  492 + align-items: center;
  493 + flex-direction: column;
  494 + z-index:999;
  495 + position: fixed;
  496 + top: 48%;
  497 + left: 50%;
  498 + transform: translate(-50%,-50%);
  499 + padding: 46rpx 88rpx;
  500 + -webkit-box-sizing: border-box;
  501 + -moz-box-sizing: border-box;
  502 + box-sizing: border-box;
  503 + border-radius: 40rpx;
  504 +}
  505 +.input-box image {
  506 + width: 110rpx;
  507 + height: 110rpx;
  508 + border-radius: 50%;
  509 + margin-bottom: 34rpx;
  510 +}
  511 +.input-box .title {
  512 + color: #333333;
  513 + font-size: 36rpx;
  514 + margin-bottom: 16rpx;
  515 +}
  516 +.input-box .tips {
  517 + color: #333333;
  518 + font-size: 24rpx;
  519 + margin-bottom: 26rpx;
  520 +}
  521 +.input-box .answer-btn {
  522 + width: 100%;
  523 + height: 66rpx;
  524 + background-color: #323232;
  525 + border-radius: 6rpx;
  526 + color:#E2C8B1;
  527 + font-size: 30rpx;
  528 + text-align: center;
  529 + line-height: 66rpx;
  530 + margin-top: 16rpx;
  531 +}
  532 +.release-btn-box {
  533 + background-color: transparent;
  534 + display: flex;
  535 + align-items: center;
  536 + justify-content: center;
  537 + position: fixed;
  538 + top: 70%;
  539 + left: 50%;
  540 + transform: translate(-50%,0);
  541 + -webkit-box-sizing: border-box;
  542 + -moz-box-sizing: border-box;
  543 + box-sizing: border-box;
  544 + z-index: 999;
  545 +}
  546 +.release-btn-box .left-btn, .release-btn-box .right-btn {
  547 + display: flex;
  548 + flex-direction: column;
  549 + align-items: center;
  550 + margin-right: 84rpx;
  551 +}
  552 +.release-btn-box .right-btn {
  553 + margin-right: 0;
  554 +}
  555 +.release-btn-box image {
  556 + width: 100rpx;
  557 + height: 100rpx;
  558 + border-radius: 50%;
  559 + margin-bottom: 22rpx;
  560 +}
  561 +.release-btn-box .text {
  562 + color: #ffffff;
  563 + font-size: 26rpx;
  564 +}
  1 +// pages/index/notice-detail/notice-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 +})
  1 +{
  2 + "navigationBarTitleText": "详情"
  3 +}
  1 +<!--pages/index/notice-detail/notice-detail.wxml-->
  2 +<view class="title">
  3 + 奥拉维尔·埃利亚松北京首展
  4 +</view>
  5 +<view class="content">
  6 + 这是昨日看的海,可我依然感觉自己就站在那,就在那个海边,所以,我让此刻面对着电脑敲打文字的自己变成昨日的我,对着海边,诉说着这么一个故事。
  7 +
  8 +   白天的海与晚上的海不同,早些的海与现在的海不同,梦里的海或是想象中的海与现实中的海也不同。沙子不一样,海水不一样,天空不一样,连看海的人也不一样。这是来自中午的海。
  9 +</view>
  1 +/* pages/index/notice-detail/notice-detail.wxss */
  1 +const app = getApp();
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + is_showSort: false,
  9 + is_showSelect: false,
  10 + currentSort: 0,
  11 + currentSelect: 0,
  12 + start_time_date: app.nowDate(),
  13 + end_time_date: app.nowDate(),
  14 + type:[
  15 + {name:'粤菜',id:1},{name:'川菜',id:2},{name:'其他中餐',id:3},{name:'粤菜',id:4},{name:'粤菜',id:5},{name:'粤菜',id:6},{name:'粤菜',id:7},
  16 + {name:'粤菜',id:8},{name:'川菜',id:9},{name:'其他中餐',id:10},{name:'粤菜',id:11},{name:'粤菜',id:12},{name:'粤菜',id:13},{name:'粤菜',id:14},
  17 + ],
  18 + sort: [{id: 0, name: '最具人气'}, {id: 1, name: '距离最近'}],
  19 + sort_id: 0,//选择的排序id,默认是0
  20 + is_all: true,
  21 + list:[
  22 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  23 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  24 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  25 + ]
  26 + },
  27 + //点击智能排序按钮
  28 + clickSort() {
  29 + let that = this;
  30 + that.setData({
  31 + // down: !that.data.down,
  32 + is_showSort: !that.data.is_showSort,
  33 + is_showSelect: false
  34 + // showrent_mask: false
  35 + })
  36 + },
  37 + //点击筛选按钮
  38 + clickSelect() {
  39 + let that = this;
  40 + that.setData({
  41 + // down: !that.data.down,
  42 + is_showSelect: !that.data.is_showSelect,
  43 + is_showSort: false,
  44 + // showrent_mask: false
  45 + })
  46 + },
  47 + //关闭排序列表
  48 + closeMask() {
  49 + let that = this;
  50 + that.setData({
  51 + // showrent_mask: false,
  52 + is_showSort: false,
  53 + is_showSelect: false,
  54 + })
  55 + },
  56 + //保持筛选列表开启
  57 + openMask() {
  58 + this.setData({is_showSelect: true,})
  59 + },
  60 + //点击默认/热度排序
  61 + chooseSort(e) {
  62 + const current = e.currentTarget.dataset.index;
  63 + this.setData({
  64 + sort_id: this.data.sort[current].id,
  65 + currentSort: current,
  66 + is_showSort: false,
  67 + // down: !this.data.down,
  68 + });
  69 + this.initPortalPost();
  70 + this.getuser_recommend()
  71 + },
  72 + //选择开始时间
  73 + changeStartTime: function(e) {
  74 + console.log('picker发送选择改变,携带值为', e.detail.value)
  75 + this.setData({
  76 + start_time_date: e.detail.value,
  77 + is_showSelect: true,
  78 + // is_birth_change: true,
  79 + })
  80 + },
  81 + //选择结束时间
  82 + changeEndTime: function(e) {
  83 + console.log('picker发送选择改变,携带值为', e.detail.value)
  84 + this.setData({
  85 + end_time_date: e.detail.value,
  86 + is_showSelect: true,
  87 + // is_birth_change: true,
  88 + })
  89 + },
  90 + //选择全部分类
  91 + chooseAll() {
  92 + this.setData({is_all: true,is_showSelect:false,current_type:null})
  93 + },
  94 + //选择分类
  95 + chooseType(e) {
  96 + const current = e.currentTarget.dataset.index;
  97 + this.setData({current_type: current,is_all:false,is_showSelect:false,is_showSort: false,})
  98 + },
  99 + /**
  100 + * 生命周期函数--监听页面加载
  101 + */
  102 + onLoad: function (options) {
  103 +
  104 + },
  105 +
  106 + /**
  107 + * 生命周期函数--监听页面初次渲染完成
  108 + */
  109 + onReady: function () {
  110 +
  111 + },
  112 +
  113 + /**
  114 + * 生命周期函数--监听页面显示
  115 + */
  116 + onShow: function () {
  117 +
  118 + },
  119 +
  120 + /**
  121 + * 生命周期函数--监听页面隐藏
  122 + */
  123 + onHide: function () {
  124 +
  125 + },
  126 +
  127 + /**
  128 + * 生命周期函数--监听页面卸载
  129 + */
  130 + onUnload: function () {
  131 +
  132 + },
  133 +
  134 + /**
  135 + * 页面相关事件处理函数--监听用户下拉动作
  136 + */
  137 + onPullDownRefresh: function () {
  138 +
  139 + },
  140 +
  141 + /**
  142 + * 页面上拉触底事件的处理函数
  143 + */
  144 + onReachBottom: function () {
  145 +
  146 + },
  147 +
  148 + /**
  149 + * 用户点击右上角分享
  150 + */
  151 + onShareAppMessage: function () {
  152 +
  153 + }
  154 +})
  1 +{
  2 + "navigationBarTitleText": "探店途中"
  3 +}
  1 +<!--pages/index/tandian-list/tandian-list.wxml-->
  2 +<view class="fix-box">
  3 + <view class="sort-select-box">
  4 + <!--智能排序按钮-->
  5 + <view class="sort-box" bindtap='clickSort'>
  6 + <view class='' class="sort-btn">智能排序</view>
  7 + <view class="iconfont icon-arrow-down"></view>
  8 + </view>
  9 + <!--筛选按钮-->
  10 + <view class="select-box" bindtap='clickSelect'>
  11 + <view class='' class="select-btn">筛选</view>
  12 + <view class="iconfont icon-arrow-down"></view>
  13 + </view>
  14 + </view>
  15 + <!--智能排序列表-->
  16 + <view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
  17 + <view class='rent_popup'>
  18 + <view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
  19 + catchtap='chooseSort' data-index="{{index}}">{{item.name}}
  20 + </view>
  21 + </view>
  22 + </view>
  23 + <!--筛选列表-->
  24 + <view class='rent_mask' wx:if='{{is_showSelect}}' bindtap="closeMask">
  25 + <view class='rent_popup time-box' catchtap="openMask">
  26 + <text class="title">时间:</text>
  27 + <view class="picker-box">
  28 + <picker bindchange="changeStartTime" value="{{start_time_date}}" mode="date">
  29 + <view class="time-select-box">
  30 + <view class="select-picker">
  31 + <view class="picker">
  32 + {{start_time_date}}
  33 + </view>
  34 + </view>
  35 + <view class="iconfont icon-arrow-down arrow"></view>
  36 + </view>
  37 + </picker>
  38 + <text>-</text>
  39 + <picker bindchange="changeEndTime" value="{{end_time_date}}" mode="date">
  40 + <view class="time-select-box">
  41 + <view class="select-picker">
  42 + <view class="picker">
  43 + {{end_time_date}}
  44 + </view>
  45 + </view>
  46 + <view class="iconfont icon-arrow-down arrow"></view>
  47 + </view>
  48 + </picker>
  49 + </view>
  50 + <text class="title">菜系:</text>
  51 + <view class="type">
  52 + <text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
  53 + <text class="{{current_type === index?'change-color':''}}"
  54 + wx:for="{{type}}" wx:key="index" catchtap="chooseType"
  55 + data-index="{{index}}">{{item.name}}
  56 + </text>
  57 + </view>
  58 + <!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
  59 + <!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
  60 + </view>
  61 + </view>
  62 +</view>
  63 +<view class='content_box'>
  64 + <view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
  65 + <view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
  66 + bindtap='gouserrecommend_detail' data-index="{{index}}">
  67 + <image src="../../../images/b1@2x (1).png"></image>
  68 + <view class="title">
  69 + <text class="area">{{item.area}}</text>
  70 + <text class="num">还差{{item.num}}人</text>
  71 + </view>
  72 + <view class="user">
  73 + <image src="../../images/avatar@2x.png" class="avatar"></image>
  74 + <text>{{item.name}}</text>
  75 + </view>
  76 + </view>
  77 +</view>
  1 +/* pages/index/tandian-list/tandian-list.wxss */
  2 +@import '../../spell-list/spell-list.wxss';
  3 +.fix-box {
  4 + border-top: 20rpx solid #f2f2f2;
  5 +}
  6 +.content_box {
  7 + margin-top: 100rpx;
  8 +}
  1 +// pages/index/type-detail/type-detail.js
  2 +const app = getApp();
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + is_showSort: false,
  10 + is_showSelect: false,
  11 + currentSort: 0,
  12 + currentSelect: 0,
  13 + start_time_date: app.nowDate(),
  14 + end_time_date: app.nowDate(),
  15 + type:[
  16 + {name:'粤菜',id:1},{name:'川菜',id:2},{name:'其他中餐',id:3},{name:'粤菜',id:4},{name:'粤菜',id:5},{name:'粤菜',id:6},{name:'粤菜',id:7},
  17 + {name:'粤菜',id:8},{name:'川菜',id:9},{name:'其他中餐',id:10},{name:'粤菜',id:11},{name:'粤菜',id:12},{name:'粤菜',id:13},{name:'粤菜',id:14},
  18 + ],
  19 + sort: [{id: 0, name: '最具人气'}, {id: 1, name: '距离最近'}],
  20 + sort_id: 0,//选择的排序id,默认是0
  21 + is_all: true,
  22 + list:[
  23 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  24 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  25 + {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
  26 + ]
  27 + },
  28 + //搜索
  29 + search() {
  30 + wx.navigateTo({
  31 + url: '/pages/search/search',
  32 + })
  33 + },
  34 + //点击智能排序按钮
  35 + clickSort() {
  36 + let that = this;
  37 + that.setData({
  38 + // down: !that.data.down,
  39 + is_showSort: !that.data.is_showSort,
  40 + is_showSelect: false
  41 + // showrent_mask: false
  42 + })
  43 + },
  44 + //点击筛选按钮
  45 + clickSelect() {
  46 + let that = this;
  47 + that.setData({
  48 + // down: !that.data.down,
  49 + is_showSelect: !that.data.is_showSelect,
  50 + is_showSort: false,
  51 + // showrent_mask: false
  52 + })
  53 + },
  54 + //关闭排序列表
  55 + closeMask() {
  56 + let that = this;
  57 + that.setData({
  58 + // showrent_mask: false,
  59 + is_showSort: false,
  60 + is_showSelect: false,
  61 + })
  62 + },
  63 + //保持筛选列表开启
  64 + openMask() {
  65 + this.setData({is_showSelect: true,})
  66 + },
  67 + //点击默认/热度排序
  68 + chooseSort(e) {
  69 + const current = e.currentTarget.dataset.index;
  70 + this.setData({
  71 + sort_id: this.data.sort[current].id,
  72 + currentSort: current,
  73 + is_showSort: false,
  74 + // down: !this.data.down,
  75 + });
  76 + this.initPortalPost();
  77 + this.getuser_recommend()
  78 + },
  79 + //选择开始时间
  80 + changeStartTime: function(e) {
  81 + console.log('picker发送选择改变,携带值为', e.detail.value)
  82 + this.setData({
  83 + start_time_date: e.detail.value,
  84 + is_showSelect: true,
  85 + // is_birth_change: true,
  86 + })
  87 + },
  88 + //选择结束时间
  89 + changeEndTime: function(e) {
  90 + console.log('picker发送选择改变,携带值为', e.detail.value)
  91 + this.setData({
  92 + end_time_date: e.detail.value,
  93 + is_showSelect: true,
  94 + // is_birth_change: true,
  95 + })
  96 + },
  97 + //选择全部分类
  98 + chooseAll() {
  99 + this.setData({is_all: true,is_showSelect:false,current_type:null})
  100 + },
  101 + //选择分类
  102 + chooseType(e) {
  103 + const current = e.currentTarget.dataset.index;
  104 + this.setData({current_type: current,is_all:false,is_showSelect:false,is_showSort: false,})
  105 + },
  106 + /**
  107 + * 生命周期函数--监听页面加载
  108 + */
  109 + onLoad: function (options) {
  110 +
  111 + },
  112 +
  113 + /**
  114 + * 生命周期函数--监听页面初次渲染完成
  115 + */
  116 + onReady: function () {
  117 +
  118 + },
  119 +
  120 + /**
  121 + * 生命周期函数--监听页面显示
  122 + */
  123 + onShow: function () {
  124 +
  125 + },
  126 +
  127 + /**
  128 + * 生命周期函数--监听页面隐藏
  129 + */
  130 + onHide: function () {
  131 +
  132 + },
  133 +
  134 + /**
  135 + * 生命周期函数--监听页面卸载
  136 + */
  137 + onUnload: function () {
  138 +
  139 + },
  140 +
  141 + /**
  142 + * 页面相关事件处理函数--监听用户下拉动作
  143 + */
  144 + onPullDownRefresh: function () {
  145 +
  146 + },
  147 +
  148 + /**
  149 + * 页面上拉触底事件的处理函数
  150 + */
  151 + onReachBottom: function () {
  152 +
  153 + },
  154 +
  155 + /**
  156 + * 用户点击右上角分享
  157 + */
  158 + onShareAppMessage: function () {
  159 +
  160 + }
  161 +})
  1 +{
  2 + "navigationBarTitleText": "短途郊游"
  3 +}
  1 +<!--pages/index/type-detail/type-detail.wxml-->
  2 +<view class="fix-box">
  3 + <view class="head">
  4 + <view class="position">
  5 + <view class="left">
  6 + <view class="iconfont icon-location"></view>
  7 + <text>北京</text>
  8 + <view class="iconfont icon-arrow-down"></view>
  9 + </view>
  10 + <view class="right" bindtap="search">
  11 + <view class="input"></view>
  12 + <image src="../../../images/search@2x.png"></image>
  13 + <!--<view class="iconfont icon-arrow-down"></view>-->
  14 + </view>
  15 + </view>
  16 + </view>
  17 +
  18 + <view class="sort-select-box">
  19 + <!--智能排序按钮-->
  20 + <view class="sort-box" bindtap='clickSort'>
  21 + <view class='' class="sort-btn">智能排序</view>
  22 + <view class="iconfont icon-arrow-down"></view>
  23 + </view>
  24 + <!--筛选按钮-->
  25 + <view class="select-box" bindtap='clickSelect'>
  26 + <view class='' class="select-btn">筛选</view>
  27 + <view class="iconfont icon-arrow-down"></view>
  28 + </view>
  29 + </view>
  30 + <!--智能排序列表-->
  31 + <view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
  32 + <view class='rent_popup'>
  33 + <view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
  34 + catchtap='chooseSort' data-index="{{index}}">{{item.name}}
  35 + </view>
  36 + </view>
  37 + </view>
  38 + <!--筛选列表-->
  39 + <view class='rent_mask' wx:if='{{is_showSelect}}' bindtap="closeMask">
  40 + <view class='rent_popup time-box' catchtap="openMask">
  41 + <text class="title">时间:</text>
  42 + <view class="picker-box">
  43 + <picker bindchange="changeStartTime" value="{{start_time_date}}" mode="date">
  44 + <view class="time-select-box">
  45 + <view class="select-picker">
  46 + <view class="picker">
  47 + {{start_time_date}}
  48 + </view>
  49 + </view>
  50 + <view class="iconfont icon-arrow-down arrow"></view>
  51 + </view>
  52 + </picker>
  53 + <text>-</text>
  54 + <picker bindchange="changeEndTime" value="{{end_time_date}}" mode="date">
  55 + <view class="time-select-box">
  56 + <view class="select-picker">
  57 + <view class="picker">
  58 + {{end_time_date}}
  59 + </view>
  60 + </view>
  61 + <view class="iconfont icon-arrow-down arrow"></view>
  62 + </view>
  63 + </picker>
  64 + </view>
  65 + <text class="title">菜系:</text>
  66 + <view class="type">
  67 + <text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
  68 + <text class="{{current_type === index?'change-color':''}}"
  69 + wx:for="{{type}}" wx:key="index" catchtap="chooseType"
  70 + data-index="{{index}}">{{item.name}}
  71 + </text>
  72 + </view>
  73 + <!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
  74 + <!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
  75 + </view>
  76 + </view>
  77 +</view>
  78 +<view class='content_box'>
  79 + <view class="no-data" wx:if="{{list.length === 0}}">暂无拼餐活动</view>
  80 + <view class='content_item' wx:for='{{list}}' wx:key="index" wx:if="{{list.length>0}}"
  81 + bindtap='gouserrecommend_detail' data-index="{{index}}">
  82 + <image src="../../../images/activity_img@2x.png"></image>
  83 + <view class="title">
  84 + <text class="area">{{item.area}}</text>
  85 + <text class="num">还差{{item.num}}人</text>
  86 + </view>
  87 + <view class="user">
  88 + <image src="../../images/avatar@2x.png" class="avatar"></image>
  89 + <text>{{item.name}}</text>
  90 + </view>
  91 + </view>
  92 +</view>
  1 +/* pages/index/type-detail/type-detail.wxss */
  2 +@import '../../spell-list/spell-list.wxss';
  3 +.head {
  4 + border-bottom: 20rpx solid #f2f2f2;
  5 +}
  6 +.rent_mask {
  7 + top: 197rpx;
  8 +}
  9 +.content_box {
  10 + margin-top: 197rpx;
  11 +}
  1 +// pages/my/edit-info/edit-info.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 + sexList: ['男','女'],
  9 + maxlength: 50,
  10 + minlength: 0,
  11 + currentnum: 0,
  12 + },
  13 + sexPickerChange(e) {
  14 + console.log('picker发送选择改变,携带值为', e.detail.value)
  15 + this.setData({
  16 + current_sex: e.detail.value,
  17 + is_sex_change: true
  18 + })
  19 + },
  20 + getPhoneNumber(e) {
  21 + console.log(e.detail.errMsg)
  22 + console.log(e.detail.iv)
  23 + console.log(e.detail.encryptedData)
  24 + },
  25 + //输入国家
  26 + inputCountry(e) {
  27 + this.setData({
  28 + country: e.detail.value,
  29 + })
  30 + },
  31 + //输入城市
  32 + inputCity(e) {
  33 + this.setData({
  34 + city: e.detail.value,
  35 + })
  36 + },
  37 + //简介
  38 + inputContent(e) {
  39 + var textcontent = e.detail.value;
  40 + var len = e.detail.cursor;
  41 + var maxlength = this.data.maxlength;
  42 + var minlength = this.data.minlength;
  43 + if (len > maxlength) {
  44 + wx.showToast({
  45 + title: '超出最大限制',
  46 + icon: 'none'
  47 + });
  48 + return
  49 + } else {
  50 + this.setData({
  51 + currentnum: len,
  52 + content: textcontent,
  53 + })
  54 + }
  55 + },
  56 + /**
  57 + * 生命周期函数--监听页面加载
  58 + */
  59 + onLoad: function (options) {
  60 +
  61 + },
  62 +
  63 + /**
  64 + * 生命周期函数--监听页面初次渲染完成
  65 + */
  66 + onReady: function () {
  67 +
  68 + },
  69 +
  70 + /**
  71 + * 生命周期函数--监听页面显示
  72 + */
  73 + onShow: function () {
  74 +
  75 + },
  76 +
  77 + /**
  78 + * 生命周期函数--监听页面隐藏
  79 + */
  80 + onHide: function () {
  81 +
  82 + },
  83 +
  84 + /**
  85 + * 生命周期函数--监听页面卸载
  86 + */
  87 + onUnload: function () {
  88 +
  89 + },
  90 +
  91 + /**
  92 + * 页面相关事件处理函数--监听用户下拉动作
  93 + */
  94 + onPullDownRefresh: function () {
  95 +
  96 + },
  97 +
  98 + /**
  99 + * 页面上拉触底事件的处理函数
  100 + */
  101 + onReachBottom: function () {
  102 +
  103 + },
  104 +
  105 + /**
  106 + * 用户点击右上角分享
  107 + */
  108 + onShareAppMessage: function () {
  109 +
  110 + }
  111 +})
  1 +{
  2 + "navigationBarTitleText": "完善个人信息"
  3 +}
  1 +<!--pages/my/edit-info/edit-info.wxml-->
  2 +<view class="content">
  3 + <view class="flex-box flex-picker">
  4 + <view class="title">性别:</view>
  5 + <view class="text">
  6 + <picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">
  7 + <view class="sex-picker">
  8 + <text class="variety-text">{{sexList[current_sex]}}</text>
  9 + <!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>-->
  10 + <view class="iconfont icon-arrow-down"></view>
  11 + </view>
  12 + </picker>
  13 + </view>
  14 + </view>
  15 + <view class="flex-box">
  16 + <view class="title">国家:</view>
  17 + <view class="text">
  18 + <input type="text" bindinput="inputCountry"/>
  19 + </view>
  20 + </view>
  21 + <view class="flex-box">
  22 + <view class="title">城市:</view>
  23 + <view class="text">
  24 + <input type="text" bindinput="inputCity"/>
  25 + </view>
  26 + </view>
  27 + <view class="flex-box">
  28 + <view class="title">手机号:</view>
  29 + <view class="phone-box">
  30 + <input type="text" bindinput="inputCountry"/>
  31 + <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button>
  32 + </view>
  33 + </view>
  34 + <view class="content-box">
  35 + <view class="title">个人简介:</view>
  36 + <view class="text">
  37 + <textarea type="text" bindinput="inputContent" maxlength="50"></textarea>
  38 + <view class='word_num'>{{currentnum}}/{{maxlength}}</view>
  39 + </view>
  40 + </view>
  41 +</view>
  1 +/* pages/my/edit-info/edit-info.wxss */
  2 +.content {
  3 + padding: 20rpx;
  4 + -webkit-box-sizing: border-box;
  5 + -moz-box-sizing: border-box;
  6 + box-sizing: border-box;
  7 +}
  8 +.flex-box {
  9 + display: flex;
  10 + align-items: center;
  11 + border-bottom: 1rpx solid #f2f2f2;
  12 + padding: 20rpx 0;
  13 +}
  14 +.flex-box .title {
  15 + color: #666666;
  16 + font-size: 26rpx;
  17 + margin-right: 20rpx;
  18 +}
  19 +.flex-box .text {
  20 + flex:1;
  21 +}
  22 +.sex-picker {
  23 + display: flex;
  24 + align-items: center;
  25 + justify-content: space-between;
  26 +}
  27 +.variety-text {
  28 + font-size: 26rpx;
  29 + color: #666666;
  30 +}
  31 +.text input {
  32 + font-size: 26rpx;
  33 + color: #666666;
  34 +}
  35 +.phone-box {
  36 + flex:1;
  37 + display: flex;
  38 + align-items: center;
  39 + justify-content: space-between;
  40 +}
  41 +.phone-btn {
  42 + width: 120rpx;
  43 + height: 40rpx;
  44 + line-height: 40rpx;
  45 + margin: 0;
  46 + padding: 0;
  47 + background-color: #333333;
  48 + color:#E1C8AF;
  49 + font-size: 22rpx;
  50 +}
  51 +.content-box {
  52 + display: flex;
  53 + flex-direction: column;
  54 + align-items:flex-start;
  55 + padding: 20rpx 0;
  56 +}
  57 +.content-box .title {
  58 + color: #666666;
  59 + font-size: 26rpx;
  60 + margin-bottom: 20rpx;
  61 +}
  62 +.content-box .text {
  63 + width:100%;
  64 + position: relative;
  65 +}
  66 +.content-box textarea {
  67 + border: 1rpx solid #f2f2f2;
  68 + border-radius: 4rpx;
  69 + width: 100%;
  70 + padding:20rpx;
  71 + color:#666666;
  72 + font-size: 26rpx;
  73 + -webkit-box-sizing: border-box;
  74 + -moz-box-sizing: border-box;
  75 + box-sizing: border-box;
  76 +}
  77 +.word_num {
  78 + position: absolute;
  79 + right: 30rpx;
  80 + bottom: 30rpx;
  81 + font-size: 28rpx;
  82 + color: #c3c3c3;
  83 +}
@@ -6,6 +6,21 @@ Page({ @@ -6,6 +6,21 @@ Page({
6 */ 6 */
7 data: { 7 data: {
8 tabcurrent: {tab: 4,bubble: ''}, 8 tabcurrent: {tab: 4,bubble: ''},
  9 + is_showAnswer: false,
  10 + is_showUserInfo:false,
  11 + is_answer: true,
  12 + is_class:1,
  13 + },
  14 + //编辑个人信息
  15 + goUserInfo() {
  16 + wx.navigateTo({
  17 + url: '/pages/my/edit-info/edit-info',
  18 + })
  19 + },
  20 + disableScroll() {},
  21 + handleBackground() {
  22 + console.log('dianji');
  23 + this.setData({is_showAnswer: false,is_showUserInfo:false,})
9 }, 24 },
10 //首页-导航 25 //首页-导航
11 service(e) { 26 service(e) {
@@ -45,10 +60,17 @@ Page({ @@ -45,10 +60,17 @@ Page({
45 }, 60 },
46 //发布按钮 61 //发布按钮
47 release(e) { 62 release(e) {
48 - let that = this;  
49 - that.setData({  
50 - releasepopup: true  
51 - }) 63 + console.log('发布');
  64 + const self = this;
  65 + if(!self.data.is_answer) {
  66 + self.setData({
  67 + is_showAnswer: true
  68 + });
  69 + }else {
  70 + self.setData({
  71 + is_showUserInfo: true
  72 + });
  73 + }
52 }, 74 },
53 //取消发布弹窗 75 //取消发布弹窗
54 cancelPopup() { 76 cancelPopup() {
1 -{}  
  1 +{
  2 + "navigationBarTitleText": "我的"
  3 +}
1 <!--pages/my/my.wxml--> 1 <!--pages/my/my.wxml-->
  2 +<view class="head-box" bindtap="goUserInfo">
  3 + <view class="head">
  4 +
  5 + </view>
  6 + <image src="../../images/user-img@2x.png" class="user-img"></image>
  7 + <view class="left">
  8 + <view class="class-box">
  9 + <image src="../../images/jin@2x.png" wx:if="{{is_class === 1}}"></image>
  10 + <image src="../../images/yin@2x.png" wx:if="{{is_class === 2}}"></image>
  11 + <image src="../../images/tong@2x.png" wx:if="{{is_class === 3}}"></image>
  12 + <text wx:if="{{is_class === 1}}">金火柴</text>
  13 + <text wx:if="{{is_class === 2}}">银火柴</text>
  14 + <text wx:if="{{is_class === 3}}">铜火柴</text>
  15 + </view>
  16 + </view>
  17 + <view class="right">
  18 + <view class="name">旦巴小公举</view>
  19 + <view class="area">
  20 + <view class="iconfont icon-dingweiweizhizuobiaoxianxing"></view>
  21 + <text>北京</text>
  22 + </view>
  23 + <view class="qian">确认过眼神,遇见对的人</view>
  24 + </view>
  25 +</view>
  26 +
  27 +
  28 +<view class="menu-box">
  29 + <view class="btn-box" bindtap="rechargeBalance">
  30 + <image src="../../images/collect@2x.png" class="icon-money"></image>
  31 + <view class="right">
  32 + <view class="text">我的收藏</view>
  33 + <image src="../../images/arrow@2x.png" class="arrow"></image>
  34 + </view>
  35 + </view>
  36 + <view class="btn-box" bindtap="safetySet">
  37 + <image src="../../images/mywallet@2x.png" class="icon-safety"></image>
  38 + <view class="right">
  39 + <view class="text">我的钱包</view>
  40 + <image src="../../images/arrow@2x.png" class="arrow"></image>
  41 + </view>
  42 + </view>
  43 + <view class="btn-box" bindtap="myCertification">
  44 + <image src="../../images/sugest@2x.png" class="icon-authentication"></image>
  45 + <view class="right">
  46 + <view class="text">意见反馈</view>
  47 + <image src="../../images/arrow@2x.png" class="arrow"></image>
  48 + </view>
  49 + </view>
  50 + <view class="btn-box" bindtap="myAddress">
  51 + <image src="../../images/about@2x.png" class="icon-address"></image>
  52 + <view class="right">
  53 + <view class="text">关于火柴一盒</view>
  54 + <image src="../../images/arrow@2x.png" class="arrow"></image>
  55 + </view>
  56 + </view>
  57 + <button class="btn-box button" open-type="concat" bindcontact="handleContact">
  58 + <image src="../../images/concat@2x.png" class="icon-customer"></image>
  59 + <view class="right">
  60 + <view class="text">联系客服</view>
  61 + <image src="../../images/arrow@2x.png" class="arrow"></image>
  62 + </view>
  63 + </button>
  64 +</view>
  65 +
  66 +
  67 +
  68 +
  69 +
  70 +
  71 +
  72 +
  73 +
  74 +
  75 +
  76 +
  77 +
  78 +
  79 +
  80 +
  81 +
  82 +
  83 +
  84 +
2 <!--底部tab--> 85 <!--底部tab-->
3 <import src="/templates/templates.wxml" /> 86 <import src="/templates/templates.wxml" />
4 <template is="tabBar" data='{{...tabcurrent}}' /> 87 <template is="tabBar" data='{{...tabcurrent}}' />
  88 +<!--去答题弹框-->
  89 +<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
  90 + <image class="sorry-img" src="../../images/sorry@2x.png"></image>
  91 + <view class="title">目前只对</view>
  92 + <view class="title">首批会员开放发布功能</view>
  93 + <view class="tips">答题后可能获得第一批次入场卷</view>
  94 + <view class="answer-btn">答题</view>
  95 +</view>
  96 +<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
  97 +<!--去完善个人信息弹框-->
  98 +<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
  99 + <image class="sorry-img" src="../../images/user_info@2x.png"></image>
  100 + <view class="title">为了更好的体验</view>
  101 + <view class="title">请先完善个人信息</view>
  102 + <view class="answer-btn">完成</view>
  103 +</view>
  104 +<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
  105 + <view class="left-btn">
  106 + <image src="../../images/pincan@2x.png"></image>
  107 + <view class="text">发布拼餐</view>
  108 + </view>
  109 + <view class="right-btn">
  110 + <image src="../../images/pinhuodong@2x.png"></image>
  111 + <view class="text">发布拼活动</view>
  112 + </view>
  113 +</view>
  114 +<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
1 /* pages/my/my.wxss */ 1 /* pages/my/my.wxss */
2 @import "../../templates/templates.wxss"; 2 @import "../../templates/templates.wxss";
  3 +@import "../../pages/css/modal.wxss";
  4 +.head-box {
  5 + position: relative;
  6 +}
  7 +.head-box .head {
  8 + width: 100%;
  9 + height: 314rpx;
  10 + background-image: url('http://pic.97uimg.com/back_pic/20/15/11/05/f87b770c518ed891c289e9c3ee1f2d80.jpg');
  11 + background-repeat: no-repeat;
  12 + -webkit-background-size: cover;
  13 + background-size: cover;
  14 + padding: 40rpx;
  15 + -webkit-box-sizing: border-box;
  16 + -moz-box-sizing: border-box;
  17 + box-sizing: border-box;
  18 + display: flex;
  19 + align-items: center;
  20 + justify-content: flex-start;
  21 + -webkit-filter: blur(2rpx); /* Chrome, Opera */
  22 + -moz-filter: blur(2rpx);
  23 + -ms-filter: blur(2rpx);
  24 + filter: blur(2rpx);
  25 +}
  26 +.left {
  27 + position: absolute;
  28 + top:65%;
  29 + left:102rpx;
  30 + display: flex;
  31 + flex-direction: column;
  32 + justify-content: space-between;
  33 +}
  34 +.head-box .left .class-box {
  35 + display: flex;
  36 + flex-direction: column;
  37 + margin-top: -10rpx;
  38 + align-items: center;
  39 +}
  40 +.head-box .left .class-box image {
  41 + width: 50rpx;
  42 + height: 64rpx;
  43 + margin-bottom: 10rpx;
  44 + /*-webkit-filter: blur(10px); !* Chrome, Opera *!*/
  45 + /*-moz-filter: blur(10px);*/
  46 + /*-ms-filter: blur(10px);*/
  47 + /*filter: blur(10px);*/
  48 +}
  49 +.head-box .left .class-box text {
  50 + width: 36rpx;
  51 + height: 15rpx;
  52 + text-align: center;
  53 + line-height: 15rpx;
  54 + /*padding: 6rpx 10rpx;*/
  55 + background-color: #E2C8B1;
  56 + color: #ffffff;
  57 + font-size: 10rpx;
  58 + border-radius: 4rpx;
  59 +}
  60 +.user-img {
  61 + position: absolute;
  62 + top:40rpx;
  63 + left:40rpx;
  64 + width: 173rpx;
  65 + height: 173rpx;
  66 + border-radius: 50%;
  67 +}
  68 +.head-box .right {
  69 + position: absolute;
  70 + top: 13%;
  71 + left: 250rpx;
  72 + display: flex;
  73 + flex-direction: column;
  74 + justify-content: space-between;
  75 + color: #ffffff;
  76 + }
  77 +
  78 +.head-box .right .name {
  79 + font-size: 34rpx;
  80 + margin-bottom: 6rpx;
  81 +}
  82 +
  83 +.head-box .right .area {
  84 + font-size: 28rpx;
  85 + display: flex;
  86 + align-items: center;
  87 + margin-bottom: 32rpx;
  88 +}
  89 +.head-box .right .area .iconfont {
  90 + color: #ffffff;
  91 + font-size: 34rpx;
  92 + margin-right: 6rpx;
  93 +}
  94 +.head-box .right .qian {
  95 + font-size: 24rpx;
  96 +}
  97 +.menu-box {
  98 + display: flex;
  99 + flex-direction: column;
  100 + padding: 0 36rpx;
  101 + -webkit-box-sizing: border-box;
  102 + -moz-box-sizing: border-box;
  103 + box-sizing: border-box;
  104 +}
  105 +.btn-box {
  106 + display: flex;
  107 + align-items: center;
  108 + border-bottom: 1rpx solid #f2f2f2;
  109 + /* justify-content: space-between; */
  110 +}
  111 +.button {
  112 + margin: 0;
  113 + padding: 0;
  114 + line-height: normal !important;
  115 + background-color: #fff;
  116 + border:0;
  117 +}
  118 +.button::after {
  119 + border:0;
  120 + line-height: 0;
  121 +}
  122 +.icon-money {
  123 + width: 52rpx;
  124 + height: 52rpx;
  125 + margin-right: 42rpx;
  126 +}
  127 +.icon-safety {
  128 + width: 50rpx;
  129 + height: 46rpx;
  130 + margin-right: 42rpx;
  131 +}
  132 +.icon-authentication {
  133 + width: 54rpx;
  134 + height: 48rpx;
  135 + margin-right: 36rpx;
  136 +}
  137 +.icon-address {
  138 + width: 48rpx;
  139 + height: 42rpx;
  140 + margin-right: 42rpx;
  141 +}
  142 +.icon-customer {
  143 + width: 52rpx;
  144 + height: 50rpx;
  145 + margin-right: 38rpx;
  146 +}
  147 +.icon-walker {
  148 + width: 38rpx;
  149 + height: 40rpx;
  150 + margin-right: 40rpx;
  151 +}
  152 +.btn-box .right {
  153 + display: flex;
  154 + align-items: center;
  155 + flex:1;
  156 + padding: 32rpx 0;
  157 + justify-content: space-between;
  158 +}
  159 +.btn-box .right .text {
  160 + color: #252729;
  161 + font-size: 28rpx;
  162 +}
  163 +.btn-box .right .arrow {
  164 + width: 14rpx;
  165 + height: 26rpx;
  166 +}
@@ -5,7 +5,29 @@ Page({ @@ -5,7 +5,29 @@ Page({
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
7 data: { 7 data: {
  8 + current:0,
  9 + orderList:
  10 + [
  11 + {title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:1,},
  12 + {title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:2,},
  13 + {title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:3,},
  14 + {title:'温哥华+翡翠岛+路易斯湖五日游',time:'2018.4.28',name:'旦巴 在多伦多',state:4,},
  15 + ],
8 tabcurrent: {tab: 3,bubble: ''}, 16 tabcurrent: {tab: 3,bubble: ''},
  17 + is_showAnswer: false,
  18 + is_showUserInfo:false,
  19 + is_answer: true,
  20 + },
  21 + //tab点击事件
  22 + chargeTab(e) {
  23 + this.setData({
  24 + current: e.currentTarget.dataset.current
  25 + })
  26 + },
  27 + disableScroll() {},
  28 + handleBackground() {
  29 + console.log('dianji');
  30 + this.setData({is_showAnswer: false,is_showUserInfo:false,})
9 }, 31 },
10 //首页-导航 32 //首页-导航
11 service(e) { 33 service(e) {
@@ -45,10 +67,17 @@ Page({ @@ -45,10 +67,17 @@ Page({
45 }, 67 },
46 //发布按钮 68 //发布按钮
47 release(e) { 69 release(e) {
48 - let that = this;  
49 - that.setData({  
50 - releasepopup: true  
51 - }) 70 + console.log('发布');
  71 + const self = this;
  72 + if(!self.data.is_answer) {
  73 + self.setData({
  74 + is_showAnswer: true
  75 + });
  76 + }else {
  77 + self.setData({
  78 + is_showUserInfo: true
  79 + });
  80 + }
52 }, 81 },
53 //取消发布弹窗 82 //取消发布弹窗
54 cancelPopup() { 83 cancelPopup() {
1 -{}  
  1 +{
  2 + "navigationBarTitleText": "订单"
  3 +}
1 <!--pages/order/order.wxml--> 1 <!--pages/order/order.wxml-->
  2 +<view class='tab_box'>
  3 + <view class="tab_item {{current==0?'active':''}}" data-current='0' bindtap='chargeTab'>全部</view>
  4 + <view class="tab_item {{current==1?'active':''}}" data-current='1' bindtap='chargeTab'>待处理</view>
  5 + <view class="tab_item {{current==2?'active':''}}" data-current='2' bindtap='chargeTab'>已拼成</view>
  6 + <view class="tab_item {{current==3?'active':''}}" data-current='3' bindtap='chargeTab'>已完成</view>
  7 + <view class="tab_item {{current==4?'active':''}}" data-current='4' bindtap='chargeTab'>已取消</view>
  8 +</view>
  9 +
  10 +<!--订单列表-->
  11 +<view class='content_box post_box' wx:if="{{orderList.length > 0}}">
  12 + <view class='content_item' wx:for="{{orderList}}" wx:key="index" bindtap='goPostDetail' data-index="{{index}}">
  13 + <image src="../../images/lishi@2x.png" class="thumb"></image>
  14 + <view class="lish-right">
  15 + <view class="title-box">
  16 + <view class="title">{{item.title}}</view>
  17 + <text wx:if="{{item.state === 1}}" class="state">待拼成</text>
  18 + <text wx:if="{{item.state === 2}}" class="state">已拼成</text>
  19 + <text wx:if="{{item.state === 3}}" class="state">已取消</text>
  20 + <text wx:if="{{item.state === 4}}" class="state">已完成</text>
  21 + </view>
  22 + <view class="time">{{item.time}}</view>
  23 + <view class="name-box">
  24 + <view class="name-left">
  25 + <image src="../../images/avatar@2x.png" class="avatar"></image>
  26 + <text>{{item.name}}</text>
  27 + </view>
  28 + <view class="btn">
  29 + <text wx:if="{{item.state === 4 || item.state === 3}}">删除</text>
  30 + <text wx:if="{{item.state === 2}}">完成</text>
  31 + </view>
  32 + </view>
  33 + </view>
  34 + </view>
  35 +</view>
  36 +
  37 +
  38 +
  39 +
  40 +
  41 +
  42 +
  43 +
  44 +
  45 +
  46 +
  47 +
  48 +
  49 +
2 <!--底部tab--> 50 <!--底部tab-->
3 <import src="/templates/templates.wxml" /> 51 <import src="/templates/templates.wxml" />
4 <template is="tabBar" data='{{...tabcurrent}}' /> 52 <template is="tabBar" data='{{...tabcurrent}}' />
  53 +<!--去答题弹框-->
  54 +<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
  55 + <image class="sorry-img" src="../../images/sorry@2x.png"></image>
  56 + <view class="title">目前只对</view>
  57 + <view class="title">首批会员开放发布功能</view>
  58 + <view class="tips">答题后可能获得第一批次入场卷</view>
  59 + <view class="answer-btn">答题</view>
  60 +</view>
  61 +<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
  62 +<!--去完善个人信息弹框-->
  63 +<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
  64 + <image class="sorry-img" src="../../images/user_info@2x.png"></image>
  65 + <view class="title">为了更好的体验</view>
  66 + <view class="title">请先完善个人信息</view>
  67 + <view class="answer-btn">完成</view>
  68 +</view>
  69 +<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
  70 + <view class="left-btn">
  71 + <image src="../../images/pincan@2x.png"></image>
  72 + <view class="text">发布拼餐</view>
  73 + </view>
  74 + <view class="right-btn">
  75 + <image src="../../images/pinhuodong@2x.png"></image>
  76 + <view class="text">发布拼活动</view>
  77 + </view>
  78 +</view>
  79 +<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
1 /* pages/order/order.wxss */ 1 /* pages/order/order.wxss */
2 @import "../../templates/templates.wxss"; 2 @import "../../templates/templates.wxss";
  3 +@import "../../pages/css/modal.wxss";
  4 +.tab_box {
  5 + height: 90rpx;
  6 + line-height: 90rpx;
  7 + display: flex;
  8 + align-items: center;
  9 + justify-content: center;
  10 + border-bottom: 1rpx solid #f5f5f5;
  11 + overflow: hidden;
  12 + white-space: nowrap;
  13 + flex-wrap: nowrap;
  14 + position: fixed;
  15 + top:0;
  16 + left:0;
  17 + right:0;
  18 +}
  19 +.tab_item {
  20 + display: inline-block;
  21 + width: 160rpx;
  22 + font-size: 30rpx;
  23 + color: #333333;
  24 + position: relative;
  25 + text-align: center;
  26 + /* border: 1rpx solid red; */
  27 +}
  28 +.active {
  29 + color: #EA5D27;
  30 +}
  31 +
  32 +.tab_box .active::after {
  33 + content: "";
  34 + /*border: 2rpx solid #DB4E2A;*/
  35 + position: absolute;
  36 + bottom: 0rpx;
  37 + left: 50%;
  38 + transform: translateX(-50%);
  39 + width: 80rpx;
  40 + height: 2rpx;
  41 + background: #EA5D27;
  42 +}.content_box {
  43 + padding: 10rpx 20rpx;
  44 + -webkit-box-sizing: border-box;
  45 + -moz-box-sizing: border-box;
  46 + box-sizing: border-box;
  47 + border-top: 1rpx solid #eeeeee;
  48 + }
  49 +.post_box {
  50 + margin-top: 92rpx;
  51 +}
  52 +.content_item {
  53 + display: flex;
  54 + align-items: center;
  55 + justify-content: flex-start;
  56 + padding: 30rpx 0;
  57 + -webkit-box-sizing: border-box;
  58 + -moz-box-sizing: border-box;
  59 + box-sizing: border-box;
  60 + border-bottom: 1rpx solid #eeeeee;
  61 +
  62 +}
  63 +.content_item .thumb {
  64 + width: 170rpx;
  65 + height: 170rpx;
  66 + margin-right: 26rpx;
  67 +}
  68 +.lish-right {
  69 + height: 166rpx;
  70 + display: flex;
  71 + flex:1;
  72 + flex-direction: column;
  73 + justify-content: space-around;
  74 +}
  75 +.lish-right .title-box {
  76 + display: flex;
  77 + align-items: center;
  78 + justify-content: space-between;
  79 +}
  80 +.lish-right .title, .lish-right .time{
  81 + font-size: 24rpx;
  82 + color: #333333;
  83 +}
  84 +.lish-right .state {
  85 + color:#999999;
  86 + font-size: 24rpx;
  87 +}
  88 +.lish-right .name-box {
  89 + display: flex;
  90 + align-items: center;
  91 + justify-content: space-between;
  92 + color: #666666;
  93 + font-size: 22rpx;
  94 +}
  95 +.lish-right .name-box .name-left {
  96 + display: flex;
  97 + align-items: center;
  98 + justify-content: flex-start;
  99 +}
  100 +.lish-right .name-box .btn {
  101 + color:#E2C8B1;
  102 + font-size: 24rpx;
  103 +}
  104 +.lish-right .name-box .btn text {
  105 + border-radius: 6rpx;
  106 + padding: 8rpx 32rpx;
  107 + background-color: #323232;
  108 +}
  109 +.lish-right .name-box .avatar{
  110 + width: 40rpx;
  111 + height: 40rpx;
  112 + margin-right: 16rpx;
  113 +}
@@ -41,7 +41,15 @@ Page({ @@ -41,7 +41,15 @@ Page({
41 {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'}, 41 {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
42 {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'}, 42 {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
43 {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'}, 43 {area:'Opera Bombana 2018.4.28',num:1,name:'巴旦 出发地朝阳区'},
44 - ] 44 + ],
  45 + is_showAnswer: false,
  46 + is_showUserInfo:false,
  47 + is_answer: true,
  48 + },
  49 + disableScroll() {},
  50 + handleBackground() {
  51 + console.log('dianji');
  52 + this.setData({is_showAnswer: false,is_showUserInfo:false,})
45 }, 53 },
46 //搜索 54 //搜索
47 search() { 55 search() {
@@ -163,10 +171,17 @@ Page({ @@ -163,10 +171,17 @@ Page({
163 }, 171 },
164 //发布按钮 172 //发布按钮
165 release(e) { 173 release(e) {
166 - let that = this;  
167 - that.setData({  
168 - releasepopup: true  
169 - }) 174 + console.log('发布');
  175 + const self = this;
  176 + if(!self.data.is_answer) {
  177 + self.setData({
  178 + is_showAnswer: true
  179 + });
  180 + }else {
  181 + self.setData({
  182 + is_showUserInfo: true
  183 + });
  184 + }
170 }, 185 },
171 //取消发布弹窗 186 //取消发布弹窗
172 cancelPopup() { 187 cancelPopup() {
@@ -36,7 +36,8 @@ @@ -36,7 +36,8 @@
36 <view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask"> 36 <view class='rent_mask' wx:if='{{is_showSort}}' bindtap="closeMask">
37 <view class='rent_popup'> 37 <view class='rent_popup'>
38 <view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index" 38 <view class="rent_item {{currentSort===index?'active':''}}" wx:for="{{sort}}" wx:key="index"
39 - catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view> 39 + catchtap='chooseSort' data-index="{{index}}">{{item.name}}
  40 + </view>
40 </view> 41 </view>
41 </view> 42 </view>
42 <!--筛选列表--> 43 <!--筛选列表-->
@@ -71,7 +72,8 @@ @@ -71,7 +72,8 @@
71 <text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text> 72 <text catchtap="chooseAll" class="{{is_all?'change-color':''}}">全部</text>
72 <text class="{{current_type === index?'change-color':''}}" 73 <text class="{{current_type === index?'change-color':''}}"
73 wx:for="{{type}}" wx:key="index" catchtap="chooseType" 74 wx:for="{{type}}" wx:key="index" catchtap="chooseType"
74 - data-index="{{index}}">{{item.name}}</text> 75 + data-index="{{index}}">{{item.name}}
  76 + </text>
75 </view> 77 </view>
76 <!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"--> 78 <!--<view class="rent_item {{currentSelect===index?'active':''}}" wx:for="{{select}}" wx:key="index"-->
77 <!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>--> 79 <!--catchtap='chooseSort' data-index="{{index}}">{{item.name}}</view>-->
@@ -113,5 +115,32 @@ @@ -113,5 +115,32 @@
113 </view> 115 </view>
114 116
115 <!--底部tab--> 117 <!--底部tab-->
116 -<import src="/templates/templates.wxml" />  
117 -<template is="tabBar" data='{{...tabcurrent}}' /> 118 +<import src="/templates/templates.wxml"/>
  119 +<template is="tabBar" data='{{...tabcurrent}}'/>
  120 +<!--去答题弹框-->
  121 +<view class="input-box" wx:if="{{is_showAnswer}}" catchtouchmove="disableScroll">
  122 + <image class="sorry-img" src="../../images/sorry@2x.png"></image>
  123 + <view class="title">目前只对</view>
  124 + <view class="title">首批会员开放发布功能</view>
  125 + <view class="tips">答题后可能获得第一批次入场卷</view>
  126 + <view class="answer-btn">答题</view>
  127 +</view>
  128 +<view class="modal_box" wx:if="{{is_showAnswer}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
  129 +<!--去完善个人信息弹框-->
  130 +<view class="input-box" wx:if="{{is_showUserInfo}}" catchtouchmove="disableScroll">
  131 + <image class="sorry-img" src="../../images/user_info@2x.png"></image>
  132 + <view class="title">为了更好的体验</view>
  133 + <view class="title">请先完善个人信息</view>
  134 + <view class="answer-btn">完成</view>
  135 +</view>
  136 +<view class="release-btn-box" wx:if="{{is_showUserInfo}}">
  137 + <view class="left-btn">
  138 + <image src="../../images/pincan@2x.png"></image>
  139 + <view class="text">发布拼餐</view>
  140 + </view>
  141 + <view class="right-btn">
  142 + <image src="../../images/pinhuodong@2x.png"></image>
  143 + <view class="text">发布拼活动</view>
  144 + </view>
  145 +</view>
  146 +<view class="modal_box" wx:if="{{is_showUserInfo}}" bindtap="handleBackground" catchtouchmove="disableScroll"></view>
1 /* pages/spell-list/spell-list.wxss */ 1 /* pages/spell-list/spell-list.wxss */
2 @import "../../templates/templates.wxss"; 2 @import "../../templates/templates.wxss";
  3 +@import "../../pages/css/modal.wxss";
  4 +
  5 +
3 @keyframes content_box { 6 @keyframes content_box {
4 0% { opacity: 0; } 7 0% { opacity: 0; }
5 100% { opacity: 1; } 8 100% { opacity: 1; }
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 "ignore": [] 4 "ignore": []
5 }, 5 },
6 "setting": { 6 "setting": {
7 - "urlCheck": true, 7 + "urlCheck": false,
8 "es6": true, 8 "es6": true,
9 "postcss": true, 9 "postcss": true,
10 "minified": true, 10 "minified": true,
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 }, 13 },
14 "compileType": "miniprogram", 14 "compileType": "miniprogram",
15 "libVersion": "2.4.2", 15 "libVersion": "2.4.2",
16 - "appid": "wxaab44bbcfc0e5bc5", 16 + "appid": "wxd2b1f6c8f2b85caf",
17 "projectname": "%E7%81%AB%E6%9F%B4%E8%A5%BF%E8%B7%AF", 17 "projectname": "%E7%81%AB%E6%9F%B4%E8%A5%BF%E8%B7%AF",
18 "debugOptions": { 18 "debugOptions": {
19 "hidedInDevtools": [] 19 "hidedInDevtools": []