修改
This commit is contained in:
@@ -145,5 +145,19 @@ export default{
|
|||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//根据id回显促销编辑
|
||||||
|
getPrice (id) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/oilSiteInfo/get/${id} `,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//促销编辑
|
||||||
|
update(data) {
|
||||||
|
return request({
|
||||||
|
url: `/${service_name}/oilSiteInfo/update`,
|
||||||
|
method: 'POST',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -80,9 +80,18 @@
|
|||||||
<view class="cu-tag badge" v-if="item.badge != 0">
|
<view class="cu-tag badge" v-if="item.badge != 0">
|
||||||
<block v-if="item.badge != 1">{{ item.badge > 99 ? '99+' : item.badge }}</block>
|
<block v-if="item.badge != 1">{{ item.badge > 99 ? '99+' : item.badge }}</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text>{{ item.name }}</text>
|
<text>{{ item.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="cu-item" @tap="routerTo('/pages/station-price/station-price')">
|
||||||
|
<view :class="['cuIcon-' + cuIconList[1].cuIcon, 'text-' + cuIconList[1].color]" class="text-sl">
|
||||||
|
<view class="cu-tag badge" v-if="cuIconList[1].badge != 0">
|
||||||
|
<block v-if="cuIconList[1].badge != 1">
|
||||||
|
{{ cuIconList[1].badge > 99 ? '99+' : cuIconList[1].badge }}</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text>{{ cuIconList[1].name }}</text>
|
||||||
|
</view>
|
||||||
<!-- <view class="cu-item" @tap="routerTo('/pages/TransactionStatistics/TransactionStatistics')">
|
<!-- <view class="cu-item" @tap="routerTo('/pages/TransactionStatistics/TransactionStatistics')">
|
||||||
<view :class="['cuIcon-' + 'new', 'text-' + cuIconList[0].color]" class="text-sl">
|
<view :class="['cuIcon-' + 'new', 'text-' + cuIconList[0].color]" class="text-sl">
|
||||||
<view class="cu-tag badge" v-if="cuIconList[0].badge != 0">
|
<view class="cu-tag badge" v-if="cuIconList[0].badge != 0">
|
||||||
@@ -204,6 +213,13 @@
|
|||||||
badge: 0,
|
badge: 0,
|
||||||
name: '油站信息'
|
name: '油站信息'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
cuIcon: 'moneybag',
|
||||||
|
path: '/pages/station-info/station-info',
|
||||||
|
color: 'yellow',
|
||||||
|
badge: 0,
|
||||||
|
name: '促销优惠'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
cuIcon: 'new',
|
cuIcon: 'new',
|
||||||
path: '/packageChart/operation-analysis/operation-analysis',
|
path: '/packageChart/operation-analysis/operation-analysis',
|
||||||
@@ -297,13 +313,13 @@
|
|||||||
},
|
},
|
||||||
changeMenuList(data){ //这里是切换处 更新权限menus处
|
changeMenuList(data){ //这里是切换处 更新权限menus处
|
||||||
const Menus =data
|
const Menus =data
|
||||||
//console.log('这里是接收menus处',Menus)
|
console.log(data,'1111111111111111111111111111111111111111')
|
||||||
|
console.log('这里是接收menus处',Menus)
|
||||||
let menusList = []
|
let menusList = []
|
||||||
Menus.forEach((item,index,Menus)=>{
|
Menus.forEach((item,index,Menus)=>{
|
||||||
if(item.roleName != 'ROOT' ){
|
if(item.roleName != 'ROOT' ){
|
||||||
// this.Splicing(item)
|
// this.Splicing(item)
|
||||||
menusList.push(this.Splicing(item)) //根据menus做处理
|
menusList.push(this.Splicing(item)) //根据menus做处理
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.setStorageSync('menusChangeList',menusList)
|
uni.setStorageSync('menusChangeList',menusList)
|
||||||
|
|||||||
145
pages/station-price/station-price.vue
Normal file
145
pages/station-price/station-price.vue
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-content" style="background:#eff3f4;overflow: hidden;">
|
||||||
|
<cu-custom class="bg-main-oil" :isBack="true" bgColor="bg-main-oil">
|
||||||
|
<block slot="backText">返回</block>
|
||||||
|
</cu-custom>
|
||||||
|
<view class="main-money margin margin-bottom-0 radius bg-white cuxiao">
|
||||||
|
<view class="cu-card case no-card ">
|
||||||
|
<view class="cuxiao-switch">
|
||||||
|
<text>促销优惠开关:</text>
|
||||||
|
<switch class="red" v-model="site.activitySwitch" :checked="site.activitySwitch" @change="switchChange" style="transform: scale(0.8);"/>
|
||||||
|
</view>
|
||||||
|
<view class="cuxiao-text">
|
||||||
|
<text>促销优惠内容:</text>
|
||||||
|
<textarea maxlength="20" class="textarea" v-model="site.activityContent" placeholder="请输入优惠信息(≤20字)"></textarea>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="bg-main-oil cuxiao-bottom" @tap="update">
|
||||||
|
确认编辑
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import cloudSiteApi from '@/api/cloud-site.js'
|
||||||
|
import OilMenuItem from '@/components/oil-menu-item.vue'
|
||||||
|
import oliSiteApi from '@/api/oli-site.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
OilMenuItem
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mainURL: this.global.mainURL,
|
||||||
|
title: 'Hello',
|
||||||
|
site: {},
|
||||||
|
oilSiteId:'',
|
||||||
|
oilList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.oilSiteId = uni.getStorageSync('oilSiteId')
|
||||||
|
this.getSiteInfo()
|
||||||
|
uni.showShareMenu()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getSiteInfo(){
|
||||||
|
console.log(this.oilSiteId,'qqqqqqqqqq')
|
||||||
|
oliSiteApi.getPrice(this.oilSiteId).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.site = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
switchChange(e){
|
||||||
|
if(e.detail.value){
|
||||||
|
this.site.activitySwitch = 1
|
||||||
|
}else{
|
||||||
|
this.site.activitySwitch = 0
|
||||||
|
}
|
||||||
|
console.log(e.detail.value,'dayineeeeeeeeeeeeeeeeeeee')
|
||||||
|
},
|
||||||
|
update(){
|
||||||
|
oliSiteApi.update(this.site).then(res => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
uni.navigateBack()
|
||||||
|
}else{
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title:res.msg
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scopeds>
|
||||||
|
|
||||||
|
|
||||||
|
.cu-card.case.no-card .image {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-view {
|
||||||
|
height: 300rpx;
|
||||||
|
min-width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.position-re {}
|
||||||
|
|
||||||
|
image {
|
||||||
|
vertical-align: bottom;
|
||||||
|
background-color: rgba(113, 11, 233, 0.5)
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
border-radius: initial;
|
||||||
|
vertical-align: bottom;
|
||||||
|
background-color: rgba(11, 11, 251, 0.7)
|
||||||
|
}
|
||||||
|
|
||||||
|
.move-top {
|
||||||
|
margin-top: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.position-call {
|
||||||
|
position: absolute;
|
||||||
|
right: 30upx;
|
||||||
|
bottom: 30upx;
|
||||||
|
}
|
||||||
|
.cuxiao{
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
width: 90%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -45%;
|
||||||
|
padding: 75rpx 40rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.cuxiao-switch{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
.cuxiao-switch text,.cuxiao-text text{
|
||||||
|
font-size: 32rpx;
|
||||||
|
}
|
||||||
|
.cuxiao-text textarea{
|
||||||
|
border: 1px solid #e4e4e4;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.cuxiao-bottom{
|
||||||
|
margin-bottom: 150px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user