|
@@ -1,55 +1,64 @@
|
|
<template>
|
|
<template>
|
|
<view class='content'>
|
|
<view class='content'>
|
|
<view class='wrap'>
|
|
<view class='wrap'>
|
|
- <view class='flex align-items-flex-start justify-space-between'>
|
|
|
|
- <view class="flex">
|
|
|
|
- <view class="head_sculpture">
|
|
|
|
- <u--image :showLoading="true" :src="currectData.coverImage" width="80rpx" height="80rpx" shape="circle"></u--image>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <view @click='switchShop' style='font-size:28rpx;'>{{currectData.shopNames}}<image src="@/static/image/yjt.png" mode=""
|
|
|
|
- style="margin-left:10rpx;width:12rpx;height: 21rpx;"></image></view>
|
|
|
|
- <view style='color:#999;font-size:24rpx;'>{{currectData.detailedAddress}}</view>
|
|
|
|
|
|
+ <view class='flex align-items-flex-start justify-space-between'>
|
|
|
|
+ <view class="flex">
|
|
|
|
+ <view class="head_sculpture">
|
|
|
|
+ <u--image :showLoading="true" :src="currectData.coverImage" width="80rpx" height="80rpx"
|
|
|
|
+ shape="circle"></u--image>
|
|
|
|
+ </view>
|
|
|
|
+ <view>
|
|
|
|
+ <view @click='switchShop' style='font-size:28rpx;'>{{currectData.shopNames}}
|
|
|
|
+ <image src="@/static/image/yjt.png" mode=""
|
|
|
|
+ style="margin-left:10rpx;width:12rpx;height: 21rpx;"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view style='color:#999;font-size:24rpx;'>{{currectData.detailedAddress}}</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
-
|
|
|
|
|
|
+
|
|
<view>
|
|
<view>
|
|
- <view class='caution' v-if='currectData.status!="显示中"&&currectData.status!="已隐藏"'>{{currectData.status}}</view>
|
|
|
|
|
|
+ <view class='caution' v-if='currectData.status!="显示中"&&currectData.status!="已隐藏"'>
|
|
|
|
+ {{currectData.status}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class='wrap'>
|
|
|
|
|
|
+ <view class='wrap'>
|
|
<view>
|
|
<view>
|
|
<view style='font-size:28rpx;'>店铺照片</view>
|
|
<view style='font-size:28rpx;'>店铺照片</view>
|
|
- <view style='flex-wrap: wrap;' class='flex'>
|
|
|
|
|
|
+ <view style='flex-wrap: wrap;' class='flex'>
|
|
<view class='shop_image' v-for='item in currectData.indoorImageArray'>
|
|
<view class='shop_image' v-for='item in currectData.indoorImageArray'>
|
|
- <u--image :showLoading="true" :radius='10' :src="item" width="100rpx" height="100rpx" ></u--image>
|
|
|
|
|
|
+ <u--image :showLoading="true" :radius='10' :src="item" width="100rpx"
|
|
|
|
+ height="100rpx"></u--image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style='margin:20rpx 0 30rpx;'>
|
|
<view style='margin:20rpx 0 30rpx;'>
|
|
<view class='switch_show flex' style='font-size:34rpx;'>
|
|
<view class='switch_show flex' style='font-size:34rpx;'>
|
|
- <view :class='showStatus==0?"active":""' @click='switchShow(0)'>商品展示({{currectData.displaysNum?currectData.displaysNum:0}})</view>
|
|
|
|
- <view :class='showStatus==1?"active":""' @click='switchShow(1)'>团购({{currectData.groupNum?currectData.groupNum:0}})</view>
|
|
|
|
|
|
+ <view :class='showStatus==0?"active":""' @click='switchShow(0)'>
|
|
|
|
+ 商品展示({{currectData.displaysNum?currectData.displaysNum:0}})</view>
|
|
|
|
+ <view :class='showStatus==1?"active":""' @click='switchShow(1)'>
|
|
|
|
+ 团购({{currectData.groupNum?currectData.groupNum:0}})</view>
|
|
</view>
|
|
</view>
|
|
<view v-if='showStatus==0' style='font-size:28rpx;'>
|
|
<view v-if='showStatus==0' style='font-size:28rpx;'>
|
|
<view v-for='item in currectData.dishClassifyInfoList' v-show='item.dishesNum'>
|
|
<view v-for='item in currectData.dishClassifyInfoList' v-show='item.dishesNum'>
|
|
- <view>
|
|
|
|
|
|
+ <view class=='flex justify-space-between'>
|
|
<view>{{item.classifyName}}({{item.dishesNum}})</view>
|
|
<view>{{item.classifyName}}({{item.dishesNum}})</view>
|
|
|
|
+ <view @click='up(item)' class="merchants_button">置顶</view>
|
|
</view>
|
|
</view>
|
|
<view style='flex-wrap: wrap;text-align:center;' class='flex'>
|
|
<view style='flex-wrap: wrap;text-align:center;' class='flex'>
|
|
<view style='margin:10rpx;' v-for='item1 in item.foodDishesInfoList'>
|
|
<view style='margin:10rpx;' v-for='item1 in item.foodDishesInfoList'>
|
|
- <u--image :showLoading="true" :src="item1.dishImage" width="150rpx" height="150rpx" ></u--image>
|
|
|
|
|
|
+ <u--image :showLoading="true" :src="item1.dishImage" width="150rpx"
|
|
|
|
+ height="150rpx"></u--image>
|
|
<view>{{item1.dishName}}</view>
|
|
<view>{{item1.dishName}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
<view v-if='showStatus==1'>
|
|
<view v-if='showStatus==1'>
|
|
<view style='margin:10rpx;' v-for='item1 in currectData.foodGroupInfoList'>
|
|
<view style='margin:10rpx;' v-for='item1 in currectData.foodGroupInfoList'>
|
|
- <u--image v-if='item1.showImage' :showLoading="true" :src="item1.showImage":width="width" :height="height"></u--image>
|
|
|
|
|
|
+ <u--image v-if='item1.showImage' :showLoading="true" :src="item1.showImage" :width="width"
|
|
|
|
+ :height="height"></u--image>
|
|
<view>{{item1.groupTitle}}</view>
|
|
<view>{{item1.groupTitle}}</view>
|
|
<view class='flex justify-space-between align-item-center'>
|
|
<view class='flex justify-space-between align-item-center'>
|
|
<view>{{item1.groupPrice}}</view>
|
|
<view>{{item1.groupPrice}}</view>
|
|
@@ -59,26 +68,29 @@
|
|
<view>待用{{item1.notUseNum}}</view>
|
|
<view>待用{{item1.notUseNum}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
- <view v-if='currectData.status=="显示中"||currectData.status=="已隐藏"' style='margin:20rpx;' class='flex justify-space-between'>
|
|
|
|
|
|
+ <view v-if='currectData.status=="显示中"||currectData.status=="已隐藏"' style='margin:20rpx;'
|
|
|
|
+ class='flex justify-space-between'>
|
|
<view class='merchants_button' @click='addfood'>添加菜品</view>
|
|
<view class='merchants_button' @click='addfood'>添加菜品</view>
|
|
<view class='merchants_button' @click='addGroupBuying'>添加团购</view>
|
|
<view class='merchants_button' @click='addGroupBuying'>添加团购</view>
|
|
<view class='merchants_button' @click='shopSetting'>店铺设置</view>
|
|
<view class='merchants_button' @click='shopSetting'>店铺设置</view>
|
|
</view>
|
|
</view>
|
|
<view v-else style='margin:20rpx;' class='flex justify-space-between'>
|
|
<view v-else style='margin:20rpx;' class='flex justify-space-between'>
|
|
- <view v-if='currectData.status=="审核中"||currectData.status=="已禁用"' class='merchants_unable_button' >添加菜品</view>
|
|
|
|
- <view v-if='currectData.status=="审核中"||currectData.status=="已禁用"' class='merchants_unable_button' >添加团购</view>
|
|
|
|
- <view v-if='currectData.status=="审核中"||currectData.status=="已禁用"' class='merchants_unable_button' >店铺设置</view>
|
|
|
|
- <view v-if='currectData.status=="已驳回"' ></view>
|
|
|
|
|
|
+ <view v-if='currectData.status=="审核中"||currectData.status=="已禁用"' class='merchants_unable_button'>添加菜品
|
|
|
|
+ </view>
|
|
|
|
+ <view v-if='currectData.status=="审核中"||currectData.status=="已禁用"' class='merchants_unable_button'>添加团购
|
|
|
|
+ </view>
|
|
|
|
+ <view v-if='currectData.status=="审核中"||currectData.status=="已禁用"' class='merchants_unable_button'>店铺设置
|
|
|
|
+ </view>
|
|
|
|
+ <view v-if='currectData.status=="已驳回"'></view>
|
|
<view v-if='currectData.status=="已驳回"' class='merchants_button' @click='editCateringindustry'>编辑店铺信息</view>
|
|
<view v-if='currectData.status=="已驳回"' class='merchants_button' @click='editCateringindustry'>编辑店铺信息</view>
|
|
<view v-if='currectData.status=="已驳回"'></view>
|
|
<view v-if='currectData.status=="已驳回"'></view>
|
|
</view>
|
|
</view>
|
|
- <u-picker immediateChange='true' title='选择店铺' @cancel='show = false' @confirm='shopConfirm' :show="show" :columns="columns" keyName="shopNames"></u-picker>
|
|
|
|
|
|
+ <u-picker immediateChange='true' title='选择店铺' @cancel='show = false' @confirm='shopConfirm' :show="show"
|
|
|
|
+ :columns="columns" keyName="shopNames"></u-picker>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -87,50 +99,49 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- dataList:[],
|
|
|
|
- currectData:{},
|
|
|
|
- showStatus:0,
|
|
|
|
- show:false,
|
|
|
|
- height:'',
|
|
|
|
- width:'',
|
|
|
|
- columns:[]
|
|
|
|
|
|
+ dataList: [],
|
|
|
|
+ currectData: {},
|
|
|
|
+ showStatus: 0,
|
|
|
|
+ show: false,
|
|
|
|
+ height: '',
|
|
|
|
+ width: '',
|
|
|
|
+ columns: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
that = this
|
|
that = this
|
|
},
|
|
},
|
|
- onShow(){
|
|
|
|
- this.height = (uni.getSystemInfoSync().windowWidth/2);
|
|
|
|
-
|
|
|
|
- this.width = uni.getSystemInfoSync().windowWidth-50;
|
|
|
|
|
|
+ onShow() {
|
|
|
|
+ this.height = (uni.getSystemInfoSync().windowWidth / 2);
|
|
|
|
+ this.width = uni.getSystemInfoSync().windowWidth - 50;
|
|
console.log(this.height)
|
|
console.log(this.height)
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中',
|
|
title: '加载中',
|
|
mask: true
|
|
mask: true
|
|
})
|
|
})
|
|
this.$request.baseRequest('admin.tourism.foodInfo', 'list', {
|
|
this.$request.baseRequest('admin.tourism.foodInfo', 'list', {
|
|
- commonId:uni.getStorageSync("userInfo").id,
|
|
|
|
- page:1,
|
|
|
|
- limit:9999
|
|
|
|
|
|
+ commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ page: 1,
|
|
|
|
+ limit: 9999
|
|
}, failres => {
|
|
}, failres => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "none",
|
|
icon: "none",
|
|
title: failres.errmsg,
|
|
title: failres.errmsg,
|
|
duration: 3000
|
|
duration: 3000
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- for(var i=0;i<res.data.items.length;i++){
|
|
|
|
- if(res.data.items[i].indoorImage){
|
|
|
|
- res.data.items[i].indoorImageArray=res.data.items[i].indoorImage.split(',')
|
|
|
|
|
|
+ for (var i = 0; i < res.data.items.length; i++) {
|
|
|
|
+ if (res.data.items[i].indoorImage) {
|
|
|
|
+ res.data.items[i].indoorImageArray = res.data.items[i].indoorImage.split(',')
|
|
}
|
|
}
|
|
- if(res.data.items[i].foodGroupInfoList){
|
|
|
|
- for(var q=0;q<res.data.items[i].foodGroupInfoList.length;q++){
|
|
|
|
|
|
+ if (res.data.items[i].foodGroupInfoList) {
|
|
|
|
+ for (var q = 0; q < res.data.items[i].foodGroupInfoList.length; q++) {
|
|
var data = res.data.items[i].foodGroupInfoList[q]
|
|
var data = res.data.items[i].foodGroupInfoList[q]
|
|
- if(data.dishImage){
|
|
|
|
|
|
+ if (data.dishImage) {
|
|
var images = data.dishImage.split(',')
|
|
var images = data.dishImage.split(',')
|
|
- data.showImage=images[0]
|
|
|
|
|
|
+ data.showImage = images[0]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -139,41 +150,47 @@
|
|
this.dataList = res.data.items
|
|
this.dataList = res.data.items
|
|
this.currectData = res.data.items[0]
|
|
this.currectData = res.data.items[0]
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- shopConfirm(e){
|
|
|
|
|
|
+ up(item) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ shopConfirm(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
- this.currectData =e.value[0]
|
|
|
|
|
|
+ this.currectData = e.value[0]
|
|
this.show = false
|
|
this.show = false
|
|
},
|
|
},
|
|
- switchShop(){
|
|
|
|
|
|
+ switchShop() {
|
|
this.show = true
|
|
this.show = true
|
|
},
|
|
},
|
|
- switchShow(status){
|
|
|
|
- this.showStatus=status
|
|
|
|
|
|
+ switchShow(status) {
|
|
|
|
+ this.showStatus = status
|
|
},
|
|
},
|
|
- addfood(){
|
|
|
|
|
|
+ addfood() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pageA/enter/myCateringdustry/addfood?foodId='+this.currectData.id+'&shopNames='+this.currectData.shopNames
|
|
|
|
|
|
+ url: '/pageA/enter/myCateringdustry/addfood?foodId=' + this.currectData.id + '&shopNames=' +
|
|
|
|
+ this.currectData.shopNames
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- editCateringindustry(){
|
|
|
|
|
|
+ editCateringindustry() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pageA/enter/myCateringdustry/edit?foodId='+this.currectData.id
|
|
|
|
|
|
+ url: '/pageA/enter/myCateringdustry/edit?foodId=' + this.currectData.id
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- addGroupBuying(){
|
|
|
|
|
|
+ addGroupBuying() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pageA/enter/myCateringdustry/addGroupBuying?foodId='+this.currectData.id+'&shopNames='+this.currectData.shopNames
|
|
|
|
|
|
+ url: '/pageA/enter/myCateringdustry/addGroupBuying?foodId=' + this.currectData.id +
|
|
|
|
+ '&shopNames=' + this.currectData.shopNames
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- shopSetting(){
|
|
|
|
- uni.setStorageSync('myCateringdustry',JSON.stringify(this.currectData))
|
|
|
|
|
|
+ shopSetting() {
|
|
|
|
+ uni.setStorageSync('myCateringdustry', JSON.stringify(this.currectData))
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pageA/enter/myCateringdustry/shopSetting/index?foodId='+this.currectData.id+'&shopNames='+this.currectData.shopNames
|
|
|
|
|
|
+ url: '/pageA/enter/myCateringdustry/shopSetting/index?foodId=' + this.currectData.id +
|
|
|
|
+ '&shopNames=' + this.currectData.shopNames
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -181,19 +198,22 @@
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
<style lang='scss' scoped>
|
|
- .wrap{
|
|
|
|
- padding:20rpx;
|
|
|
|
|
|
+ .wrap {
|
|
|
|
+ padding: 20rpx;
|
|
}
|
|
}
|
|
- .head_sculpture{
|
|
|
|
|
|
+
|
|
|
|
+ .head_sculpture {
|
|
padding: 0 20rpx 20rpx 0;
|
|
padding: 0 20rpx 20rpx 0;
|
|
}
|
|
}
|
|
- .shop_image{
|
|
|
|
- margin:10rpx;
|
|
|
|
|
|
+
|
|
|
|
+ .shop_image {
|
|
|
|
+ margin: 10rpx;
|
|
}
|
|
}
|
|
- .switch_show{
|
|
|
|
- .active{
|
|
|
|
- font-weight:600;
|
|
|
|
- color:#5F7DE9;
|
|
|
|
|
|
+
|
|
|
|
+ .switch_show {
|
|
|
|
+ .active {
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #5F7DE9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|