lixuan
lixuan 3 years ago
parent 50b38e9218
commit c77585c60e
  1. 2
      pages/home/home.vue
  2. 12
      pages/station-price/station-price.vue

@ -408,7 +408,7 @@
}else{ }else{
this.showHeight = '340rpx' this.showHeight = '340rpx'
} }
uni.setStorageSync('oilSiteId',res.data.site.siteCode) uni.setStorageSync('oilSitePriceId',res.data.site.id)
} }
}) })
}, },

@ -1,6 +1,7 @@
<template> <template>
<view class="page-content" style="background:#eff3f4;overflow: hidden;"> <view class="page-content" style="background:#eff3f4;overflow: hidden;">
<cu-custom class="bg-main-oil" :isBack="true" bgColor="bg-main-oil"> <cu-custom class="bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="content">促销编辑</block>
<block slot="backText">返回</block> <block slot="backText">返回</block>
</cu-custom> </cu-custom>
<view class="main-money margin margin-bottom-0 radius bg-white cuxiao"> <view class="main-money margin margin-bottom-0 radius bg-white cuxiao">
@ -39,7 +40,7 @@
} }
}, },
onLoad() { onLoad() {
this.oilSiteId = uni.getStorageSync('oilSiteId') this.oilSiteId = uni.getStorageSync('oilSitePriceId')
this.getSiteInfo() this.getSiteInfo()
uni.showShareMenu() uni.showShareMenu()
}, },
@ -61,6 +62,15 @@
console.log(e.detail.value,'dayineeeeeeeeeeeeeeeeeeee') console.log(e.detail.value,'dayineeeeeeeeeeeeeeeeeeee')
}, },
update(){ update(){
if(this.site.activitySwitch && !this.site.activityContent){
uni.showToast({
title:'请输入促销优惠内容'
})
return
}
if(!this.site.activitySwitch && !this.site.activityContent){
this.site.activityContent = '暂无'
}
oliSiteApi.update(this.site).then(res => { oliSiteApi.update(this.site).then(res => {
if (res.code === 20000) { if (res.code === 20000) {
uni.navigateBack() uni.navigateBack()

Loading…
Cancel
Save