This commit is contained in:
parent
8ab068036e
commit
1790b4c823
4
App.vue
4
App.vue
|
|
@ -1,5 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
onTabItemClick(itemPath) {
|
||||||
|
// 例如,你可以在这里添加一个确认对话框
|
||||||
|
console.log("itemPath", itemPath)
|
||||||
|
},
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
// this.handleHomeConfig()
|
// this.handleHomeConfig()
|
||||||
console.log('App Launch')
|
console.log('App Launch')
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 0 15px 10px;
|
padding: 0 15px 10px;
|
||||||
z-index: 9;
|
z-index: 99;
|
||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
|
|
||||||
.serach-box {
|
.serach-box {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<search @handleSearch="handleSearch"></search>
|
<search @handleSearch="handleSearch"></search>
|
||||||
|
|
||||||
<view class="box menu">
|
|
||||||
<!-- 头部1级菜单栏 -->
|
<!-- 头部1级菜单栏 -->
|
||||||
<view class="tab_list">
|
<view class="tab_list">
|
||||||
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
|
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
|
||||||
|
|
@ -12,19 +11,21 @@
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="box menu" :class="[ActiveList.length?'maxheight':'']">
|
||||||
<!-- 左侧2级商品 -->
|
<!-- 左侧2级商品 -->
|
||||||
<view class="left" :class="[ActiveList.length?'maxheight':'']">
|
<view class="left">
|
||||||
<view class="name" v-for="(ite,ind) in menu2" :key="ind" :class="[leftInd==ind?'active':'']"
|
<view class="name" v-for="(ite,ind) in menu2" :key="ind" :class="[leftInd==ind?'active':'']"
|
||||||
@click="handleToggleLeft(ind)">
|
@click="handleToggleLeft(ind)">
|
||||||
{{ite.name}}
|
{{ite.name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 右侧3级 -->
|
<!-- 右侧3级 -->
|
||||||
<view class="right" :class="[ActiveList.length?'maxheight':'']">
|
<view class="right">
|
||||||
<view class="list mt-15">
|
<view class="list mt-15">
|
||||||
<view class="item" v-for="(ite,ind) in menu3" :key="ind" @click="handleDetail(ite)"
|
<view class="item" v-for="(ite,ind) in menu3" :key="ind" @click="handleDetail(ite,1)"
|
||||||
:class="[ActiveList.indexOf(ite)!=-1?'active0':'']">
|
:class="[ActiveList.indexOf(ite)!=-1?'active0':'']">
|
||||||
<text>{{ite.name}}</text>
|
<text class="overflow">{{ite.name}}</text>
|
||||||
<icon class="iconfont" :class="[ActiveList.indexOf(ite)!=-1?'icon-xuanzhong':'icon-add']" />
|
<icon class="iconfont" :class="[ActiveList.indexOf(ite)!=-1?'icon-xuanzhong':'icon-add']" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -39,7 +40,7 @@
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" v-for="(ite,ind) in ActiveList" :key="ind">
|
<view class="item" v-for="(ite,ind) in ActiveList" :key="ind">
|
||||||
<text>{{ite.name}}</text>
|
<text>{{ite.name}}</text>
|
||||||
<icon class="iconfont icon-quxiao" @click="handleDetail(ite)"></icon>
|
<icon class="iconfont icon-quxiao" @click="handleDetail(ite,2)"></icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="groupbtn">
|
<view class="groupbtn">
|
||||||
|
|
@ -91,7 +92,7 @@
|
||||||
}
|
}
|
||||||
that.handleHomeInfo()
|
that.handleHomeInfo()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onPullDownRefresh() {
|
||||||
let that = this
|
let that = this
|
||||||
if (!this.lastPage || this.page >= this.lastPage) {
|
if (!this.lastPage || this.page >= this.lastPage) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -104,6 +105,9 @@
|
||||||
if (that.menu2.length) {
|
if (that.menu2.length) {
|
||||||
that.handleHomeInfo()
|
that.handleHomeInfo()
|
||||||
}
|
}
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleHomeInfo() {
|
handleHomeInfo() {
|
||||||
|
|
@ -139,12 +143,18 @@
|
||||||
that.handleHomeInfo()
|
that.handleHomeInfo()
|
||||||
},
|
},
|
||||||
// 商品选择
|
// 商品选择
|
||||||
handleDetail(ite) {
|
handleDetail(ite, ind) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.ActiveList.indexOf(ite) == -1) {
|
let list = []
|
||||||
that.ActiveList.push(ite);
|
if (ind == 1) {
|
||||||
|
list.push(ite)
|
||||||
|
that.ActiveList = that.$tools.mergeAndDeduplicate(that.ActiveList, list, 'name')
|
||||||
} else {
|
} else {
|
||||||
that.ActiveList.splice(that.ActiveList.indexOf(ite), 1);
|
for (var n = 0; n < that.ActiveList.length; n++) {
|
||||||
|
if (ite.name == that.ActiveList[n].name) {
|
||||||
|
that.ActiveList.splice(n, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 商品清空
|
// 商品清空
|
||||||
|
|
@ -192,7 +202,12 @@
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.tab_list {
|
.tab_list {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 45px -10px 0;
|
top: 50px;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 99;
|
||||||
|
height: 45px;
|
||||||
|
background: #FFF;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.scroll-menu {
|
.scroll-menu {
|
||||||
|
|
@ -216,12 +231,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: 101px;
|
||||||
|
height: calc(100vh - 101px) !important;
|
||||||
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
top: 90px !important;
|
top: 101px !important;
|
||||||
|
position: fixed;
|
||||||
|
background-color: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
top: 90px !important;
|
top: 0px !important;
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -234,10 +258,11 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 0 2% 10px;
|
margin: 0 2% 10px;
|
||||||
|
padding: 0 5px;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
|
|
@ -269,19 +294,21 @@
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
padding-bottom: 55px;
|
padding-bottom: 55px;
|
||||||
display: flex;
|
// display: flex;
|
||||||
flex-wrap: wrap;
|
// flex-wrap: wrap;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 29%;
|
width: 29%;
|
||||||
border: 1px solid $maincolor;
|
border: 1px solid $maincolor;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0 2% 10px;
|
margin: 0 2% 10px;
|
||||||
|
float: left;
|
||||||
|
padding: 0 5px;
|
||||||
|
|
||||||
icon {
|
icon {
|
||||||
color: $maincolor;
|
color: $maincolor;
|
||||||
|
|
@ -319,6 +346,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.maxheight {
|
.maxheight {
|
||||||
height: calc(100vh - 600rpx);
|
padding-bottom: 265rpx;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
height: calc(100vh - 500rpx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -3,13 +3,14 @@
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页"
|
"navigationBarTitleText": "首页",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/menu/menu",
|
"path": "pages/menu/menu",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "菜谱",
|
"navigationBarTitleText": "菜谱",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -98,7 +99,7 @@
|
||||||
"path": "me/foodlist",
|
"path": "me/foodlist",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "食材库",
|
"navigationBarTitleText": "食材库",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "count/setting",
|
"path": "count/setting",
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,13 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
|
onShow() {
|
||||||
|
console.log("11111111onshow")
|
||||||
|
},
|
||||||
|
onTabItemClick(itemPath) {
|
||||||
|
// 例如,你可以在这里添加一个确认对话框
|
||||||
|
console.log("itemPath", itemPath)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//
|
//
|
||||||
getAddFood(list) {
|
getAddFood(list) {
|
||||||
|
|
@ -113,8 +120,7 @@
|
||||||
list.forEach(ite => {
|
list.forEach(ite => {
|
||||||
ite.weight = null
|
ite.weight = null
|
||||||
})
|
})
|
||||||
that.info.food_list = list
|
that.info.food_list = that.$tools.mergeAndDeduplicate(that.info.food_list, list, 'name')
|
||||||
console.log("list", list)
|
|
||||||
},
|
},
|
||||||
// 清空食材
|
// 清空食材
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
|
@ -322,6 +328,17 @@
|
||||||
that.$model.getAddCookbook(that.info).then(res2 => {
|
that.$model.getAddCookbook(that.info).then(res2 => {
|
||||||
if (res2.code == 0) {
|
if (res2.code == 0) {
|
||||||
that.$tools.msg("添加成功")
|
that.$tools.msg("添加成功")
|
||||||
|
that.isFood = true
|
||||||
|
that.info = {
|
||||||
|
cook_label: null,
|
||||||
|
title: "",
|
||||||
|
description: "",
|
||||||
|
food_list: [],
|
||||||
|
cover: null, //封面id
|
||||||
|
step_list: []
|
||||||
|
}
|
||||||
|
that.FMimg = ""
|
||||||
|
that.cookIndex = null
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/menu/menu"
|
url: "/pages/menu/menu"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<!-- 进度 -->
|
<!-- 进度 -->
|
||||||
<view class="left ">
|
<view class="left ">
|
||||||
<qiun-data-charts type="arcbar" :chartData="chartData" :canvas2d="true" :cHeight="300"
|
<qiun-data-charts type="arcbar" :chartData="chartData" :canvas2d="true" :cHeight="300"
|
||||||
:cWidth="300" />
|
:cWidth="300" canvasId="arcbar008"/>
|
||||||
<view class="center">
|
<view class="center">
|
||||||
还能吃
|
还能吃
|
||||||
<text>{{remaining_kcal}}</text>
|
<text>{{remaining_kcal}}</text>
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,19 @@
|
||||||
let that = this
|
let that = this
|
||||||
that.handleHomeConfig()
|
that.handleHomeConfig()
|
||||||
},
|
},
|
||||||
onShow() {},
|
onPullDownRefresh() {
|
||||||
|
let that = this
|
||||||
|
that.menu = []
|
||||||
|
that.index = 0
|
||||||
|
that.fimages = []
|
||||||
|
that.list = []
|
||||||
|
that.tools = []
|
||||||
|
that.footlist = []
|
||||||
|
that.handleHomeConfig()
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 菜谱,食材,banner,金刚区配置
|
// 菜谱,食材,banner,金刚区配置
|
||||||
handleHomeConfig() {
|
handleHomeConfig() {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
that.page = 1
|
that.page = 1
|
||||||
that.handleCookListLabel()
|
that.handleCookListLabel()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onPullDownRefresh() {
|
||||||
let that = this
|
let that = this
|
||||||
if (!this.lastPage || this.page >= this.lastPage) {
|
if (!this.lastPage || this.page >= this.lastPage) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -71,6 +71,9 @@
|
||||||
}
|
}
|
||||||
this.page++
|
this.page++
|
||||||
this.handleCookListLabel()
|
this.handleCookListLabel()
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 食材列表
|
// 食材列表
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -120,6 +120,10 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
});
|
});
|
||||||
exports.default = void 0;
|
exports.default = void 0;
|
||||||
var _default = {
|
var _default = {
|
||||||
|
onTabItemClick: function onTabItemClick(itemPath) {
|
||||||
|
// 例如,你可以在这里添加一个确认对话框
|
||||||
|
console.log("itemPath", itemPath);
|
||||||
|
},
|
||||||
onLaunch: function onLaunch() {
|
onLaunch: function onLaunch() {
|
||||||
// this.handleHomeConfig()
|
// this.handleHomeConfig()
|
||||||
console.log('App Launch');
|
console.log('App Launch');
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1747,7 +1747,7 @@ function initData(vueOptions, context) {
|
||||||
try {
|
try {
|
||||||
data = data.call(context); // 支持 Vue.prototype 上挂的数据
|
data = data.call(context); // 支持 Vue.prototype 上挂的数据
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||||
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
|
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9812,7 +9812,7 @@ function type(obj) {
|
||||||
|
|
||||||
function flushCallbacks$1(vm) {
|
function flushCallbacks$1(vm) {
|
||||||
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
|
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
|
||||||
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||||
var mpInstance = vm.$scope;
|
var mpInstance = vm.$scope;
|
||||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||||
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
|
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
|
||||||
|
|
@ -9833,14 +9833,14 @@ function nextTick$1(vm, cb) {
|
||||||
//1.nextTick 之前 已 setData 且 setData 还未回调完成
|
//1.nextTick 之前 已 setData 且 setData 还未回调完成
|
||||||
//2.nextTick 之前存在 render watcher
|
//2.nextTick 之前存在 render watcher
|
||||||
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
|
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
|
||||||
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
|
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||||
var mpInstance = vm.$scope;
|
var mpInstance = vm.$scope;
|
||||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||||
']:nextVueTick');
|
']:nextVueTick');
|
||||||
}
|
}
|
||||||
return nextTick(cb, vm)
|
return nextTick(cb, vm)
|
||||||
}else{
|
}else{
|
||||||
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
|
if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
|
||||||
var mpInstance$1 = vm.$scope;
|
var mpInstance$1 = vm.$scope;
|
||||||
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
|
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
|
||||||
']:nextMPTick');
|
']:nextMPTick');
|
||||||
|
|
@ -9936,7 +9936,7 @@ var patch = function(oldVnode, vnode) {
|
||||||
});
|
});
|
||||||
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
|
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
|
||||||
if (Object.keys(diffData).length) {
|
if (Object.keys(diffData).length) {
|
||||||
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"kitchendDevice","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
|
||||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
|
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
|
||||||
']差量更新',
|
']差量更新',
|
||||||
JSON.stringify(diffData));
|
JSON.stringify(diffData));
|
||||||
|
|
@ -18812,13 +18812,14 @@ var _default = {
|
||||||
"pages": [{
|
"pages": [{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页"
|
"navigationBarTitleText": "首页",
|
||||||
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/menu/menu",
|
"path": "pages/menu/menu",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "菜谱",
|
"navigationBarTitleText": "菜谱",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/add/add",
|
"path": "pages/add/add",
|
||||||
|
|
@ -18893,7 +18894,7 @@ var _default = {
|
||||||
"path": "me/foodlist",
|
"path": "me/foodlist",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "食材库",
|
"navigationBarTitleText": "食材库",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "count/setting",
|
"path": "count/setting",
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 0 15px 10px;
|
padding: 0 15px 10px;
|
||||||
z-index: 9;
|
z-index: 99;
|
||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
}
|
}
|
||||||
.serachBox .serach-box.data-v-039252a3 {
|
.serachBox .serach-box.data-v-039252a3 {
|
||||||
|
|
|
||||||
|
|
@ -103,28 +103,26 @@ var render = function () {
|
||||||
var _h = _vm.$createElement
|
var _h = _vm.$createElement
|
||||||
var _c = _vm._self._c || _h
|
var _c = _vm._self._c || _h
|
||||||
var g0 = _vm.ActiveList.length
|
var g0 = _vm.ActiveList.length
|
||||||
var g1 = _vm.ActiveList.length
|
|
||||||
var l0 = _vm.__map(_vm.menu3, function (ite, ind) {
|
var l0 = _vm.__map(_vm.menu3, function (ite, ind) {
|
||||||
var $orig = _vm.__get_orig(ite)
|
var $orig = _vm.__get_orig(ite)
|
||||||
|
var g1 = _vm.ActiveList.indexOf(ite)
|
||||||
var g2 = _vm.ActiveList.indexOf(ite)
|
var g2 = _vm.ActiveList.indexOf(ite)
|
||||||
var g3 = _vm.ActiveList.indexOf(ite)
|
|
||||||
return {
|
return {
|
||||||
$orig: $orig,
|
$orig: $orig,
|
||||||
|
g1: g1,
|
||||||
g2: g2,
|
g2: g2,
|
||||||
g3: g3,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
var g4 = _vm.menu3.length
|
var g3 = _vm.menu3.length
|
||||||
var g5 = _vm.ActiveList.length
|
var g4 = _vm.ActiveList.length
|
||||||
_vm.$mp.data = Object.assign(
|
_vm.$mp.data = Object.assign(
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
$root: {
|
$root: {
|
||||||
g0: g0,
|
g0: g0,
|
||||||
g1: g1,
|
|
||||||
l0: l0,
|
l0: l0,
|
||||||
|
g3: g3,
|
||||||
g4: g4,
|
g4: g4,
|
||||||
g5: g5,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -212,7 +210,7 @@ var _default = {
|
||||||
}
|
}
|
||||||
that.handleHomeInfo();
|
that.handleHomeInfo();
|
||||||
},
|
},
|
||||||
onReachBottom: function onReachBottom() {
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!this.lastPage || this.page >= this.lastPage) {
|
if (!this.lastPage || this.page >= this.lastPage) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -225,6 +223,9 @@ var _default = {
|
||||||
if (that.menu2.length) {
|
if (that.menu2.length) {
|
||||||
that.handleHomeInfo();
|
that.handleHomeInfo();
|
||||||
}
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleHomeInfo: function handleHomeInfo() {
|
handleHomeInfo: function handleHomeInfo() {
|
||||||
|
|
@ -260,12 +261,18 @@ var _default = {
|
||||||
that.handleHomeInfo();
|
that.handleHomeInfo();
|
||||||
},
|
},
|
||||||
// 商品选择
|
// 商品选择
|
||||||
handleDetail: function handleDetail(ite) {
|
handleDetail: function handleDetail(ite, ind) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (that.ActiveList.indexOf(ite) == -1) {
|
var list = [];
|
||||||
that.ActiveList.push(ite);
|
if (ind == 1) {
|
||||||
|
list.push(ite);
|
||||||
|
that.ActiveList = that.$tools.mergeAndDeduplicate(that.ActiveList, list, 'name');
|
||||||
} else {
|
} else {
|
||||||
that.ActiveList.splice(that.ActiveList.indexOf(ite), 1);
|
for (var n = 0; n < that.ActiveList.length; n++) {
|
||||||
|
if (ite.name == that.ActiveList[n].name) {
|
||||||
|
that.ActiveList.splice(n, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 商品清空
|
// 商品清空
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "食材库",
|
"navigationBarTitleText": "食材库",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"search": "/components/search"
|
"search": "/components/search"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="content data-v-c58b4fba"><search bind:handleSearch="__e" vue-id="0a112d43-1" data-event-opts="{{[['^handleSearch',[['handleSearch']]]]}}" class="data-v-c58b4fba" bind:__l="__l"></search><view class="box menu data-v-c58b4fba"><view class="tab_list data-v-c58b4fba"><scroll-view class="scroll-menu data-v-c58b4fba" style="white-space:nowrap;" scroll-x="true"><block wx:for="{{menuTop}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleToggle',[ind]]]]]}}" class="tabbar data-v-c58b4fba" bindtap="__e"><view class="{{['data-v-c58b4fba',index==ind?'active':'']}}">{{ite.name}}</view></view></block></scroll-view></view><view class="{{['left','data-v-c58b4fba',$root.g0?'maxheight':'']}}"><block wx:for="{{menu2}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleToggleLeft',[ind]]]]]}}" class="{{['name','data-v-c58b4fba',leftInd==ind?'active':'']}}" bindtap="__e">{{''+ite.name+''}}</view></block></view><view class="{{['right','data-v-c58b4fba',$root.g1?'maxheight':'']}}"><view class="list mt-15 data-v-c58b4fba"><block wx:for="{{$root.l0}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleDetail',['$0'],[[['menu3','',ind]]]]]]]}}" class="{{['item','data-v-c58b4fba',ite.g2!=-1?'active0':'']}}" bindtap="__e"><text class="data-v-c58b4fba">{{ite.$orig.name}}</text><icon class="{{['iconfont','data-v-c58b4fba',ite.g3!=-1?'icon-xuanzhong':'icon-add']}}"></icon></view></block></view><block wx:if="{{!$root.g4}}"><view class="nolist data-v-c58b4fba"><icon class="iconfont icon-wancan data-v-c58b4fba"></icon><text class="data-v-c58b4fba">还没有数据哦!</text></view></block></view></view><block wx:if="{{$root.g5}}"><view class="activeList data-v-c58b4fba"><view class="list data-v-c58b4fba"><block wx:for="{{ActiveList}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view class="item data-v-c58b4fba"><text class="data-v-c58b4fba">{{ite.name}}</text><icon data-event-opts="{{[['tap',[['handleDetail',['$0'],[[['ActiveList','',ind]]]]]]]}}" class="iconfont icon-quxiao data-v-c58b4fba" bindtap="__e"></icon></view></block></view><view class="groupbtn data-v-c58b4fba"><view data-event-opts="{{[['tap',[['handledelete',['$event']]]]]}}" bindtap="__e" class="data-v-c58b4fba">清空</view><view data-event-opts="{{[['tap',[['handlesubbtn',['$event']]]]]}}" class="subbtn data-v-c58b4fba" bindtap="__e">确定</view></view></view></block></view>
|
<view class="content data-v-c58b4fba"><search bind:handleSearch="__e" vue-id="0a112d43-1" data-event-opts="{{[['^handleSearch',[['handleSearch']]]]}}" class="data-v-c58b4fba" bind:__l="__l"></search><view class="tab_list data-v-c58b4fba"><scroll-view class="scroll-menu data-v-c58b4fba" style="white-space:nowrap;" scroll-x="true"><block wx:for="{{menuTop}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleToggle',[ind]]]]]}}" class="tabbar data-v-c58b4fba" bindtap="__e"><view class="{{['data-v-c58b4fba',index==ind?'active':'']}}">{{ite.name}}</view></view></block></scroll-view></view><view class="{{['box','menu','data-v-c58b4fba',$root.g0?'maxheight':'']}}"><view class="left data-v-c58b4fba"><block wx:for="{{menu2}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleToggleLeft',[ind]]]]]}}" class="{{['name','data-v-c58b4fba',leftInd==ind?'active':'']}}" bindtap="__e">{{''+ite.name+''}}</view></block></view><view class="right data-v-c58b4fba"><view class="list mt-15 data-v-c58b4fba"><block wx:for="{{$root.l0}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view data-event-opts="{{[['tap',[['handleDetail',['$0',1],[[['menu3','',ind]]]]]]]}}" class="{{['item','data-v-c58b4fba',ite.g1!=-1?'active0':'']}}" bindtap="__e"><text class="overflow data-v-c58b4fba">{{ite.$orig.name}}</text><icon class="{{['iconfont','data-v-c58b4fba',ite.g2!=-1?'icon-xuanzhong':'icon-add']}}"></icon></view></block></view><block wx:if="{{!$root.g3}}"><view class="nolist data-v-c58b4fba"><icon class="iconfont icon-wancan data-v-c58b4fba"></icon><text class="data-v-c58b4fba">还没有数据哦!</text></view></block></view></view><block wx:if="{{$root.g4}}"><view class="activeList data-v-c58b4fba"><view class="list data-v-c58b4fba"><block wx:for="{{ActiveList}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view class="item data-v-c58b4fba"><text class="data-v-c58b4fba">{{ite.name}}</text><icon data-event-opts="{{[['tap',[['handleDetail',['$0',2],[[['ActiveList','',ind]]]]]]]}}" class="iconfont icon-quxiao data-v-c58b4fba" bindtap="__e"></icon></view></block></view><view class="groupbtn data-v-c58b4fba"><view data-event-opts="{{[['tap',[['handledelete',['$event']]]]]}}" bindtap="__e" class="data-v-c58b4fba">清空</view><view data-event-opts="{{[['tap',[['handlesubbtn',['$event']]]]]}}" class="subbtn data-v-c58b4fba" bindtap="__e">确定</view></view></view></block></view>
|
||||||
|
|
@ -26,7 +26,12 @@
|
||||||
/* 文章场景相关 */
|
/* 文章场景相关 */
|
||||||
.tab_list.data-v-c58b4fba {
|
.tab_list.data-v-c58b4fba {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 45px -10px 0;
|
top: 50px;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 99;
|
||||||
|
height: 45px;
|
||||||
|
background: #FFF;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.tab_list .scroll-menu.data-v-c58b4fba {
|
.tab_list .scroll-menu.data-v-c58b4fba {
|
||||||
|
|
@ -45,11 +50,19 @@
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: #ff4c4f;
|
background-color: #ff4c4f;
|
||||||
}
|
}
|
||||||
|
.menu.data-v-c58b4fba {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
margin-top: 101px;
|
||||||
|
height: calc(100vh - 101px) !important;
|
||||||
|
}
|
||||||
.left.data-v-c58b4fba {
|
.left.data-v-c58b4fba {
|
||||||
top: 90px !important;
|
top: 101px !important;
|
||||||
|
position: fixed;
|
||||||
|
background-color: #f7f7f7;
|
||||||
}
|
}
|
||||||
.right.data-v-c58b4fba {
|
.right.data-v-c58b4fba {
|
||||||
top: 90px !important;
|
top: 0px !important;
|
||||||
}
|
}
|
||||||
.right .list.data-v-c58b4fba {
|
.right .list.data-v-c58b4fba {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -61,10 +74,11 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 0 2% 10px;
|
margin: 0 2% 10px;
|
||||||
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
.right .item text.data-v-c58b4fba {
|
.right .item text.data-v-c58b4fba {
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
|
|
@ -90,19 +104,19 @@
|
||||||
height: 340rpx;
|
height: 340rpx;
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
padding-bottom: 55px;
|
padding-bottom: 55px;
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
}
|
||||||
.activeList .list .item.data-v-c58b4fba {
|
.activeList .list .item.data-v-c58b4fba {
|
||||||
width: 29%;
|
width: 29%;
|
||||||
border: 1px solid #ff4c4f;
|
border: 1px solid #ff4c4f;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0 2% 10px;
|
margin: 0 2% 10px;
|
||||||
|
float: left;
|
||||||
|
padding: 0 5px;
|
||||||
}
|
}
|
||||||
.activeList .list .item icon.data-v-c58b4fba {
|
.activeList .list .item icon.data-v-c58b4fba {
|
||||||
color: #ff4c4f;
|
color: #ff4c4f;
|
||||||
|
|
@ -133,6 +147,9 @@
|
||||||
background-color: #ff4c4f;
|
background-color: #ff4c4f;
|
||||||
}
|
}
|
||||||
.maxheight.data-v-c58b4fba {
|
.maxheight.data-v-c58b4fba {
|
||||||
height: calc(100vh - 600rpx);
|
padding-bottom: 265rpx;
|
||||||
|
}
|
||||||
|
.maxheight .left.data-v-c58b4fba {
|
||||||
|
height: calc(100vh - 500rpx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,13 @@ var _default = {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
onLoad: function onLoad() {},
|
onLoad: function onLoad() {},
|
||||||
|
onShow: function onShow() {
|
||||||
|
console.log("11111111onshow");
|
||||||
|
},
|
||||||
|
onTabItemClick: function onTabItemClick(itemPath) {
|
||||||
|
// 例如,你可以在这里添加一个确认对话框
|
||||||
|
console.log("itemPath", itemPath);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//
|
//
|
||||||
getAddFood: function getAddFood(list) {
|
getAddFood: function getAddFood(list) {
|
||||||
|
|
@ -239,8 +246,7 @@ var _default = {
|
||||||
list.forEach(function (ite) {
|
list.forEach(function (ite) {
|
||||||
ite.weight = null;
|
ite.weight = null;
|
||||||
});
|
});
|
||||||
that.info.food_list = list;
|
that.info.food_list = that.$tools.mergeAndDeduplicate(that.info.food_list, list, 'name');
|
||||||
console.log("list", list);
|
|
||||||
},
|
},
|
||||||
// 清空食材
|
// 清空食材
|
||||||
handleClose: function handleClose() {
|
handleClose: function handleClose() {
|
||||||
|
|
@ -452,6 +458,18 @@ var _default = {
|
||||||
that.$model.getAddCookbook(that.info).then(function (res2) {
|
that.$model.getAddCookbook(that.info).then(function (res2) {
|
||||||
if (res2.code == 0) {
|
if (res2.code == 0) {
|
||||||
that.$tools.msg("添加成功");
|
that.$tools.msg("添加成功");
|
||||||
|
that.isFood = true;
|
||||||
|
that.info = {
|
||||||
|
cook_label: null,
|
||||||
|
title: "",
|
||||||
|
description: "",
|
||||||
|
food_list: [],
|
||||||
|
cover: null,
|
||||||
|
//封面id
|
||||||
|
step_list: []
|
||||||
|
};
|
||||||
|
that.FMimg = "";
|
||||||
|
that.cookIndex = null;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/menu/menu"
|
url: "/pages/menu/menu"
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -185,7 +185,19 @@ var _default = {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.handleHomeConfig();
|
that.handleHomeConfig();
|
||||||
},
|
},
|
||||||
onShow: function onShow() {},
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
|
var that = this;
|
||||||
|
that.menu = [];
|
||||||
|
that.index = 0;
|
||||||
|
that.fimages = [];
|
||||||
|
that.list = [];
|
||||||
|
that.tools = [];
|
||||||
|
that.footlist = [];
|
||||||
|
that.handleHomeConfig();
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 菜谱,食材,banner,金刚区配置
|
// 菜谱,食材,banner,金刚区配置
|
||||||
handleHomeConfig: function handleHomeConfig() {
|
handleHomeConfig: function handleHomeConfig() {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "首页",
|
"navigationBarTitleText": "首页",
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"search": "/components/search",
|
"search": "/components/search",
|
||||||
"food-list": "/components/list"
|
"food-list": "/components/list"
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ var _default = {
|
||||||
that.page = 1;
|
that.page = 1;
|
||||||
that.handleCookListLabel();
|
that.handleCookListLabel();
|
||||||
},
|
},
|
||||||
onReachBottom: function onReachBottom() {
|
onPullDownRefresh: function onPullDownRefresh() {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!this.lastPage || this.page >= this.lastPage) {
|
if (!this.lastPage || this.page >= this.lastPage) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -196,6 +196,9 @@ var _default = {
|
||||||
}
|
}
|
||||||
this.page++;
|
this.page++;
|
||||||
this.handleCookListLabel();
|
this.handleCookListLabel();
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 食材列表
|
// 食材列表
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "菜谱",
|
"navigationBarTitleText": "菜谱",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true,
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"search": "/components/search"
|
"search": "/components/search"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue