This commit is contained in:
qiaocl 2025-04-03 16:29:29 +08:00
parent 8ab068036e
commit 1790b4c823
50 changed files with 236 additions and 101 deletions

View File

@ -1,5 +1,9 @@
<script>
export default {
onTabItemClick(itemPath) {
//
console.log("itemPath", itemPath)
},
onLaunch: function() {
// this.handleHomeConfig()
console.log('App Launch')

View File

@ -43,7 +43,7 @@
left: 0;
right: 0;
padding: 0 15px 10px;
z-index: 9;
z-index: 99;
background-color: #efefef;
.serach-box {

View File

@ -3,28 +3,29 @@
<!-- 搜索 -->
<search @handleSearch="handleSearch"></search>
<view class="box menu">
<!-- 头部1级菜单栏 -->
<view class="tab_list">
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
<view class="tabbar" v-for="(ite,ind) in menuTop" :key="ind" @click="handleToggle(ind)">
<view :class="[index ==ind?'active':'']">{{ite.name}}</view>
</view>
</scroll-view>
</view>
<!-- 头部1级菜单栏 -->
<view class="tab_list">
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
<view class="tabbar" v-for="(ite,ind) in menuTop" :key="ind" @click="handleToggle(ind)">
<view :class="[index ==ind?'active':'']">{{ite.name}}</view>
</view>
</scroll-view>
</view>
<view class="box menu" :class="[ActiveList.length?'maxheight':'']">
<!-- 左侧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':'']"
@click="handleToggleLeft(ind)">
{{ite.name}}
</view>
</view>
<!-- 右侧3级 -->
<view class="right" :class="[ActiveList.length?'maxheight':'']">
<view class="right">
<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':'']">
<text>{{ite.name}}</text>
<text class="overflow">{{ite.name}}</text>
<icon class="iconfont" :class="[ActiveList.indexOf(ite)!=-1?'icon-xuanzhong':'icon-add']" />
</view>
</view>
@ -39,7 +40,7 @@
<view class="list">
<view class="item" v-for="(ite,ind) in ActiveList" :key="ind">
<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 class="groupbtn">
@ -91,7 +92,7 @@
}
that.handleHomeInfo()
},
onReachBottom() {
onPullDownRefresh() {
let that = this
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
@ -104,6 +105,9 @@
if (that.menu2.length) {
that.handleHomeInfo()
}
setTimeout(function() {
uni.stopPullDownRefresh();
}, 500);
},
methods: {
handleHomeInfo() {
@ -139,12 +143,18 @@
that.handleHomeInfo()
},
//
handleDetail(ite) {
handleDetail(ite, ind) {
var that = this;
if (that.ActiveList.indexOf(ite) == -1) {
that.ActiveList.push(ite);
let list = []
if (ind == 1) {
list.push(ite)
that.ActiveList = that.$tools.mergeAndDeduplicate(that.ActiveList, list, 'name')
} 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>
.tab_list {
display: flex;
margin: 45px -10px 0;
top: 50px;
width: 100%;
position: fixed;
z-index: 99;
height: 45px;
background: #FFF;
justify-content: space-between;
.scroll-menu {
@ -216,12 +231,21 @@
}
}
.menu {
width: 100%;
position: relative;
margin-top: 101px;
height: calc(100vh - 101px) !important;
}
.left {
top: 90px !important;
top: 101px !important;
position: fixed;
background-color: #f7f7f7;
}
.right {
top: 90px !important;
top: 0px !important;
.list {
display: flex;
@ -234,10 +258,11 @@
display: flex;
align-items: center;
box-sizing: border-box;
justify-content: space-around;
justify-content: space-between;
height: 30px;
border-radius: 5px;
margin: 0 2% 10px;
padding: 0 5px;
text {
margin-bottom: 0 !important;
@ -269,19 +294,21 @@
height: 340rpx;
overflow: scroll;
padding-bottom: 55px;
display: flex;
flex-wrap: wrap;
// display: flex;
// flex-wrap: wrap;
.item {
width: 29%;
border: 1px solid $maincolor;
display: flex;
justify-content: space-around;
justify-content: space-between;
height: 28px;
box-sizing: border-box;
border-radius: 5px;
align-items: center;
margin: 0 2% 10px;
float: left;
padding: 0 5px;
icon {
color: $maincolor;
@ -319,6 +346,10 @@
}
.maxheight {
height: calc(100vh - 600rpx);
padding-bottom: 265rpx;
.left {
height: calc(100vh - 500rpx);
}
}
</style>

View File

@ -3,13 +3,14 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true
}
}, {
"path": "pages/menu/menu",
"style": {
"navigationBarTitleText": "菜谱",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
},
@ -98,7 +99,7 @@
"path": "me/foodlist",
"style": {
"navigationBarTitleText": "食材库",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
}, {
"path": "count/setting",

View File

@ -106,6 +106,13 @@
},
},
onLoad() {},
onShow() {
console.log("11111111onshow")
},
onTabItemClick(itemPath) {
//
console.log("itemPath", itemPath)
},
methods: {
//
getAddFood(list) {
@ -113,8 +120,7 @@
list.forEach(ite => {
ite.weight = null
})
that.info.food_list = list
console.log("list", list)
that.info.food_list = that.$tools.mergeAndDeduplicate(that.info.food_list, list, 'name')
},
//
handleClose() {
@ -322,6 +328,17 @@
that.$model.getAddCookbook(that.info).then(res2 => {
if (res2.code == 0) {
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() {
uni.switchTab({
url: "/pages/menu/menu"

View File

@ -23,7 +23,7 @@
<!-- 进度 -->
<view class="left ">
<qiun-data-charts type="arcbar" :chartData="chartData" :canvas2d="true" :cHeight="300"
:cWidth="300" />
:cWidth="300" canvasId="arcbar008"/>
<view class="center">
还能吃
<text>{{remaining_kcal}}</text>

View File

@ -75,7 +75,19 @@
let that = this
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: {
// banner,
handleHomeConfig() {

View File

@ -60,7 +60,7 @@
that.page = 1
that.handleCookListLabel()
},
onReachBottom() {
onPullDownRefresh() {
let that = this
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
@ -71,6 +71,9 @@
}
this.page++
this.handleCookListLabel()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 500);
},
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

View File

@ -120,6 +120,10 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = void 0;
var _default = {
onTabItemClick: function onTabItemClick(itemPath) {
// 例如,你可以在这里添加一个确认对话框
console.log("itemPath", itemPath);
},
onLaunch: function onLaunch() {
// this.handleHomeConfig()
console.log('App Launch');

View File

@ -19,6 +19,10 @@

View File

@ -1747,7 +1747,7 @@ function initData(vueOptions, context) {
try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据
} 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);
}
}
@ -9812,7 +9812,7 @@ function type(obj) {
function flushCallbacks$1(vm) {
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;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@ -9833,14 +9833,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher
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;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick');
}
return nextTick(cb, vm)
}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;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick');
@ -9936,7 +9936,7 @@ var patch = function(oldVnode, vnode) {
});
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
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 +
']差量更新',
JSON.stringify(diffData));
@ -18812,13 +18812,14 @@ var _default = {
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true
}
}, {
"path": "pages/menu/menu",
"style": {
"navigationBarTitleText": "菜谱",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
}, {
"path": "pages/add/add",
@ -18893,7 +18894,7 @@ var _default = {
"path": "me/foodlist",
"style": {
"navigationBarTitleText": "食材库",
"enablePullDownRefresh": false
"enablePullDownRefresh": true
}
}, {
"path": "count/setting",

View File

@ -31,7 +31,7 @@
left: 0;
right: 0;
padding: 0 15px 10px;
z-index: 9;
z-index: 99;
background-color: #efefef;
}
.serachBox .serach-box.data-v-039252a3 {

View File

@ -103,28 +103,26 @@ var render = function () {
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var g0 = _vm.ActiveList.length
var g1 = _vm.ActiveList.length
var l0 = _vm.__map(_vm.menu3, function (ite, ind) {
var $orig = _vm.__get_orig(ite)
var g1 = _vm.ActiveList.indexOf(ite)
var g2 = _vm.ActiveList.indexOf(ite)
var g3 = _vm.ActiveList.indexOf(ite)
return {
$orig: $orig,
g1: g1,
g2: g2,
g3: g3,
}
})
var g4 = _vm.menu3.length
var g5 = _vm.ActiveList.length
var g3 = _vm.menu3.length
var g4 = _vm.ActiveList.length
_vm.$mp.data = Object.assign(
{},
{
$root: {
g0: g0,
g1: g1,
l0: l0,
g3: g3,
g4: g4,
g5: g5,
},
}
)
@ -212,7 +210,7 @@ var _default = {
}
that.handleHomeInfo();
},
onReachBottom: function onReachBottom() {
onPullDownRefresh: function onPullDownRefresh() {
var that = this;
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
@ -225,6 +223,9 @@ var _default = {
if (that.menu2.length) {
that.handleHomeInfo();
}
setTimeout(function () {
uni.stopPullDownRefresh();
}, 500);
},
methods: {
handleHomeInfo: function handleHomeInfo() {
@ -260,12 +261,18 @@ var _default = {
that.handleHomeInfo();
},
// 商品选择
handleDetail: function handleDetail(ite) {
handleDetail: function handleDetail(ite, ind) {
var that = this;
if (that.ActiveList.indexOf(ite) == -1) {
that.ActiveList.push(ite);
var list = [];
if (ind == 1) {
list.push(ite);
that.ActiveList = that.$tools.mergeAndDeduplicate(that.ActiveList, list, 'name');
} 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);
}
}
}
},
// 商品清空

View File

@ -1,6 +1,6 @@
{
"navigationBarTitleText": "食材库",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"usingComponents": {
"search": "/components/search"
}

View File

@ -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>

View File

@ -26,7 +26,12 @@
/* 文章场景相关 */
.tab_list.data-v-c58b4fba {
display: flex;
margin: 45px -10px 0;
top: 50px;
width: 100%;
position: fixed;
z-index: 99;
height: 45px;
background: #FFF;
justify-content: space-between;
}
.tab_list .scroll-menu.data-v-c58b4fba {
@ -45,11 +50,19 @@
border-radius: 5px;
background-color: #ff4c4f;
}
.menu.data-v-c58b4fba {
width: 100%;
position: relative;
margin-top: 101px;
height: calc(100vh - 101px) !important;
}
.left.data-v-c58b4fba {
top: 90px !important;
top: 101px !important;
position: fixed;
background-color: #f7f7f7;
}
.right.data-v-c58b4fba {
top: 90px !important;
top: 0px !important;
}
.right .list.data-v-c58b4fba {
display: flex;
@ -61,10 +74,11 @@
display: flex;
align-items: center;
box-sizing: border-box;
justify-content: space-around;
justify-content: space-between;
height: 30px;
border-radius: 5px;
margin: 0 2% 10px;
padding: 0 5px;
}
.right .item text.data-v-c58b4fba {
margin-bottom: 0 !important;
@ -90,19 +104,19 @@
height: 340rpx;
overflow: scroll;
padding-bottom: 55px;
display: flex;
flex-wrap: wrap;
}
.activeList .list .item.data-v-c58b4fba {
width: 29%;
border: 1px solid #ff4c4f;
display: flex;
justify-content: space-around;
justify-content: space-between;
height: 28px;
box-sizing: border-box;
border-radius: 5px;
align-items: center;
margin: 0 2% 10px;
float: left;
padding: 0 5px;
}
.activeList .list .item icon.data-v-c58b4fba {
color: #ff4c4f;
@ -133,6 +147,9 @@
background-color: #ff4c4f;
}
.maxheight.data-v-c58b4fba {
height: calc(100vh - 600rpx);
padding-bottom: 265rpx;
}
.maxheight .left.data-v-c58b4fba {
height: calc(100vh - 500rpx);
}

View File

@ -232,6 +232,13 @@ var _default = {
}
}),
onLoad: function onLoad() {},
onShow: function onShow() {
console.log("11111111onshow");
},
onTabItemClick: function onTabItemClick(itemPath) {
// 例如,你可以在这里添加一个确认对话框
console.log("itemPath", itemPath);
},
methods: {
//
getAddFood: function getAddFood(list) {
@ -239,8 +246,7 @@ var _default = {
list.forEach(function (ite) {
ite.weight = null;
});
that.info.food_list = list;
console.log("list", list);
that.info.food_list = that.$tools.mergeAndDeduplicate(that.info.food_list, list, 'name');
},
// 清空食材
handleClose: function handleClose() {
@ -452,6 +458,18 @@ var _default = {
that.$model.getAddCookbook(that.info).then(function (res2) {
if (res2.code == 0) {
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 () {
uni.switchTab({
url: "/pages/menu/menu"

File diff suppressed because one or more lines are too long

View File

@ -185,7 +185,19 @@ var _default = {
var that = this;
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: {
// 菜谱食材banner,金刚区配置
handleHomeConfig: function handleHomeConfig() {

View File

@ -1,5 +1,6 @@
{
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true,
"usingComponents": {
"search": "/components/search",
"food-list": "/components/list"

View File

@ -185,7 +185,7 @@ var _default = {
that.page = 1;
that.handleCookListLabel();
},
onReachBottom: function onReachBottom() {
onPullDownRefresh: function onPullDownRefresh() {
var that = this;
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
@ -196,6 +196,9 @@ var _default = {
}
this.page++;
this.handleCookListLabel();
setTimeout(function () {
uni.stopPullDownRefresh();
}, 500);
},
methods: {
// 食材列表

View File

@ -1,6 +1,6 @@
{
"navigationBarTitleText": "菜谱",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"usingComponents": {
"search": "/components/search"
}