Commit 382ea8d7 authored by xd's avatar xd

提交测试

parent 32eab36d
...@@ -10,14 +10,16 @@ const routes = [ ...@@ -10,14 +10,16 @@ const routes = [
name: 'home', name: 'home',
component: Home component: Home
}, },
// { {
// path: '/about', path: '/turntableDetail',
// name: 'about', name: 'turntableDetail',
// // route level code-splitting component: () => import(/* webpackChunkName: "about" */ '../views/active/turntableDetail.vue')
// // this generates a separate chunk (about.[hash].js) for this route },
// // which is lazy-loaded when the route is visited. {
// component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') path: '/createActive',
// } name: 'createActive',
component: () => import(/* webpackChunkName: "about" */ '../views/active/createActive.vue')
}
] ]
const router = new VueRouter({ const router = new VueRouter({
......
<template>
<div>
<div class="title">基础设置</div>
<van-cell-group>
<van-cell
class="list"
title="活动标题"
value="新客有礼"
style="font-size:14px;"
/>
<van-cell title="消费后领券" style="font-size:14px;">
<template slot="default">
<van-switch v-model="coupon" size="20px" />
</template>
</van-cell>
<van-cell title="新客专享" style="font-size:14px;">
<template slot="default">
<van-switch v-model="newCustomer" size="20px" />
</template>
</van-cell>
<van-cell title="领券条件" style="font-size:14px;">
<template slot="default">
<span class="phone">手机号必填</span>
<van-switch v-model="condition" size="20px" />
</template>
</van-cell>
</van-cell-group>
<div class="title">券设置</div>
<van-cell-group>
<van-cell
class="list"
title="活动标题"
value="新客有礼"
style="font-size:14px;"
/>
<van-cell title="券类型" style="font-size:14px;">
<template slot="default">
<van-radio-group v-model="type">
<van-radio name="1" style="float:left;">代金券</van-radio>
<van-radio name="2" style="float:right;">折扣券</van-radio>
</van-radio-group>
</template>
</van-cell>
<van-cell title="代金券金额" style="font-size:14px;">
<template slot="default">
<van-field
readonly
clickable
:value="cashCoupon"
@touchstart.native.stop="show = true"
/>
<van-number-keyboard
v-model="cashCoupon"
:show="show"
:maxlength="6"
@blur="show = false"
/>
</template>
</van-cell>
<van-cell title="使用门槛" style="font-size:14px;">
<template slot="default">
<van-field
class="limit"
readonly
clickable
:value="limit"
@touchstart.native.stop="show2 = true"
/>
<van-number-keyboard
v-model="limit"
:show="show2"
:maxlength="6"
@blur="show2 = false"
/>
</template>
</van-cell>
<van-cell title="活动开始时间" style="font-size:14px;">
<template slot="default">
<span @click="handleSTimeShow">{{startTime==''?"请选择开始时间":startTime}}</span>
<van-popup v-model="startShow" position="bottom">
<van-datetime-picker
v-model="startTime"
type="dateTime"
@confirm = "handleSTimeClose"
@change="getStartTime"
/>
</van-popup>
</template>
</van-cell>
<van-cell title="活动结束时间" style="font-size:14px;">
<template slot="default">
<van-datetime-picker
v-model="endTime"
type="datetime"
/>
</template>
</van-cell>
</van-cell-group>
</div>
</template>
<script>
export default {
data() {
return {
coupon: "",
newCustomer: "",
condition: "",
type: "",
show: false,
show2: false,
cashCoupon: "",
limit: "",
startTime: '',
endTime: new Date(),
startShow: false
};
},
methods: {
timeFormat(time) { // 时间格式化 2019-09-08
let year = time.getFullYear();
let month = time.getMonth() + 1;
let day = time.getDate();
return year + '年' + month + '月' + day + '日'
},
handleSTimeShow() {
this.startShow = true
},
handleSTimeClose() {
this.startTime = this.timeFormat(this.startTime)
this.startShow = false
//console.log(getValues(),"???");
},
getStartTime(val) {
console.log(val,"开始时间");
}
}
};
</script>
<style>
</style>
<style lang="scss" scoped>
/deep/ .van-field__control {
height: 20px;
margin-left: 77px;
}
/deep/ .van-cell {
height: 46px;
}
.phone {
float: left;
margin-top: 6px;
}
.title {
background-color: #f8f8f8;
height: 36px;
line-height: 36px;
font-size: 12px;
padding-left: 16px;
color: #2d476a;
}
</style>
<template>
<div>
<div>大转盘详情</div>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment