Authored by 李奇

扩展活动表区分大转盘活动

... ... @@ -40,6 +40,8 @@
<a class="btn btn-info" href="/admin/activity/article?actId={{id}}">文章列表</a>
<a class="btn btn-primary" href="/admin/activity/createArticle?actId={{id}}">
创建文章</a>
<a class="btn btn-primary" href="/admin/wheelSurf/decor?actId={{id}}">
大转盘活动配置</a>
<button class="btn btn-danger btn-delete" data-id="{{id}}">删除活动
</button>
</td>
... ...
... ... @@ -107,7 +107,8 @@ module.exports = (env) => {
alias:{
'vue$':'vue/dist/vue.esm.js',
'vue@': path.join(__dirname, '../public/vue')
}
},
extensions: ['.js', '.json', '.vue']
},
stats: {
children: false
... ...
... ... @@ -5,6 +5,9 @@
*/
#注意:GO;分割执行块
# 活动表区分类型
ALTER TABLE activity ADD `type` INT(2) DEFAULT 0 COMMENT '活动类型:1、大转盘活动';
GO;
# 大转盘活动配置数据表
CREATE TABLE IF NOT EXISTS act_wheel_surf_conf (
... ...
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from 'vue@/App.vue';
import {create, list} from 'vue@/wheel-surf';
import {create, list, decor} from 'vue@/wheel-surf';
require('admin/wheel-surf.page.css');
... ... @@ -10,6 +10,7 @@ Vue.use(VueRouter);
const router = new VueRouter({
routes: [
{path: '/admin/wheelSurf', component: list},
{path: '/admin/wheelSurf/decor', name: 'decor', component: decor},
{path: '/admin/wheelSurf/create', name: 'create', component: create}
],
mode: 'history'
... ...
<template>
<div>
<div class="">
<div class="main-conf">
</div>
<div class="main-">
</div>
</div>
<div>
<button class="btn btn-info">预览</button>
<button class="btn btn-primary">保存</button>
</div>
</div>
</template>
<script>
module.exports = {
data() {
return {
actId: 0
};
},
created() {
this.actId = this.$route.query.actId;
},
methods: {
create() {
this.$router.push({name: 'create'});
}
}
}
</script>
<style>
</style>
... ...
import create from './create.vue';
import list from './list.vue';
import decor from './decor';
export {
create,
list
list,
decor
}
... ...
... ... @@ -14,7 +14,7 @@
methods: {
create() {
console.log(this.$router.push)
this.$router.push({name: 'create'});
this.$router.push({name: 'decor', query: {actId: 1}});
}
}
}
... ...