Commit 1c6c84f3e7a629abce4f9ae276bc3bf433c82eab

Authored by liuxuqing
1 parent 405fa5b7

no message

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.

111vvvvbnghnhgvvvvvnbVB是按时是多少大杀四方
//app.js
var util = require('utils/util.js')
var uri = require('utils/uri.js')
const socket = require('utils/socket.js');
var mta= require('utils/mta_analysis.js')
App({
scence:0,
onLaunch: function (opt) {
mta.App.init({
"appID":"500667278",
});
this.getSystemInfo(uri.CACHE__SYSTEM_INFO);
console.log(socket)
// socket.initSocket();
},
onShow:function(){
socket.resiverMessage();
this.scence=0;
// if(util.cache('identity')){
// this.getstaff();
// }
if (wx.canIUse('getUpdateManager')) {
const updateManager = wx.getUpdateManager();
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log('onCheckForUpdate',res)
})
updateManager.onUpdateReady(function (res) {
console.log('onUpdateReady',res)
updateManager.applyUpdate();
wx.showToast({
title:'版本已更新',
duration:2000,
mask:true,
success:function(){
}
})
})
updateManager.onUpdateFailed(function (res) {
// 新的版本下载失败
console.log('onUpdateFailed',res)
})
}
},
getstaff:function(){
var that=this;
wx.request({
url: "https://dcapi.colorcun.com/?service=App.Seller.GetAuthUserLists",
data: {sellerid:util.cache('sellerid')},
header: {
'content-type': 'application/json'
},
success: function(res) {
if(res.data.ret==200){
var list=res.data.data;
var temp={};
for(var key in list){
list[key].forEach(function(v,i){
if(v.openid && v.openid!=''){
temp[v.openid]=true
}
})
}
if(!temp[util.cache('openid')]){
that.getsellerlist();
}
}
},
complete:function (res) {
}
})
},
getsellerlist:function(){
var that=this;
wx.request({
url: "https://dcapi.colorcun.com/?service=App.Seller.GetSystemByOpenid",
data: {openid: util.cache('openid')},
header: {
'content-type': 'application/json'
},
success: function (res) {
if (that.scence == 0) {
if (res.data.ret == 200 && res.data.data[0].auth == 0) { //无商家
if (util.cache('manage')) {
wx.reLaunch({
url: '/pages/currency/c_store'
})
} else {
wx.reLaunch({
url: '/pages/login/l_login'
})
}
} else if (res.data.ret == 200 && res.data.data[0].length > 1) { //有多个商家
wx.reLaunch({
url: '/pages/currency/c_store'
})
} else if (res.data.ret == 200 && res.data.data[0].length == 1) { //有1个商家
wx.reLaunch({
url: '/pages/me/s_index?sellerid=' + res.data.data[0][0].id
})
}
}
}
})
},
onHide:function(){
},
getSystemInfo:function(cb){
var systemInfo=util.cache(uri.CACHE__SYSTEM_INFO);
if(systemInfo){
typeof cb == "function" && cb(systemInfo)
}else{
//调用设备信息接口
wx.getSystemInfo({
success:function(res){
util.cache(uri.CACHE__SYSTEM_INFO,res);
typeof cb == "function" && cb(res);
}
});
}
},
"networkTimeout":{
"request": 20000,
"connectSocket": 20000,
"uploadFile": 20000,
"downloadFile": 20000
},
})
\ No newline at end of file
... ...
{
"pages": [
"pages/custom/enter/enter",
"pages/custom/seller/menu",
"pages/custom/seller/order",
"pages/custom/seller/remark",
"pages/custom/seller/detail",
"pages/custom/address/list",
"pages/custom/address/address",
"pages/custom/me/index",
"pages/custom/me/list",
"pages/me/s_index",
"pages/me/t_index",
"pages/cookbook/cb_alllist",
"pages/cookbook/cb_list",
"pages/cookbook/cb_fadd",
"pages/cookbook/cb_sadd",
"pages/cookbook/cb_ggadd",
"pages/cookbook/cb_wayadd",
"pages/cookbook/cb_label",
"pages/cookbook/cb_desc",
"pages/cookbook/cb_unit",
"pages/cookbook/cb_addunit",
"pages/cooktype/ct_list",
"pages/cookclear/cc_list",
"pages/cookclear/ck_list",
"pages/print/p_list",
"pages/print/p_add",
"pages/print/p_badd",
"pages/manage/config",
"pages/order/o_list",
"pages/order/o_detail",
"pages/store/s_staffadd",
"pages/store/s_confirm",
"pages/store/s_complete",
"pages/store/s_detail",
"pages/store/s_password",
"pages/store/s_repass",
"pages/store/s_handover",
"pages/store/s_addmany",
"pages/store/s_book",
"pages/setting/s_grade",
"pages/setting/s_rank",
"pages/setting/s_store",
"pages/currency/c_store",
"pages/currency/c_setting",
"pages/login/l_login",
"pages/login/promise",
"pages/login/agreement",
"pages/login/l_info",
"pages/login/l_open",
"pages/snack/s_code",
"pages/snack/s_cook",
"pages/report/r_index",
"pages/report/r_cook",
"pages/report/r_detail",
"pages/report/r_time",
"pages/message/mould",
"pages/picture/picture"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#199095",
"navigationBarTitleText": "飞鸭外卖",
"navigationBarTextStyle": "white",
"navigationStyle": "custom"
},
"networkTimeout": {
"request": 20000,
"downloadFile": 20000,
"connectSocket": 20000,
"uploadFile": 20000
},
"debug": true,
"plugins": {
"WechatSI": {
"version": "0.3.4",
"provider": "wx069ba97219f66d99"
}
},
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小饕点餐商户位置展示"
}
},
"usingComponents": {
"nav": "/components/nav/nav"
},
"sitemapLocation": "sitemap.json"
}
\ No newline at end of file
... ...
/**app.wxss**/
@import "icon.wxss";
.hidden {
display: none;
}
navigater{
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent; /* For some Androids,个人感觉是低版本的安卓,4.0以下 */
}
page {
color: #000;
font-size: 16px;
font-family: 'PingFang SC','sans-serif','Helvetica Neue','Helvetica','Arial';
}
.section{ margin-left:4%; margin-right:4%; width:92%; overflow: hidden;}
.sectionW{margin-left:2%; margin-right:2%;width:96%;overflow: hidden;}
.section90{margin-left:5%; margin-right:5%;width:90%;overflow: hidden;}
.sectionZ{margin-left:7%; margin-right:7%;width:86%;overflow: hidden;}
.sectionM{margin-left:41rpx; margin-right:41rpx;width:668rpx;overflow: hidden;}
.black-font{
color: #353535;
}
.font32r{
font-size:32rpx;
}
.font36r{
font-size:36rpx;
}
.f-black{
color:#030303;
}
.f-black1{
color:#050505;
}
.f_red{
color: #E64340;
}
.red{
color:#f12c20;
}
.blue{
color: #10AEFF;
}
.yellow{
color: #FFBE00;
}
.orange{
color:rgb(255,76,0);
}
.gray{
color: #BFBFBF;
}
.white{
color: white;
}
.black-font{
color:#333333;
}
.white-font{
color:#ffffff;
}
.gray-deep-font{
color:#666666;
}
.gray-font{
color:#999999;
}
.red-pink-font{
color: #F0242E;
}
.gray-light-font{
color:#CCCCCC;
}
.bg-red-pink{
background: #F0242E;
}
.bg-white{
background: #FFFFFF;
}
.bg-gray{
background: #F9F9F9;
}
.bg-light-gray{
background: #CCCCCC;
}
.bg-line-gray{
background: #EFEFEF;
}
.bg-green{
background: #199095;
}
.click-icon{
width: 12rpx;
height: 12rpx;
border:2rpx solid transparent;
border-top:2rpx solid #999999;
border-right:2rpx solid #999999;
transform: rotate(45deg);
border-radius: 4rpx;
}
.f-white{
color: #FDFDFD;
}
.f-white1{
color: #FDFCFC;
}
.f-brown{
color:rgb(70,0,0);
}
.ft-liggray{
color:#DCDBE0;
}
.f-gray{
color:#333333;
}
.f-liggray{
color:#b2b2b2;
}
.f-midgray{
color:#4D4B4B;
}
.f-darkgray{
color:#666;
}
.f-deepgray{
color:#999;
}
.f-deepred{
color:#B3515A;
}
.f-blue{
color:#576B95;
}
.bg{
background-color: #efeef3;
}
.bg_green{
background-color: #199095;
}
.bg_red{
background-color: #e64340;
}
.bg_deepred{
background-color: #B3515A;
}
.bg_gray{
background-color: #f3f3f3;
}
.bg_white{
background-color: white;
}
.bg_eee{
background-color: #eee;
}
.font_color{
color: #008100;
}
.mtop3{
margin-top: 3px;
}
.mtop5{
margin-top: 5px;
}
.mtop8{
margin-top: 8px;
}
.mtop10{
margin-top: 10px;
}
.mtop15{
margin-top: 15px;
}
.mtop16{
margin-top: 16px;
}
.mtop20{
margin-top: 20px;
}
.mtop25{
margin-top: 25px;
}
.mtop30{
margin-top: 30px;
}
.mtop50{
margin-top: 50px;
}
.mbottom10{
margin-bottom: 10px;
}
.mbottom15{
margin-bottom: 15px;
}
.mbottom16{
margin-bottom: 16px;
}
.mbottom20{
margin-bottom: 20px;
}
.mbottom25{
margin-bottom: 25px;
}
.mbottom50{
margin-bottom: 50px;
}
.mleft{
margin-left:4%;
}
.mleft5{
margin-left: 5px;
}
.mleft8{
margin-left: 8px;
}
.mleft10{
margin-left: 10px;
}
.mleft14{
margin-left: 14px;
}
.mleft15{
margin-left: 15px;
}
.mleft20{margin-left: 20px;}
.mleft45{margin-left: 45%;}
.mright5{margin-right: 5px;}
.mright10{
margin-right: 10px;
}
.mright25{
margin-right: 14px;
}
.mright20{
margin-right: 20px;
}
.strong,.bold,.font-bold{
font-weight: bold;
}
.bold500{
font-weight: 500;
}
.fweight700{
font-weight:700;
}
.textoverflow{
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.fsize11{
font-size: 11px;
}
.fsize12{
font-size: 12px;
}
.fsize13{
font-size: 13px;
}
.fsize14{
font-size: 14px;
}
.fsize15{
font-size: 15px;
}
.fsize16{
font-size: 16px;
}
.fsize17{
font-size: 17px;
}
.fsize18{
font-size: 18px;
}
.fsize19{
font-size: 19px;
}
.fsize20{
font-size: 20px;
}
.fsize22{
font-size: 22px;
}
.fsize24{
font-size: 24px;
}
.fsize25{
font-size: 25px;
}
.fsize28{
font-size: 28px;
}
.fsize30{
font-size: 30px;
}
.fsize35{
font-size: 35px;
}
.fsize36{
font-size: 36px;
}
.fsize40{
font-size: 40px;
}
fsize50{
font-size: 50px;
}
.hr{
background: #efeef3;
height: 20rpx;
width:100%;
}
.hr-one{
background: #eee;
height: 1px;
width:auto;
}
.hr-line{
background:#f3f3f3;
height:25px;
line-height: 27px;
width:100%;
color:#999;
font-size:12px;
padding-left:5%;
}
.nowrap{white-space:nowrap;}
.avatar-min,.avatar-min image{width:40px;height:40px; border-radius: 50%;}
.avatar-mid,.avatar-mid image{width:60px;height:60px; border-radius: 50%;}
.avatar,.avatar image{width:64px;height:64px; border-radius: 50%;}
.avatar-max,.avatar-max image{width:70px;height:70px; border-radius: 50%;}
.thumb,.thumb image{width:60px;height:60px;}
.thumb-max,.thumb-max image{width:70px;height:70px;}
/*水平方向左右分布*/
.flex-lr{
display: flex;
display: -webkit-flex;
justify-content: space-between;
align-items:center;
flex-direction: row;
-webkit-flex-direction: row;
}
.flex-ll{
display: flex;
display: -webkit-flex;
justify-content: flex-start;
align-items: center;
flex-direction: row;
-webkit-flex-direction: row;
}
.flex-rr{
display: flex;
display: -webkit-flex;
justify-content: flex-end;
align-items: center;
flex-direction: row;
-webkit-flex-direction: row;
}
/*垂直方向居中分布*/
.flex-vc{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: center;
flex-direction: column;
-webkit-flex-direction: column;
}
/*垂直方向居左分布*/
.flex-vl{
display: flex;
display: -webkit-flex;
justify-content: flex-start;
align-items: left;
flex-direction: column;
-webkit-flex-direction: column;
}
.flex-vr{
display: flex;
display: -webkit-flex;
justify-content: flex-end;
align-items: center;
flex-direction: column;
-webkit-flex-direction: column;
}
/*水平方向居中分布*/
.flex-cc{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: center;
flex-direction: row;
-webkit-flex-direction: row;
}
/*基准线对齐*/
.flex-bc{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: baseline;
flex-direction: row;
-webkit-flex-direction: row;
}
/*流式布局*/
.flex-auto{
display: flex;
display: -webkit-flex;
justify-content: space-around;
align-content: flex-start;
flex-flow:wrap;
}
.fixed-bottom{
position: fixed;
bottom: 10px;
}
.h1{
font-size: 40px;
}
.div-v-center {
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
}
.div-h-center {
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-ms-transform: translateX(-50%);
-o-transform: translateX(-50%);
transform: translateX(-50%);
}
/*绿色虚线边框*/
.bd-green{
border: 1px dashed #21ab38;
border-radius: 5px;
}
/*灰色虚线边框*/
.bd-gray{
border: 1px dashed #b2b2b2;
border-radius: 5px;
}
/*灰实线边框*/
.bs-gray{
border: 1px solid #b2b2b2;
}
.border-r{border-right: 1px solid #e0e0e0;}
.yellow{
color: #FFBE00;
}
.userinfo{
width: 90%;
}
.userinfo .nickname{
max-width: 65%;
margin-left: 10px;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.itemtitle{
white-space:nowrap;
}
.t-align-c{
text-align: center;
}
.t-align-r{
text-align: right;
}
.displaysan{
word-break:break-all;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
overflow:hidden;
}
.footer{
width:96%;
height: 48px;
line-height:48px;
color:#fff;
bottom:6px;
position: fixed;
margin:0 2%;
}
.footer button{
width:96%;
margin:0 2%;
}
textarea{
z-index: 0;
}
.linethrough{
text-decoration:line-through
}
image{
background-color: #f4f4f4;
background-repeat: no-repeat;
background-size: 68px 24px;
background-position: center;
}
.opacity2{
opacity: 0.2;
}
.opacity3{
opacity: 0.3;
}
.opacity{
opacity: 0.4;
}
.opacity5{
opacity: 0.5;
}
.ptop5{
padding-top:5px;
}
.ptop10{
padding-top:10px;
}
.pbottom10{
padding-bottom:10px;
}
.ptop12{
padding-top:12px;
}
.pbottom12{
padding-bottom:12px;
}
.pbottom15{
padding-bottom:15px;
}
.ptop20{
padding-top:20px;
}
.pbottom20{
padding-bottom:20px;
}
.ptop25{
padding-top:25px;
}
.pbottom25{
padding-bottom:25px;
}
.ptop50{
padding-top:50px;
}
.pbottom50{
padding-bottom:50px;
}
.width20{
width:20%;
}
.width80{
width:80%;
}
.height12{
height:12px;
line-height:12px;
}
.avater{width:50px;height:50px;border-radius:50%;}
/*.loading:before{
display: inline-block;
margin-right: 5rpx;
vertical-align: middle;
content: '';
width: 40rpx;
height: 40rpx;
background: url(../image/loading.png) no-repeat;
background-size: contain;
animation: rotate 1s linear infinite;
} */
.loading.complete:before{
display: none;
}
.height50{height:50px;line-height:50px;}
.width70{width:70%;}
.width30{width:30%;}
.b-radius3{border-radius:3px;}
.b-radius5{border-radius:5px;}
.b-radius{border-radius:6px;}
.b-radius50{border-radius:50%;}
.addin{width:68px;height:20px;line-height:20px;margin:0 5px;border:1px solid #B3515A;border-radius:3px;}
.bottom button{width:130px;position:absolute;right:20px;top:-58px;height:43px;line-height:43px;}
button[disabled][type="primary"] ,.button-hover[type="primary"],button[loading][type="primary"]{background-color:#B3515A;}
.steptpl .circle{color:#fff;width:16px; height:16px;line-height:16px;border-radius:50%; background-color:#C2C2C2;text-align:center;}
.steptpl .line{width:25.5%; height:1px;background-color:#e0e0e0;}
.steptpl .active{background-color:#B3515A;color:#fff;}
.steptpl .black{color:#020202;}
.steptpl .gray{color:#020202;}
.steptpl .ligray{color:#999;}
.steptpl .item{margin-left:11.5%;width:79%;}
.modal{height:36px;line-height:36px;}
.modaltip{width:92%;padding:0 4%;}
.btnStyle{height:35px;line-height:35px;color:#fff;padding:0 10px;border-radius:4px;background-color:#B3515A;}
/*点餐商户端新增*/
.eattitle{text-align:center;height:30px;margin-top:20px;font-size:20px}
.eatsubhead{text-align:center;font-size:14px}
.common{background-color:#FAFAFA;padding:2% 3%}
.height50{height:50px;line-height:50px;border-bottom:1px #dadada solid }
.height51{height:50px;line-height:50px}
/*菜品及分类的列表页*/
.line{width:96%;margin-left:2%;margin-bottom:2%;border-bottom:1px #dadada solid;}
.addcook{color:#9AC0CD;width:30%;justify-content:center;display:flex;height:45px;align-items:center;}
.name{background:#F7F7F7;border-radius:4px;font-size:14px;height:75%;}
.action{font-size:28px}
.moremodal{margin:10px 0;}
.type_table {border:0px solid darkgray;display:flex;justify-content:center;}
.type_tr {display:flex;width:94%;justify-content:center;height:120rpx;align-items:center;border-bottom:1px solid #efeef3;}
.type_td {width:33.333%;height:120rpx;line-height:120rpx;}
.type_th {width:33.333%;height:120rpx;justify-content:center;display:flex;align-items:center;line-height:120rpx;}
.dname{margin:15rpx 40rpx;color:#353535;font-size:30rpx;font-weight:bold;}
.type_name{
display:flex;
align-items:center;
line-height:1.2
}
.block1{width:28%;margin:10px 2%;text-align:center;background-color:#ffff;display:inline-block;border:1px #eeeeee solid;border-radius:10px;height:100px}
.block2{width:28%;margin:10px 2%;text-align:center;background-color:#ffff;display:inline-block;border:1px #000000 solid;border-radius:10px;height:100px}
.block3{width:42%;margin:15px 3%;text-align:center;background-color:#ffff;display:inline-block;border:1px #eeeeee solid;border-radius:10px;height:150px}
.desk-reminder{
width:100%;
height:100rpx;
padding-left:3%;
box-sizing:border-box;
background:#ebf8f8;
color:#666;
font-size:30rpx;
line-height:100rpx;
margin-bottom:45rpx;
}
.imageblock1{width: 100%; height: 50px; background-color: #eeeeee; border-radius:10px 10px 0 0;}
.imageblock2{width: 100%; height: 80px; background-color: #eeeeee; border-radius:10px 10px 0 0;}
/*swtich样式-start*/
/*swtich整体大小*/
/*.wx-switch-input{
width:104rpx !important;
height:64rpx !important;
border-radius:32rpx!important;
}*/
/*白色样式(false的样式)*/
/*.wx-switch-input::before{
width:102rpx !important;
height: 60rpx !important;
border-radius:30rpx!important;
}*/
/*绿色样式(true的样式)*/
/*.wx-switch-input::after{
width: 60rpx !important;
height: 60rpx !important;
border-radius:30rpx!important;
}*/
/*swtich样式end*/
.font34r{
font-size:34rpx;
}
.font28r{
font-size:28rpx;
}
.font30r{
font-size:30rpx;
}
.font32r{
font-size:32rpx;
}
.font26r{
font-size:26rpx;
}
.font24r{
font-size:24rpx;
}
.font38r{
font-size:38rpx;
}
.font40r{
font-size:40rpx;
}
.font44r{
font-size:44rpx;
}
.font50r{
font-size:50rpx;
}
.font52r{
font-size:52rpx;
}
.font20r{
font-size:20rpx;
}
.white-font{
color:#fff;
}
.green-font{
color:#199095;
}
.red-font{
color:#E14553;
}
.flex-rc{
display:flex;
display: -webkit-flex;
justify-content:center;
align-items:center;
}
.flex-rs{
display:flex;
display: -webkit-flex;
justify-content:flex-start;
align-items:center;
flex-direction: row;
flex-wrap:wrap;
}
.flex-cmc{
display:flex;
display: -webkit-flex;
justify-content:center;
align-items:center;
flex-direction: column;
}
.flex-re{
display:flex;
display: -webkit-flex;
justify-content:flex-end;
}
.flex-lt{
display: flex;
display: -webkit-flex;
justify-content: flex-start;
align-items: flex-start;
flex-direction: row;
-webkit-flex-direction: row;
}
.flex-vtb{
display: flex;
display: -webkit-flex;
justify-content: space-between;
align-items: left;
flex-direction: column;
-webkit-flex-direction: column;
}
/* 弹出框 */
.modal-dialog{
position:fixed;
left:0;
right:0;
top:50%;
margin:0 auto;
margin-top:-180rpx;
z-index:1000;
width:550rpx;
min-height:300rpx;
background:#fff;
}
.modal-mask{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
background:rgba(0,0,0,.7);
z-index:999;
}
.modal-dialog-title{
width:100%;
padding:35rpx 0;
}
.modal-dialog-input{
display:block;
width:90%;
height:75rpx;
margin:25rpx auto;
text-align:center;
}
.modal-dialog-button{
width:100%;
height:105rpx;
border-top:1px solid #e0e0e0;
box-sizing:border-box;
}
.modal-button{
width:50%;
height:100%;
}
.modal-cancel{
border-right:1px solid #e0e0e0;
box-sizing:border-box;
}
.modal-confirm{
color:#008489;
}
.modal-dialog-all{
width:570rpx;
min-height:460rpx;
margin-top:-250rpx;
border-radius:10rpx;
overflow:hidden;
}
.modal-dialog-info{
min-height:205rpx;
height:auto;
}
.modal-dialog-single{
width:490rpx;
margin:0 auto;
padding-bottom:40rpx;
}
.modal-dialog-kind{
width:110rpx;
height:48rpx;
border:1px solid #dadada;
}
.modal-dialog-allInput{
width:300rpx;
height:48rpx;
border-bottom:1px solid #dadada;
text-align:center;
}
.modal-dialog-reminder{
min-height:240rpx;
margin-top:-150rpx;
}
.modal-reminder-title{
width:100%;
padding:15rpx 40rpx 60rpx 40rpx;
box-sizing:border-box;
text-align:center;
color:#353535;
font-size:36rpx;
}
.icon16-28{
width:16rpx;
height:28rpx;
background:transparent;
margin-left:18rpx;
}
.default-setting{
color:#999;
font-size:38rpx;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.cut{
width:100%;
height:20rpx;
}
.smooth{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
button::after{
border:0;
}
.font-bold{
font-weight:bold;
}
.font-more{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.font-more-two{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
image{
background:transparent;
}
.gray-font{
color:#999;
}
.gray-deep-font{
color:#666;
}
.icon12-22{
width:12rpx;
height:22rpx;
background:transparent;
}
.bg_gray{
background:#efeef3;
}
.font-siny{
font-weight:300;
}
image{
background-color:transparent;
}
.modal-alert{
width:550rpx;
height:auto;
min-height:252rpx;
position:fixed;
left:0;
top:50%;
right:0;
margin:0 auto;
margin-top:-125rpx;
background:#fff;
border-radius:10rpx;
z-index:999;
}
.modal-menu{
width:300rpx;
height:125rpx;
border-bottom:1px solid #efeef3;
margin:0 auto;
}
.modal-close{
width:67rpx;
height:67rpx;
position:absolute;
left:0;
right:0;
bottom:-160rpx;
margin:0 auto;
border:1px solid #fff;
border-radius:50%;
}
.close-image{
width:36rpx;
height:36rpx;
background:transparent;
}
.fixed{
position:fixed;
}
.left{
left:0;
}
.right{
right:0;
}
.top{
top:0;
}
.bottom{
bottom:0;
}
... ...
const temp={
yseIKonw:function(){
page.setData({
flag:true
})
}
}
export default temp
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class="alert-mark" hidden="{{openMask}}" bindTap='closeDialog'></view>
<view class="alert-content" animation="{{animation}}">
<view class="alert-title">{{innerText}}</view>
<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>
<view class="alert-button">
<view class="alert-cancel alert-button-com" bindtap='closeDialog'>取 消</view>
<view class="alert-config alert-button-com" bindtap='closeDialog' data-type="confirm">确 定</view>
</view>
</view>
... ...
.alert-mark{
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
}
.alert-content{
position: fixed;
z-index: 5000;
width: 545rpx;
top: 50%;
left: 50%;
margin-left: -272rpx;
transform:translateY(-350%);
background-color: #FFFFFF;
text-align: center;
overflow: hidden;
}
.alert-title{
font-size: 34rpx;
padding-top: 40rpx;
color:#353535;
}
.alert-input{
width: 465rpx;
height: 70rpx;
padding:0 15rpx;
border: 1rpx solid #f2f2f2;
box-sizing: border-box;
margin:55rpx auto;
color:#353535;
font-size: 14px;
text-align: left;
}
.alert-button{
width: 100%;
height: 90rpx;
border-top: 1rpx solid #eee;
box-sizing: border-box;
}
.alert-button-com{
float: left;
width: 50%;
height: 100%;
font-size: 32rpx;
text-align: center;
line-height: 89rpx;
}
.alert-cancel{
border-right: 1rpx solid #eee;
box-sizing: border-box;
}
.alert-config{
color:#e14553;
}
... ...
Component({
data:{
alertHidden:true
},
methods:{
show:function(info,info2='',confirmtext='确定'){
this.setData({
alertHidden:false,
info:info,
info2:info2,
confirmtext:confirmtext
})
},
close:function(){
this.setData({
alertHidden:true
})
}
}
})
\ No newline at end of file
... ...
{
"component": true
}
\ No newline at end of file
... ...
<view class="alert-open-mask" hidden="{{alertHidden}}"></view>
<view class="alert-open bg_white" hidden="{{alertHidden}}">
<view class="gray-deep-font font30r alter-open-info flex-vc">
<view>{{info}}</view>
<view>{{info2}}</view>
</view>
<view class="green-font font36r flex-cc alert-button" bindtap="close">{{confirmtext}}</view>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.alert-open-mask{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
background:rgba(0,0,0,.7);
z-index:10;
}
.alert-open{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
width:560rpx;
height:290rpx;
border-radius:15rpx;
overflow:hidden;
z-index:11;
}
.alter-open-info{
width:500rpx;
padding-top:20rpx;
height:170rpx;
margin:0 auto;
}
.alert-button{
position:absolute;
left:0;
bottom:0;
width:100%;
height:100rpx;
border-top:1px solid #efeef3;
box-sizing:border-box;
}
\ No newline at end of file
... ...
Component({
properties:{
typelist:Array,
topHeight:{
type:Number,
value:0
}
},
data:{
},
methods:{
selectclass:function(e){
var id=e.currentTarget.dataset.id;
var typelist=this.data.typelist;
typelist.forEach(function(v,i){
v.isactive=false
if(id==v.id){
v.isactive=true;
}
})
this.setData({
typelist:typelist,
classid:id
})
this.triggerEvent('getcooklist',id)
},
}
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<view class="cook-class flex-rs green-bg" style="top:{{topHeight==0 ? '0px' : topHeight+'px'}}">
<block wx:for="{{typelist}}">
<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>
</block>
</view>
\ No newline at end of file
... ...
@import '../common.wxss'
.cook-class{
width:100%;
padding:0 45rpx;
padding-top:30rpx;
box-sizing:border-box;
background:#199095;
position:fixed;
top:0;
left:0;
z-index:10;
}
.cook-single-class{
width:180rpx;
height:60rpx;
border:1px solid #fff;
border-radius:30rpx;
margin:0 20rpx;
margin-bottom:30rpx;
box-sizing:border-box;
text-align:center;
line-height:58rpx;
}
\ No newline at end of file
... ...
/*水平方向左右分布*/
.flex-lr{
display: flex;
display: -webkit-flex;
justify-content: space-between;
align-items:center;
flex-direction: row;
-webkit-flex-direction: row;
}
.flex-ll{
display: flex;
display: -webkit-flex;
justify-content: flex-start;
align-items: center;
flex-direction: row;
-webkit-flex-direction: row;
}
.flex-rr{
display: flex;
display: -webkit-flex;
justify-content: flex-end;
align-items: center;
flex-direction: row;
-webkit-flex-direction: row;
}
/*垂直方向居中分布*/
.flex-vc{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: center;
flex-direction: column;
-webkit-flex-direction: column;
}
/*垂直方向居左分布*/
.flex-vl{
display: flex;
display: -webkit-flex;
justify-content: flex-start;
align-items: left;
flex-direction: column;
-webkit-flex-direction: column;
}
.flex-vr{
display: flex;
display: -webkit-flex;
justify-content: flex-end;
align-items: center;
flex-direction: column;
-webkit-flex-direction: column;
}
/*水平方向居中分布*/
.flex-cc{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: center;
flex-direction: row;
-webkit-flex-direction: row;
}
/*基准线对齐*/
.flex-bc{
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: baseline;
flex-direction: row;
-webkit-flex-direction: row;
}
/*流式布局*/
.flex-auto{
display: flex;
display: -webkit-flex;
justify-content: space-around;
align-content: flex-start;
flex-flow:wrap;
}
.font34r{
font-size:34rpx;
}
.font36r{
font-size:36rpx;
}
.font28r{
font-size:28rpx;
}
.font30r{
font-size:30rpx;
}
.font32r{
font-size:32rpx;
}
.font26r{
font-size:26rpx;
}
.font24r{
font-size:24rpx;
}
.font38r{
font-size:38rpx;
}
.font40r{
font-size:40rpx;
}
.font44r{
font-size:44rpx;
}
.font20r{
font-size:20rpx;
}
.black-font{
color:#353535;
}
.white-font{
color:#fff;
}
.green-font{
color:#199095;
}
.flex-rc{
display:flex;
display: -webkit-flex;
justify-content:center;
align-items:center;
}
.flex-rs{
display:flex;
display: -webkit-flex;
justify-content:flex-start;
align-items:center;
flex-direction: row;
flex-wrap:wrap;
}
.flex-cmc{
display:flex;
display: -webkit-flex;
justify-content:center;
align-items:center;
flex-direction: column;
}
.flex-re{
display:flex;
display: -webkit-flex;
justify-content:flex-end;
}
.default-setting{
color:#999;
font-size:38rpx;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.cut{
width:100%;
height:20rpx;
}
.smooth{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
button::after{
border:0;
}
.font-bold{
font-weight:bold;
}
.font-more{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.font-more-two{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
image{
background:transparent;
}
.gray-font{
color:#999;
}
.gray-deep-font{
color:#666;
}
.icon12-22{
width:12rpx;
height:22rpx;
background:transparent;
}
.bg_white{
background:#fff;
}
.bg_green{
background:#199095;
}
.bg_gray{
background:#efeef3;
}
.font-siny{
font-weight:300;
}
.cut{
width:100%;
height:20rpx;
}
.border-right{
border-right:1px solid #efeef3;
}
\ No newline at end of file
... ...
Component({
properties:{
},
data:{
alertHidden:true
},
methods:{
show:function(info){
this.setData({
alertHidden:false,
info:info
})
},
close:function(){
this.setData({
alertHidden:true
})
},
confirmsucc:function(){
this.close();
this.triggerEvent('changeclass')
}
}
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<view class="modal-mask" hidden="{{alertHidden}}"></view>
<view class="modal-alert bg_white" hidden="{{alertHidden}}">
<view class="gray-deep-font font30r alter-open-info flex-vc">{{info}}</view>
<view class="alert-button flex-lr">
<view class="alert-single-button gray-font font36r border-right flex-cc" bindtap="close">取消</view>
<view class="alert-single-button green-font font36r flex-cc" bindtap="confirmsucc">确定</view>
</view>
</view>
\ No newline at end of file
... ...
@import '../common.wxss'
.modal-mask{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
background:rgba(0,0,0,.7);
z-index:999;
}
.modal-alert{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
width:560rpx;
height:290rpx;
border-radius:15rpx;
overflow:hidden;
z-index:1000;
}
.alter-open-info{
width:500rpx;
padding-top:20rpx;
height:170rpx;
margin:0 auto;
text-align:center;
}
.alert-button{
position:absolute;
left:0;
bottom:0;
width:100%;
height:100rpx;
border-top:1px solid #efeef3;
box-sizing:border-box;
}
.alert-single-button{
width:50%;
height:100%;
box-sizing:border-box;
}
.border-right{
border-right:1px solid #efeef3;
}
\ No newline at end of file
... ...
var util = require('../../utils/util.js')
Component({
properties:{
item:Object,
pagetype:String
},
data:{
count:0
},
methods:{
selectcook:function (e) {
var id=e.currentTarget.dataset.id;
var count=util.cache('count',count) ? util.cache('count',count) : 0;
if(this.data.item.isactive==false){
count=count+1;
}else{
count=count-1;
}
if(count>10 && this.data.pagetype=='calist'){
}else{
this.data.item.isactive=!this.data.item.isactive;
}
if(this.data.pagetype=='calist'){
util.cache('count',count)
}
this.triggerEvent('selectcook',{id:id,isactive:this.data.item.isactive});
this.setData({
item:this.data.item,
count:count
})
}
}
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<view class="food-single {{item.bg_color}} flex-vc" data-id="{{item.id}}" bindtap="selectcook">
<view class="font40r font-bold cook-list-name black-font smooth flex-ll" style="width:100%;">{{item.name}}</view>
<view class="font30r black-font flex-lr" style="margin-top:30rpx;width:100%;">
<view>{{item.price}}元/{{item.unit}}</view>
<block wx:if="{{pagetype=='cclist'}}">
<block wx:if="{{item.clear_num && item.clear_num==0}}">
<image src="/pages/image/clear.png" style="width:82rpx;height:52rpx;background:transparent;margin-right:10rpx;position:relative;top:-6rpx;"></image>
</block>
</block>
</view>
<block wx:if="{{pagetype!='cclist'}}">
<view class="black-circle {{item.isactive==false ? '' : 'bg_green'}} flex-cc">
<image src="/pages/image/{{item.isactive==false ? 'select-right.svg' : 'select-right-active.svg'}}" style="width:26rpx;height:26rpx;"></image>
<!--<icon type="success_no_circle" class="icon-success-block" color="{{item.isactive==false ? '#199095' : '#fff'}}" size="26rpx"></icon>-->
</view>
</block>
<block wx:else>
<block wx:if="{{item.clear_num && item.clear_num>0}}">
<view class="food-clear flex-ll" style="top:0;">
<view class="food-clear-angel">
<view class="angel angel-top"></view>
<view class="angel angel-bottom"></view>
</view>
<view class="food-clear-num white-font smooth font20r flex-cc">剩余:{{item.clear_num}}</view>
</view>
</block>
</block>
</view>
\ No newline at end of file
... ...
@import '../common.wxss'
.food-single{
width:330rpx;
height:220rpx;
margin-bottom:30rpx;
margin-left:30rpx;
position:relative;
padding-top:10rpx;
padding-left:30rpx;
padding-right:10rpx;
box-sizing:border-box;
}
.cook-list-name{
height:44rpx;
}
.bg-blue{
background:#eef2fb;
}
.bg-pink{
background:#feeff0;
}
.black-circle{
width:36rpx;
height:36rpx;
border:1px solid #199095;
border-radius:50%;
position:absolute;
right:10rpx;
top:10rpx;
}
.icon-success-block{
position:absolute;
left:4rpx;
top:6rpx;
}
.white_mask{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
background:rgba(255,255,255,.8);
z-index:9;
}
.food-clear{
position:absolute;
right:0;
height:40rpx;
overflow:hidden;
}
.food-clear-angel{
height:40rpx;
position:relative;
left:2rpx;
}
.angel{
width: 0px;
height: 0px;
border-width: 0 0 20rpx 20rpx;
border-style: solid;
}
.angel-top{
border-color:transparent rgba(216,30,6,.9);
transform:rotate(90deg)
}
.angel-bottom{
border-color: rgba(216,30,6,.9) transparent;
}
.food-clear-num{
padding:0 6rpx;
background:rgba(216,30,6,.9);
height:100%;
}
\ No newline at end of file
... ...
Component({
properties:{
deskarea:Array
},
data:{
showmore:false
},
methods:{
showmoredesk:function(){
this.setData({
showmore:true
})
},
closemoredesk:function(){
this.setData({
showmore:false
})
},
selectarea:function(e){
var name=e.currentTarget.dataset.name;
this.triggerEvent('changedesk',name);
var deskarea=this.data.deskarea;
deskarea.forEach(function(v,i){
v.isactive=false;
if(v.name==name){
v.isactive=true;
}
})
this.setData({
deskarea:deskarea
})
},
}
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<view class="desk-area bg_green">
<block wx:for="{{deskarea}}">
<block wx:if="{{index<5}}">
<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>
</block>
<block wx:else>
<block wx:if="{{deskarea.length<=6}}">
<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>
</block>
<block wx:else>
<block wx:if="{{index>=5 && showmore==true}}">
<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>
</block>
</block>
</block>
</block>
<block wx:if="{{deskarea.length>6}}">
<view class="white-font font30r smooth desk-area-single" bindtap="{{showmore==true ? 'closemoredesk' : 'showmoredesk'}}">
<block wx:if="{{showmore==false}}">更多</block>
<block wx:else>收起</block>
</view>
</block>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.desk-area{
width:100%;
padding:0 45rpx;
padding-bottom:30rpx;
box-sizing:border-box;
}
.desk-area-single{
width:180rpx;
height:60rpx;
border:1px solid #fff;
box-sizing:border-box;
border-radius:30rpx;
margin:0 20rpx;
margin-top:40rpx;
float:left;
text-align:center;
line-height:58rpx;
}
.desk-area:after{
width:0;
height:0;
content:'';
display:block;
clear:both;
}
\ No newline at end of file
... ...
Component({
properties:{
item:Object,
typepage:{
type:String,
value:''
}
},
data:{
},
methods:{
selectdesk:function(e){
var tableid=e.currentTarget.dataset.id;
var status=e.currentTarget.dataset.status;
if(this.data.typepage!=''){
this.data.item.isselect=!this.data.item.isselect
}
this.setData({
item:this.data.item
})
this.triggerEvent('selectdesk',{tableid:tableid,status:status})
}
}
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<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':''}}"
data-id="{{item.id}}" data-status="{{item.status}}"
bindtap="{{item.status=='disabled'?'':'selectdesk'}}">
<block wx:if="{{item.tid && (item.tid!=1 && item.tid!=0)}}">
<view class="white-font font24r smooth desk-type flex-cc">
<block wx:if="{{item.tid==2}}">包间</block>
<block wx:if="{{item.tid==3}}">卡座</block>
</view>
</block>
<block wx:if="{{item.status=='disabled'}}">
<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>
<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>
<block wx:if="{{item.enable==0}}">
<view class="flex-cc font-more white-font font34r desk-enable">未启用</view>
</block>
</block>
<block wx:elif="{{(item.status=='' || item.status==0 || item.status==1)}}">
<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>
<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>
<block wx:if="{{typepage=='cdesk'}}">
<view class="black-circle white-font font24r smooth flex-cc" style="border:1px solid #199095;background:{{item.isselect==false ? 'transparent' : '#199095'}};">
<image src="/pages/image/{{item.isselect==false ? 'select-right.svg' : 'select-right-active.svg'}}" style="width:26rpx;height:26rpx;"></image>
</view>
</block>
<block wx:if="{{item.enable==0}}">
<view class="flex-cc font-more white-font font34r desk-enable">未启用</view>
</block>
</block>
<block wx:else>
<view class="table-info flex-vc">
<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>
<view class="flex-lr desk-other-info">
<view class="font34r smooth black-font">
<block wx:if="{{item.spell==1}}">{{item.orderCout}}单</block>
<block wx:else>{{item.pnum}}人</block>
</view>
<block wx:if="{{item.spell!=1}}">
<view class="flex-ll">
<image src="/pages/image/clock.png" class="clock-time"></image>
<view class="gray-font font28r">{{item.dur}}</view>
</view>
</block>
</view>
</view>
<view class="desk-order-status white-font font34r smooth flex-cc">
<block wx:if="{{item.spell==1}}">拼桌中</block>
<block wx:else>{{item.status}}</block>
</view>
</block>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.desk-block{
width:200rpx;
height:200rpx;
margin:0 20rpx;
margin-bottom:40rpx;
border-radius:12rpx;
text-align:center;
box-sizing:border-box;
position:relative;
overflow:hidden;
}
.desk-type{
position:absolute;
left:0;
top:0;
width:72rpx;
height:32rpx;
border-top-right-radius:16rpx;
border-bottom-right-radius:16rpx;
background:#8FC1D0;
}
.green-light-bg{
background:#EBF8F8;
}
.green-deep-bg{
background:#A9E3E6;
}
.border-green{
border:1px solid #199095;
}
.border-light-green{
border:1px solid #8FC1D0;
}
.desk-pnum{
height:38rpx;
margin-top:10rpx;
}
.desk-enable{
position:absolute;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
width:136rpx;
height:136rpx;
border-radius:50%;
background:rgba(0,0,0,.45);
z-index:1;
}
.table-info{
width:100%;
height:150rpx;
}
.desk-other-info{
width:100%;
height:38rpx;
padding:0 16rpx;
box-sizing:border-box;
margin-top:10rpx;
}
.clock-time{
width:28rpx;
height:28rpx;
margin-right:4rpx;
}
.desk-order-status{
width:100%;
height:50rpx;
background:#777;
}
.black-circle{
width:36rpx;
height:36rpx;
border:1px solid #fff;
border-radius:50%;
position:absolute;
right:10rpx;
top:10rpx;
}
.desk-block.disabled{
background-color: #E0E0E0;
border:1px solid #E0E0E0;
}
.desk-block.disabled .black-font{
color:#999999;
}
\ No newline at end of file
... ...
Component({
properties:{
info:String,
result:String
},
data:{
deskHidden:true
},
methods:{
show:function(info,result){
this.setData({
deskHidden:false,
info:info,
result:result
})
},
close:function(){
this.setData({
deskHidden:true
})
}
}
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<view class="desk-toast white-font font28r smooth flex-vc" hidden="{{deskHidden}}">
<view>{{info}}</view>
<view>{{result}}</view>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.desk-toast{
width:240rpx;
height:240rpx;
background:rgba(0,0,0,.7);
border-radius:20rpx;
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
z-index:99;
}
\ No newline at end of file
... ...
Component({
properties:{
item:Object
},
data:{
},
methods:{
showlist:function(){
var isshowlist=this.data.item.isshowlist;
this.data.item.isshowlist=!isshowlist;
this.setData({
item:this.data.item
})
},
gotodetail:function(e){
wx.navigateTo({
url:e.currentTarget.dataset.path
})
}
}
})
\ No newline at end of file
... ...
{
"component": true
}
\ No newline at end of file
... ...
<view class="manage-single bg_white">
<view class="flex-lr manage-single-title" bindtap="{{item.can==true ? 'showlist' : ''}}">
<view class="{{item.can==true ? 'black-font' : 'gray-font'}} font30r">{{item.title}}</view>
<block wx:if="{{item.isshowlist==false}}">
<image src="/pages/image/{{item.can==true ? 'click.png' : 'clisk-light.png'}}" class="icon12-22"></image>
</block>
<block wx:else>
<view class="gray-deep-font font-siny font24r">收起</view>
</block>
</view>
<block wx:if="{{item.list}}">
<view class="flex-rs manage-single-list" hidden="{{!item.isshowlist}}">
<block wx:for="{{item.list}}" wx:for-item="list">
<view class="flex-vc manage-single-one {{list.id%3==0 ? '' : 'border-right'}}" data-path="{{list.path}}" bindtap="gotodetail">
<image src="{{list.imgurl}}" class="single-list-icon"></image>
<view class="{{list.can==true ? 'black-font' : 'gray-font'}} font28r">{{list.title}}</view>
</view>
</block>
</view>
</block>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.manage-single{
width:100%;
height:auto;
}
.manage-single-title{
width:100%;
height:115rpx;
padding:0 40rpx;
box-sizing:border-box;
}
.manage-single-list{
border-top:1px solid #efeef3;
}
.manage-single-one{
width:33.333%;
height:190rpx;
border-bottom:1px solid #efeef3;
box-sizing:border-box;
}
.single-list-icon{
width:40rpx;
height:40rpx;
margin-bottom:30rpx;
}
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
item:Object
},
attached(){
console.log(this.data.item);
},
methods:{
addfood(){
this.setData({
'item.count':this.data.item.count+1
})
},
tellfood(e){
console.log(e,'yyyyyyykkkk')
if(e.detail.action=='add'){
this.addfood();
}else{
this.reducefood();
}
console.log('hahaha')
this.triggerEvent('refresh');
},
reducefood(){
this.setData({
'item.count':this.data.item.count-1
})
},
show(){
this.triggerEvent('showspec',{id:this.data.item.id});
},
showrmodal(){
console.log('rrrrrrrr')
this.triggerEvent('showrmodal',{id:this.data.item.id});
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"reduce":"./reduce",
"add":"./add"
}
}
\ No newline at end of file
... ...
<view class="flex-rr">
<block wx:if="{{item.count>0}}">
<reduce parmdata="{{item}}" action="{{item.practice && item.practice.length>0 || (item.spec && item.spec.length>0) ? 'showrmodal' : 'reduce'}}" bindactfood="tellfood" bindshowrmodal="showrmodal">
<view class="act-button">
<image src="http://nosqn.colorcun.com/icon-reduce.jpg" mode="aspectFill"></image>
</view>
</reduce>
</block>
<view class="black-font font30r num-input" hidden="{{item.count>0 ? false : true}}">{{item.count}}</view>
<add parmdata="{{item}}" action="{{item.practice && item.practice.length>0 || (item.spec && item.spec.length>0) ? 'showspec' : 'add'}}" bindactfood="tellfood" bindshowspec="show">
<view class="act-button">
<image src="http://nosqn.colorcun.com/icon-add.jpg" mode="aspectFill"></image>
</view>
</add>
</view>
... ...
@import '../../app.wxss'
.act-button{
padding:0 10rpx;
}
.act-button image{
width: 40rpx;
height: 40rpx;
}
.num-input{
width: 50rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
}
\ No newline at end of file
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
parmdata:Object,
action:{
type:String,
value:'add'
}
},
attached(){
},
methods:{
addcart(){
console.log('yyyyyy',this.data.parmdata)
let parmdata={
sellerid:this.data.parmdata.sellerid,
openid:util.cache('openid'),
cookbookid:this.data.parmdata.cookbookid ? this.data.parmdata.cookbookid : this.data.parmdata.id
}
if(this.data.parmdata.specid){
parmdata.specid=this.data.parmdata.specid
}
if(this.data.parmdata.practiceid){
parmdata.practiceid=this.data.parmdata.practiceid
}
console.log('yyyyyy',this.data.parmdata)
if(this.data.action=='add'){
App.Orders.AddCart(parmdata).then((json)=>{
console.log(json);
if(json.ret==200){
this.triggerEvent('actfood',{action:'add'})
}
})
}else{
this.triggerEvent('showspec')
}
}
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<view bindtap="addcart">
<slot></slot>
</view>
\ No newline at end of file
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
seller:Object
},
data:{
boxhidden:true,
},
attached(){
console.log(this.data.seller)
},
methods:{
getcartlist(){
App.Orders.GetCartByOpenid({sellerid:this.data.seller.id,openid:util.cache('openid')}).then((json)=>{
console.log(json,'yyyyyyy')
if(json.ret==200){
json.data.forEach((v,i)=>{
v.price=Number(v.price);
v.member_price=Number(v.member_price);
v.count=Number(v.count);
})
this.setData({
cartlist:json.data
})
}
})
},
showbox(){
this.setData({
boxhidden:false
})
this.getcartlist();
},
hidebox(){
this.setData({
boxhidden:true
})
},
tellfood(e){
this.triggerEvent('tellfood',e.detail);
if(e.detail.count==0){
this.getcartlist();
}
},
clearfood(){
App.Orders.ClearCar({sellerid:this.data.seller.id,openid:util.cache('openid')}).then((json)=>{
if(json.ret==200){
wx.showToast({
title:'购物车已清空',
icon:'none',
duration:1500,
mask:true
})
this.getcartlist();
this.hidebox();
this.triggerEvent('refresh')
}
})
}
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"add":"./add",
"reduce":"./reduce",
"cart":"./cart"
}
}
\ No newline at end of file
... ...
<view class="modal-mask" hidden="{{boxhidden}}" style="z-index: 1000;" bindtap="hidebox"></view>
<view class="box bg-white" hidden="{{boxhidden}}">
<view class="box-head flex-rr" bindtap="clearfood">
<image src="http://nosqn.colorcun.com/delete.jpg"></image>
<view class="gray-deep-font font28r">清空购物车</view>
</view>
<view class="box-conetnt">
<block wx:for="{{cartlist}}">
<cart item="{{item}}" bindtellfood="tellfood"></cart>
</block>
</view>
</view>
\ No newline at end of file
... ...
@import '../../app.wxss'
@import './com.wxss'
.box{
width: 100%;
min-height: 200rpx;
max-height: 920rpx;
padding-bottom: 120rpx;
box-sizing: border-box;
border-radius: 20rpx 20rpx 0 0;
overflow: hidden;
position: fixed;
left: 0;
bottom: 0;
z-index: 1001;
}
.box-head{
width: 100%;
height: 100rpx;
padding: 0 40rpx;
border-bottom: 2rpx solid #EFEFEF;
box-sizing: border-box;
}
.box-head image{
width: 34rpx;
height: 36rpx;
margin-right: 20rpx;
}
.box-conetnt{
width: 100%;
max-height: 700rpx;
padding: 0 40rpx;
box-sizing: border-box;
overflow-y: scroll;
}
.food-single{
width: 100%;
padding: 40rpx 0;
border-bottom: 2rpx solid #EFEFEF;
}
\ No newline at end of file
... ...
Component({
properties:{
item:Object
},
methods:{
addfood(){
this.setData({
'item.count':this.data.item.count+1
})
},
tellfood(e){
console.log('rrrrr')
if(e.detail.action=='add'){
this.addfood();
}else{
this.reducefood();
}
this.triggerEvent('tellfood',{id:this.data.item.cookbookid,count:this.data.item.count,action:e.detail.action,classid:this.data.item.classid})
},
reducefood(){
this.setData({
'item.count':this.data.item.count-1
})
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"add":"./add",
"reduce":"./reduce"
}
}
\ No newline at end of file
... ...
<view class="food-single flex-lr">
<view>
<view class="black-font font32r font-more" style="width: 280rpx;line-height: 44rpx;">{{item.cookname}}</view>
<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>
</view>
<view class="flex-rr">
<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>
<view class="flex-rr">
<reduce parmdata="{{item}}" action="reduce" bindactfood="tellfood">
<view class="act-button">
<image src="http://nosqn.colorcun.com/icon-reduce.jpg" mode="aspectFill"></image>
</view>
</reduce>
<view class="black-font font30r num-input" hidden="{{item.count>0 ? false : true}}">{{item.count}}</view>
<add parmdata="{{item}}" action="add" bindactfood="tellfood">
<view class="act-button">
<image src="http://nosqn.colorcun.com/icon-add.jpg" mode="aspectFill"></image>
</view>
</add>
</view>
</view>
</view>
\ No newline at end of file
... ...
@import '../../app.wxss'
@import './act.wxss'
.food-single{
width: 100%;
padding: 40rpx 0;
border-bottom: 2rpx solid #EFEFEF;
}
\ No newline at end of file
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
seller:Object,
classidx:{
type:Number,
value:0
}
},
data:{
},
attached(){
this.getclasslist();
let systeminfo=util.cache('system.info');
let ratio=750/systeminfo.windowWidth;
let headerHeight=util.cache('headerHeight')
let contentheight=systeminfo.windowHeight-headerHeight-(418/ratio);
this.setData({
contentheight:Math.floor(contentheight)
})
},
methods:{
getclasslist(){
App.Cookbook.GetCookbookClassBySellerId({SellerId:this.data.seller.id,type:2}).then((json)=>{
console.log(json)
this.setData({
classlist:json.data[0]
})
})
},
selectclass(e){
let classidx=e.currentTarget.dataset.index;
if(classidx!=this.data.classidx){
this.triggerEvent('tellclass',{classidx:classidx})
}
}
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<scroll-view class="class-list bg-gray" style="height:{{contentheight}}px;" scroll-y scroll-into-view="view_{{classlist[classidx].id}}">
<block wx:for="{{classlist}}">
<view class="class-tab flex-cc {{index==classidx ? 'bg-white' : ''}}" bindtap="selectclass" data-index="{{index}}" id="view_{{classlist[classidx].id}}">
<view class="font-more-two class-name {{index==classidx ? 'black-font font-bold' : 'gray-font'}} font28r smooth">{{item.class_name}}</view>
</view>
</block>
</scroll-view>
\ No newline at end of file
... ...
@import '../../app.wxss'
.class-list{
width:170rpx;
height: auto;
}
.class-tab{
width:100%;
height: 140rpx;
padding: 0 28rpx;
box-sizing: border-box;
}
.class-name{
width: 100%;
text-align: center;
line-height: 40rpx;
}
\ No newline at end of file
... ...
.modal-mask{
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0,0,0,.49);
z-index: 99;
}
.close{
width: 60rpx;
height: 60rpx;
position: fixed;
left: 0;
right: 0;
top: 860rpx;
bottom: 0;
margin: auto;
z-index: 1000;
}
.close image{
width: 100%;
height: 100%;
}
... ...
Component({
properties:{
item:Object,
classidx:Number,
cookidx:Number,
},
attached(){
},
methods:{
refresh(){
this.triggerEvent('refresh');
},
showspec(e){
this.triggerEvent('showspec',{id:e.detail.id,classidx:this.data.classidx,cookidx:this.data.cookidx});
},
showrmodal(e){
this.triggerEvent('showrmodal',{id:e.detail.id,classidx:this.data.classidx,cookidx:this.data.cookidx});
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"act":"./act"
}
}
\ No newline at end of file
... ...
<view class="food flex-ll">
<image src="{{item.image ? item.image : 'http://nosqn.colorcun.com/empty.jpg'}}" class="food-image bg-gray" mode="aspectFill" lazy-load></image>
<view class="food-info flex-vtb">
<view class="smooth">
<view class="font-more font-bold font32r black-font" style="width:320rpx;margin-bottom: 6rpx;">{{item.name}}</view>
<view class="gray-font font24r font-more-two" wx:if="{{item.desc}}" style="width:320rpx;">{{item.desc}}</view>
</view>
<view class="flex-lr">
<view class="food-price flex-ll">
<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>
<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>
</view>
<act item="{{item}}" bindrefresh="refresh" bindshowspec="showspec" bindshowrmodal="showrmodal"></act>
</view>
</view>
</view>
\ No newline at end of file
... ...
@import '../../app.wxss'
.food{
width: 580rpx;
padding:30rpx 20rpx;
box-sizing: border-box;
margin-bottom: 10rpx;
overflow-x: hidden;
position: relative;
}
.food-image{
width: 180rpx;
height: 170rpx;
border-radius: 10rpx;
}
.food-info{
width: 360rpx;
height: 170rpx;
padding-left: 20rpx;
box-sizing: border-box;
}
\ No newline at end of file
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
parmdata:Object,
action:{
type:String,
value:'reduce'
}
},
attached(){
console.log(this.data.item);
},
methods:{
reducecart(){
console.log('yyyyyy',this.data.parmdata,this.data.action)
let parmdata={
sellerid:this.data.parmdata.sellerid,
openid:util.cache('openid'),
cookbookid:this.data.parmdata.cookbookid ? this.data.parmdata.cookbookid : this.data.parmdata.id
}
if(parmdata.specid){
parmdata.specid=this.data.specid
}
if(parmdata.practiceid){
parmdata.practiceid=this.data.practiceid
}
if(this.data.action=='reduce'){
App.Orders.ReduceOrder(parmdata).then((json)=>{
console.log(json);
this.triggerEvent('actfood',{action:'reduce'})
})
}else{
console.log('yyyyyyyyyy')
this.triggerEvent('showrmodal')
}
}
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<view bindtap="reducecart">
<slot></slot>
</view>
\ No newline at end of file
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
fooditem:Object,
},
data:{
num:5,
rmodalhidden:true
},
observers: {
},
attached(){
},
methods:{
showrmodal(){
this.setData({
rmodalhidden:false
})
this.getcartlist();
},
hidermodal(){
this.setData({
rmodalhidden:true
})
},
actfood(e){
console.log('reduce')
this.triggerEvent('tellfood',{action:e.detail.action,classid:this.data.fooditem.cid,id:this.data.fooditem.id});
this.getcartlist();
},
getcartlist(){
App.Orders.GetCartByOpenid({sellerid:this.data.fooditem.sellerid,openid:util.cache('openid'),cookbookid:this.data.fooditem.id}).then((json)=>{
console.log(json,'yyyyyyy')
if(json.ret==200){
if(json.data.length==0){
this.hidermodal();
}else{
this.setData({
bookfood:json.data
})
}
// json.data.forEach((v,i)=>{
// v.price=Number(v.price);
// v.member_price=Number(v.member_price);
// })
// this.setData({
// cartlist:json.data
// })
}
})
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"add":"./add",
"reduce":"./reduce"
}
}
\ No newline at end of file
... ...
<view class="modal-mask" hidden="{{rmodalhidden}}" bindtap="hidermodal"></view>
<view class="modal flex-vtb bg-white smooth" hidden="{{rmodalhidden}}">
<view class="spec-content">
<view class="food-name font32r font-bold black-font font-more">{{fooditem.name}}</view>
<view class="food-spec-prac flex-lr" wx:for="{{bookfood}}">
<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>
<view class="flex-rr">
<reduce parmdata="{{item}}" action="reduce" bindactfood="actfood">
<view class="act-button">
<image src="http://nosqn.colorcun.com/icon-reduce.jpg" mode="aspectFill"></image>
</view>
</reduce>
<view class="black-font font30r num-input">{{item.count}}</view>
<add parmdata="{{item}}" action="add" bindactfood="actfood">
<view class="act-button">
<image src="http://nosqn.colorcun.com/icon-add.jpg" mode="aspectFill"></image>
</view>
</add>
</view>
</view>
</view>
<view class="spec-main flex-rr">
<!-- <view class="flex-ll spec-price red-pink-font font32r" style="align-items: baseline;">¥<text class="font-bold font44r">25</text></view> -->
<view class="bg-red-pink white-font font-bold font30r spec-button flex-cc" bindtap="hidermodal">确定</view>
</view>
</view>
<view class="close" hidden="{{rmodalhidden}}" bindtap="hidermodal">
<image src="http://nosqn.colorcun.com/close.jpg"></image>
</view>
\ No newline at end of file
... ...
@import '../../app.wxss'
@import './act.wxss'
@import './spec.wxss'
.food-spec-prac-single{
width: 290rpx;
height: 64rpx;
border-radius: 10rpx;
border:2rpx solid #FD777D;
box-sizing: border-box;
margin-right:40rpx;
margin-bottom: 30rpx;
background: #FFE6E6;
}
.food-spec-prac{
width: 100%;
padding-top: 40rpx;
padding-right: 40rpx;
box-sizing: border-box;
}
\ No newline at end of file
... ...
Component({
properties:{
fooditem:Object,
},
data:{
specidx:0,
pracidx:0,
spechidden:true,
},
attached(){
},
methods:{
getdata(){
let parmdata={
sellerid:this.data.fooditem.sellerid,
id:this.data.fooditem.id,
}
if(this.data.fooditem.spec && this.data.fooditem.spec.length>0){
parmdata.specid=this.data.fooditem.spec[this.data.specidx].id
}
if(this.data.fooditem.practice && this.data.fooditem.practice.length>0){
parmdata.practiceid=this.data.fooditem.practice[this.data.pracidx].id
}
this.setData({
parmdata:parmdata
})
console.log(this.data.parmdata,'add0000000000');
},
actfood(){
this.triggerEvent('addfood',{action:'add',classid:this.data.fooditem.cid,id:this.data.fooditem.id});
this.hide();
},
selectspec(e){
console.log(e)
let specidx=e.currentTarget.dataset.index;
this.setData({
specidx:specidx,
'parmdata.specid':e.currentTarget.dataset.id
})
},
selectprac(e){
let pracidx=e.currentTarget.dataset.index;
this.setData({
pracidx:pracidx,
'parmdata.practiceid':e.currentTarget.dataset.id
})
},
show(){
this.setData({
spechidden:false
})
this.getdata();
},
hide(){
this.setData({
spechidden:true
})
},
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"add":"./add"
}
}
\ No newline at end of file
... ...
<view class="modal-mask" hidden="{{spechidden}}" bindtap="hide"></view>
<view class="modal flex-vtb bg-white smooth" hidden="{{spechidden}}">
<view class="spec-content">
<view class="food-name font32r font-bold black-font font-more">{{fooditem.name}}</view>
<view class="spec-title gray-deep-font font28r" wx:if="{{fooditem.spec && fooditem.spec.length>0}}">规格</view>
<view class="flex-rs spec-list" wx:if="{{fooditem.spec && fooditem.spec.length>0}}">
<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>
</view>
<view class="spec-title gray-deep-font font28r" wx:if="{{fooditem.practice && fooditem.practice.length>0}}">做法</view>
<view class="flex-rs spec-list" wx:if="{{fooditem.practice && fooditem.practice.length>0}}">
<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>
</view>
</view>
<view class="spec-main flex-lr">
<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>
<add parmdata="{{parmdata}}" action="add" bindactfood="actfood">
<view class="bg-red-pink white-font font-bold font30r spec-button flex-cc">确定</view>
</add>
</view>
</view>
<view class="close" hidden="{{spechidden}}" bindtap="hide">
<image src="http://nosqn.colorcun.com/close.jpg"></image>
</view>
... ...
@import '../../app.wxss'
.modal-mask{
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0,0,0,.49);
z-index: 999;
}
.modal{
width: 670rpx;
height: 720rpx;
border-radius: 20rpx;
box-sizing: border-box;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
z-index: 1000;
overflow-y: scroll;
}
.spec-content{
width: 100%;
padding-left: 40rpx;
box-sizing: border-box;
line-height: 1.4;
padding-top: 20rpx;
max-height: 600rpx;
overflow-y: scroll;
}
.food-name,.spec-title{
width: 100%;
padding: 20rpx 0;
}
.food-name{
width:100%;
padding-right: 40rpx;
text-align: center;
box-sizing: border-box;
}
.spec-list{
width: 100%;
}
.spec-single{
width: 170rpx;
height: 64rpx;
border-radius: 10rpx;
border:2rpx solid #EFEFEF;
box-sizing: border-box;
margin-right:40rpx;
margin-bottom: 30rpx;
}
.spec-single.active{
background: #FFE6E6;
border-color: #FD777D;
}
.spec-main{
width: 100%;
height: 120rpx;
padding: 0 60rpx;
border-top:2rpx solid #EFEFEF;
box-sizing: border-box;
border-radius:0 0 20rpx 20rpx;
}
.spec-button{
width: 250rpx;
height: 80rpx;
border-radius: 40rpx;
}
.close{
width: 60rpx;
height: 60rpx;
position: fixed;
left: 0;
right: 0;
top: 860rpx;
bottom: 0;
margin: auto;
z-index: 1000;
}
.close image{
width: 100%;
height: 100%;
}
... ...
import App from '../../utils/api.js'
import util from '../../utils/util.js'
Component({
properties:{
seller:Object,
refresh:{
type:Boolean,
value:false
}
},
attached(){
console.log('uuuuu',this.data.seller)
this.getsellerconfig();
},
observers: {
'refresh': function(newrefresh){
this.gettotal();
}
},
methods:{
getsellerconfig(){
App.Seller.GetSellerConfig({sellerid:this.data.seller.id}).then((json)=>{
console.log(json)
if(json.ret==200){
this.setData({
config:json.data[0]
})
}
})
},
gettotal(){
App.Orders.GetOrderTotalMoney({sellerid:this.data.seller.id,openid:util.cache('openid')}).then((json)=>{
console.log(json,'total')
if(json.ret==200){
this.setData({
totalobj:json.data
})
if(json.data.cookBookTotal==0){
this.selectComponent('#box').hidebox();
}
}
})
},
showbox(){
this.selectComponent('#box').showbox();
},
toorder(){
wx.navigateTo({
url:'./order?id='+this.data.seller.id+'&totalprice='+this.data.totalobj.cookBookPirce
})
},
tellfood(e){
this.triggerEvent('tellfood',e.detail);
},
refresh(){
this.triggerEvent('refresh')
}
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {
"box":"./box"
}
}
\ No newline at end of file
... ...
<view class="bg-white total-price flex-lr">
<view class="total-count-cover flex-cc" wx:if="{{totalobj.cookBookTotal>0}}">
<view class="total-count white-font font24r smooth flex-cc">{{totalobj.cookBookTotal}}</view>
</view>
<view class="flex-ll" bindtap="{{totalobj.cookBookTotal>0 ? 'showbox' : ''}}">
<image class="" src="{{totalobj.cookBookTotal>0 ? 'http://nosqn.colorcun.com/send-red.jpg' : 'http://nosqn.colorcun.com/send-gray.jpg'}}"></image>
<!-- <view style="height: 100%;position: relative;top: -6rpx;">
<view class="red-pink-font font32r" style="margin-bottom: 0rpx;">¥<text class="font44r font-bold">{{totalobj.cookBookPirce}}</text></view>
<view style="height: 24rpx;text-decoration: line-through;position: relative;top: -4rpx;" class="gray-light-font font24r"></view>
</view> -->
<view class="red-pink-font font28r" style="margin-bottom: 24rpx;">¥<text class="font40r font-bold">{{totalobj.cookBookPirce}}</text></view>
</view>
<block wx:if="{{totalobj.cookBookPirce>=config.is_full_amount && totalobj.cookBookTotal>0}}">
<view class="box-button flex-cc white-font bg-red-pink" bindtap="toorder">去结算</view>
</block>
<block wx:else>
<view class="box-button flex-cc white-font bg-light-gray">满¥{{config.is_full_amount}}起送</view>
</block>
<!-- <view class="box-button flex-cc white-font bg-red-pink" bindtap="toorder">去结算</view> -->
</view>
<block wx:if="{{seller}}">
<box seller="{{seller}}" id="box" bindtellfood="tellfood" bindrefresh="refresh"></box>
</block>
... ...
@import '../../app.wxss'
.total-price{
width: 100%;
height: 120rpx;
padding: 0 60rpx;
box-sizing: border-box;
box-shadow: 0 0 10rpx 0 #E5E5E5;
position: fixed;
left: 0;
right: 0;
bottom: 0;
line-height: 1.4;
z-index: 1002;
}
.total-count-cover{
width: 72rpx;
position: absolute;
left: 30rpx;
top: 10rpx;
}
.total-count{
min-width: 32rpx;
padding: 0 6rpx;
height: 32rpx;
box-sizing: border-box;
border-radius: 16rpx;
background: #FA5151;
}
.total-price image{
width: 104rpx;
height: 88rpx;
/* margin-right: 10rpx; */
margin-left: 20rpx;
}
.box-button{
width: 300rpx;
height: 84rpx;
border-radius: 42rpx;
}
\ No newline at end of file
... ...
var util = require('../../utils/util.js')
var uri=require('../../utils/uri.js');
import App from '../../utils/api.js'
Component({
properties:{
},
data:{
modalHidden:true
},
methods:{
show:function(id,sn){
this.setData({
modalHidden:false,
pid:id,
sn:sn
})
},
confirm:function(){
this.setData({
modalHidden:true
})
App.Prints.DelPrints({pid:this.data.pid,sn:this.data.sn}).then((json)=>{
if(json.ret==200){
if(json.data[0]==1){
wx.showToast({
title:'删除成功',
duration:2000
})
this.triggerEvent("printlist");
}else{
wx.showModal({
content:json.data[0].no[0],
showCancel:false,
confirmColor:'#199095',
success:function(res){
}
})
}
}
})
},
cancle:function(){
this.setData({
modalHidden:true
})
}
}
})
\ No newline at end of file
... ...
{
"component": true
}
\ No newline at end of file
... ...
<view class="modal-mask" hidden="{{modalHidden}}" bindtap="cancle"></view>
<view class="confirm-modal" hidden="{{modalHidden}}">
<view class="black-font font34r smooth flex-cc modal-info">确定删除?删除后,该打印机绑定的菜品和小票将无法打印</view>
<view class="modal-button flex-lr">
<view class="flex-cc gray-font font36r border-right" bindtap="confirm">确定</view>
<view class="flex-cc green-font font36r" bindtap="cancle">取消</view>
</view>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.modal-mask{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
background:rgba(0,0,0,.7);
z-index:99;
}
.confirm-modal{
width:560rpx;
height:290rpx;
box-sizing:border-box;
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
background:#fff;
border-radius:10rpx;
overflow:hidden;
box-shadow:0 0 10px rgba(0,0,0,.2);
z-index:100;
}
.modal-button{
width:100%;
height:100rpx;
border-top:1px solid #efeef3;
box-sizing:border-box;
}
.modal-info{
width:100%;
height:190rpx;
padding:0 50rpx;
box-sizing:border-box;
}
.modal-button>view{
width:50%;
height:100%;
}
.border-right{
border-right:1px solid #efeef3;
box-sizing:border-box;
}
\ No newline at end of file
... ...
// components/nav/nav.js
Component({
/**
* 组件的属性列表
*/
properties: {
backgroundColor: {
type: String,
value: '#ffffff'
},
color: {
type: String,
value: '#000000'
},
hasHome: {
type: Boolean,
value: false
},
place:{
type:Boolean,
value:true
}
},
/**
* 组件的初始数据
*/
data: {
disHome: false,
disBack: false,
},
attached(){
this.init();
},
/**
* 组件的方法列表
*/
methods: {
back(){
this.triggerEvent('NavEvent');
wx.navigateBack();
},
home(){
if (!this.data.disHome) return;
wx.reLaunch({
url: '/pages/customer/index'
})
},
init(){
let disBack = false;
let disHome = false;
let pages = getCurrentPages();
console.log('pages.length', pages[0]);
if (pages.length > 1) {
disBack = true;
} else {
//if (getApp().shareTicket && this.data.hasHome) {
if (this.data.hasHome && pages[0].route != "pages/customer/list") {
disHome = true;
}
}
//导航栏自适应
let systemInfo = wx.getSystemInfoSync();
let reg = /ios/i;
let pt = 20;//导航状态栏上内边距
let h = 44;//导航状态栏高度
if(reg.test(systemInfo.system)){
pt = systemInfo.statusBarHeight;
h = 44;
}else{
pt = systemInfo.statusBarHeight;
h = 48;
}
this.setData({
statusBarHeight: pt,
disHome: disHome,
disBack: disBack,
statusBarHeightFull: pt + h,
titleBarHeight:h,
})
wx.setStorageSync('headerHeight', pt + h)
console.log('this.setData', this.data);
},
getHeight(){
return this.data.statusBarHeightFull
},
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/nav/nav.wxml-->
<view class="nav-main" style="background-color: {{backgroundColor}};color:{{color}};">
<view class="nav" style="margin-top: {{statusBarHeight}}px;">
<view class="flex-lr part" style="height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px">
<view class="opt flex-ll">
<view class="back flex-vc"
style="height: {{titleBarHeight}}px; line-height: {{titleBarHeight}}px"
bindtap="back" wx:if="{{disBack}}">
<image class="back-image"
src="http://nosqn.colorcun.com/custom/lite-yd/image/back{{backgroundColor!='#ffffff'?'-light':''}}.png"></image>
</view>
<view class="home flex-vc" bindtap="home" wx:if="{{disHome}}">
<image class="home-image"
src="http://nosqn.colorcun.com/custom/lite-yd/image/home{{backgroundColor!='#ffffff'?'-light':''}}.svg"></image>
</view>
</view>
<view class="title" bindtap="home">
<slot></slot>
</view>
<view class="opt">
<view></view>
</view>
</view>
</view>
</view>
<view class="nav-main-space" style="height: {{statusBarHeightFull}}px;" wx:if="{{place}}">
</view>
\ No newline at end of file
... ...
/* components/nav/nav.wxss */
@import "../../app.wxss";
.nav-main{
position:fixed;
width: 100%;
z-index: 10;
top:0;
}
.nav{
font-size: 30rpx;
font-weight: bold;
}
.nav .part{
text-align: center;
}
.nav .part .title{
width: 100%;
white-space:nowrap;
position: relative;
height:100%;
}
.nav .part .opt{
min-width: 188rpx;
height: 100%;
}
.nav .part .opt view{
width: 108rpx;
height: 100%;
}
.nav .part .opt .back-image{
height: 32rpx;
width: 18rpx;
padding-left: 40rpx;
padding-right: 40rpx;
}
.nav .part .opt .home-image{
height: 34rpx;
width: 36rpx;
padding-left: 40rpx;
padding-right: 40rpx;
}
... ...
Component({
properties:{
},
data:{
netreminder:'当前网络不给力,请检查好网络后重试',
network:true
},
attached:function(){
this.looknet();
this.netstatus();
},
methods:{
looknet:function(){
var that=this;
wx.getNetworkType({
success:function(res){
var netreminder=that.data.netreminder;
var network=that.data.network;
//有网
if(res.networkType!='none'){
if(res.networkType=='unknown'){
wx.hideToast();
network=false
netreminder='当前网络不给力,请检查好网络后重试';
}else{
network = true
}
}else{
wx.hideToast();
network=false
netreminder='当前网络不可用,请检查网络设置';
}
that.setnetdata(network,netreminder)
}
})
},
netstatus:function(){
var that=this;
wx.onNetworkStatusChange(function (res) {
var netreminder=that.data.netreminder;
var network=that.data.network;
if(res.isConnected==false){
wx.hideToast();
network = false;
netreminder='当前网络不可用,请检查网络设置';
}else{
if(res.networkType=='unknown'){
wx.hideToast();
network = false;
netreminder='当前网络不给力,请检查好网络后重试';
}else{
network = true
}
}
that.setnetdata(network,netreminder)
})
},
setnetdata:function(network,netreminder){
console.log('xxxxxxx',network)
this.setData({
network:network,
netreminder:netreminder
})
},
refresh:function(){
this.triggerEvent('netchange')
},
},
})
\ No newline at end of file
... ...
{
"component":true
}
\ No newline at end of file
... ...
<view class="network flex-vc bg_white" hidden="{{network}}">
<image src="/pages/image/reminder.png" class="nothing-network"></image>
<view class="gray-deep-font font30r">{{netreminder}}</view>
<view class="refresh-button black-font font30r flex-cc bg_gray" bindtap="refresh">重试</view>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.network{
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
z-index:1000;
}
.nothing-network{
width:428rpx;
height:298rpx;
margin-bottom:80rpx;
margin-left:40rpx;
}
.refresh-button{
width:140rpx;
height:70rpx;
border:1px solid #ccc;
margin-top:80rpx;
}
... ...
var util = require('../../utils/util.js')
var systemInfo=util.getsystem();
Component({
properties:{
height:{
type:Number,
value:systemInfo.windowHeight
},
content:{
type:String,
value:'暂无内容'
},
},
data:{
},
methods:{
}
})
\ No newline at end of file
... ...
{
"component": true
}
\ No newline at end of file
... ...
<view style="height:{{height}}px;" class="nothing-page flex-vc bg-white">
<image class="nothing-booklist" src="/pages/image/nothing-booklist.png"></image>
<view class="black-font font34r smooth nothing-content">{{content}}</view>
</view>
\ No newline at end of file
... ...
@import '../common.wxss';
.nothing-page{
width:100%;
padding-bottom:90rpx;
box-sizing:border-box;
}
.nothing-booklist{
width:384rpx;
height:296rpx;
}
.nothing-content{
margin-top:40rpx;
}
\ No newline at end of file
... ...