完成茶株游戏

This commit is contained in:
闵宪瑞 2024-11-18 17:34:00 +08:00
parent a312c9e95a
commit 8a63422688
5 changed files with 79 additions and 54 deletions

View File

@ -12,19 +12,20 @@
:collapse-transition="true"
mode="vertical"
>
<sidebar-item v-for="route in sidebarRouters" :key="route.url" :item="route" :base-path="route.url" />
<sidebar-item v-for="route in sidebarRouters" :key="route.url" :item="route" :base-path="route.url" />
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters,mapState } from 'vuex'
import {mapGetters, mapState} from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
export default {
components: { SidebarItem, Logo },
components: {SidebarItem, Logo},
computed: {
...mapState(["settings"]),
...mapGetters([
@ -34,7 +35,7 @@ export default {
]),
activeMenu() {
const route = this.$route
const { meta, path } = route
const {meta, path} = route
// if set path, the sidebar will highlight the path you set
if (meta.activeMenu) {
return meta.activeMenu
@ -54,8 +55,8 @@ export default {
}
</script>
<style lang="scss">
.el-submenu__icon-arrow{
color: #fff !important;
}
.el-submenu__icon-arrow {
color: #fff !important;
}
</style>

View File

@ -326,12 +326,13 @@
<el-form-item label="内容" prop="content">
<Tinymce v-model="teaPlants.content"></Tinymce>
</el-form-item>
<!-- <el-form-item label="热门标识" prop="isHot">-->
<!-- <el-input v-model="teaPlants.isHot" placeholder="请输入热门标识"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="热门标识" prop="isHot">-->
<!-- <el-input v-model="teaPlants.isHot" placeholder="请输入热门标识"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="热门显示天数" prop="hotDay">
<el-input-number v-model="teaPlants.hotDay" :min="0" :max="365" placeholder="请输入热门显示天数"></el-input-number>
<el-input-number v-model="teaPlants.hotDay" :min="0" :max="365"
placeholder="请输入热门显示天数"></el-input-number>
</el-form-item>
<el-form-item>
<el-button v-hasPermi="['admin:game:update']" type="primary" @click="submitForm">提交</el-button>
@ -510,7 +511,7 @@ export default {
case 'pi4':
_this.teaPlants.hotImage = img[0].sattDir;
break;
case 'pi6':
case 'pi6':
_this.specsData.image = img[0].sattDir;
break;
case 'pi5':

View File

@ -7,10 +7,21 @@
<div class="clearfix">
<div class="container">
<el-form :model="specsData" label-width="120px" class="stage-form">
<el-form-item label="活动名称" prop="name">
<el-form-item label="抽奖名称" prop="name">
<el-input v-model="specsData.name"></el-input>
</el-form-item>
<el-form-item label="活动开始时间" prop="beginTime">
<!-- <el-form-item label="背景图片" prop="id">-->
<!-- <div class="upLoadPicBox" @click="modalPicTap('1','pi6')">-->
<!-- <div v-if="specsData.image" class="pictrue">-->
<!-- <img :src="specsData.image"></div>-->
<!-- <div v-else class="upLoad">-->
<!-- <i class="el-icon-camera cameraIconfont"/>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-form-item>-->
<el-form-item label="抽奖开始时间" prop="beginTime">
<el-date-picker
v-model="specsData.beginTime"
type="datetime"
@ -18,7 +29,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="活动结束时间" prop="endTime">
<el-form-item label="抽奖结束时间" prop="endTime">
<el-date-picker
v-model="specsData.endTime"
type="datetime"
@ -31,8 +42,6 @@
</div>
</el-card>
<div class="mt20"></div>
<el-table
:data="specsData.items"
style="width: 100%;">
@ -83,6 +92,12 @@
align="center"
label="数量">
</el-table-column>
<el-table-column
prop="productPrice"
header-align="center"
align="center"
label="价值">
</el-table-column>
<el-table-column
prop="lotteryRate"
@ -101,6 +116,23 @@
</template>
</el-table-column>
</el-table>
<div class="mt20"></div>
<!-- <div style="width: 200px;">-->
<!-- 抽奖状态{{specsData.status}}-->
<!-- <el-switch-->
<!-- v-model="specsData.status"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- active-color="#13ce66"-->
<!-- inactive-color="#ff4949"-->
<!-- >-->
<!-- </el-switch>-->
<!-- </div>-->
<div class="mt20"></div>
<el-button type="primary" @click="submit()">提交修改</el-button>
<el-dialog
@ -117,6 +149,11 @@
</div>
</div>
</el-form-item>
<el-form-item v-if="teaPlants.id == 7" label="优惠券">
<el-input v-model="teaPlants.productId"/>
</el-form-item>
<el-form-item label="奖品名称">
<el-input v-model="teaPlants.productName"/>
</el-form-item>
@ -130,6 +167,9 @@
<el-form-item label="奖品概率">
<el-input type="number" v-model="teaPlants.lotteryRate"/>
</el-form-item>
<el-form-item label="奖品价值">
<el-input type="number" v-model="teaPlants.productPrice"/>
</el-form-item>
<el-form-item>
<el-button v-hasPermi="['admin:game:update']" type="primary" @click="submitForm">提交</el-button>
</el-form-item>
@ -243,7 +283,7 @@ export default {
this.gameFrom.cid = this.specsData.cid
this.gameFrom.id = this.specsData.id
//todo
this.gameFrom.image = "茶株游戏不需要图片"
this.gameFrom.image = "抽奖游戏不需要图片"
this.gameFrom.name = this.specsData.name
gamesUpdateApi(this.gameFrom).then(() => {
this.$message.success('操作成功');
@ -270,6 +310,9 @@ export default {
case 'pi5':
_this.teaPlants.productImage = img[0].sattDir;
break;
case 'pi6':
_this.specsData.image = img[0].sattDir;
break;
}
}
}, tit, 'content');
@ -293,14 +336,8 @@ export default {
</script>
<style scoped>
.input-row {
display: flex; /* 使用 Flex 布局 */
align-items: center; /* 垂直居中 */
gap: 5px; /* 控制子元素之间的间距 */
}
.input-item {
flex: 1; /* 控制输入框的宽度,如果需要调整大小比例可以设置 flex 属性 */
.container{
width: 340px;
}
</style>

View File

@ -1,15 +0,0 @@
<template>
<div>
<router-view />
</div>
</template>
<script>
export default {
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -1,17 +1,19 @@
<template>
<div class="divBox">
<el-card class="box-card">
<el-tabs v-model="activeNamel1" @tab-click="handleTabClick" v-loading="loading" v-if="checkPermi(['admin:system:config:info'])">
<el-tab-pane
v-for="tab,index in treeList"
v-for="(tab,index) in treeList"
:key="index"
:label="tab.name"
:name="tab.id.toString()">
<template>
<el-tabs v-if="tab.child.length > 0" v-model="activeNamel2"
<el-tabs v-model="activeNamel2"
type="border-card" @tab-click="handleItemTabClick">
<el-tab-pane
v-for="tabItem,itemIndex in tab.child"
v-for="(tabItem,itemIndex) in tab.child"
:key="itemIndex"
:label="tabItem.name"
:name="tabItem.extra"
@ -25,22 +27,21 @@
/>
</el-tab-pane>
</el-tabs>
<span v-else>
<parser
v-if="formConf.render"
:is-edit="formConf.isEdit"
:form-conf="formConf.content"
:form-edit-data="currentEditData"
@submit="handlerSubmit"
/>
</span>
<!-- <span v-else>-->
<!-- <parser-->
<!-- v-if="formConf.render"-->
<!-- :is-edit="formConf.isEdit"-->
<!-- :form-conf="formConf.content"-->
<!-- :form-edit-data="currentEditData"-->
<!-- @submit="handlerSubmit"-->
<!-- />-->
<!-- </span>-->
</template>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<script>
import parser from '@/components/FormGenerator/components/parser/Parser'
import * as categoryApi from '@/api/categoryApi.js'