|
|
@@ -35,8 +35,8 @@
|
|
|
style="transform: rotate(90deg);margin-left: 6rpx;"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="bg-white">
|
|
|
- <u-notice-bar mode="horizontal" :list="appProperties.shopNotice"></u-notice-bar>
|
|
|
+ <view class="bg-white" v-if="$isNotEmpty(appProperties.shopNotice)">
|
|
|
+ <u-notice-bar mode="horizontal" :list="[appProperties.shopNotice]"></u-notice-bar>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -115,7 +115,7 @@
|
|
|
</block>
|
|
|
</block>
|
|
|
|
|
|
- <view class="" v-show="!isLoading">
|
|
|
+ <view class="" v-show="!isLoading && $isNotEmpty(goods)">
|
|
|
<!-- 购物车栏 begin -->
|
|
|
<view class="cart-box" v-if="cart && cart.length">
|
|
|
<view class="mark" @tap="cartPopupVisible = !cartPopupVisible">
|
|
|
@@ -287,13 +287,13 @@
|
|
|
shopDetail: {},
|
|
|
appProperties: {
|
|
|
"shopName": "",
|
|
|
- "sendingPrice": 1, // 商家配送费
|
|
|
- "packingPrice": 1, // 包装费
|
|
|
- "sendingNeedLeastPrice": 2000, // 起送需要的最低价格
|
|
|
+ "sendingPrice": 0, // 商家配送费
|
|
|
+ "packingPrice": 0, // 包装费
|
|
|
+ "sendingNeedLeastPrice": 0, // 起送需要的最低价格
|
|
|
"businessStartTime": '09:00:00', // 营业开始时间, 开始的点必须在结束之前
|
|
|
- "businessEndTime": '22:00:00', // 营业结束时间
|
|
|
+ "businessEndTime": '19:00:00', // 营业结束时间
|
|
|
"shopStatus": true, // 商家营业状态
|
|
|
- "shopNotice": ['10点到22点可以送餐~'], // 公告
|
|
|
+ "shopNotice": '', // 公告
|
|
|
},
|
|
|
goods: {},
|
|
|
currentCategoryName: '', // 默认分类
|
|
|
@@ -470,14 +470,26 @@
|
|
|
await this.initShop()
|
|
|
await this.initMenu()
|
|
|
await this.initCart()
|
|
|
+ this.initShopConfig()
|
|
|
},
|
|
|
- initShop() {
|
|
|
+
|
|
|
+ async initShop() {
|
|
|
let params = {
|
|
|
id: this.shopId
|
|
|
}
|
|
|
- this.$api.shop.detail(params).then(res => {
|
|
|
- this.shopDetail = res.data
|
|
|
- this.appProperties.shopName = this.shopDetail.name
|
|
|
+ let res=await this.$api.shop.detail(params)
|
|
|
+ this.shopDetail = res.data
|
|
|
+ this.appProperties.shopName=this.shopDetail.name
|
|
|
+ },
|
|
|
+ initShopConfig(){
|
|
|
+ let params={
|
|
|
+ shopId:this.shopId
|
|
|
+ }
|
|
|
+ this.$api.shopConfig.list(params).then(res=>{
|
|
|
+ if (this.$isNotEmpty(res.data.records)) {
|
|
|
+ this.$util.objectCopy(this.appProperties,res.data.records[0])
|
|
|
+ this.appProperties.shopName=this.shopDetail.name
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
async initMenu() {
|