Showing
100 changed files
with
3535 additions
and
2 deletions
Too many changes to show.
To preserve performance only 100 of 100+ files are displayed.
README.md
0 → 100644
a.html
deleted
100644 → 0
| 1 | -111vvvvbnghnhgvvvvvnbVB是按时是多少大杀四方 |
app.js
0 → 100644
| 1 | +//app.js | ||
| 2 | +var util = require('utils/util.js') | ||
| 3 | +var uri = require('utils/uri.js') | ||
| 4 | +const socket = require('utils/socket.js'); | ||
| 5 | +var mta= require('utils/mta_analysis.js') | ||
| 6 | +App({ | ||
| 7 | + scence:0, | ||
| 8 | + onLaunch: function (opt) { | ||
| 9 | + mta.App.init({ | ||
| 10 | + "appID":"500667278", | ||
| 11 | + }); | ||
| 12 | + | ||
| 13 | + this.getSystemInfo(uri.CACHE__SYSTEM_INFO); | ||
| 14 | + console.log(socket) | ||
| 15 | + // socket.initSocket(); | ||
| 16 | + }, | ||
| 17 | + onShow:function(){ | ||
| 18 | + socket.resiverMessage(); | ||
| 19 | + this.scence=0; | ||
| 20 | + // if(util.cache('identity')){ | ||
| 21 | + // this.getstaff(); | ||
| 22 | + // } | ||
| 23 | + if (wx.canIUse('getUpdateManager')) { | ||
| 24 | + const updateManager = wx.getUpdateManager(); | ||
| 25 | + updateManager.onCheckForUpdate(function (res) { | ||
| 26 | + // 请求完新版本信息的回调 | ||
| 27 | + console.log('onCheckForUpdate',res) | ||
| 28 | + }) | ||
| 29 | + | ||
| 30 | + updateManager.onUpdateReady(function (res) { | ||
| 31 | + console.log('onUpdateReady',res) | ||
| 32 | + updateManager.applyUpdate(); | ||
| 33 | + wx.showToast({ | ||
| 34 | + title:'版本已更新', | ||
| 35 | + duration:2000, | ||
| 36 | + mask:true, | ||
| 37 | + success:function(){ | ||
| 38 | + | ||
| 39 | + } | ||
| 40 | + }) | ||
| 41 | + | ||
| 42 | + }) | ||
| 43 | + updateManager.onUpdateFailed(function (res) { | ||
| 44 | + // 新的版本下载失败 | ||
| 45 | + console.log('onUpdateFailed',res) | ||
| 46 | + }) | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + }, | ||
| 50 | + getstaff:function(){ | ||
| 51 | + var that=this; | ||
| 52 | + wx.request({ | ||
| 53 | + url: "https://dcapi.colorcun.com/?service=App.Seller.GetAuthUserLists", | ||
| 54 | + data: {sellerid:util.cache('sellerid')}, | ||
| 55 | + header: { | ||
| 56 | + 'content-type': 'application/json' | ||
| 57 | + }, | ||
| 58 | + success: function(res) { | ||
| 59 | + if(res.data.ret==200){ | ||
| 60 | + var list=res.data.data; | ||
| 61 | + var temp={}; | ||
| 62 | + for(var key in list){ | ||
| 63 | + list[key].forEach(function(v,i){ | ||
| 64 | + if(v.openid && v.openid!=''){ | ||
| 65 | + temp[v.openid]=true | ||
| 66 | + } | ||
| 67 | + }) | ||
| 68 | + } | ||
| 69 | + if(!temp[util.cache('openid')]){ | ||
| 70 | + that.getsellerlist(); | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + }, | ||
| 75 | + complete:function (res) { | ||
| 76 | + } | ||
| 77 | + }) | ||
| 78 | + | ||
| 79 | + }, | ||
| 80 | + getsellerlist:function(){ | ||
| 81 | + var that=this; | ||
| 82 | + wx.request({ | ||
| 83 | + url: "https://dcapi.colorcun.com/?service=App.Seller.GetSystemByOpenid", | ||
| 84 | + data: {openid: util.cache('openid')}, | ||
| 85 | + header: { | ||
| 86 | + 'content-type': 'application/json' | ||
| 87 | + }, | ||
| 88 | + success: function (res) { | ||
| 89 | + if (that.scence == 0) { | ||
| 90 | + if (res.data.ret == 200 && res.data.data[0].auth == 0) { //无商家 | ||
| 91 | + if (util.cache('manage')) { | ||
| 92 | + wx.reLaunch({ | ||
| 93 | + url: '/pages/currency/c_store' | ||
| 94 | + }) | ||
| 95 | + } else { | ||
| 96 | + wx.reLaunch({ | ||
| 97 | + url: '/pages/login/l_login' | ||
| 98 | + }) | ||
| 99 | + } | ||
| 100 | + } else if (res.data.ret == 200 && res.data.data[0].length > 1) { //有多个商家 | ||
| 101 | + wx.reLaunch({ | ||
| 102 | + url: '/pages/currency/c_store' | ||
| 103 | + }) | ||
| 104 | + } else if (res.data.ret == 200 && res.data.data[0].length == 1) { //有1个商家 | ||
| 105 | + wx.reLaunch({ | ||
| 106 | + url: '/pages/me/s_index?sellerid=' + res.data.data[0][0].id | ||
| 107 | + }) | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + }) | ||
| 112 | + }, | ||
| 113 | + | ||
| 114 | + onHide:function(){ | ||
| 115 | + }, | ||
| 116 | + getSystemInfo:function(cb){ | ||
| 117 | + var systemInfo=util.cache(uri.CACHE__SYSTEM_INFO); | ||
| 118 | + if(systemInfo){ | ||
| 119 | + typeof cb == "function" && cb(systemInfo) | ||
| 120 | + }else{ | ||
| 121 | + //调用设备信息接口 | ||
| 122 | + wx.getSystemInfo({ | ||
| 123 | + success:function(res){ | ||
| 124 | + util.cache(uri.CACHE__SYSTEM_INFO,res); | ||
| 125 | + typeof cb == "function" && cb(res); | ||
| 126 | + } | ||
| 127 | + }); | ||
| 128 | + } | ||
| 129 | + }, | ||
| 130 | + "networkTimeout":{ | ||
| 131 | + "request": 20000, | ||
| 132 | + "connectSocket": 20000, | ||
| 133 | + "uploadFile": 20000, | ||
| 134 | + "downloadFile": 20000 | ||
| 135 | + }, | ||
| 136 | +}) |
app.json
0 → 100644
| 1 | +{ | ||
| 2 | + "pages": [ | ||
| 3 | + "pages/custom/enter/enter", | ||
| 4 | + "pages/custom/seller/menu", | ||
| 5 | + "pages/custom/seller/order", | ||
| 6 | + "pages/custom/seller/remark", | ||
| 7 | + "pages/custom/seller/detail", | ||
| 8 | + "pages/custom/address/list", | ||
| 9 | + "pages/custom/address/address", | ||
| 10 | + "pages/custom/me/index", | ||
| 11 | + "pages/custom/me/list", | ||
| 12 | + "pages/me/s_index", | ||
| 13 | + "pages/me/t_index", | ||
| 14 | + "pages/cookbook/cb_alllist", | ||
| 15 | + "pages/cookbook/cb_list", | ||
| 16 | + "pages/cookbook/cb_fadd", | ||
| 17 | + "pages/cookbook/cb_sadd", | ||
| 18 | + "pages/cookbook/cb_ggadd", | ||
| 19 | + "pages/cookbook/cb_wayadd", | ||
| 20 | + "pages/cookbook/cb_label", | ||
| 21 | + "pages/cookbook/cb_desc", | ||
| 22 | + "pages/cookbook/cb_unit", | ||
| 23 | + "pages/cookbook/cb_addunit", | ||
| 24 | + "pages/cooktype/ct_list", | ||
| 25 | + "pages/cookclear/cc_list", | ||
| 26 | + "pages/cookclear/ck_list", | ||
| 27 | + "pages/print/p_list", | ||
| 28 | + "pages/print/p_add", | ||
| 29 | + "pages/print/p_badd", | ||
| 30 | + "pages/manage/config", | ||
| 31 | + "pages/order/o_list", | ||
| 32 | + "pages/order/o_detail", | ||
| 33 | + "pages/store/s_staffadd", | ||
| 34 | + "pages/store/s_confirm", | ||
| 35 | + "pages/store/s_complete", | ||
| 36 | + "pages/store/s_detail", | ||
| 37 | + "pages/store/s_password", | ||
| 38 | + "pages/store/s_repass", | ||
| 39 | + "pages/store/s_handover", | ||
| 40 | + "pages/store/s_addmany", | ||
| 41 | + "pages/store/s_book", | ||
| 42 | + "pages/setting/s_grade", | ||
| 43 | + "pages/setting/s_rank", | ||
| 44 | + "pages/setting/s_store", | ||
| 45 | + "pages/currency/c_store", | ||
| 46 | + "pages/currency/c_setting", | ||
| 47 | + "pages/login/l_login", | ||
| 48 | + "pages/login/promise", | ||
| 49 | + "pages/login/agreement", | ||
| 50 | + "pages/login/l_info", | ||
| 51 | + "pages/login/l_open", | ||
| 52 | + "pages/snack/s_code", | ||
| 53 | + "pages/snack/s_cook", | ||
| 54 | + "pages/report/r_index", | ||
| 55 | + "pages/report/r_cook", | ||
| 56 | + "pages/report/r_detail", | ||
| 57 | + "pages/report/r_time", | ||
| 58 | + "pages/message/mould", | ||
| 59 | + "pages/picture/picture" | ||
| 60 | + ], | ||
| 61 | + "window": { | ||
| 62 | + "backgroundTextStyle": "light", | ||
| 63 | + "navigationBarBackgroundColor": "#199095", | ||
| 64 | + "navigationBarTitleText": "飞鸭外卖", | ||
| 65 | + "navigationBarTextStyle": "white", | ||
| 66 | + "navigationStyle": "custom" | ||
| 67 | + }, | ||
| 68 | + "networkTimeout": { | ||
| 69 | + "request": 20000, | ||
| 70 | + "downloadFile": 20000, | ||
| 71 | + "connectSocket": 20000, | ||
| 72 | + "uploadFile": 20000 | ||
| 73 | + }, | ||
| 74 | + "debug": true, | ||
| 75 | + "plugins": { | ||
| 76 | + "WechatSI": { | ||
| 77 | + "version": "0.3.4", | ||
| 78 | + "provider": "wx069ba97219f66d99" | ||
| 79 | + } | ||
| 80 | + }, | ||
| 81 | + "permission": { | ||
| 82 | + "scope.userLocation": { | ||
| 83 | + "desc": "你的位置信息将用于小饕点餐商户位置展示" | ||
| 84 | + } | ||
| 85 | + }, | ||
| 86 | + "usingComponents": { | ||
| 87 | + "nav": "/components/nav/nav" | ||
| 88 | + }, | ||
| 89 | + "sitemapLocation": "sitemap.json" | ||
| 90 | +} |
app.wxss
0 → 100644
| 1 | +/**app.wxss**/ | ||
| 2 | +@import "icon.wxss"; | ||
| 3 | + | ||
| 4 | +.hidden { | ||
| 5 | + display: none; | ||
| 6 | +} | ||
| 7 | +navigater{ | ||
| 8 | + -webkit-tap-highlight-color: rgba(0,0,0,0); | ||
| 9 | + -webkit-tap-highlight-color: transparent; /* For some Androids,个人感觉是低版本的安卓,4.0以下 */ | ||
| 10 | +} | ||
| 11 | +page { | ||
| 12 | + color: #000; | ||
| 13 | + font-size: 16px; | ||
| 14 | + font-family: 'PingFang SC','sans-serif','Helvetica Neue','Helvetica','Arial'; | ||
| 15 | +} | ||
| 16 | +.section{ margin-left:4%; margin-right:4%; width:92%; overflow: hidden;} | ||
| 17 | +.sectionW{margin-left:2%; margin-right:2%;width:96%;overflow: hidden;} | ||
| 18 | +.section90{margin-left:5%; margin-right:5%;width:90%;overflow: hidden;} | ||
| 19 | +.sectionZ{margin-left:7%; margin-right:7%;width:86%;overflow: hidden;} | ||
| 20 | +.sectionM{margin-left:41rpx; margin-right:41rpx;width:668rpx;overflow: hidden;} | ||
| 21 | +.black-font{ | ||
| 22 | + color: #353535; | ||
| 23 | +} | ||
| 24 | +.font32r{ | ||
| 25 | + font-size:32rpx; | ||
| 26 | +} | ||
| 27 | +.font36r{ | ||
| 28 | + font-size:36rpx; | ||
| 29 | +} | ||
| 30 | +.f-black{ | ||
| 31 | + color:#030303; | ||
| 32 | +} | ||
| 33 | +.f-black1{ | ||
| 34 | + color:#050505; | ||
| 35 | +} | ||
| 36 | +.f_red{ | ||
| 37 | + color: #E64340; | ||
| 38 | +} | ||
| 39 | +.red{ | ||
| 40 | + color:#f12c20; | ||
| 41 | +} | ||
| 42 | +.blue{ | ||
| 43 | + color: #10AEFF; | ||
| 44 | +} | ||
| 45 | +.yellow{ | ||
| 46 | + color: #FFBE00; | ||
| 47 | +} | ||
| 48 | +.orange{ | ||
| 49 | + color:rgb(255,76,0); | ||
| 50 | +} | ||
| 51 | +.gray{ | ||
| 52 | + color: #BFBFBF; | ||
| 53 | +} | ||
| 54 | +.white{ | ||
| 55 | + color: white; | ||
| 56 | +} | ||
| 57 | +.black-font{ | ||
| 58 | + color:#333333; | ||
| 59 | +} | ||
| 60 | +.white-font{ | ||
| 61 | + color:#ffffff; | ||
| 62 | +} | ||
| 63 | +.gray-deep-font{ | ||
| 64 | + color:#666666; | ||
| 65 | +} | ||
| 66 | +.gray-font{ | ||
| 67 | + color:#999999; | ||
| 68 | +} | ||
| 69 | +.red-pink-font{ | ||
| 70 | + color: #F0242E; | ||
| 71 | +} | ||
| 72 | +.gray-light-font{ | ||
| 73 | + color:#CCCCCC; | ||
| 74 | +} | ||
| 75 | + | ||
| 76 | +.bg-red-pink{ | ||
| 77 | + background: #F0242E; | ||
| 78 | +} | ||
| 79 | +.bg-white{ | ||
| 80 | + background: #FFFFFF; | ||
| 81 | +} | ||
| 82 | +.bg-gray{ | ||
| 83 | + background: #F9F9F9; | ||
| 84 | +} | ||
| 85 | +.bg-light-gray{ | ||
| 86 | + background: #CCCCCC; | ||
| 87 | +} | ||
| 88 | +.bg-line-gray{ | ||
| 89 | + background: #EFEFEF; | ||
| 90 | +} | ||
| 91 | +.bg-green{ | ||
| 92 | + background: #199095; | ||
| 93 | +} | ||
| 94 | + | ||
| 95 | + | ||
| 96 | +.click-icon{ | ||
| 97 | + width: 12rpx; | ||
| 98 | + height: 12rpx; | ||
| 99 | + border:2rpx solid transparent; | ||
| 100 | + border-top:2rpx solid #999999; | ||
| 101 | + border-right:2rpx solid #999999; | ||
| 102 | + transform: rotate(45deg); | ||
| 103 | + border-radius: 4rpx; | ||
| 104 | +} | ||
| 105 | + | ||
| 106 | +.f-white{ | ||
| 107 | + color: #FDFDFD; | ||
| 108 | +} | ||
| 109 | +.f-white1{ | ||
| 110 | + color: #FDFCFC; | ||
| 111 | +} | ||
| 112 | +.f-brown{ | ||
| 113 | + color:rgb(70,0,0); | ||
| 114 | +} | ||
| 115 | +.ft-liggray{ | ||
| 116 | + color:#DCDBE0; | ||
| 117 | +} | ||
| 118 | +.f-gray{ | ||
| 119 | + color:#333333; | ||
| 120 | +} | ||
| 121 | +.f-liggray{ | ||
| 122 | + color:#b2b2b2; | ||
| 123 | +} | ||
| 124 | +.f-midgray{ | ||
| 125 | + color:#4D4B4B; | ||
| 126 | +} | ||
| 127 | +.f-darkgray{ | ||
| 128 | + color:#666; | ||
| 129 | +} | ||
| 130 | +.f-deepgray{ | ||
| 131 | + color:#999; | ||
| 132 | +} | ||
| 133 | +.f-deepred{ | ||
| 134 | + color:#B3515A; | ||
| 135 | +} | ||
| 136 | +.f-blue{ | ||
| 137 | + color:#576B95; | ||
| 138 | +} | ||
| 139 | +.bg{ | ||
| 140 | + background-color: #efeef3; | ||
| 141 | +} | ||
| 142 | +.bg_green{ | ||
| 143 | + background-color: #199095; | ||
| 144 | +} | ||
| 145 | +.bg_red{ | ||
| 146 | + background-color: #e64340; | ||
| 147 | +} | ||
| 148 | +.bg_deepred{ | ||
| 149 | + background-color: #B3515A; | ||
| 150 | +} | ||
| 151 | +.bg_gray{ | ||
| 152 | + background-color: #f3f3f3; | ||
| 153 | +} | ||
| 154 | +.bg_white{ | ||
| 155 | + background-color: white; | ||
| 156 | +} | ||
| 157 | +.bg_eee{ | ||
| 158 | + background-color: #eee; | ||
| 159 | +} | ||
| 160 | +.font_color{ | ||
| 161 | + color: #008100; | ||
| 162 | +} | ||
| 163 | +.mtop3{ | ||
| 164 | + margin-top: 3px; | ||
| 165 | +} | ||
| 166 | +.mtop5{ | ||
| 167 | + margin-top: 5px; | ||
| 168 | +} | ||
| 169 | +.mtop8{ | ||
| 170 | + margin-top: 8px; | ||
| 171 | +} | ||
| 172 | +.mtop10{ | ||
| 173 | + margin-top: 10px; | ||
| 174 | +} | ||
| 175 | +.mtop15{ | ||
| 176 | + margin-top: 15px; | ||
| 177 | +} | ||
| 178 | +.mtop16{ | ||
| 179 | + margin-top: 16px; | ||
| 180 | +} | ||
| 181 | +.mtop20{ | ||
| 182 | + margin-top: 20px; | ||
| 183 | +} | ||
| 184 | +.mtop25{ | ||
| 185 | + margin-top: 25px; | ||
| 186 | +} | ||
| 187 | +.mtop30{ | ||
| 188 | + margin-top: 30px; | ||
| 189 | +} | ||
| 190 | +.mtop50{ | ||
| 191 | + margin-top: 50px; | ||
| 192 | +} | ||
| 193 | +.mbottom10{ | ||
| 194 | + margin-bottom: 10px; | ||
| 195 | +} | ||
| 196 | +.mbottom15{ | ||
| 197 | + margin-bottom: 15px; | ||
| 198 | +} | ||
| 199 | +.mbottom16{ | ||
| 200 | + margin-bottom: 16px; | ||
| 201 | +} | ||
| 202 | +.mbottom20{ | ||
| 203 | + margin-bottom: 20px; | ||
| 204 | +} | ||
| 205 | +.mbottom25{ | ||
| 206 | + margin-bottom: 25px; | ||
| 207 | +} | ||
| 208 | +.mbottom50{ | ||
| 209 | + margin-bottom: 50px; | ||
| 210 | +} | ||
| 211 | +.mleft{ | ||
| 212 | + margin-left:4%; | ||
| 213 | +} | ||
| 214 | +.mleft5{ | ||
| 215 | + margin-left: 5px; | ||
| 216 | +} | ||
| 217 | +.mleft8{ | ||
| 218 | + margin-left: 8px; | ||
| 219 | +} | ||
| 220 | +.mleft10{ | ||
| 221 | + margin-left: 10px; | ||
| 222 | +} | ||
| 223 | +.mleft14{ | ||
| 224 | + margin-left: 14px; | ||
| 225 | +} | ||
| 226 | +.mleft15{ | ||
| 227 | + margin-left: 15px; | ||
| 228 | +} | ||
| 229 | +.mleft20{margin-left: 20px;} | ||
| 230 | +.mleft45{margin-left: 45%;} | ||
| 231 | +.mright5{margin-right: 5px;} | ||
| 232 | +.mright10{ | ||
| 233 | + margin-right: 10px; | ||
| 234 | +} | ||
| 235 | +.mright25{ | ||
| 236 | + margin-right: 14px; | ||
| 237 | +} | ||
| 238 | +.mright20{ | ||
| 239 | + margin-right: 20px; | ||
| 240 | +} | ||
| 241 | +.strong,.bold,.font-bold{ | ||
| 242 | + font-weight: bold; | ||
| 243 | +} | ||
| 244 | +.bold500{ | ||
| 245 | + font-weight: 500; | ||
| 246 | +} | ||
| 247 | +.fweight700{ | ||
| 248 | + font-weight:700; | ||
| 249 | +} | ||
| 250 | +.textoverflow{ | ||
| 251 | + display: block; | ||
| 252 | + overflow: hidden; | ||
| 253 | + white-space: nowrap; | ||
| 254 | + text-overflow: ellipsis; | ||
| 255 | +} | ||
| 256 | +.fsize11{ | ||
| 257 | + font-size: 11px; | ||
| 258 | +} | ||
| 259 | +.fsize12{ | ||
| 260 | + font-size: 12px; | ||
| 261 | +} | ||
| 262 | +.fsize13{ | ||
| 263 | + font-size: 13px; | ||
| 264 | +} | ||
| 265 | +.fsize14{ | ||
| 266 | + font-size: 14px; | ||
| 267 | +} | ||
| 268 | +.fsize15{ | ||
| 269 | + font-size: 15px; | ||
| 270 | +} | ||
| 271 | +.fsize16{ | ||
| 272 | + font-size: 16px; | ||
| 273 | +} | ||
| 274 | +.fsize17{ | ||
| 275 | + font-size: 17px; | ||
| 276 | +} | ||
| 277 | +.fsize18{ | ||
| 278 | + font-size: 18px; | ||
| 279 | +} | ||
| 280 | +.fsize19{ | ||
| 281 | + font-size: 19px; | ||
| 282 | +} | ||
| 283 | +.fsize20{ | ||
| 284 | + font-size: 20px; | ||
| 285 | +} | ||
| 286 | +.fsize22{ | ||
| 287 | + font-size: 22px; | ||
| 288 | +} | ||
| 289 | +.fsize24{ | ||
| 290 | + font-size: 24px; | ||
| 291 | +} | ||
| 292 | +.fsize25{ | ||
| 293 | + font-size: 25px; | ||
| 294 | +} | ||
| 295 | +.fsize28{ | ||
| 296 | + font-size: 28px; | ||
| 297 | +} | ||
| 298 | +.fsize30{ | ||
| 299 | + font-size: 30px; | ||
| 300 | +} | ||
| 301 | +.fsize35{ | ||
| 302 | + font-size: 35px; | ||
| 303 | +} | ||
| 304 | +.fsize36{ | ||
| 305 | + font-size: 36px; | ||
| 306 | +} | ||
| 307 | +.fsize40{ | ||
| 308 | + font-size: 40px; | ||
| 309 | +} | ||
| 310 | +fsize50{ | ||
| 311 | + font-size: 50px; | ||
| 312 | +} | ||
| 313 | +.hr{ | ||
| 314 | + background: #efeef3; | ||
| 315 | + height: 20rpx; | ||
| 316 | + width:100%; | ||
| 317 | +} | ||
| 318 | +.hr-one{ | ||
| 319 | + background: #eee; | ||
| 320 | + height: 1px; | ||
| 321 | + width:auto; | ||
| 322 | +} | ||
| 323 | +.hr-line{ | ||
| 324 | + background:#f3f3f3; | ||
| 325 | + height:25px; | ||
| 326 | + line-height: 27px; | ||
| 327 | + width:100%; | ||
| 328 | + color:#999; | ||
| 329 | + font-size:12px; | ||
| 330 | + padding-left:5%; | ||
| 331 | +} | ||
| 332 | +.nowrap{white-space:nowrap;} | ||
| 333 | +.avatar-min,.avatar-min image{width:40px;height:40px; border-radius: 50%;} | ||
| 334 | +.avatar-mid,.avatar-mid image{width:60px;height:60px; border-radius: 50%;} | ||
| 335 | +.avatar,.avatar image{width:64px;height:64px; border-radius: 50%;} | ||
| 336 | +.avatar-max,.avatar-max image{width:70px;height:70px; border-radius: 50%;} | ||
| 337 | +.thumb,.thumb image{width:60px;height:60px;} | ||
| 338 | +.thumb-max,.thumb-max image{width:70px;height:70px;} | ||
| 339 | + | ||
| 340 | +/*水平方向左右分布*/ | ||
| 341 | +.flex-lr{ | ||
| 342 | + display: flex; | ||
| 343 | + display: -webkit-flex; | ||
| 344 | + justify-content: space-between; | ||
| 345 | + align-items:center; | ||
| 346 | + flex-direction: row; | ||
| 347 | + -webkit-flex-direction: row; | ||
| 348 | +} | ||
| 349 | +.flex-ll{ | ||
| 350 | + display: flex; | ||
| 351 | + display: -webkit-flex; | ||
| 352 | + justify-content: flex-start; | ||
| 353 | + align-items: center; | ||
| 354 | + flex-direction: row; | ||
| 355 | + -webkit-flex-direction: row; | ||
| 356 | +} | ||
| 357 | +.flex-rr{ | ||
| 358 | + display: flex; | ||
| 359 | + display: -webkit-flex; | ||
| 360 | + justify-content: flex-end; | ||
| 361 | + align-items: center; | ||
| 362 | + flex-direction: row; | ||
| 363 | + -webkit-flex-direction: row; | ||
| 364 | +} | ||
| 365 | +/*垂直方向居中分布*/ | ||
| 366 | +.flex-vc{ | ||
| 367 | + display: flex; | ||
| 368 | + display: -webkit-flex; | ||
| 369 | + justify-content: center; | ||
| 370 | + align-items: center; | ||
| 371 | + flex-direction: column; | ||
| 372 | + -webkit-flex-direction: column; | ||
| 373 | +} | ||
| 374 | +/*垂直方向居左分布*/ | ||
| 375 | +.flex-vl{ | ||
| 376 | + display: flex; | ||
| 377 | + display: -webkit-flex; | ||
| 378 | + justify-content: flex-start; | ||
| 379 | + align-items: left; | ||
| 380 | + flex-direction: column; | ||
| 381 | + -webkit-flex-direction: column; | ||
| 382 | +} | ||
| 383 | +.flex-vr{ | ||
| 384 | + display: flex; | ||
| 385 | + display: -webkit-flex; | ||
| 386 | + justify-content: flex-end; | ||
| 387 | + align-items: center; | ||
| 388 | + flex-direction: column; | ||
| 389 | + -webkit-flex-direction: column; | ||
| 390 | +} | ||
| 391 | +/*水平方向居中分布*/ | ||
| 392 | +.flex-cc{ | ||
| 393 | + display: flex; | ||
| 394 | + display: -webkit-flex; | ||
| 395 | + justify-content: center; | ||
| 396 | + align-items: center; | ||
| 397 | + flex-direction: row; | ||
| 398 | + -webkit-flex-direction: row; | ||
| 399 | +} | ||
| 400 | +/*基准线对齐*/ | ||
| 401 | +.flex-bc{ | ||
| 402 | + display: flex; | ||
| 403 | + display: -webkit-flex; | ||
| 404 | + justify-content: center; | ||
| 405 | + align-items: baseline; | ||
| 406 | + flex-direction: row; | ||
| 407 | + -webkit-flex-direction: row; | ||
| 408 | +} | ||
| 409 | +/*流式布局*/ | ||
| 410 | +.flex-auto{ | ||
| 411 | + display: flex; | ||
| 412 | + display: -webkit-flex; | ||
| 413 | + justify-content: space-around; | ||
| 414 | + align-content: flex-start; | ||
| 415 | + flex-flow:wrap; | ||
| 416 | +} | ||
| 417 | +.fixed-bottom{ | ||
| 418 | + position: fixed; | ||
| 419 | + bottom: 10px; | ||
| 420 | +} | ||
| 421 | + | ||
| 422 | +.h1{ | ||
| 423 | + font-size: 40px; | ||
| 424 | +} | ||
| 425 | +.div-v-center { | ||
| 426 | + -webkit-transform: translateY(-50%); | ||
| 427 | + -moz-transform: translateY(-50%); | ||
| 428 | + -ms-transform: translateY(-50%); | ||
| 429 | + -o-transform: translateY(-50%); | ||
| 430 | + transform: translateY(-50%); | ||
| 431 | +} | ||
| 432 | +.div-h-center { | ||
| 433 | + -webkit-transform: translateX(-50%); | ||
| 434 | + -moz-transform: translateX(-50%); | ||
| 435 | + -ms-transform: translateX(-50%); | ||
| 436 | + -o-transform: translateX(-50%); | ||
| 437 | + transform: translateX(-50%); | ||
| 438 | +} | ||
| 439 | +/*绿色虚线边框*/ | ||
| 440 | +.bd-green{ | ||
| 441 | + border: 1px dashed #21ab38; | ||
| 442 | + border-radius: 5px; | ||
| 443 | +} | ||
| 444 | +/*灰色虚线边框*/ | ||
| 445 | +.bd-gray{ | ||
| 446 | + border: 1px dashed #b2b2b2; | ||
| 447 | + border-radius: 5px; | ||
| 448 | +} | ||
| 449 | +/*灰实线边框*/ | ||
| 450 | +.bs-gray{ | ||
| 451 | + border: 1px solid #b2b2b2; | ||
| 452 | +} | ||
| 453 | +.border-r{border-right: 1px solid #e0e0e0;} | ||
| 454 | +.yellow{ | ||
| 455 | + color: #FFBE00; | ||
| 456 | +} | ||
| 457 | +.userinfo{ | ||
| 458 | + width: 90%; | ||
| 459 | +} | ||
| 460 | +.userinfo .nickname{ | ||
| 461 | + max-width: 65%; | ||
| 462 | + margin-left: 10px; | ||
| 463 | + display: block; | ||
| 464 | + overflow: hidden; | ||
| 465 | + white-space: nowrap; | ||
| 466 | + text-overflow: ellipsis; | ||
| 467 | +} | ||
| 468 | +.itemtitle{ | ||
| 469 | + white-space:nowrap; | ||
| 470 | +} | ||
| 471 | +.t-align-c{ | ||
| 472 | + text-align: center; | ||
| 473 | +} | ||
| 474 | +.t-align-r{ | ||
| 475 | + text-align: right; | ||
| 476 | +} | ||
| 477 | +.displaysan{ | ||
| 478 | + word-break:break-all; | ||
| 479 | + text-overflow:ellipsis; | ||
| 480 | + display:-webkit-box; | ||
| 481 | + -webkit-box-orient:vertical; | ||
| 482 | + -webkit-line-clamp:2; | ||
| 483 | + overflow:hidden; | ||
| 484 | +} | ||
| 485 | +.footer{ | ||
| 486 | + width:96%; | ||
| 487 | + height: 48px; | ||
| 488 | + line-height:48px; | ||
| 489 | + color:#fff; | ||
| 490 | + bottom:6px; | ||
| 491 | + position: fixed; | ||
| 492 | + margin:0 2%; | ||
| 493 | +} | ||
| 494 | +.footer button{ | ||
| 495 | + width:96%; | ||
| 496 | + margin:0 2%; | ||
| 497 | +} | ||
| 498 | +textarea{ | ||
| 499 | + z-index: 0; | ||
| 500 | +} | ||
| 501 | +.linethrough{ | ||
| 502 | + text-decoration:line-through | ||
| 503 | +} | ||
| 504 | +image{ | ||
| 505 | + background-color: #f4f4f4; | ||
| 506 | + background-repeat: no-repeat; | ||
| 507 | + background-size: 68px 24px; | ||
| 508 | + background-position: center; | ||
| 509 | +} | ||
| 510 | +.opacity2{ | ||
| 511 | + opacity: 0.2; | ||
| 512 | +} | ||
| 513 | +.opacity3{ | ||
| 514 | + opacity: 0.3; | ||
| 515 | +} | ||
| 516 | +.opacity{ | ||
| 517 | + opacity: 0.4; | ||
| 518 | +} | ||
| 519 | +.opacity5{ | ||
| 520 | + opacity: 0.5; | ||
| 521 | +} | ||
| 522 | +.ptop5{ | ||
| 523 | + padding-top:5px; | ||
| 524 | +} | ||
| 525 | +.ptop10{ | ||
| 526 | + padding-top:10px; | ||
| 527 | +} | ||
| 528 | +.pbottom10{ | ||
| 529 | + padding-bottom:10px; | ||
| 530 | +} | ||
| 531 | +.ptop12{ | ||
| 532 | + padding-top:12px; | ||
| 533 | +} | ||
| 534 | +.pbottom12{ | ||
| 535 | + padding-bottom:12px; | ||
| 536 | +} | ||
| 537 | +.pbottom15{ | ||
| 538 | + padding-bottom:15px; | ||
| 539 | +} | ||
| 540 | +.ptop20{ | ||
| 541 | + padding-top:20px; | ||
| 542 | +} | ||
| 543 | +.pbottom20{ | ||
| 544 | + padding-bottom:20px; | ||
| 545 | +} | ||
| 546 | +.ptop25{ | ||
| 547 | + padding-top:25px; | ||
| 548 | +} | ||
| 549 | +.pbottom25{ | ||
| 550 | + padding-bottom:25px; | ||
| 551 | +} | ||
| 552 | +.ptop50{ | ||
| 553 | + padding-top:50px; | ||
| 554 | +} | ||
| 555 | +.pbottom50{ | ||
| 556 | + padding-bottom:50px; | ||
| 557 | +} | ||
| 558 | +.width20{ | ||
| 559 | + width:20%; | ||
| 560 | +} | ||
| 561 | +.width80{ | ||
| 562 | + width:80%; | ||
| 563 | +} | ||
| 564 | +.height12{ | ||
| 565 | + height:12px; | ||
| 566 | + line-height:12px; | ||
| 567 | +} | ||
| 568 | +.avater{width:50px;height:50px;border-radius:50%;} | ||
| 569 | +/*.loading:before{ | ||
| 570 | + display: inline-block; | ||
| 571 | + margin-right: 5rpx; | ||
| 572 | + vertical-align: middle; | ||
| 573 | + content: ''; | ||
| 574 | + width: 40rpx; | ||
| 575 | + height: 40rpx; | ||
| 576 | + background: url(../image/loading.png) no-repeat; | ||
| 577 | + background-size: contain; | ||
| 578 | + animation: rotate 1s linear infinite; | ||
| 579 | +} */ | ||
| 580 | +.loading.complete:before{ | ||
| 581 | + display: none; | ||
| 582 | +} | ||
| 583 | +.height50{height:50px;line-height:50px;} | ||
| 584 | +.width70{width:70%;} | ||
| 585 | +.width30{width:30%;} | ||
| 586 | +.b-radius3{border-radius:3px;} | ||
| 587 | +.b-radius5{border-radius:5px;} | ||
| 588 | +.b-radius{border-radius:6px;} | ||
| 589 | +.b-radius50{border-radius:50%;} | ||
| 590 | + | ||
| 591 | +.addin{width:68px;height:20px;line-height:20px;margin:0 5px;border:1px solid #B3515A;border-radius:3px;} | ||
| 592 | +.bottom button{width:130px;position:absolute;right:20px;top:-58px;height:43px;line-height:43px;} | ||
| 593 | +button[disabled][type="primary"] ,.button-hover[type="primary"],button[loading][type="primary"]{background-color:#B3515A;} | ||
| 594 | + | ||
| 595 | +.steptpl .circle{color:#fff;width:16px; height:16px;line-height:16px;border-radius:50%; background-color:#C2C2C2;text-align:center;} | ||
| 596 | +.steptpl .line{width:25.5%; height:1px;background-color:#e0e0e0;} | ||
| 597 | +.steptpl .active{background-color:#B3515A;color:#fff;} | ||
| 598 | +.steptpl .black{color:#020202;} | ||
| 599 | +.steptpl .gray{color:#020202;} | ||
| 600 | +.steptpl .ligray{color:#999;} | ||
| 601 | +.steptpl .item{margin-left:11.5%;width:79%;} | ||
| 602 | + | ||
| 603 | +.modal{height:36px;line-height:36px;} | ||
| 604 | +.modaltip{width:92%;padding:0 4%;} | ||
| 605 | +.btnStyle{height:35px;line-height:35px;color:#fff;padding:0 10px;border-radius:4px;background-color:#B3515A;} | ||
| 606 | + | ||
| 607 | + | ||
| 608 | +/*点餐商户端新增*/ | ||
| 609 | +.eattitle{text-align:center;height:30px;margin-top:20px;font-size:20px} | ||
| 610 | +.eatsubhead{text-align:center;font-size:14px} | ||
| 611 | +.common{background-color:#FAFAFA;padding:2% 3%} | ||
| 612 | +.height50{height:50px;line-height:50px;border-bottom:1px #dadada solid } | ||
| 613 | +.height51{height:50px;line-height:50px} | ||
| 614 | + | ||
| 615 | +/*菜品及分类的列表页*/ | ||
| 616 | +.line{width:96%;margin-left:2%;margin-bottom:2%;border-bottom:1px #dadada solid;} | ||
| 617 | +.addcook{color:#9AC0CD;width:30%;justify-content:center;display:flex;height:45px;align-items:center;} | ||
| 618 | +.name{background:#F7F7F7;border-radius:4px;font-size:14px;height:75%;} | ||
| 619 | +.action{font-size:28px} | ||
| 620 | +.moremodal{margin:10px 0;} | ||
| 621 | +.type_table {border:0px solid darkgray;display:flex;justify-content:center;} | ||
| 622 | +.type_tr {display:flex;width:94%;justify-content:center;height:120rpx;align-items:center;border-bottom:1px solid #efeef3;} | ||
| 623 | +.type_td {width:33.333%;height:120rpx;line-height:120rpx;} | ||
| 624 | +.type_th {width:33.333%;height:120rpx;justify-content:center;display:flex;align-items:center;line-height:120rpx;} | ||
| 625 | +.dname{margin:15rpx 40rpx;color:#353535;font-size:30rpx;font-weight:bold;} | ||
| 626 | +.type_name{ | ||
| 627 | + display:flex; | ||
| 628 | + align-items:center; | ||
| 629 | + line-height:1.2 | ||
| 630 | +} | ||
| 631 | + | ||
| 632 | +.block1{width:28%;margin:10px 2%;text-align:center;background-color:#ffff;display:inline-block;border:1px #eeeeee solid;border-radius:10px;height:100px} | ||
| 633 | +.block2{width:28%;margin:10px 2%;text-align:center;background-color:#ffff;display:inline-block;border:1px #000000 solid;border-radius:10px;height:100px} | ||
| 634 | +.block3{width:42%;margin:15px 3%;text-align:center;background-color:#ffff;display:inline-block;border:1px #eeeeee solid;border-radius:10px;height:150px} | ||
| 635 | +.desk-reminder{ | ||
| 636 | + width:100%; | ||
| 637 | + height:100rpx; | ||
| 638 | + padding-left:3%; | ||
| 639 | + box-sizing:border-box; | ||
| 640 | + background:#ebf8f8; | ||
| 641 | + color:#666; | ||
| 642 | + font-size:30rpx; | ||
| 643 | + line-height:100rpx; | ||
| 644 | + margin-bottom:45rpx; | ||
| 645 | +} | ||
| 646 | + | ||
| 647 | +.imageblock1{width: 100%; height: 50px; background-color: #eeeeee; border-radius:10px 10px 0 0;} | ||
| 648 | +.imageblock2{width: 100%; height: 80px; background-color: #eeeeee; border-radius:10px 10px 0 0;} | ||
| 649 | + | ||
| 650 | +/*swtich样式-start*/ | ||
| 651 | +/*swtich整体大小*/ | ||
| 652 | +/*.wx-switch-input{ | ||
| 653 | + width:104rpx !important; | ||
| 654 | + height:64rpx !important; | ||
| 655 | + border-radius:32rpx!important; | ||
| 656 | +}*/ | ||
| 657 | +/*白色样式(false的样式)*/ | ||
| 658 | +/*.wx-switch-input::before{ | ||
| 659 | + width:102rpx !important; | ||
| 660 | + height: 60rpx !important; | ||
| 661 | + border-radius:30rpx!important; | ||
| 662 | +}*/ | ||
| 663 | +/*绿色样式(true的样式)*/ | ||
| 664 | +/*.wx-switch-input::after{ | ||
| 665 | + width: 60rpx !important; | ||
| 666 | + height: 60rpx !important; | ||
| 667 | + border-radius:30rpx!important; | ||
| 668 | +}*/ | ||
| 669 | +/*swtich样式end*/ | ||
| 670 | +.font34r{ | ||
| 671 | + font-size:34rpx; | ||
| 672 | +} | ||
| 673 | +.font28r{ | ||
| 674 | + font-size:28rpx; | ||
| 675 | +} | ||
| 676 | +.font30r{ | ||
| 677 | + font-size:30rpx; | ||
| 678 | +} | ||
| 679 | +.font32r{ | ||
| 680 | + font-size:32rpx; | ||
| 681 | +} | ||
| 682 | +.font26r{ | ||
| 683 | + font-size:26rpx; | ||
| 684 | +} | ||
| 685 | +.font24r{ | ||
| 686 | + font-size:24rpx; | ||
| 687 | +} | ||
| 688 | +.font38r{ | ||
| 689 | + font-size:38rpx; | ||
| 690 | +} | ||
| 691 | +.font40r{ | ||
| 692 | + font-size:40rpx; | ||
| 693 | +} | ||
| 694 | +.font44r{ | ||
| 695 | + font-size:44rpx; | ||
| 696 | +} | ||
| 697 | +.font50r{ | ||
| 698 | + font-size:50rpx; | ||
| 699 | +} | ||
| 700 | +.font52r{ | ||
| 701 | + font-size:52rpx; | ||
| 702 | +} | ||
| 703 | +.font20r{ | ||
| 704 | + font-size:20rpx; | ||
| 705 | +} | ||
| 706 | +.white-font{ | ||
| 707 | + color:#fff; | ||
| 708 | +} | ||
| 709 | +.green-font{ | ||
| 710 | + color:#199095; | ||
| 711 | +} | ||
| 712 | +.red-font{ | ||
| 713 | + color:#E14553; | ||
| 714 | +} | ||
| 715 | +.flex-rc{ | ||
| 716 | + display:flex; | ||
| 717 | + display: -webkit-flex; | ||
| 718 | + justify-content:center; | ||
| 719 | + align-items:center; | ||
| 720 | +} | ||
| 721 | +.flex-rs{ | ||
| 722 | + display:flex; | ||
| 723 | + display: -webkit-flex; | ||
| 724 | + justify-content:flex-start; | ||
| 725 | + align-items:center; | ||
| 726 | + flex-direction: row; | ||
| 727 | + flex-wrap:wrap; | ||
| 728 | +} | ||
| 729 | +.flex-cmc{ | ||
| 730 | + display:flex; | ||
| 731 | + display: -webkit-flex; | ||
| 732 | + justify-content:center; | ||
| 733 | + align-items:center; | ||
| 734 | + flex-direction: column; | ||
| 735 | +} | ||
| 736 | +.flex-re{ | ||
| 737 | + display:flex; | ||
| 738 | + display: -webkit-flex; | ||
| 739 | + justify-content:flex-end; | ||
| 740 | +} | ||
| 741 | +.flex-lt{ | ||
| 742 | + display: flex; | ||
| 743 | + display: -webkit-flex; | ||
| 744 | + justify-content: flex-start; | ||
| 745 | + align-items: flex-start; | ||
| 746 | + flex-direction: row; | ||
| 747 | + -webkit-flex-direction: row; | ||
| 748 | +} | ||
| 749 | +.flex-vtb{ | ||
| 750 | + display: flex; | ||
| 751 | + display: -webkit-flex; | ||
| 752 | + justify-content: space-between; | ||
| 753 | + align-items: left; | ||
| 754 | + flex-direction: column; | ||
| 755 | + -webkit-flex-direction: column; | ||
| 756 | +} | ||
| 757 | +/* 弹出框 */ | ||
| 758 | +.modal-dialog{ | ||
| 759 | + position:fixed; | ||
| 760 | + left:0; | ||
| 761 | + right:0; | ||
| 762 | + top:50%; | ||
| 763 | + margin:0 auto; | ||
| 764 | + margin-top:-180rpx; | ||
| 765 | + z-index:1000; | ||
| 766 | + width:550rpx; | ||
| 767 | + min-height:300rpx; | ||
| 768 | + background:#fff; | ||
| 769 | + | ||
| 770 | +} | ||
| 771 | +.modal-mask{ | ||
| 772 | + position:fixed; | ||
| 773 | + left:0; | ||
| 774 | + right:0; | ||
| 775 | + top:0; | ||
| 776 | + bottom:0; | ||
| 777 | + background:rgba(0,0,0,.7); | ||
| 778 | + z-index:999; | ||
| 779 | +} | ||
| 780 | +.modal-dialog-title{ | ||
| 781 | + width:100%; | ||
| 782 | + padding:35rpx 0; | ||
| 783 | +} | ||
| 784 | +.modal-dialog-input{ | ||
| 785 | + display:block; | ||
| 786 | + width:90%; | ||
| 787 | + height:75rpx; | ||
| 788 | + margin:25rpx auto; | ||
| 789 | + text-align:center; | ||
| 790 | +} | ||
| 791 | +.modal-dialog-button{ | ||
| 792 | + width:100%; | ||
| 793 | + height:105rpx; | ||
| 794 | + border-top:1px solid #e0e0e0; | ||
| 795 | + box-sizing:border-box; | ||
| 796 | +} | ||
| 797 | +.modal-button{ | ||
| 798 | + width:50%; | ||
| 799 | + height:100%; | ||
| 800 | +} | ||
| 801 | +.modal-cancel{ | ||
| 802 | + border-right:1px solid #e0e0e0; | ||
| 803 | + box-sizing:border-box; | ||
| 804 | +} | ||
| 805 | +.modal-confirm{ | ||
| 806 | + color:#008489; | ||
| 807 | +} | ||
| 808 | +.modal-dialog-all{ | ||
| 809 | + width:570rpx; | ||
| 810 | + min-height:460rpx; | ||
| 811 | + margin-top:-250rpx; | ||
| 812 | + border-radius:10rpx; | ||
| 813 | + overflow:hidden; | ||
| 814 | +} | ||
| 815 | +.modal-dialog-info{ | ||
| 816 | + min-height:205rpx; | ||
| 817 | + height:auto; | ||
| 818 | +} | ||
| 819 | +.modal-dialog-single{ | ||
| 820 | + width:490rpx; | ||
| 821 | + margin:0 auto; | ||
| 822 | + padding-bottom:40rpx; | ||
| 823 | +} | ||
| 824 | +.modal-dialog-kind{ | ||
| 825 | + width:110rpx; | ||
| 826 | + height:48rpx; | ||
| 827 | + border:1px solid #dadada; | ||
| 828 | +} | ||
| 829 | +.modal-dialog-allInput{ | ||
| 830 | + width:300rpx; | ||
| 831 | + height:48rpx; | ||
| 832 | + border-bottom:1px solid #dadada; | ||
| 833 | + text-align:center; | ||
| 834 | +} | ||
| 835 | +.modal-dialog-reminder{ | ||
| 836 | + min-height:240rpx; | ||
| 837 | + margin-top:-150rpx; | ||
| 838 | +} | ||
| 839 | +.modal-reminder-title{ | ||
| 840 | + width:100%; | ||
| 841 | + padding:15rpx 40rpx 60rpx 40rpx; | ||
| 842 | + box-sizing:border-box; | ||
| 843 | + text-align:center; | ||
| 844 | + color:#353535; | ||
| 845 | + font-size:36rpx; | ||
| 846 | +} | ||
| 847 | +.icon16-28{ | ||
| 848 | + width:16rpx; | ||
| 849 | + height:28rpx; | ||
| 850 | + background:transparent; | ||
| 851 | + margin-left:18rpx; | ||
| 852 | +} | ||
| 853 | +.default-setting{ | ||
| 854 | + color:#999; | ||
| 855 | + font-size:38rpx; | ||
| 856 | + -webkit-font-smoothing: antialiased; | ||
| 857 | + -moz-osx-font-smoothing: grayscale; | ||
| 858 | +} | ||
| 859 | +.cut{ | ||
| 860 | + width:100%; | ||
| 861 | + height:20rpx; | ||
| 862 | +} | ||
| 863 | +.smooth{ | ||
| 864 | + -webkit-font-smoothing: antialiased; | ||
| 865 | + -moz-osx-font-smoothing: grayscale; | ||
| 866 | +} | ||
| 867 | +button::after{ | ||
| 868 | + border:0; | ||
| 869 | +} | ||
| 870 | +.font-bold{ | ||
| 871 | + font-weight:bold; | ||
| 872 | +} | ||
| 873 | +.font-more{ | ||
| 874 | + overflow:hidden; | ||
| 875 | + text-overflow:ellipsis; | ||
| 876 | + white-space:nowrap; | ||
| 877 | +} | ||
| 878 | +.font-more-two{ | ||
| 879 | + display: -webkit-box; | ||
| 880 | + -webkit-box-orient: vertical; | ||
| 881 | + -webkit-line-clamp: 2; | ||
| 882 | + overflow: hidden; | ||
| 883 | +} | ||
| 884 | +image{ | ||
| 885 | + background:transparent; | ||
| 886 | +} | ||
| 887 | +.gray-font{ | ||
| 888 | + color:#999; | ||
| 889 | +} | ||
| 890 | +.gray-deep-font{ | ||
| 891 | + color:#666; | ||
| 892 | +} | ||
| 893 | +.icon12-22{ | ||
| 894 | + width:12rpx; | ||
| 895 | + height:22rpx; | ||
| 896 | + background:transparent; | ||
| 897 | + | ||
| 898 | +} | ||
| 899 | +.bg_gray{ | ||
| 900 | + background:#efeef3; | ||
| 901 | +} | ||
| 902 | +.font-siny{ | ||
| 903 | + font-weight:300; | ||
| 904 | +} | ||
| 905 | +image{ | ||
| 906 | + background-color:transparent; | ||
| 907 | +} | ||
| 908 | + | ||
| 909 | +.modal-alert{ | ||
| 910 | + width:550rpx; | ||
| 911 | + height:auto; | ||
| 912 | + min-height:252rpx; | ||
| 913 | + position:fixed; | ||
| 914 | + left:0; | ||
| 915 | + top:50%; | ||
| 916 | + right:0; | ||
| 917 | + margin:0 auto; | ||
| 918 | + margin-top:-125rpx; | ||
| 919 | + background:#fff; | ||
| 920 | + border-radius:10rpx; | ||
| 921 | + z-index:999; | ||
| 922 | +} | ||
| 923 | +.modal-menu{ | ||
| 924 | + width:300rpx; | ||
| 925 | + height:125rpx; | ||
| 926 | + border-bottom:1px solid #efeef3; | ||
| 927 | + margin:0 auto; | ||
| 928 | +} | ||
| 929 | +.modal-close{ | ||
| 930 | + width:67rpx; | ||
| 931 | + height:67rpx; | ||
| 932 | + position:absolute; | ||
| 933 | + left:0; | ||
| 934 | + right:0; | ||
| 935 | + bottom:-160rpx; | ||
| 936 | + margin:0 auto; | ||
| 937 | + border:1px solid #fff; | ||
| 938 | + border-radius:50%; | ||
| 939 | +} | ||
| 940 | +.close-image{ | ||
| 941 | + width:36rpx; | ||
| 942 | + height:36rpx; | ||
| 943 | + background:transparent; | ||
| 944 | +} | ||
| 945 | +.fixed{ | ||
| 946 | + position:fixed; | ||
| 947 | +} | ||
| 948 | +.left{ | ||
| 949 | + left:0; | ||
| 950 | +} | ||
| 951 | +.right{ | ||
| 952 | + right:0; | ||
| 953 | +} | ||
| 954 | +.top{ | ||
| 955 | + top:0; | ||
| 956 | +} | ||
| 957 | +.bottom{ | ||
| 958 | + bottom:0; | ||
| 959 | +} |
b.html
deleted
100644 → 0
| 1 | -223 |
components/Dialog/dialog.js
0 → 100644
components/Dialog/dialog.json
0 → 100644
components/Dialog/dialog.wxml
0 → 100644
| 1 | + | ||
| 2 | + <view class="alert-mark" hidden="{{openMask}}" bindTap='closeDialog'></view> | ||
| 3 | + <view class="alert-content" animation="{{animation}}"> | ||
| 4 | + <view class="alert-title">{{innerText}}</view> | ||
| 5 | + <input type="{{inputtype}}" class="alert-input" placeholder='{{msg}}' placeholder-style="color:#ccc;font-size:14px;text-align:left;" value='{{info}}' bindinput="bindkeyInput" maxlength='20'></input> | ||
| 6 | + <view class="alert-button"> | ||
| 7 | + <view class="alert-cancel alert-button-com" bindtap='closeDialog'>取 消</view> | ||
| 8 | + <view class="alert-config alert-button-com" bindtap='closeDialog' data-type="confirm">确 定</view> | ||
| 9 | + </view> | ||
| 10 | + </view> |
components/Dialog/dialog.wxss
0 → 100644
| 1 | +.alert-mark{ | ||
| 2 | + position: fixed; | ||
| 3 | + z-index: 1000; | ||
| 4 | + top: 0; | ||
| 5 | + right: 0; | ||
| 6 | + left: 0; | ||
| 7 | + bottom: 0; | ||
| 8 | + background: rgba(0, 0, 0, 0.8); | ||
| 9 | +} | ||
| 10 | +.alert-content{ | ||
| 11 | + position: fixed; | ||
| 12 | + z-index: 5000; | ||
| 13 | + width: 545rpx; | ||
| 14 | + top: 50%; | ||
| 15 | + left: 50%; | ||
| 16 | + margin-left: -272rpx; | ||
| 17 | + transform:translateY(-350%); | ||
| 18 | + background-color: #FFFFFF; | ||
| 19 | + text-align: center; | ||
| 20 | + overflow: hidden; | ||
| 21 | +} | ||
| 22 | +.alert-title{ | ||
| 23 | + font-size: 34rpx; | ||
| 24 | + padding-top: 40rpx; | ||
| 25 | + color:#353535; | ||
| 26 | +} | ||
| 27 | +.alert-input{ | ||
| 28 | + width: 465rpx; | ||
| 29 | + height: 70rpx; | ||
| 30 | + padding:0 15rpx; | ||
| 31 | + border: 1rpx solid #f2f2f2; | ||
| 32 | + box-sizing: border-box; | ||
| 33 | + margin:55rpx auto; | ||
| 34 | + color:#353535; | ||
| 35 | + font-size: 14px; | ||
| 36 | + text-align: left; | ||
| 37 | +} | ||
| 38 | +.alert-button{ | ||
| 39 | + width: 100%; | ||
| 40 | + height: 90rpx; | ||
| 41 | + border-top: 1rpx solid #eee; | ||
| 42 | + box-sizing: border-box; | ||
| 43 | +} | ||
| 44 | +.alert-button-com{ | ||
| 45 | + float: left; | ||
| 46 | + width: 50%; | ||
| 47 | + height: 100%; | ||
| 48 | + font-size: 32rpx; | ||
| 49 | + text-align: center; | ||
| 50 | + line-height: 89rpx; | ||
| 51 | +} | ||
| 52 | +.alert-cancel{ | ||
| 53 | + border-right: 1rpx solid #eee; | ||
| 54 | + box-sizing: border-box; | ||
| 55 | +} | ||
| 56 | +.alert-config{ | ||
| 57 | + color:#e14553; | ||
| 58 | +} |
components/alert/alert.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + data:{ | ||
| 3 | + alertHidden:true | ||
| 4 | + }, | ||
| 5 | + methods:{ | ||
| 6 | + show:function(info,info2='',confirmtext='确定'){ | ||
| 7 | + this.setData({ | ||
| 8 | + alertHidden:false, | ||
| 9 | + info:info, | ||
| 10 | + info2:info2, | ||
| 11 | + confirmtext:confirmtext | ||
| 12 | + }) | ||
| 13 | + }, | ||
| 14 | + close:function(){ | ||
| 15 | + this.setData({ | ||
| 16 | + alertHidden:true | ||
| 17 | + }) | ||
| 18 | + } | ||
| 19 | + } | ||
| 20 | +}) |
components/alert/alert.json
0 → 100644
components/alert/alert.wxml
0 → 100644
| 1 | +<view class="alert-open-mask" hidden="{{alertHidden}}"></view> | ||
| 2 | +<view class="alert-open bg_white" hidden="{{alertHidden}}"> | ||
| 3 | + <view class="gray-deep-font font30r alter-open-info flex-vc"> | ||
| 4 | + <view>{{info}}</view> | ||
| 5 | + <view>{{info2}}</view> | ||
| 6 | + </view> | ||
| 7 | + <view class="green-font font36r flex-cc alert-button" bindtap="close">{{confirmtext}}</view> | ||
| 8 | +</view> |
components/alert/alert.wxss
0 → 100644
| 1 | +@import '../common.wxss'; | ||
| 2 | +.alert-open-mask{ | ||
| 3 | + position:fixed; | ||
| 4 | + left:0; | ||
| 5 | + right:0; | ||
| 6 | + top:0; | ||
| 7 | + bottom:0; | ||
| 8 | + background:rgba(0,0,0,.7); | ||
| 9 | + z-index:10; | ||
| 10 | +} | ||
| 11 | +.alert-open{ | ||
| 12 | + position:fixed; | ||
| 13 | + left:0; | ||
| 14 | + right:0; | ||
| 15 | + top:0; | ||
| 16 | + bottom:0; | ||
| 17 | + margin:auto; | ||
| 18 | + width:560rpx; | ||
| 19 | + height:290rpx; | ||
| 20 | + border-radius:15rpx; | ||
| 21 | + overflow:hidden; | ||
| 22 | + z-index:11; | ||
| 23 | +} | ||
| 24 | +.alter-open-info{ | ||
| 25 | + width:500rpx; | ||
| 26 | + padding-top:20rpx; | ||
| 27 | + height:170rpx; | ||
| 28 | + margin:0 auto; | ||
| 29 | +} | ||
| 30 | +.alert-button{ | ||
| 31 | + position:absolute; | ||
| 32 | + left:0; | ||
| 33 | + bottom:0; | ||
| 34 | + width:100%; | ||
| 35 | + height:100rpx; | ||
| 36 | + border-top:1px solid #efeef3; | ||
| 37 | + box-sizing:border-box; | ||
| 38 | +} |
components/classlist/classlist.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + typelist:Array, | ||
| 4 | + topHeight:{ | ||
| 5 | + type:Number, | ||
| 6 | + value:0 | ||
| 7 | + } | ||
| 8 | + }, | ||
| 9 | + data:{ | ||
| 10 | + }, | ||
| 11 | + methods:{ | ||
| 12 | + selectclass:function(e){ | ||
| 13 | + var id=e.currentTarget.dataset.id; | ||
| 14 | + var typelist=this.data.typelist; | ||
| 15 | + typelist.forEach(function(v,i){ | ||
| 16 | + v.isactive=false | ||
| 17 | + if(id==v.id){ | ||
| 18 | + v.isactive=true; | ||
| 19 | + } | ||
| 20 | + }) | ||
| 21 | + this.setData({ | ||
| 22 | + typelist:typelist, | ||
| 23 | + classid:id | ||
| 24 | + | ||
| 25 | + }) | ||
| 26 | + this.triggerEvent('getcooklist',id) | ||
| 27 | + }, | ||
| 28 | + } | ||
| 29 | +}) |
components/classlist/classlist.json
0 → 100644
components/classlist/classlist.wxml
0 → 100644
| 1 | +<view class="cook-class flex-rs green-bg" style="top:{{topHeight==0 ? '0px' : topHeight+'px'}}"> | ||
| 2 | + <block wx:for="{{typelist}}"> | ||
| 3 | + <view class="cook-single-class font28r box-cover font-siny {{item.isactive==true ? 'bg_white green-font' : 'white-font'}} font-more" data-id="{{item.id}}" bindtap="selectclass">{{item.class_name}}</view> | ||
| 4 | + </block> | ||
| 5 | +</view> |
components/classlist/classlist.wxss
0 → 100644
| 1 | +@import '../common.wxss' | ||
| 2 | +.cook-class{ | ||
| 3 | + width:100%; | ||
| 4 | + padding:0 45rpx; | ||
| 5 | + padding-top:30rpx; | ||
| 6 | + box-sizing:border-box; | ||
| 7 | + background:#199095; | ||
| 8 | + position:fixed; | ||
| 9 | + top:0; | ||
| 10 | + left:0; | ||
| 11 | + z-index:10; | ||
| 12 | +} | ||
| 13 | +.cook-single-class{ | ||
| 14 | + width:180rpx; | ||
| 15 | + height:60rpx; | ||
| 16 | + border:1px solid #fff; | ||
| 17 | + border-radius:30rpx; | ||
| 18 | + margin:0 20rpx; | ||
| 19 | + margin-bottom:30rpx; | ||
| 20 | + box-sizing:border-box; | ||
| 21 | + text-align:center; | ||
| 22 | + line-height:58rpx; | ||
| 23 | +} |
components/common.wxss
0 → 100644
| 1 | +/*水平方向左右分布*/ | ||
| 2 | +.flex-lr{ | ||
| 3 | + display: flex; | ||
| 4 | + display: -webkit-flex; | ||
| 5 | + justify-content: space-between; | ||
| 6 | + align-items:center; | ||
| 7 | + flex-direction: row; | ||
| 8 | + -webkit-flex-direction: row; | ||
| 9 | +} | ||
| 10 | +.flex-ll{ | ||
| 11 | + display: flex; | ||
| 12 | + display: -webkit-flex; | ||
| 13 | + justify-content: flex-start; | ||
| 14 | + align-items: center; | ||
| 15 | + flex-direction: row; | ||
| 16 | + -webkit-flex-direction: row; | ||
| 17 | +} | ||
| 18 | +.flex-rr{ | ||
| 19 | + display: flex; | ||
| 20 | + display: -webkit-flex; | ||
| 21 | + justify-content: flex-end; | ||
| 22 | + align-items: center; | ||
| 23 | + flex-direction: row; | ||
| 24 | + -webkit-flex-direction: row; | ||
| 25 | +} | ||
| 26 | +/*垂直方向居中分布*/ | ||
| 27 | +.flex-vc{ | ||
| 28 | + display: flex; | ||
| 29 | + display: -webkit-flex; | ||
| 30 | + justify-content: center; | ||
| 31 | + align-items: center; | ||
| 32 | + flex-direction: column; | ||
| 33 | + -webkit-flex-direction: column; | ||
| 34 | +} | ||
| 35 | +/*垂直方向居左分布*/ | ||
| 36 | +.flex-vl{ | ||
| 37 | + display: flex; | ||
| 38 | + display: -webkit-flex; | ||
| 39 | + justify-content: flex-start; | ||
| 40 | + align-items: left; | ||
| 41 | + flex-direction: column; | ||
| 42 | + -webkit-flex-direction: column; | ||
| 43 | +} | ||
| 44 | +.flex-vr{ | ||
| 45 | + display: flex; | ||
| 46 | + display: -webkit-flex; | ||
| 47 | + justify-content: flex-end; | ||
| 48 | + align-items: center; | ||
| 49 | + flex-direction: column; | ||
| 50 | + -webkit-flex-direction: column; | ||
| 51 | +} | ||
| 52 | +/*水平方向居中分布*/ | ||
| 53 | +.flex-cc{ | ||
| 54 | + display: flex; | ||
| 55 | + display: -webkit-flex; | ||
| 56 | + justify-content: center; | ||
| 57 | + align-items: center; | ||
| 58 | + flex-direction: row; | ||
| 59 | + -webkit-flex-direction: row; | ||
| 60 | +} | ||
| 61 | +/*基准线对齐*/ | ||
| 62 | +.flex-bc{ | ||
| 63 | + display: flex; | ||
| 64 | + display: -webkit-flex; | ||
| 65 | + justify-content: center; | ||
| 66 | + align-items: baseline; | ||
| 67 | + flex-direction: row; | ||
| 68 | + -webkit-flex-direction: row; | ||
| 69 | +} | ||
| 70 | +/*流式布局*/ | ||
| 71 | +.flex-auto{ | ||
| 72 | + display: flex; | ||
| 73 | + display: -webkit-flex; | ||
| 74 | + justify-content: space-around; | ||
| 75 | + align-content: flex-start; | ||
| 76 | + flex-flow:wrap; | ||
| 77 | +} | ||
| 78 | +.font34r{ | ||
| 79 | + font-size:34rpx; | ||
| 80 | +} | ||
| 81 | +.font36r{ | ||
| 82 | + font-size:36rpx; | ||
| 83 | + } | ||
| 84 | +.font28r{ | ||
| 85 | + font-size:28rpx; | ||
| 86 | +} | ||
| 87 | +.font30r{ | ||
| 88 | + font-size:30rpx; | ||
| 89 | +} | ||
| 90 | +.font32r{ | ||
| 91 | + font-size:32rpx; | ||
| 92 | +} | ||
| 93 | +.font26r{ | ||
| 94 | + font-size:26rpx; | ||
| 95 | +} | ||
| 96 | +.font24r{ | ||
| 97 | + font-size:24rpx; | ||
| 98 | +} | ||
| 99 | +.font38r{ | ||
| 100 | + font-size:38rpx; | ||
| 101 | +} | ||
| 102 | +.font40r{ | ||
| 103 | + font-size:40rpx; | ||
| 104 | +} | ||
| 105 | +.font44r{ | ||
| 106 | + font-size:44rpx; | ||
| 107 | +} | ||
| 108 | +.font20r{ | ||
| 109 | + font-size:20rpx; | ||
| 110 | +} | ||
| 111 | +.black-font{ | ||
| 112 | + color:#353535; | ||
| 113 | +} | ||
| 114 | +.white-font{ | ||
| 115 | + color:#fff; | ||
| 116 | +} | ||
| 117 | +.green-font{ | ||
| 118 | + color:#199095; | ||
| 119 | +} | ||
| 120 | +.flex-rc{ | ||
| 121 | + display:flex; | ||
| 122 | + display: -webkit-flex; | ||
| 123 | + justify-content:center; | ||
| 124 | + align-items:center; | ||
| 125 | +} | ||
| 126 | +.flex-rs{ | ||
| 127 | + display:flex; | ||
| 128 | + display: -webkit-flex; | ||
| 129 | + justify-content:flex-start; | ||
| 130 | + align-items:center; | ||
| 131 | + flex-direction: row; | ||
| 132 | + flex-wrap:wrap; | ||
| 133 | +} | ||
| 134 | +.flex-cmc{ | ||
| 135 | + display:flex; | ||
| 136 | + display: -webkit-flex; | ||
| 137 | + justify-content:center; | ||
| 138 | + align-items:center; | ||
| 139 | + flex-direction: column; | ||
| 140 | +} | ||
| 141 | +.flex-re{ | ||
| 142 | + display:flex; | ||
| 143 | + display: -webkit-flex; | ||
| 144 | + justify-content:flex-end; | ||
| 145 | +} | ||
| 146 | +.default-setting{ | ||
| 147 | + color:#999; | ||
| 148 | + font-size:38rpx; | ||
| 149 | + -webkit-font-smoothing: antialiased; | ||
| 150 | + -moz-osx-font-smoothing: grayscale; | ||
| 151 | +} | ||
| 152 | +.cut{ | ||
| 153 | + width:100%; | ||
| 154 | + height:20rpx; | ||
| 155 | +} | ||
| 156 | +.smooth{ | ||
| 157 | + -webkit-font-smoothing: antialiased; | ||
| 158 | + -moz-osx-font-smoothing: grayscale; | ||
| 159 | +} | ||
| 160 | +button::after{ | ||
| 161 | + border:0; | ||
| 162 | +} | ||
| 163 | +.font-bold{ | ||
| 164 | + font-weight:bold; | ||
| 165 | +} | ||
| 166 | +.font-more{ | ||
| 167 | + overflow:hidden; | ||
| 168 | + text-overflow:ellipsis; | ||
| 169 | + white-space:nowrap; | ||
| 170 | +} | ||
| 171 | +.font-more-two{ | ||
| 172 | + display: -webkit-box; | ||
| 173 | + -webkit-box-orient: vertical; | ||
| 174 | + -webkit-line-clamp: 2; | ||
| 175 | + overflow: hidden; | ||
| 176 | +} | ||
| 177 | +image{ | ||
| 178 | + background:transparent; | ||
| 179 | +} | ||
| 180 | +.gray-font{ | ||
| 181 | + color:#999; | ||
| 182 | +} | ||
| 183 | +.gray-deep-font{ | ||
| 184 | + color:#666; | ||
| 185 | +} | ||
| 186 | +.icon12-22{ | ||
| 187 | + width:12rpx; | ||
| 188 | + height:22rpx; | ||
| 189 | + background:transparent; | ||
| 190 | + | ||
| 191 | +} | ||
| 192 | +.bg_white{ | ||
| 193 | + background:#fff; | ||
| 194 | +} | ||
| 195 | +.bg_green{ | ||
| 196 | + background:#199095; | ||
| 197 | +} | ||
| 198 | +.bg_gray{ | ||
| 199 | + background:#efeef3; | ||
| 200 | +} | ||
| 201 | +.font-siny{ | ||
| 202 | + font-weight:300; | ||
| 203 | +} | ||
| 204 | +.cut{ | ||
| 205 | + width:100%; | ||
| 206 | + height:20rpx; | ||
| 207 | +} | ||
| 208 | +.border-right{ | ||
| 209 | + border-right:1px solid #efeef3; | ||
| 210 | +} |
components/confirmalert/confirmalert.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + | ||
| 4 | + }, | ||
| 5 | + data:{ | ||
| 6 | + alertHidden:true | ||
| 7 | + }, | ||
| 8 | + methods:{ | ||
| 9 | + show:function(info){ | ||
| 10 | + this.setData({ | ||
| 11 | + alertHidden:false, | ||
| 12 | + info:info | ||
| 13 | + }) | ||
| 14 | + }, | ||
| 15 | + close:function(){ | ||
| 16 | + this.setData({ | ||
| 17 | + alertHidden:true | ||
| 18 | + }) | ||
| 19 | + }, | ||
| 20 | + confirmsucc:function(){ | ||
| 21 | + this.close(); | ||
| 22 | + this.triggerEvent('changeclass') | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | +}) |
components/confirmalert/confirmalert.json
0 → 100644
components/confirmalert/confirmalert.wxml
0 → 100644
| 1 | +<view class="modal-mask" hidden="{{alertHidden}}"></view> | ||
| 2 | +<view class="modal-alert bg_white" hidden="{{alertHidden}}"> | ||
| 3 | + <view class="gray-deep-font font30r alter-open-info flex-vc">{{info}}</view> | ||
| 4 | + <view class="alert-button flex-lr"> | ||
| 5 | + <view class="alert-single-button gray-font font36r border-right flex-cc" bindtap="close">取消</view> | ||
| 6 | + <view class="alert-single-button green-font font36r flex-cc" bindtap="confirmsucc">确定</view> | ||
| 7 | + </view> | ||
| 8 | +</view> |
components/confirmalert/confirmalert.wxss
0 → 100644
| 1 | +@import '../common.wxss' | ||
| 2 | +.modal-mask{ | ||
| 3 | + position:fixed; | ||
| 4 | + left:0; | ||
| 5 | + right:0; | ||
| 6 | + top:0; | ||
| 7 | + bottom:0; | ||
| 8 | + background:rgba(0,0,0,.7); | ||
| 9 | + z-index:999; | ||
| 10 | +} | ||
| 11 | +.modal-alert{ | ||
| 12 | + position:fixed; | ||
| 13 | + left:0; | ||
| 14 | + right:0; | ||
| 15 | + top:0; | ||
| 16 | + bottom:0; | ||
| 17 | + margin:auto; | ||
| 18 | + width:560rpx; | ||
| 19 | + height:290rpx; | ||
| 20 | + border-radius:15rpx; | ||
| 21 | + overflow:hidden; | ||
| 22 | + z-index:1000; | ||
| 23 | +} | ||
| 24 | +.alter-open-info{ | ||
| 25 | + width:500rpx; | ||
| 26 | + padding-top:20rpx; | ||
| 27 | + height:170rpx; | ||
| 28 | + margin:0 auto; | ||
| 29 | + text-align:center; | ||
| 30 | +} | ||
| 31 | +.alert-button{ | ||
| 32 | + position:absolute; | ||
| 33 | + left:0; | ||
| 34 | + bottom:0; | ||
| 35 | + width:100%; | ||
| 36 | + height:100rpx; | ||
| 37 | + border-top:1px solid #efeef3; | ||
| 38 | + box-sizing:border-box; | ||
| 39 | +} | ||
| 40 | +.alert-single-button{ | ||
| 41 | + width:50%; | ||
| 42 | + height:100%; | ||
| 43 | + box-sizing:border-box; | ||
| 44 | +} | ||
| 45 | +.border-right{ | ||
| 46 | + border-right:1px solid #efeef3; | ||
| 47 | +} |
components/cooklist/cooklist.js
0 → 100644
| 1 | +var util = require('../../utils/util.js') | ||
| 2 | +Component({ | ||
| 3 | + properties:{ | ||
| 4 | + item:Object, | ||
| 5 | + pagetype:String | ||
| 6 | + }, | ||
| 7 | + data:{ | ||
| 8 | + count:0 | ||
| 9 | + }, | ||
| 10 | + methods:{ | ||
| 11 | + selectcook:function (e) { | ||
| 12 | + var id=e.currentTarget.dataset.id; | ||
| 13 | + var count=util.cache('count',count) ? util.cache('count',count) : 0; | ||
| 14 | + if(this.data.item.isactive==false){ | ||
| 15 | + count=count+1; | ||
| 16 | + }else{ | ||
| 17 | + count=count-1; | ||
| 18 | + } | ||
| 19 | + if(count>10 && this.data.pagetype=='calist'){ | ||
| 20 | + }else{ | ||
| 21 | + this.data.item.isactive=!this.data.item.isactive; | ||
| 22 | + } | ||
| 23 | + if(this.data.pagetype=='calist'){ | ||
| 24 | + util.cache('count',count) | ||
| 25 | + } | ||
| 26 | + this.triggerEvent('selectcook',{id:id,isactive:this.data.item.isactive}); | ||
| 27 | + this.setData({ | ||
| 28 | + item:this.data.item, | ||
| 29 | + count:count | ||
| 30 | + }) | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | +}) |
components/cooklist/cooklist.json
0 → 100644
components/cooklist/cooklist.wxml
0 → 100644
| 1 | +<view class="food-single {{item.bg_color}} flex-vc" data-id="{{item.id}}" bindtap="selectcook"> | ||
| 2 | + <view class="font40r font-bold cook-list-name black-font smooth flex-ll" style="width:100%;">{{item.name}}</view> | ||
| 3 | + <view class="font30r black-font flex-lr" style="margin-top:30rpx;width:100%;"> | ||
| 4 | + <view>{{item.price}}元/{{item.unit}}</view> | ||
| 5 | + <block wx:if="{{pagetype=='cclist'}}"> | ||
| 6 | + <block wx:if="{{item.clear_num && item.clear_num==0}}"> | ||
| 7 | + <image src="/pages/image/clear.png" style="width:82rpx;height:52rpx;background:transparent;margin-right:10rpx;position:relative;top:-6rpx;"></image> | ||
| 8 | + </block> | ||
| 9 | + </block> | ||
| 10 | + </view> | ||
| 11 | + <block wx:if="{{pagetype!='cclist'}}"> | ||
| 12 | + <view class="black-circle {{item.isactive==false ? '' : 'bg_green'}} flex-cc"> | ||
| 13 | + <image src="/pages/image/{{item.isactive==false ? 'select-right.svg' : 'select-right-active.svg'}}" style="width:26rpx;height:26rpx;"></image> | ||
| 14 | + <!--<icon type="success_no_circle" class="icon-success-block" color="{{item.isactive==false ? '#199095' : '#fff'}}" size="26rpx"></icon>--> | ||
| 15 | + </view> | ||
| 16 | + </block> | ||
| 17 | + <block wx:else> | ||
| 18 | + <block wx:if="{{item.clear_num && item.clear_num>0}}"> | ||
| 19 | + <view class="food-clear flex-ll" style="top:0;"> | ||
| 20 | + <view class="food-clear-angel"> | ||
| 21 | + <view class="angel angel-top"></view> | ||
| 22 | + <view class="angel angel-bottom"></view> | ||
| 23 | + </view> | ||
| 24 | + <view class="food-clear-num white-font smooth font20r flex-cc">剩余:{{item.clear_num}}</view> | ||
| 25 | + </view> | ||
| 26 | + </block> | ||
| 27 | + </block> | ||
| 28 | +</view> |
components/cooklist/cooklist.wxss
0 → 100644
| 1 | +@import '../common.wxss' | ||
| 2 | +.food-single{ | ||
| 3 | + width:330rpx; | ||
| 4 | + height:220rpx; | ||
| 5 | + margin-bottom:30rpx; | ||
| 6 | + margin-left:30rpx; | ||
| 7 | + position:relative; | ||
| 8 | + padding-top:10rpx; | ||
| 9 | + padding-left:30rpx; | ||
| 10 | + padding-right:10rpx; | ||
| 11 | + box-sizing:border-box; | ||
| 12 | +} | ||
| 13 | +.cook-list-name{ | ||
| 14 | + height:44rpx; | ||
| 15 | +} | ||
| 16 | +.bg-blue{ | ||
| 17 | + background:#eef2fb; | ||
| 18 | +} | ||
| 19 | +.bg-pink{ | ||
| 20 | + background:#feeff0; | ||
| 21 | +} | ||
| 22 | +.black-circle{ | ||
| 23 | + width:36rpx; | ||
| 24 | + height:36rpx; | ||
| 25 | + border:1px solid #199095; | ||
| 26 | + border-radius:50%; | ||
| 27 | + position:absolute; | ||
| 28 | + right:10rpx; | ||
| 29 | + top:10rpx; | ||
| 30 | + } | ||
| 31 | +.icon-success-block{ | ||
| 32 | + position:absolute; | ||
| 33 | + left:4rpx; | ||
| 34 | + top:6rpx; | ||
| 35 | + } | ||
| 36 | + .white_mask{ | ||
| 37 | + position:absolute; | ||
| 38 | + left:0; | ||
| 39 | + top:0; | ||
| 40 | + width:100%; | ||
| 41 | + height:100%; | ||
| 42 | + background:rgba(255,255,255,.8); | ||
| 43 | + z-index:9; | ||
| 44 | + } | ||
| 45 | + .food-clear{ | ||
| 46 | + position:absolute; | ||
| 47 | + right:0; | ||
| 48 | + height:40rpx; | ||
| 49 | + overflow:hidden; | ||
| 50 | + } | ||
| 51 | + .food-clear-angel{ | ||
| 52 | + height:40rpx; | ||
| 53 | + position:relative; | ||
| 54 | + left:2rpx; | ||
| 55 | + } | ||
| 56 | + .angel{ | ||
| 57 | + width: 0px; | ||
| 58 | + height: 0px; | ||
| 59 | + border-width: 0 0 20rpx 20rpx; | ||
| 60 | + border-style: solid; | ||
| 61 | + } | ||
| 62 | + .angel-top{ | ||
| 63 | + border-color:transparent rgba(216,30,6,.9); | ||
| 64 | + transform:rotate(90deg) | ||
| 65 | + } | ||
| 66 | + .angel-bottom{ | ||
| 67 | + border-color: rgba(216,30,6,.9) transparent; | ||
| 68 | + } | ||
| 69 | + .food-clear-num{ | ||
| 70 | + padding:0 6rpx; | ||
| 71 | + background:rgba(216,30,6,.9); | ||
| 72 | + height:100%; | ||
| 73 | + } |
components/deskarea/deskarea.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + deskarea:Array | ||
| 4 | + }, | ||
| 5 | + data:{ | ||
| 6 | + showmore:false | ||
| 7 | + }, | ||
| 8 | + methods:{ | ||
| 9 | + showmoredesk:function(){ | ||
| 10 | + this.setData({ | ||
| 11 | + showmore:true | ||
| 12 | + }) | ||
| 13 | + }, | ||
| 14 | + closemoredesk:function(){ | ||
| 15 | + this.setData({ | ||
| 16 | + showmore:false | ||
| 17 | + }) | ||
| 18 | + }, | ||
| 19 | + selectarea:function(e){ | ||
| 20 | + var name=e.currentTarget.dataset.name; | ||
| 21 | + this.triggerEvent('changedesk',name); | ||
| 22 | + var deskarea=this.data.deskarea; | ||
| 23 | + deskarea.forEach(function(v,i){ | ||
| 24 | + v.isactive=false; | ||
| 25 | + if(v.name==name){ | ||
| 26 | + v.isactive=true; | ||
| 27 | + } | ||
| 28 | + }) | ||
| 29 | + this.setData({ | ||
| 30 | + deskarea:deskarea | ||
| 31 | + }) | ||
| 32 | + }, | ||
| 33 | + } | ||
| 34 | +}) |
components/deskarea/deskarea.json
0 → 100644
components/deskarea/deskarea.wxml
0 → 100644
| 1 | +<view class="desk-area bg_green"> | ||
| 2 | + <block wx:for="{{deskarea}}"> | ||
| 3 | + <block wx:if="{{index<5}}"> | ||
| 4 | + <view class="{{item.isactive==true ? 'green-font bg_white' : 'white-font'}} font30r smooth desk-area-single font-more" data-name="{{item.name}}" bindtap="selectarea">{{item.name}}</view> | ||
| 5 | + </block> | ||
| 6 | + <block wx:else> | ||
| 7 | + <block wx:if="{{deskarea.length<=6}}"> | ||
| 8 | + <view class="{{item.isactive==true ? 'green-font bg_white' : 'white-font'}} font30r smooth desk-area-single font-more" data-name="{{item.name}}" bindtap="selectarea">{{item.name}}</view> | ||
| 9 | + </block> | ||
| 10 | + <block wx:else> | ||
| 11 | + <block wx:if="{{index>=5 && showmore==true}}"> | ||
| 12 | + <view class="{{item.isactive==true ? 'green-font bg_white' : 'white-font'}} font30r smooth desk-area-single font-more" data-name="{{item.name}}" bindtap="selectarea">{{item.name}}</view> | ||
| 13 | + </block> | ||
| 14 | + </block> | ||
| 15 | + </block> | ||
| 16 | + </block> | ||
| 17 | + <block wx:if="{{deskarea.length>6}}"> | ||
| 18 | + <view class="white-font font30r smooth desk-area-single" bindtap="{{showmore==true ? 'closemoredesk' : 'showmoredesk'}}"> | ||
| 19 | + <block wx:if="{{showmore==false}}">更多</block> | ||
| 20 | + <block wx:else>收起</block> | ||
| 21 | + </view> | ||
| 22 | + </block> | ||
| 23 | + | ||
| 24 | +</view> |
components/deskarea/deskarea.wxss
0 → 100644
| 1 | +@import '../common.wxss'; | ||
| 2 | +.desk-area{ | ||
| 3 | + width:100%; | ||
| 4 | + padding:0 45rpx; | ||
| 5 | + padding-bottom:30rpx; | ||
| 6 | + box-sizing:border-box; | ||
| 7 | +} | ||
| 8 | +.desk-area-single{ | ||
| 9 | + width:180rpx; | ||
| 10 | + height:60rpx; | ||
| 11 | + border:1px solid #fff; | ||
| 12 | + box-sizing:border-box; | ||
| 13 | + border-radius:30rpx; | ||
| 14 | + margin:0 20rpx; | ||
| 15 | + margin-top:40rpx; | ||
| 16 | + float:left; | ||
| 17 | + text-align:center; | ||
| 18 | + line-height:58rpx; | ||
| 19 | +} | ||
| 20 | +.desk-area:after{ | ||
| 21 | + width:0; | ||
| 22 | + height:0; | ||
| 23 | + content:''; | ||
| 24 | + display:block; | ||
| 25 | + clear:both; | ||
| 26 | +} |
components/desklist/desklist.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + item:Object, | ||
| 4 | + typepage:{ | ||
| 5 | + type:String, | ||
| 6 | + value:'' | ||
| 7 | + } | ||
| 8 | + }, | ||
| 9 | + data:{ | ||
| 10 | + | ||
| 11 | + }, | ||
| 12 | + methods:{ | ||
| 13 | + selectdesk:function(e){ | ||
| 14 | + var tableid=e.currentTarget.dataset.id; | ||
| 15 | + var status=e.currentTarget.dataset.status; | ||
| 16 | + if(this.data.typepage!=''){ | ||
| 17 | + this.data.item.isselect=!this.data.item.isselect | ||
| 18 | + } | ||
| 19 | + this.setData({ | ||
| 20 | + item:this.data.item | ||
| 21 | + }) | ||
| 22 | + this.triggerEvent('selectdesk',{tableid:tableid,status:status}) | ||
| 23 | + } | ||
| 24 | + } | ||
| 25 | +}) |
components/desklist/desklist.json
0 → 100644
components/desklist/desklist.wxml
0 → 100644
| 1 | +<view class="desk-block flex-vc {{item.status=='' || item.status==0 || item.status==1 ? 'green-light-bg border-light-green' : 'green-deep-bg border-green'}} {{item.status=='disabled'?'disabled':''}}" | ||
| 2 | + data-id="{{item.id}}" data-status="{{item.status}}" | ||
| 3 | + bindtap="{{item.status=='disabled'?'':'selectdesk'}}"> | ||
| 4 | + <block wx:if="{{item.tid && (item.tid!=1 && item.tid!=0)}}"> | ||
| 5 | + <view class="white-font font24r smooth desk-type flex-cc"> | ||
| 6 | + <block wx:if="{{item.tid==2}}">包间</block> | ||
| 7 | + <block wx:if="{{item.tid==3}}">卡座</block> | ||
| 8 | + </view> | ||
| 9 | + </block> | ||
| 10 | + <block wx:if="{{item.status=='disabled'}}"> | ||
| 11 | + <view class="font38r smooth black-font font-bold flex-cc" style="width:100%;padding:0 16rpx;box-sizing:border-box;padding-top:10rpx;height:42rpx;">{{item.name}}</view> | ||
| 12 | + <view class="font34r smooth black-font desk-pnum">{{item.most_pnum && item.table_pnum < item.most_pnum ? item.table_pnum+'-'+item.most_pnum : item.table_pnum}}人</view> | ||
| 13 | + <block wx:if="{{item.enable==0}}"> | ||
| 14 | + <view class="flex-cc font-more white-font font34r desk-enable">未启用</view> | ||
| 15 | + </block> | ||
| 16 | + </block> | ||
| 17 | + <block wx:elif="{{(item.status=='' || item.status==0 || item.status==1)}}"> | ||
| 18 | + <view class="font38r smooth black-font font-bold flex-cc" style="width:100%;padding:0 16rpx;box-sizing:border-box;padding-top:10rpx;height:42rpx;">{{item.name}}</view> | ||
| 19 | + <view class="font34r smooth black-font desk-pnum">{{item.most_pnum && item.table_pnum < item.most_pnum ? item.table_pnum+'-'+item.most_pnum : item.table_pnum}}人</view> | ||
| 20 | + <block wx:if="{{typepage=='cdesk'}}"> | ||
| 21 | + <view class="black-circle white-font font24r smooth flex-cc" style="border:1px solid #199095;background:{{item.isselect==false ? 'transparent' : '#199095'}};"> | ||
| 22 | + <image src="/pages/image/{{item.isselect==false ? 'select-right.svg' : 'select-right-active.svg'}}" style="width:26rpx;height:26rpx;"></image> | ||
| 23 | + </view> | ||
| 24 | + </block> | ||
| 25 | + <block wx:if="{{item.enable==0}}"> | ||
| 26 | + <view class="flex-cc font-more white-font font34r desk-enable">未启用</view> | ||
| 27 | + </block> | ||
| 28 | + </block> | ||
| 29 | + <block wx:else> | ||
| 30 | + <view class="table-info flex-vc"> | ||
| 31 | + <view class="font38r smooth black-font font-bold flex-ll" style="width:100%;padding:0 16rpx;box-sizing:border-box;text-align:left;height:42rpx;">{{item.name}}</view> | ||
| 32 | + <view class="flex-lr desk-other-info"> | ||
| 33 | + <view class="font34r smooth black-font"> | ||
| 34 | + <block wx:if="{{item.spell==1}}">{{item.orderCout}}单</block> | ||
| 35 | + <block wx:else>{{item.pnum}}人</block> | ||
| 36 | + </view> | ||
| 37 | + <block wx:if="{{item.spell!=1}}"> | ||
| 38 | + <view class="flex-ll"> | ||
| 39 | + <image src="/pages/image/clock.png" class="clock-time"></image> | ||
| 40 | + <view class="gray-font font28r">{{item.dur}}</view> | ||
| 41 | + </view> | ||
| 42 | + </block> | ||
| 43 | + </view> | ||
| 44 | + </view> | ||
| 45 | + <view class="desk-order-status white-font font34r smooth flex-cc"> | ||
| 46 | + <block wx:if="{{item.spell==1}}">拼桌中</block> | ||
| 47 | + <block wx:else>{{item.status}}</block> | ||
| 48 | + </view> | ||
| 49 | + </block> | ||
| 50 | +</view> |
components/desklist/desklist.wxss
0 → 100644
| 1 | +@import '../common.wxss'; | ||
| 2 | +.desk-block{ | ||
| 3 | + width:200rpx; | ||
| 4 | + height:200rpx; | ||
| 5 | + margin:0 20rpx; | ||
| 6 | + margin-bottom:40rpx; | ||
| 7 | + border-radius:12rpx; | ||
| 8 | + text-align:center; | ||
| 9 | + box-sizing:border-box; | ||
| 10 | + position:relative; | ||
| 11 | + overflow:hidden; | ||
| 12 | +} | ||
| 13 | +.desk-type{ | ||
| 14 | + position:absolute; | ||
| 15 | + left:0; | ||
| 16 | + top:0; | ||
| 17 | + width:72rpx; | ||
| 18 | + height:32rpx; | ||
| 19 | + border-top-right-radius:16rpx; | ||
| 20 | + border-bottom-right-radius:16rpx; | ||
| 21 | + background:#8FC1D0; | ||
| 22 | +} | ||
| 23 | +.green-light-bg{ | ||
| 24 | + background:#EBF8F8; | ||
| 25 | +} | ||
| 26 | +.green-deep-bg{ | ||
| 27 | + background:#A9E3E6; | ||
| 28 | +} | ||
| 29 | +.border-green{ | ||
| 30 | + border:1px solid #199095; | ||
| 31 | +} | ||
| 32 | +.border-light-green{ | ||
| 33 | + border:1px solid #8FC1D0; | ||
| 34 | +} | ||
| 35 | +.desk-pnum{ | ||
| 36 | + height:38rpx; | ||
| 37 | + margin-top:10rpx; | ||
| 38 | +} | ||
| 39 | +.desk-enable{ | ||
| 40 | + position:absolute; | ||
| 41 | + left:0; | ||
| 42 | + right:0; | ||
| 43 | + top:0; | ||
| 44 | + bottom:0; | ||
| 45 | + margin:auto; | ||
| 46 | + width:136rpx; | ||
| 47 | + height:136rpx; | ||
| 48 | + border-radius:50%; | ||
| 49 | + background:rgba(0,0,0,.45); | ||
| 50 | + z-index:1; | ||
| 51 | +} | ||
| 52 | +.table-info{ | ||
| 53 | + width:100%; | ||
| 54 | + height:150rpx; | ||
| 55 | +} | ||
| 56 | +.desk-other-info{ | ||
| 57 | + width:100%; | ||
| 58 | + height:38rpx; | ||
| 59 | + padding:0 16rpx; | ||
| 60 | + box-sizing:border-box; | ||
| 61 | + margin-top:10rpx; | ||
| 62 | +} | ||
| 63 | +.clock-time{ | ||
| 64 | + width:28rpx; | ||
| 65 | + height:28rpx; | ||
| 66 | + margin-right:4rpx; | ||
| 67 | +} | ||
| 68 | +.desk-order-status{ | ||
| 69 | + width:100%; | ||
| 70 | + height:50rpx; | ||
| 71 | + background:#777; | ||
| 72 | +} | ||
| 73 | +.black-circle{ | ||
| 74 | + width:36rpx; | ||
| 75 | + height:36rpx; | ||
| 76 | + border:1px solid #fff; | ||
| 77 | + border-radius:50%; | ||
| 78 | + position:absolute; | ||
| 79 | + right:10rpx; | ||
| 80 | + top:10rpx; | ||
| 81 | +} | ||
| 82 | +.desk-block.disabled{ | ||
| 83 | + background-color: #E0E0E0; | ||
| 84 | + border:1px solid #E0E0E0; | ||
| 85 | +} | ||
| 86 | +.desk-block.disabled .black-font{ | ||
| 87 | + color:#999999; | ||
| 88 | +} |
components/desktoast/desktoast.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + info:String, | ||
| 4 | + result:String | ||
| 5 | + }, | ||
| 6 | + data:{ | ||
| 7 | + deskHidden:true | ||
| 8 | + }, | ||
| 9 | + methods:{ | ||
| 10 | + show:function(info,result){ | ||
| 11 | + this.setData({ | ||
| 12 | + deskHidden:false, | ||
| 13 | + info:info, | ||
| 14 | + result:result | ||
| 15 | + }) | ||
| 16 | + }, | ||
| 17 | + close:function(){ | ||
| 18 | + this.setData({ | ||
| 19 | + deskHidden:true | ||
| 20 | + }) | ||
| 21 | + } | ||
| 22 | + } | ||
| 23 | +}) |
components/desktoast/desktoast.json
0 → 100644
components/desktoast/desktoast.wxml
0 → 100644
components/desktoast/desktoast.wxss
0 → 100644
components/melist/melist.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + item:Object | ||
| 4 | + }, | ||
| 5 | + data:{ | ||
| 6 | + | ||
| 7 | + }, | ||
| 8 | + methods:{ | ||
| 9 | + showlist:function(){ | ||
| 10 | + var isshowlist=this.data.item.isshowlist; | ||
| 11 | + this.data.item.isshowlist=!isshowlist; | ||
| 12 | + this.setData({ | ||
| 13 | + item:this.data.item | ||
| 14 | + }) | ||
| 15 | + }, | ||
| 16 | + gotodetail:function(e){ | ||
| 17 | + wx.navigateTo({ | ||
| 18 | + url:e.currentTarget.dataset.path | ||
| 19 | + }) | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + } | ||
| 23 | +}) |
components/melist/melist.json
0 → 100644
components/melist/melist.wxml
0 → 100644
| 1 | +<view class="manage-single bg_white"> | ||
| 2 | + <view class="flex-lr manage-single-title" bindtap="{{item.can==true ? 'showlist' : ''}}"> | ||
| 3 | + <view class="{{item.can==true ? 'black-font' : 'gray-font'}} font30r">{{item.title}}</view> | ||
| 4 | + <block wx:if="{{item.isshowlist==false}}"> | ||
| 5 | + <image src="/pages/image/{{item.can==true ? 'click.png' : 'clisk-light.png'}}" class="icon12-22"></image> | ||
| 6 | + </block> | ||
| 7 | + <block wx:else> | ||
| 8 | + <view class="gray-deep-font font-siny font24r">收起</view> | ||
| 9 | + </block> | ||
| 10 | + </view> | ||
| 11 | + <block wx:if="{{item.list}}"> | ||
| 12 | + <view class="flex-rs manage-single-list" hidden="{{!item.isshowlist}}"> | ||
| 13 | + <block wx:for="{{item.list}}" wx:for-item="list"> | ||
| 14 | + <view class="flex-vc manage-single-one {{list.id%3==0 ? '' : 'border-right'}}" data-path="{{list.path}}" bindtap="gotodetail"> | ||
| 15 | + <image src="{{list.imgurl}}" class="single-list-icon"></image> | ||
| 16 | + <view class="{{list.can==true ? 'black-font' : 'gray-font'}} font28r">{{list.title}}</view> | ||
| 17 | + </view> | ||
| 18 | + </block> | ||
| 19 | + </view> | ||
| 20 | + </block> | ||
| 21 | +</view> |
components/melist/melist.wxss
0 → 100644
| 1 | +@import '../common.wxss'; | ||
| 2 | +.manage-single{ | ||
| 3 | + width:100%; | ||
| 4 | + height:auto; | ||
| 5 | +} | ||
| 6 | +.manage-single-title{ | ||
| 7 | + width:100%; | ||
| 8 | + height:115rpx; | ||
| 9 | + padding:0 40rpx; | ||
| 10 | + box-sizing:border-box; | ||
| 11 | +} | ||
| 12 | +.manage-single-list{ | ||
| 13 | + border-top:1px solid #efeef3; | ||
| 14 | +} | ||
| 15 | +.manage-single-one{ | ||
| 16 | + width:33.333%; | ||
| 17 | + height:190rpx; | ||
| 18 | + border-bottom:1px solid #efeef3; | ||
| 19 | + box-sizing:border-box; | ||
| 20 | +} | ||
| 21 | +.single-list-icon{ | ||
| 22 | + width:40rpx; | ||
| 23 | + height:40rpx; | ||
| 24 | + margin-bottom:30rpx; | ||
| 25 | +} |
components/menu/act.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + item:Object | ||
| 6 | + }, | ||
| 7 | + attached(){ | ||
| 8 | + console.log(this.data.item); | ||
| 9 | + }, | ||
| 10 | + methods:{ | ||
| 11 | + addfood(){ | ||
| 12 | + this.setData({ | ||
| 13 | + 'item.count':this.data.item.count+1 | ||
| 14 | + }) | ||
| 15 | + }, | ||
| 16 | + tellfood(e){ | ||
| 17 | + console.log(e,'yyyyyyykkkk') | ||
| 18 | + if(e.detail.action=='add'){ | ||
| 19 | + this.addfood(); | ||
| 20 | + }else{ | ||
| 21 | + this.reducefood(); | ||
| 22 | + } | ||
| 23 | + console.log('hahaha') | ||
| 24 | + this.triggerEvent('refresh'); | ||
| 25 | + }, | ||
| 26 | + reducefood(){ | ||
| 27 | + this.setData({ | ||
| 28 | + 'item.count':this.data.item.count-1 | ||
| 29 | + }) | ||
| 30 | + }, | ||
| 31 | + show(){ | ||
| 32 | + this.triggerEvent('showspec',{id:this.data.item.id}); | ||
| 33 | + }, | ||
| 34 | + showrmodal(){ | ||
| 35 | + console.log('rrrrrrrr') | ||
| 36 | + this.triggerEvent('showrmodal',{id:this.data.item.id}); | ||
| 37 | + }, | ||
| 38 | + } | ||
| 39 | +}) |
components/menu/act.json
0 → 100644
components/menu/act.wxml
0 → 100644
| 1 | +<view class="flex-rr"> | ||
| 2 | + <block wx:if="{{item.count>0}}"> | ||
| 3 | + <reduce parmdata="{{item}}" action="{{item.practice && item.practice.length>0 || (item.spec && item.spec.length>0) ? 'showrmodal' : 'reduce'}}" bindactfood="tellfood" bindshowrmodal="showrmodal"> | ||
| 4 | + <view class="act-button"> | ||
| 5 | + <image src="http://nosqn.colorcun.com/icon-reduce.jpg" mode="aspectFill"></image> | ||
| 6 | + </view> | ||
| 7 | + </reduce> | ||
| 8 | + </block> | ||
| 9 | + <view class="black-font font30r num-input" hidden="{{item.count>0 ? false : true}}">{{item.count}}</view> | ||
| 10 | + <add parmdata="{{item}}" action="{{item.practice && item.practice.length>0 || (item.spec && item.spec.length>0) ? 'showspec' : 'add'}}" bindactfood="tellfood" bindshowspec="show"> | ||
| 11 | + <view class="act-button"> | ||
| 12 | + <image src="http://nosqn.colorcun.com/icon-add.jpg" mode="aspectFill"></image> | ||
| 13 | + </view> | ||
| 14 | + </add> | ||
| 15 | + | ||
| 16 | +</view> | ||
| 17 | + |
components/menu/act.wxss
0 → 100644
components/menu/add.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + parmdata:Object, | ||
| 6 | + action:{ | ||
| 7 | + type:String, | ||
| 8 | + value:'add' | ||
| 9 | + } | ||
| 10 | + }, | ||
| 11 | + attached(){ | ||
| 12 | + | ||
| 13 | + }, | ||
| 14 | + methods:{ | ||
| 15 | + addcart(){ | ||
| 16 | + console.log('yyyyyy',this.data.parmdata) | ||
| 17 | + let parmdata={ | ||
| 18 | + sellerid:this.data.parmdata.sellerid, | ||
| 19 | + openid:util.cache('openid'), | ||
| 20 | + cookbookid:this.data.parmdata.cookbookid ? this.data.parmdata.cookbookid : this.data.parmdata.id | ||
| 21 | + } | ||
| 22 | + if(this.data.parmdata.specid){ | ||
| 23 | + parmdata.specid=this.data.parmdata.specid | ||
| 24 | + } | ||
| 25 | + if(this.data.parmdata.practiceid){ | ||
| 26 | + parmdata.practiceid=this.data.parmdata.practiceid | ||
| 27 | + } | ||
| 28 | + console.log('yyyyyy',this.data.parmdata) | ||
| 29 | + if(this.data.action=='add'){ | ||
| 30 | + App.Orders.AddCart(parmdata).then((json)=>{ | ||
| 31 | + console.log(json); | ||
| 32 | + if(json.ret==200){ | ||
| 33 | + this.triggerEvent('actfood',{action:'add'}) | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + }) | ||
| 37 | + }else{ | ||
| 38 | + this.triggerEvent('showspec') | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | +}) |
components/menu/add.json
0 → 100644
| 1 | +{} |
components/menu/add.wxml
0 → 100644
components/menu/add.wxss
0 → 100644
components/menu/box.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + seller:Object | ||
| 6 | + }, | ||
| 7 | + data:{ | ||
| 8 | + boxhidden:true, | ||
| 9 | + }, | ||
| 10 | + attached(){ | ||
| 11 | + console.log(this.data.seller) | ||
| 12 | + }, | ||
| 13 | + methods:{ | ||
| 14 | + getcartlist(){ | ||
| 15 | + App.Orders.GetCartByOpenid({sellerid:this.data.seller.id,openid:util.cache('openid')}).then((json)=>{ | ||
| 16 | + console.log(json,'yyyyyyy') | ||
| 17 | + if(json.ret==200){ | ||
| 18 | + json.data.forEach((v,i)=>{ | ||
| 19 | + v.price=Number(v.price); | ||
| 20 | + v.member_price=Number(v.member_price); | ||
| 21 | + v.count=Number(v.count); | ||
| 22 | + }) | ||
| 23 | + this.setData({ | ||
| 24 | + cartlist:json.data | ||
| 25 | + }) | ||
| 26 | + | ||
| 27 | + } | ||
| 28 | + }) | ||
| 29 | + }, | ||
| 30 | + showbox(){ | ||
| 31 | + this.setData({ | ||
| 32 | + boxhidden:false | ||
| 33 | + }) | ||
| 34 | + this.getcartlist(); | ||
| 35 | + }, | ||
| 36 | + hidebox(){ | ||
| 37 | + this.setData({ | ||
| 38 | + boxhidden:true | ||
| 39 | + }) | ||
| 40 | + }, | ||
| 41 | + tellfood(e){ | ||
| 42 | + this.triggerEvent('tellfood',e.detail); | ||
| 43 | + if(e.detail.count==0){ | ||
| 44 | + this.getcartlist(); | ||
| 45 | + } | ||
| 46 | + }, | ||
| 47 | + clearfood(){ | ||
| 48 | + App.Orders.ClearCar({sellerid:this.data.seller.id,openid:util.cache('openid')}).then((json)=>{ | ||
| 49 | + if(json.ret==200){ | ||
| 50 | + wx.showToast({ | ||
| 51 | + title:'购物车已清空', | ||
| 52 | + icon:'none', | ||
| 53 | + duration:1500, | ||
| 54 | + mask:true | ||
| 55 | + }) | ||
| 56 | + this.getcartlist(); | ||
| 57 | + this.hidebox(); | ||
| 58 | + this.triggerEvent('refresh') | ||
| 59 | + } | ||
| 60 | + }) | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | +}) |
components/menu/box.json
0 → 100644
components/menu/box.wxml
0 → 100644
| 1 | +<view class="modal-mask" hidden="{{boxhidden}}" style="z-index: 1000;" bindtap="hidebox"></view> | ||
| 2 | +<view class="box bg-white" hidden="{{boxhidden}}"> | ||
| 3 | + <view class="box-head flex-rr" bindtap="clearfood"> | ||
| 4 | + <image src="http://nosqn.colorcun.com/delete.jpg"></image> | ||
| 5 | + <view class="gray-deep-font font28r">清空购物车</view> | ||
| 6 | + </view> | ||
| 7 | + <view class="box-conetnt"> | ||
| 8 | + <block wx:for="{{cartlist}}"> | ||
| 9 | + <cart item="{{item}}" bindtellfood="tellfood"></cart> | ||
| 10 | + </block> | ||
| 11 | + | ||
| 12 | + </view> | ||
| 13 | +</view> |
components/menu/box.wxss
0 → 100644
| 1 | +@import '../../app.wxss' | ||
| 2 | +@import './com.wxss' | ||
| 3 | +.box{ | ||
| 4 | + width: 100%; | ||
| 5 | + min-height: 200rpx; | ||
| 6 | + max-height: 920rpx; | ||
| 7 | + padding-bottom: 120rpx; | ||
| 8 | + box-sizing: border-box; | ||
| 9 | + border-radius: 20rpx 20rpx 0 0; | ||
| 10 | + overflow: hidden; | ||
| 11 | + position: fixed; | ||
| 12 | + left: 0; | ||
| 13 | + bottom: 0; | ||
| 14 | + z-index: 1001; | ||
| 15 | +} | ||
| 16 | +.box-head{ | ||
| 17 | + width: 100%; | ||
| 18 | + height: 100rpx; | ||
| 19 | + padding: 0 40rpx; | ||
| 20 | + border-bottom: 2rpx solid #EFEFEF; | ||
| 21 | + box-sizing: border-box; | ||
| 22 | +} | ||
| 23 | +.box-head image{ | ||
| 24 | + width: 34rpx; | ||
| 25 | + height: 36rpx; | ||
| 26 | + margin-right: 20rpx; | ||
| 27 | +} | ||
| 28 | +.box-conetnt{ | ||
| 29 | + width: 100%; | ||
| 30 | + max-height: 700rpx; | ||
| 31 | + padding: 0 40rpx; | ||
| 32 | + box-sizing: border-box; | ||
| 33 | + overflow-y: scroll; | ||
| 34 | +} | ||
| 35 | +.food-single{ | ||
| 36 | + width: 100%; | ||
| 37 | + padding: 40rpx 0; | ||
| 38 | + border-bottom: 2rpx solid #EFEFEF; | ||
| 39 | +} |
components/menu/cart.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + item:Object | ||
| 4 | + }, | ||
| 5 | + methods:{ | ||
| 6 | + addfood(){ | ||
| 7 | + this.setData({ | ||
| 8 | + 'item.count':this.data.item.count+1 | ||
| 9 | + }) | ||
| 10 | + }, | ||
| 11 | + tellfood(e){ | ||
| 12 | + console.log('rrrrr') | ||
| 13 | + if(e.detail.action=='add'){ | ||
| 14 | + this.addfood(); | ||
| 15 | + }else{ | ||
| 16 | + this.reducefood(); | ||
| 17 | + } | ||
| 18 | + this.triggerEvent('tellfood',{id:this.data.item.cookbookid,count:this.data.item.count,action:e.detail.action,classid:this.data.item.classid}) | ||
| 19 | + }, | ||
| 20 | + reducefood(){ | ||
| 21 | + this.setData({ | ||
| 22 | + 'item.count':this.data.item.count-1 | ||
| 23 | + }) | ||
| 24 | + }, | ||
| 25 | + } | ||
| 26 | +}) |
components/menu/cart.json
0 → 100644
components/menu/cart.wxml
0 → 100644
| 1 | +<view class="food-single flex-lr"> | ||
| 2 | + <view> | ||
| 3 | + <view class="black-font font32r font-more" style="width: 280rpx;line-height: 44rpx;">{{item.cookname}}</view> | ||
| 4 | + <view class="font28r gray-deep-font smooth" style="padding-top: 2rpx;" wx:if="{{item.spec_name || item.practice_name}}">{{item.spec_name ? item.spec_name : ''}}{{item.practice_name && item.spec_name ? ',' : ''}}{{item.practice_name ? item.practice_name : ''}}</view> | ||
| 5 | + </view> | ||
| 6 | + <view class="flex-rr"> | ||
| 7 | + <view class="red-pink-font font24r" style="margin-right:60rpx;">¥<text class="font36r font-bold">{{item.member_price && item.member_price!=0 ? item.member_price : item.price}}</text></view> | ||
| 8 | + <view class="flex-rr"> | ||
| 9 | + <reduce parmdata="{{item}}" action="reduce" bindactfood="tellfood"> | ||
| 10 | + <view class="act-button"> | ||
| 11 | + <image src="http://nosqn.colorcun.com/icon-reduce.jpg" mode="aspectFill"></image> | ||
| 12 | + </view> | ||
| 13 | + </reduce> | ||
| 14 | + <view class="black-font font30r num-input" hidden="{{item.count>0 ? false : true}}">{{item.count}}</view> | ||
| 15 | + <add parmdata="{{item}}" action="add" bindactfood="tellfood"> | ||
| 16 | + <view class="act-button"> | ||
| 17 | + <image src="http://nosqn.colorcun.com/icon-add.jpg" mode="aspectFill"></image> | ||
| 18 | + </view> | ||
| 19 | + </add> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + </view> |
components/menu/cart.wxss
0 → 100644
components/menu/class.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + seller:Object, | ||
| 6 | + classidx:{ | ||
| 7 | + type:Number, | ||
| 8 | + value:0 | ||
| 9 | + } | ||
| 10 | + }, | ||
| 11 | + data:{ | ||
| 12 | + | ||
| 13 | + }, | ||
| 14 | + attached(){ | ||
| 15 | + this.getclasslist(); | ||
| 16 | + let systeminfo=util.cache('system.info'); | ||
| 17 | + let ratio=750/systeminfo.windowWidth; | ||
| 18 | + let headerHeight=util.cache('headerHeight') | ||
| 19 | + let contentheight=systeminfo.windowHeight-headerHeight-(418/ratio); | ||
| 20 | + this.setData({ | ||
| 21 | + contentheight:Math.floor(contentheight) | ||
| 22 | + }) | ||
| 23 | + }, | ||
| 24 | + methods:{ | ||
| 25 | + getclasslist(){ | ||
| 26 | + App.Cookbook.GetCookbookClassBySellerId({SellerId:this.data.seller.id,type:2}).then((json)=>{ | ||
| 27 | + console.log(json) | ||
| 28 | + this.setData({ | ||
| 29 | + classlist:json.data[0] | ||
| 30 | + }) | ||
| 31 | + }) | ||
| 32 | + }, | ||
| 33 | + selectclass(e){ | ||
| 34 | + let classidx=e.currentTarget.dataset.index; | ||
| 35 | + if(classidx!=this.data.classidx){ | ||
| 36 | + this.triggerEvent('tellclass',{classidx:classidx}) | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | +}) |
components/menu/class.json
0 → 100644
| 1 | +{} |
components/menu/class.wxml
0 → 100644
| 1 | +<scroll-view class="class-list bg-gray" style="height:{{contentheight}}px;" scroll-y scroll-into-view="view_{{classlist[classidx].id}}"> | ||
| 2 | + <block wx:for="{{classlist}}"> | ||
| 3 | + <view class="class-tab flex-cc {{index==classidx ? 'bg-white' : ''}}" bindtap="selectclass" data-index="{{index}}" id="view_{{classlist[classidx].id}}"> | ||
| 4 | + <view class="font-more-two class-name {{index==classidx ? 'black-font font-bold' : 'gray-font'}} font28r smooth">{{item.class_name}}</view> | ||
| 5 | + </view> | ||
| 6 | + </block> | ||
| 7 | +</scroll-view> |
components/menu/class.wxss
0 → 100644
components/menu/com.wxss
0 → 100644
| 1 | +.modal-mask{ | ||
| 2 | + position: fixed; | ||
| 3 | + left: 0; | ||
| 4 | + right: 0; | ||
| 5 | + top: 0; | ||
| 6 | + bottom: 0; | ||
| 7 | + background: rgba(0,0,0,.49); | ||
| 8 | + z-index: 99; | ||
| 9 | +} | ||
| 10 | +.close{ | ||
| 11 | + width: 60rpx; | ||
| 12 | + height: 60rpx; | ||
| 13 | + position: fixed; | ||
| 14 | + left: 0; | ||
| 15 | + right: 0; | ||
| 16 | + top: 860rpx; | ||
| 17 | + bottom: 0; | ||
| 18 | + margin: auto; | ||
| 19 | + z-index: 1000; | ||
| 20 | +} | ||
| 21 | +.close image{ | ||
| 22 | + width: 100%; | ||
| 23 | + height: 100%; | ||
| 24 | +} |
components/menu/food.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + item:Object, | ||
| 4 | + classidx:Number, | ||
| 5 | + cookidx:Number, | ||
| 6 | + }, | ||
| 7 | + attached(){ | ||
| 8 | + }, | ||
| 9 | + methods:{ | ||
| 10 | + refresh(){ | ||
| 11 | + this.triggerEvent('refresh'); | ||
| 12 | + }, | ||
| 13 | + showspec(e){ | ||
| 14 | + this.triggerEvent('showspec',{id:e.detail.id,classidx:this.data.classidx,cookidx:this.data.cookidx}); | ||
| 15 | + }, | ||
| 16 | + showrmodal(e){ | ||
| 17 | + this.triggerEvent('showrmodal',{id:e.detail.id,classidx:this.data.classidx,cookidx:this.data.cookidx}); | ||
| 18 | + }, | ||
| 19 | + } | ||
| 20 | +}) |
components/menu/food.json
0 → 100644
components/menu/food.wxml
0 → 100644
| 1 | +<view class="food flex-ll"> | ||
| 2 | + <image src="{{item.image ? item.image : 'http://nosqn.colorcun.com/empty.jpg'}}" class="food-image bg-gray" mode="aspectFill" lazy-load></image> | ||
| 3 | + <view class="food-info flex-vtb"> | ||
| 4 | + <view class="smooth"> | ||
| 5 | + <view class="font-more font-bold font32r black-font" style="width:320rpx;margin-bottom: 6rpx;">{{item.name}}</view> | ||
| 6 | + <view class="gray-font font24r font-more-two" wx:if="{{item.desc}}" style="width:320rpx;">{{item.desc}}</view> | ||
| 7 | + </view> | ||
| 8 | + <view class="flex-lr"> | ||
| 9 | + <view class="food-price flex-ll"> | ||
| 10 | + <view class="red-pink-font font24r" style="margin-right:12rpx;">¥<text class="font36r font-bold">{{item.member_price && item.member_price!=0 ? item.member_price : item.price}}</text></view> | ||
| 11 | + <view class="gray-light-font font20r" style="text-decoration: line-through;" wx:if="{{item.member_price && item.member_price!=0}}">¥<text class="font28r">{{item.price}}</text></view> | ||
| 12 | + </view> | ||
| 13 | + <act item="{{item}}" bindrefresh="refresh" bindshowspec="showspec" bindshowrmodal="showrmodal"></act> | ||
| 14 | + </view> | ||
| 15 | + </view> | ||
| 16 | +</view> |
components/menu/food.wxss
0 → 100644
| 1 | +@import '../../app.wxss' | ||
| 2 | +.food{ | ||
| 3 | + width: 580rpx; | ||
| 4 | + padding:30rpx 20rpx; | ||
| 5 | + box-sizing: border-box; | ||
| 6 | + margin-bottom: 10rpx; | ||
| 7 | + overflow-x: hidden; | ||
| 8 | + position: relative; | ||
| 9 | +} | ||
| 10 | +.food-image{ | ||
| 11 | + width: 180rpx; | ||
| 12 | + height: 170rpx; | ||
| 13 | + border-radius: 10rpx; | ||
| 14 | +} | ||
| 15 | +.food-info{ | ||
| 16 | + width: 360rpx; | ||
| 17 | + height: 170rpx; | ||
| 18 | + padding-left: 20rpx; | ||
| 19 | + box-sizing: border-box; | ||
| 20 | +} |
components/menu/reduce.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + parmdata:Object, | ||
| 6 | + action:{ | ||
| 7 | + type:String, | ||
| 8 | + value:'reduce' | ||
| 9 | + } | ||
| 10 | + }, | ||
| 11 | + attached(){ | ||
| 12 | + console.log(this.data.item); | ||
| 13 | + }, | ||
| 14 | + methods:{ | ||
| 15 | + reducecart(){ | ||
| 16 | + console.log('yyyyyy',this.data.parmdata,this.data.action) | ||
| 17 | + let parmdata={ | ||
| 18 | + sellerid:this.data.parmdata.sellerid, | ||
| 19 | + openid:util.cache('openid'), | ||
| 20 | + cookbookid:this.data.parmdata.cookbookid ? this.data.parmdata.cookbookid : this.data.parmdata.id | ||
| 21 | + } | ||
| 22 | + if(parmdata.specid){ | ||
| 23 | + parmdata.specid=this.data.specid | ||
| 24 | + } | ||
| 25 | + if(parmdata.practiceid){ | ||
| 26 | + parmdata.practiceid=this.data.practiceid | ||
| 27 | + } | ||
| 28 | + if(this.data.action=='reduce'){ | ||
| 29 | + App.Orders.ReduceOrder(parmdata).then((json)=>{ | ||
| 30 | + console.log(json); | ||
| 31 | + this.triggerEvent('actfood',{action:'reduce'}) | ||
| 32 | + }) | ||
| 33 | + }else{ | ||
| 34 | + console.log('yyyyyyyyyy') | ||
| 35 | + this.triggerEvent('showrmodal') | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | +}) |
components/menu/reduce.json
0 → 100644
| 1 | +{} |
components/menu/reduce.wxml
0 → 100644
components/menu/reduce.wxss
0 → 100644
components/menu/rmodal.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + fooditem:Object, | ||
| 6 | + }, | ||
| 7 | + data:{ | ||
| 8 | + num:5, | ||
| 9 | + rmodalhidden:true | ||
| 10 | + }, | ||
| 11 | + observers: { | ||
| 12 | + | ||
| 13 | + }, | ||
| 14 | + attached(){ | ||
| 15 | + }, | ||
| 16 | + methods:{ | ||
| 17 | + showrmodal(){ | ||
| 18 | + this.setData({ | ||
| 19 | + rmodalhidden:false | ||
| 20 | + }) | ||
| 21 | + this.getcartlist(); | ||
| 22 | + }, | ||
| 23 | + hidermodal(){ | ||
| 24 | + this.setData({ | ||
| 25 | + rmodalhidden:true | ||
| 26 | + }) | ||
| 27 | + }, | ||
| 28 | + actfood(e){ | ||
| 29 | + console.log('reduce') | ||
| 30 | + this.triggerEvent('tellfood',{action:e.detail.action,classid:this.data.fooditem.cid,id:this.data.fooditem.id}); | ||
| 31 | + this.getcartlist(); | ||
| 32 | + }, | ||
| 33 | + | ||
| 34 | + getcartlist(){ | ||
| 35 | + App.Orders.GetCartByOpenid({sellerid:this.data.fooditem.sellerid,openid:util.cache('openid'),cookbookid:this.data.fooditem.id}).then((json)=>{ | ||
| 36 | + console.log(json,'yyyyyyy') | ||
| 37 | + if(json.ret==200){ | ||
| 38 | + if(json.data.length==0){ | ||
| 39 | + this.hidermodal(); | ||
| 40 | + }else{ | ||
| 41 | + this.setData({ | ||
| 42 | + bookfood:json.data | ||
| 43 | + }) | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + // json.data.forEach((v,i)=>{ | ||
| 47 | + // v.price=Number(v.price); | ||
| 48 | + // v.member_price=Number(v.member_price); | ||
| 49 | + // }) | ||
| 50 | + // this.setData({ | ||
| 51 | + // cartlist:json.data | ||
| 52 | + // }) | ||
| 53 | + | ||
| 54 | + } | ||
| 55 | + }) | ||
| 56 | + }, | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | +}) |
components/menu/rmodal.json
0 → 100644
components/menu/rmodal.wxml
0 → 100644
| 1 | +<view class="modal-mask" hidden="{{rmodalhidden}}" bindtap="hidermodal"></view> | ||
| 2 | +<view class="modal flex-vtb bg-white smooth" hidden="{{rmodalhidden}}"> | ||
| 3 | + <view class="spec-content"> | ||
| 4 | + <view class="food-name font32r font-bold black-font font-more">{{fooditem.name}}</view> | ||
| 5 | + <view class="food-spec-prac flex-lr" wx:for="{{bookfood}}"> | ||
| 6 | + <view class="food-spec-prac-single red-pink-font flex-cc font30r">{{item.spec_name ? item.spec_name : ''}}{{item.practice_name && item.spec_name ? ',' : ''}}{{item.practice_name ? item.practice_name : ''}}</view> | ||
| 7 | + <view class="flex-rr"> | ||
| 8 | + <reduce parmdata="{{item}}" action="reduce" bindactfood="actfood"> | ||
| 9 | + <view class="act-button"> | ||
| 10 | + <image src="http://nosqn.colorcun.com/icon-reduce.jpg" mode="aspectFill"></image> | ||
| 11 | + </view> | ||
| 12 | + </reduce> | ||
| 13 | + <view class="black-font font30r num-input">{{item.count}}</view> | ||
| 14 | + <add parmdata="{{item}}" action="add" bindactfood="actfood"> | ||
| 15 | + <view class="act-button"> | ||
| 16 | + <image src="http://nosqn.colorcun.com/icon-add.jpg" mode="aspectFill"></image> | ||
| 17 | + </view> | ||
| 18 | + </add> | ||
| 19 | + | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + </view> | ||
| 23 | + <view class="spec-main flex-rr"> | ||
| 24 | + <!-- <view class="flex-ll spec-price red-pink-font font32r" style="align-items: baseline;">¥<text class="font-bold font44r">25</text></view> --> | ||
| 25 | + <view class="bg-red-pink white-font font-bold font30r spec-button flex-cc" bindtap="hidermodal">确定</view> | ||
| 26 | + </view> | ||
| 27 | +</view> | ||
| 28 | +<view class="close" hidden="{{rmodalhidden}}" bindtap="hidermodal"> | ||
| 29 | + <image src="http://nosqn.colorcun.com/close.jpg"></image> | ||
| 30 | +</view> |
components/menu/rmodal.wxss
0 → 100644
| 1 | +@import '../../app.wxss' | ||
| 2 | +@import './act.wxss' | ||
| 3 | +@import './spec.wxss' | ||
| 4 | +.food-spec-prac-single{ | ||
| 5 | + width: 290rpx; | ||
| 6 | + height: 64rpx; | ||
| 7 | + border-radius: 10rpx; | ||
| 8 | + border:2rpx solid #FD777D; | ||
| 9 | + box-sizing: border-box; | ||
| 10 | + margin-right:40rpx; | ||
| 11 | + margin-bottom: 30rpx; | ||
| 12 | + background: #FFE6E6; | ||
| 13 | +} | ||
| 14 | +.food-spec-prac{ | ||
| 15 | + width: 100%; | ||
| 16 | + padding-top: 40rpx; | ||
| 17 | + padding-right: 40rpx; | ||
| 18 | + box-sizing: border-box; | ||
| 19 | +} |
components/menu/spec.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + fooditem:Object, | ||
| 4 | + }, | ||
| 5 | + data:{ | ||
| 6 | + specidx:0, | ||
| 7 | + pracidx:0, | ||
| 8 | + spechidden:true, | ||
| 9 | + }, | ||
| 10 | + attached(){ | ||
| 11 | + | ||
| 12 | + }, | ||
| 13 | + methods:{ | ||
| 14 | + getdata(){ | ||
| 15 | + let parmdata={ | ||
| 16 | + sellerid:this.data.fooditem.sellerid, | ||
| 17 | + id:this.data.fooditem.id, | ||
| 18 | + } | ||
| 19 | + if(this.data.fooditem.spec && this.data.fooditem.spec.length>0){ | ||
| 20 | + parmdata.specid=this.data.fooditem.spec[this.data.specidx].id | ||
| 21 | + } | ||
| 22 | + if(this.data.fooditem.practice && this.data.fooditem.practice.length>0){ | ||
| 23 | + parmdata.practiceid=this.data.fooditem.practice[this.data.pracidx].id | ||
| 24 | + } | ||
| 25 | + this.setData({ | ||
| 26 | + parmdata:parmdata | ||
| 27 | + }) | ||
| 28 | + console.log(this.data.parmdata,'add0000000000'); | ||
| 29 | + }, | ||
| 30 | + actfood(){ | ||
| 31 | + this.triggerEvent('addfood',{action:'add',classid:this.data.fooditem.cid,id:this.data.fooditem.id}); | ||
| 32 | + this.hide(); | ||
| 33 | + }, | ||
| 34 | + selectspec(e){ | ||
| 35 | + console.log(e) | ||
| 36 | + let specidx=e.currentTarget.dataset.index; | ||
| 37 | + this.setData({ | ||
| 38 | + specidx:specidx, | ||
| 39 | + 'parmdata.specid':e.currentTarget.dataset.id | ||
| 40 | + }) | ||
| 41 | + }, | ||
| 42 | + selectprac(e){ | ||
| 43 | + let pracidx=e.currentTarget.dataset.index; | ||
| 44 | + this.setData({ | ||
| 45 | + pracidx:pracidx, | ||
| 46 | + 'parmdata.practiceid':e.currentTarget.dataset.id | ||
| 47 | + }) | ||
| 48 | + }, | ||
| 49 | + show(){ | ||
| 50 | + this.setData({ | ||
| 51 | + spechidden:false | ||
| 52 | + }) | ||
| 53 | + this.getdata(); | ||
| 54 | + }, | ||
| 55 | + hide(){ | ||
| 56 | + this.setData({ | ||
| 57 | + spechidden:true | ||
| 58 | + }) | ||
| 59 | + }, | ||
| 60 | + } | ||
| 61 | +}) |
components/menu/spec.json
0 → 100644
components/menu/spec.wxml
0 → 100644
| 1 | +<view class="modal-mask" hidden="{{spechidden}}" bindtap="hide"></view> | ||
| 2 | +<view class="modal flex-vtb bg-white smooth" hidden="{{spechidden}}"> | ||
| 3 | + <view class="spec-content"> | ||
| 4 | + <view class="food-name font32r font-bold black-font font-more">{{fooditem.name}}</view> | ||
| 5 | + <view class="spec-title gray-deep-font font28r" wx:if="{{fooditem.spec && fooditem.spec.length>0}}">规格</view> | ||
| 6 | + <view class="flex-rs spec-list" wx:if="{{fooditem.spec && fooditem.spec.length>0}}"> | ||
| 7 | + <view wx:for="{{fooditem.spec}}" class="spec-single flex-cc font30r {{specidx==index ? 'active red-pink-font' : 'black-font'}}" bindtap="selectspec" data-index="{{index}}" data-id="{{item.id}}">{{item.specs}}</view> | ||
| 8 | + </view> | ||
| 9 | + <view class="spec-title gray-deep-font font28r" wx:if="{{fooditem.practice && fooditem.practice.length>0}}">做法</view> | ||
| 10 | + <view class="flex-rs spec-list" wx:if="{{fooditem.practice && fooditem.practice.length>0}}"> | ||
| 11 | + <view wx:for="{{fooditem.practice}}" class="spec-single flex-cc font30r {{pracidx==index ? 'active red-pink-font' : 'black-font'}}" bindtap="selectprac" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view> | ||
| 12 | + </view> | ||
| 13 | + </view> | ||
| 14 | + <view class="spec-main flex-lr"> | ||
| 15 | + <view class="flex-ll spec-price red-pink-font font32r" style="align-items: baseline;">¥<text class="font-bold font44r"><block wx:if="{{fooditem.spec && fooditem.spec.length>0}}">{{fooditem.spec[specidx].member_price && fooditem.spec[specidx].member_price!=0 ? fooditem.spec[specidx].member_price : fooditem.spec[specidx].price}}</block><block wx:else>{{fooditem.member_price && fooditem.member_price!=0 ? fooditem.member_price : fooditem.price}}</block></text></view> | ||
| 16 | + <add parmdata="{{parmdata}}" action="add" bindactfood="actfood"> | ||
| 17 | + <view class="bg-red-pink white-font font-bold font30r spec-button flex-cc">确定</view> | ||
| 18 | + </add> | ||
| 19 | + </view> | ||
| 20 | +</view> | ||
| 21 | +<view class="close" hidden="{{spechidden}}" bindtap="hide"> | ||
| 22 | + <image src="http://nosqn.colorcun.com/close.jpg"></image> | ||
| 23 | +</view> |
components/menu/spec.wxss
0 → 100644
| 1 | +@import '../../app.wxss' | ||
| 2 | +.modal-mask{ | ||
| 3 | + position: fixed; | ||
| 4 | + left: 0; | ||
| 5 | + right: 0; | ||
| 6 | + top: 0; | ||
| 7 | + bottom: 0; | ||
| 8 | + background: rgba(0,0,0,.49); | ||
| 9 | + z-index: 999; | ||
| 10 | +} | ||
| 11 | +.modal{ | ||
| 12 | + width: 670rpx; | ||
| 13 | + height: 720rpx; | ||
| 14 | + border-radius: 20rpx; | ||
| 15 | + box-sizing: border-box; | ||
| 16 | + position: fixed; | ||
| 17 | + left: 0; | ||
| 18 | + right: 0; | ||
| 19 | + top: 0; | ||
| 20 | + bottom: 0; | ||
| 21 | + margin: auto; | ||
| 22 | + z-index: 1000; | ||
| 23 | + overflow-y: scroll; | ||
| 24 | +} | ||
| 25 | +.spec-content{ | ||
| 26 | + width: 100%; | ||
| 27 | + padding-left: 40rpx; | ||
| 28 | + box-sizing: border-box; | ||
| 29 | + line-height: 1.4; | ||
| 30 | + padding-top: 20rpx; | ||
| 31 | + max-height: 600rpx; | ||
| 32 | + overflow-y: scroll; | ||
| 33 | +} | ||
| 34 | +.food-name,.spec-title{ | ||
| 35 | + width: 100%; | ||
| 36 | + padding: 20rpx 0; | ||
| 37 | +} | ||
| 38 | +.food-name{ | ||
| 39 | + width:100%; | ||
| 40 | + padding-right: 40rpx; | ||
| 41 | + text-align: center; | ||
| 42 | + box-sizing: border-box; | ||
| 43 | +} | ||
| 44 | +.spec-list{ | ||
| 45 | + width: 100%; | ||
| 46 | +} | ||
| 47 | +.spec-single{ | ||
| 48 | + width: 170rpx; | ||
| 49 | + height: 64rpx; | ||
| 50 | + border-radius: 10rpx; | ||
| 51 | + border:2rpx solid #EFEFEF; | ||
| 52 | + box-sizing: border-box; | ||
| 53 | + margin-right:40rpx; | ||
| 54 | + margin-bottom: 30rpx; | ||
| 55 | +} | ||
| 56 | +.spec-single.active{ | ||
| 57 | + background: #FFE6E6; | ||
| 58 | + border-color: #FD777D; | ||
| 59 | +} | ||
| 60 | +.spec-main{ | ||
| 61 | + width: 100%; | ||
| 62 | + height: 120rpx; | ||
| 63 | + padding: 0 60rpx; | ||
| 64 | + border-top:2rpx solid #EFEFEF; | ||
| 65 | + box-sizing: border-box; | ||
| 66 | + border-radius:0 0 20rpx 20rpx; | ||
| 67 | +} | ||
| 68 | +.spec-button{ | ||
| 69 | + width: 250rpx; | ||
| 70 | + height: 80rpx; | ||
| 71 | + border-radius: 40rpx; | ||
| 72 | +} | ||
| 73 | +.close{ | ||
| 74 | + width: 60rpx; | ||
| 75 | + height: 60rpx; | ||
| 76 | + position: fixed; | ||
| 77 | + left: 0; | ||
| 78 | + right: 0; | ||
| 79 | + top: 860rpx; | ||
| 80 | + bottom: 0; | ||
| 81 | + margin: auto; | ||
| 82 | + z-index: 1000; | ||
| 83 | +} | ||
| 84 | +.close image{ | ||
| 85 | + width: 100%; | ||
| 86 | + height: 100%; | ||
| 87 | +} | ||
| 88 | + |
components/menu/totalprice.js
0 → 100644
| 1 | +import App from '../../utils/api.js' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + seller:Object, | ||
| 6 | + refresh:{ | ||
| 7 | + type:Boolean, | ||
| 8 | + value:false | ||
| 9 | + } | ||
| 10 | + }, | ||
| 11 | + attached(){ | ||
| 12 | + console.log('uuuuu',this.data.seller) | ||
| 13 | + this.getsellerconfig(); | ||
| 14 | + }, | ||
| 15 | + observers: { | ||
| 16 | + 'refresh': function(newrefresh){ | ||
| 17 | + this.gettotal(); | ||
| 18 | + } | ||
| 19 | + }, | ||
| 20 | + methods:{ | ||
| 21 | + getsellerconfig(){ | ||
| 22 | + App.Seller.GetSellerConfig({sellerid:this.data.seller.id}).then((json)=>{ | ||
| 23 | + console.log(json) | ||
| 24 | + if(json.ret==200){ | ||
| 25 | + this.setData({ | ||
| 26 | + config:json.data[0] | ||
| 27 | + }) | ||
| 28 | + } | ||
| 29 | + }) | ||
| 30 | + }, | ||
| 31 | + gettotal(){ | ||
| 32 | + App.Orders.GetOrderTotalMoney({sellerid:this.data.seller.id,openid:util.cache('openid')}).then((json)=>{ | ||
| 33 | + console.log(json,'total') | ||
| 34 | + if(json.ret==200){ | ||
| 35 | + this.setData({ | ||
| 36 | + totalobj:json.data | ||
| 37 | + }) | ||
| 38 | + if(json.data.cookBookTotal==0){ | ||
| 39 | + this.selectComponent('#box').hidebox(); | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + }) | ||
| 43 | + }, | ||
| 44 | + showbox(){ | ||
| 45 | + this.selectComponent('#box').showbox(); | ||
| 46 | + }, | ||
| 47 | + toorder(){ | ||
| 48 | + wx.navigateTo({ | ||
| 49 | + url:'./order?id='+this.data.seller.id+'&totalprice='+this.data.totalobj.cookBookPirce | ||
| 50 | + }) | ||
| 51 | + }, | ||
| 52 | + tellfood(e){ | ||
| 53 | + this.triggerEvent('tellfood',e.detail); | ||
| 54 | + }, | ||
| 55 | + refresh(){ | ||
| 56 | + this.triggerEvent('refresh') | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | +}) |
components/menu/totalprice.json
0 → 100644
components/menu/totalprice.wxml
0 → 100644
| 1 | +<view class="bg-white total-price flex-lr"> | ||
| 2 | + <view class="total-count-cover flex-cc" wx:if="{{totalobj.cookBookTotal>0}}"> | ||
| 3 | + <view class="total-count white-font font24r smooth flex-cc">{{totalobj.cookBookTotal}}</view> | ||
| 4 | + </view> | ||
| 5 | + | ||
| 6 | + <view class="flex-ll" bindtap="{{totalobj.cookBookTotal>0 ? 'showbox' : ''}}"> | ||
| 7 | + <image class="" src="{{totalobj.cookBookTotal>0 ? 'http://nosqn.colorcun.com/send-red.jpg' : 'http://nosqn.colorcun.com/send-gray.jpg'}}"></image> | ||
| 8 | + <!-- <view style="height: 100%;position: relative;top: -6rpx;"> | ||
| 9 | + <view class="red-pink-font font32r" style="margin-bottom: 0rpx;">¥<text class="font44r font-bold">{{totalobj.cookBookPirce}}</text></view> | ||
| 10 | + <view style="height: 24rpx;text-decoration: line-through;position: relative;top: -4rpx;" class="gray-light-font font24r"></view> | ||
| 11 | + </view> --> | ||
| 12 | + <view class="red-pink-font font28r" style="margin-bottom: 24rpx;">¥<text class="font40r font-bold">{{totalobj.cookBookPirce}}</text></view> | ||
| 13 | + </view> | ||
| 14 | + <block wx:if="{{totalobj.cookBookPirce>=config.is_full_amount && totalobj.cookBookTotal>0}}"> | ||
| 15 | + <view class="box-button flex-cc white-font bg-red-pink" bindtap="toorder">去结算</view> | ||
| 16 | + </block> | ||
| 17 | + <block wx:else> | ||
| 18 | + <view class="box-button flex-cc white-font bg-light-gray">满¥{{config.is_full_amount}}起送</view> | ||
| 19 | + </block> | ||
| 20 | + <!-- <view class="box-button flex-cc white-font bg-red-pink" bindtap="toorder">去结算</view> --> | ||
| 21 | + | ||
| 22 | +</view> | ||
| 23 | +<block wx:if="{{seller}}"> | ||
| 24 | + <box seller="{{seller}}" id="box" bindtellfood="tellfood" bindrefresh="refresh"></box> | ||
| 25 | +</block> |
components/menu/totalprice.wxss
0 → 100644
| 1 | +@import '../../app.wxss' | ||
| 2 | +.total-price{ | ||
| 3 | + width: 100%; | ||
| 4 | + height: 120rpx; | ||
| 5 | + padding: 0 60rpx; | ||
| 6 | + box-sizing: border-box; | ||
| 7 | + box-shadow: 0 0 10rpx 0 #E5E5E5; | ||
| 8 | + position: fixed; | ||
| 9 | + left: 0; | ||
| 10 | + right: 0; | ||
| 11 | + bottom: 0; | ||
| 12 | + line-height: 1.4; | ||
| 13 | + z-index: 1002; | ||
| 14 | +} | ||
| 15 | +.total-count-cover{ | ||
| 16 | + width: 72rpx; | ||
| 17 | + position: absolute; | ||
| 18 | + left: 30rpx; | ||
| 19 | + top: 10rpx; | ||
| 20 | +} | ||
| 21 | +.total-count{ | ||
| 22 | + min-width: 32rpx; | ||
| 23 | + padding: 0 6rpx; | ||
| 24 | + height: 32rpx; | ||
| 25 | + box-sizing: border-box; | ||
| 26 | + border-radius: 16rpx; | ||
| 27 | + background: #FA5151; | ||
| 28 | +} | ||
| 29 | +.total-price image{ | ||
| 30 | + width: 104rpx; | ||
| 31 | + height: 88rpx; | ||
| 32 | + /* margin-right: 10rpx; */ | ||
| 33 | + margin-left: 20rpx; | ||
| 34 | +} | ||
| 35 | +.box-button{ | ||
| 36 | + width: 300rpx; | ||
| 37 | + height: 84rpx; | ||
| 38 | + border-radius: 42rpx; | ||
| 39 | +} |
components/modal/modal.js
0 → 100644
| 1 | +var util = require('../../utils/util.js') | ||
| 2 | +var uri=require('../../utils/uri.js'); | ||
| 3 | +import App from '../../utils/api.js' | ||
| 4 | +Component({ | ||
| 5 | + properties:{ | ||
| 6 | + | ||
| 7 | + }, | ||
| 8 | + data:{ | ||
| 9 | + modalHidden:true | ||
| 10 | + | ||
| 11 | + }, | ||
| 12 | + methods:{ | ||
| 13 | + show:function(id,sn){ | ||
| 14 | + this.setData({ | ||
| 15 | + modalHidden:false, | ||
| 16 | + pid:id, | ||
| 17 | + sn:sn | ||
| 18 | + }) | ||
| 19 | + }, | ||
| 20 | + confirm:function(){ | ||
| 21 | + this.setData({ | ||
| 22 | + modalHidden:true | ||
| 23 | + }) | ||
| 24 | + App.Prints.DelPrints({pid:this.data.pid,sn:this.data.sn}).then((json)=>{ | ||
| 25 | + if(json.ret==200){ | ||
| 26 | + if(json.data[0]==1){ | ||
| 27 | + wx.showToast({ | ||
| 28 | + title:'删除成功', | ||
| 29 | + duration:2000 | ||
| 30 | + }) | ||
| 31 | + this.triggerEvent("printlist"); | ||
| 32 | + }else{ | ||
| 33 | + wx.showModal({ | ||
| 34 | + content:json.data[0].no[0], | ||
| 35 | + showCancel:false, | ||
| 36 | + confirmColor:'#199095', | ||
| 37 | + success:function(res){ | ||
| 38 | + | ||
| 39 | + } | ||
| 40 | + }) | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + }) | ||
| 44 | + }, | ||
| 45 | + cancle:function(){ | ||
| 46 | + this.setData({ | ||
| 47 | + modalHidden:true | ||
| 48 | + }) | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | +}) |
components/modal/modal.json
0 → 100644
components/modal/modal.wxml
0 → 100644
| 1 | +<view class="modal-mask" hidden="{{modalHidden}}" bindtap="cancle"></view> | ||
| 2 | +<view class="confirm-modal" hidden="{{modalHidden}}"> | ||
| 3 | + <view class="black-font font34r smooth flex-cc modal-info">确定删除?删除后,该打印机绑定的菜品和小票将无法打印</view> | ||
| 4 | + <view class="modal-button flex-lr"> | ||
| 5 | + <view class="flex-cc gray-font font36r border-right" bindtap="confirm">确定</view> | ||
| 6 | + <view class="flex-cc green-font font36r" bindtap="cancle">取消</view> | ||
| 7 | + </view> | ||
| 8 | +</view> |
components/modal/modal.wxss
0 → 100644
| 1 | +@import '../common.wxss'; | ||
| 2 | +.modal-mask{ | ||
| 3 | + position:fixed; | ||
| 4 | + left:0; | ||
| 5 | + right:0; | ||
| 6 | + top:0; | ||
| 7 | + bottom:0; | ||
| 8 | + background:rgba(0,0,0,.7); | ||
| 9 | + z-index:99; | ||
| 10 | +} | ||
| 11 | +.confirm-modal{ | ||
| 12 | + width:560rpx; | ||
| 13 | + height:290rpx; | ||
| 14 | + box-sizing:border-box; | ||
| 15 | + position:fixed; | ||
| 16 | + left:0; | ||
| 17 | + right:0; | ||
| 18 | + top:0; | ||
| 19 | + bottom:0; | ||
| 20 | + margin:auto; | ||
| 21 | + background:#fff; | ||
| 22 | + border-radius:10rpx; | ||
| 23 | + overflow:hidden; | ||
| 24 | + box-shadow:0 0 10px rgba(0,0,0,.2); | ||
| 25 | + z-index:100; | ||
| 26 | +} | ||
| 27 | +.modal-button{ | ||
| 28 | + width:100%; | ||
| 29 | + height:100rpx; | ||
| 30 | + border-top:1px solid #efeef3; | ||
| 31 | + box-sizing:border-box; | ||
| 32 | +} | ||
| 33 | +.modal-info{ | ||
| 34 | + width:100%; | ||
| 35 | + height:190rpx; | ||
| 36 | + padding:0 50rpx; | ||
| 37 | + box-sizing:border-box; | ||
| 38 | +} | ||
| 39 | +.modal-button>view{ | ||
| 40 | + width:50%; | ||
| 41 | + height:100%; | ||
| 42 | +} | ||
| 43 | +.border-right{ | ||
| 44 | + border-right:1px solid #efeef3; | ||
| 45 | + box-sizing:border-box; | ||
| 46 | +} |
components/nav/nav.js
0 → 100644
| 1 | +// components/nav/nav.js | ||
| 2 | +Component({ | ||
| 3 | + /** | ||
| 4 | + * 组件的属性列表 | ||
| 5 | + */ | ||
| 6 | + properties: { | ||
| 7 | + backgroundColor: { | ||
| 8 | + type: String, | ||
| 9 | + value: '#ffffff' | ||
| 10 | + }, | ||
| 11 | + color: { | ||
| 12 | + type: String, | ||
| 13 | + value: '#000000' | ||
| 14 | + }, | ||
| 15 | + hasHome: { | ||
| 16 | + type: Boolean, | ||
| 17 | + value: false | ||
| 18 | + }, | ||
| 19 | + place:{ | ||
| 20 | + type:Boolean, | ||
| 21 | + value:true | ||
| 22 | + } | ||
| 23 | + }, | ||
| 24 | + | ||
| 25 | + /** | ||
| 26 | + * 组件的初始数据 | ||
| 27 | + */ | ||
| 28 | + data: { | ||
| 29 | + disHome: false, | ||
| 30 | + disBack: false, | ||
| 31 | + }, | ||
| 32 | + | ||
| 33 | + attached(){ | ||
| 34 | + this.init(); | ||
| 35 | + }, | ||
| 36 | + /** | ||
| 37 | + * 组件的方法列表 | ||
| 38 | + */ | ||
| 39 | + methods: { | ||
| 40 | + back(){ | ||
| 41 | + this.triggerEvent('NavEvent'); | ||
| 42 | + wx.navigateBack(); | ||
| 43 | + }, | ||
| 44 | + home(){ | ||
| 45 | + if (!this.data.disHome) return; | ||
| 46 | + wx.reLaunch({ | ||
| 47 | + url: '/pages/customer/index' | ||
| 48 | + }) | ||
| 49 | + }, | ||
| 50 | + init(){ | ||
| 51 | + | ||
| 52 | + let disBack = false; | ||
| 53 | + let disHome = false; | ||
| 54 | + let pages = getCurrentPages(); | ||
| 55 | + console.log('pages.length', pages[0]); | ||
| 56 | + if (pages.length > 1) { | ||
| 57 | + disBack = true; | ||
| 58 | + } else { | ||
| 59 | + //if (getApp().shareTicket && this.data.hasHome) { | ||
| 60 | + if (this.data.hasHome && pages[0].route != "pages/customer/list") { | ||
| 61 | + disHome = true; | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + //导航栏自适应 | ||
| 65 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 66 | + let reg = /ios/i; | ||
| 67 | + let pt = 20;//导航状态栏上内边距 | ||
| 68 | + let h = 44;//导航状态栏高度 | ||
| 69 | + if(reg.test(systemInfo.system)){ | ||
| 70 | + pt = systemInfo.statusBarHeight; | ||
| 71 | + h = 44; | ||
| 72 | + }else{ | ||
| 73 | + pt = systemInfo.statusBarHeight; | ||
| 74 | + h = 48; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + this.setData({ | ||
| 78 | + statusBarHeight: pt, | ||
| 79 | + disHome: disHome, | ||
| 80 | + disBack: disBack, | ||
| 81 | + statusBarHeightFull: pt + h, | ||
| 82 | + titleBarHeight:h, | ||
| 83 | + }) | ||
| 84 | + wx.setStorageSync('headerHeight', pt + h) | ||
| 85 | + console.log('this.setData', this.data); | ||
| 86 | + }, | ||
| 87 | + getHeight(){ | ||
| 88 | + return this.data.statusBarHeightFull | ||
| 89 | + }, | ||
| 90 | + } | ||
| 91 | +}) |
components/nav/nav.json
0 → 100644
components/nav/nav.wxml
0 → 100644
| 1 | +<!--components/nav/nav.wxml--> | ||
| 2 | +<view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};"> | ||
| 3 | + <view class="nav" style="margin-top: {{statusBarHeight}}px;"> | ||
| 4 | + <view class="flex-lr part" style="height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px"> | ||
| 5 | + <view class="opt flex-ll"> | ||
| 6 | + <view class="back flex-vc" | ||
| 7 | + style="height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px" | ||
| 8 | + bindtap="back" wx:if="{{disBack}}"> | ||
| 9 | + <image class="back-image" | ||
| 10 | + src="http://nosqn.colorcun.com/custom/lite-yd/image/back{{backgroundColor!='#ffffff'?'-light':''}}.png"></image> | ||
| 11 | + </view> | ||
| 12 | + <view class="home flex-vc" bindtap="home" wx:if="{{disHome}}"> | ||
| 13 | + <image class="home-image" | ||
| 14 | + src="http://nosqn.colorcun.com/custom/lite-yd/image/home{{backgroundColor!='#ffffff'?'-light':''}}.svg"></image> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + <view class="title" bindtap="home"> | ||
| 18 | + <slot></slot> | ||
| 19 | + </view> | ||
| 20 | + <view class="opt"> | ||
| 21 | + <view></view> | ||
| 22 | + </view> | ||
| 23 | + </view> | ||
| 24 | + | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | +<view class="nav-main-space" style="height: {{statusBarHeightFull}}px;" wx:if="{{place}}"> | ||
| 28 | + | ||
| 29 | +</view> |
components/nav/nav.wxss
0 → 100644
| 1 | +/* components/nav/nav.wxss */ | ||
| 2 | +@import "../../app.wxss"; | ||
| 3 | +.nav-main{ | ||
| 4 | + position:fixed; | ||
| 5 | + width: 100%; | ||
| 6 | + z-index: 10; | ||
| 7 | + top:0; | ||
| 8 | +} | ||
| 9 | +.nav{ | ||
| 10 | + font-size: 30rpx; | ||
| 11 | + font-weight: bold; | ||
| 12 | +} | ||
| 13 | +.nav .part{ | ||
| 14 | + text-align: center; | ||
| 15 | + | ||
| 16 | +} | ||
| 17 | +.nav .part .title{ | ||
| 18 | + width: 100%; | ||
| 19 | + white-space:nowrap; | ||
| 20 | + position: relative; | ||
| 21 | + height:100%; | ||
| 22 | +} | ||
| 23 | +.nav .part .opt{ | ||
| 24 | + min-width: 188rpx; | ||
| 25 | + height: 100%; | ||
| 26 | +} | ||
| 27 | +.nav .part .opt view{ | ||
| 28 | + width: 108rpx; | ||
| 29 | + height: 100%; | ||
| 30 | +} | ||
| 31 | +.nav .part .opt .back-image{ | ||
| 32 | + height: 32rpx; | ||
| 33 | + width: 18rpx; | ||
| 34 | + padding-left: 40rpx; | ||
| 35 | + padding-right: 40rpx; | ||
| 36 | +} | ||
| 37 | +.nav .part .opt .home-image{ | ||
| 38 | + height: 34rpx; | ||
| 39 | + width: 36rpx; | ||
| 40 | + padding-left: 40rpx; | ||
| 41 | + padding-right: 40rpx; | ||
| 42 | +} |
components/network/network.js
0 → 100644
| 1 | +Component({ | ||
| 2 | + properties:{ | ||
| 3 | + }, | ||
| 4 | + data:{ | ||
| 5 | + netreminder:'当前网络不给力,请检查好网络后重试', | ||
| 6 | + network:true | ||
| 7 | + }, | ||
| 8 | + attached:function(){ | ||
| 9 | + this.looknet(); | ||
| 10 | + this.netstatus(); | ||
| 11 | + }, | ||
| 12 | + methods:{ | ||
| 13 | + looknet:function(){ | ||
| 14 | + var that=this; | ||
| 15 | + wx.getNetworkType({ | ||
| 16 | + success:function(res){ | ||
| 17 | + var netreminder=that.data.netreminder; | ||
| 18 | + var network=that.data.network; | ||
| 19 | + //有网 | ||
| 20 | + if(res.networkType!='none'){ | ||
| 21 | + if(res.networkType=='unknown'){ | ||
| 22 | + wx.hideToast(); | ||
| 23 | + network=false | ||
| 24 | + netreminder='当前网络不给力,请检查好网络后重试'; | ||
| 25 | + }else{ | ||
| 26 | + network = true | ||
| 27 | + } | ||
| 28 | + }else{ | ||
| 29 | + wx.hideToast(); | ||
| 30 | + network=false | ||
| 31 | + netreminder='当前网络不可用,请检查网络设置'; | ||
| 32 | + } | ||
| 33 | + that.setnetdata(network,netreminder) | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + }) | ||
| 37 | + }, | ||
| 38 | + netstatus:function(){ | ||
| 39 | + var that=this; | ||
| 40 | + wx.onNetworkStatusChange(function (res) { | ||
| 41 | + var netreminder=that.data.netreminder; | ||
| 42 | + var network=that.data.network; | ||
| 43 | + if(res.isConnected==false){ | ||
| 44 | + wx.hideToast(); | ||
| 45 | + network = false; | ||
| 46 | + netreminder='当前网络不可用,请检查网络设置'; | ||
| 47 | + }else{ | ||
| 48 | + if(res.networkType=='unknown'){ | ||
| 49 | + wx.hideToast(); | ||
| 50 | + network = false; | ||
| 51 | + netreminder='当前网络不给力,请检查好网络后重试'; | ||
| 52 | + }else{ | ||
| 53 | + network = true | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + that.setnetdata(network,netreminder) | ||
| 57 | + }) | ||
| 58 | + }, | ||
| 59 | + setnetdata:function(network,netreminder){ | ||
| 60 | + console.log('xxxxxxx',network) | ||
| 61 | + this.setData({ | ||
| 62 | + network:network, | ||
| 63 | + netreminder:netreminder | ||
| 64 | + }) | ||
| 65 | + }, | ||
| 66 | + refresh:function(){ | ||
| 67 | + this.triggerEvent('netchange') | ||
| 68 | + }, | ||
| 69 | + }, | ||
| 70 | + | ||
| 71 | +}) |
components/network/network.json
0 → 100644
components/network/network.wxml
0 → 100644
| 1 | +<view class="network flex-vc bg_white" hidden="{{network}}"> | ||
| 2 | + <image src="/pages/image/reminder.png" class="nothing-network"></image> | ||
| 3 | + <view class="gray-deep-font font30r">{{netreminder}}</view> | ||
| 4 | + <view class="refresh-button black-font font30r flex-cc bg_gray" bindtap="refresh">重试</view> | ||
| 5 | +</view> |
components/network/network.wxss
0 → 100644
| 1 | +@import '../common.wxss'; | ||
| 2 | +.network{ | ||
| 3 | + position:fixed; | ||
| 4 | + left:0; | ||
| 5 | + right:0; | ||
| 6 | + top:0; | ||
| 7 | + bottom:0; | ||
| 8 | + z-index:1000; | ||
| 9 | +} | ||
| 10 | +.nothing-network{ | ||
| 11 | + width:428rpx; | ||
| 12 | + height:298rpx; | ||
| 13 | + margin-bottom:80rpx; | ||
| 14 | + margin-left:40rpx; | ||
| 15 | +} | ||
| 16 | +.refresh-button{ | ||
| 17 | + width:140rpx; | ||
| 18 | + height:70rpx; | ||
| 19 | + border:1px solid #ccc; | ||
| 20 | + margin-top:80rpx; | ||
| 21 | +} |
components/nothing/nothing.js
0 → 100644
| 1 | +var util = require('../../utils/util.js') | ||
| 2 | +var systemInfo=util.getsystem(); | ||
| 3 | +Component({ | ||
| 4 | + properties:{ | ||
| 5 | + height:{ | ||
| 6 | + type:Number, | ||
| 7 | + value:systemInfo.windowHeight | ||
| 8 | + }, | ||
| 9 | + content:{ | ||
| 10 | + type:String, | ||
| 11 | + value:'暂无内容' | ||
| 12 | + }, | ||
| 13 | + }, | ||
| 14 | + data:{ | ||
| 15 | + | ||
| 16 | + }, | ||
| 17 | + methods:{ | ||
| 18 | + | ||
| 19 | + } | ||
| 20 | +}) |
components/nothing/nothing.json
0 → 100644
components/nothing/nothing.wxml
0 → 100644
-
Please register or login to post a comment