194 lines
3.8 KiB
Vue
194 lines
3.8 KiB
Vue
<template>
|
|
<view>
|
|
<u-navbar :title="tit" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
|
|
height='45'></u-navbar>
|
|
<view class="box">
|
|
<view class="ul">
|
|
<view class="name">
|
|
会员卡名称
|
|
</view>
|
|
<input type="text" v-model="name" placeholder="请输入会员卡名称"/>
|
|
</view>
|
|
<view class="ul">
|
|
<view class="name">
|
|
会员卡原价/元
|
|
</view>
|
|
<input type="text" v-model="yuanjia" placeholder="请输入会员卡原价"/>
|
|
</view>
|
|
<view class="ul">
|
|
<view class="name">
|
|
会员卡现价/元
|
|
</view>
|
|
<input type="text" v-model="xianjia" placeholder="请输入会员卡现价"/>
|
|
</view>
|
|
<view class="ul">
|
|
<view class="name">
|
|
会员卡期限/天
|
|
</view>
|
|
<input type="text" v-model="qixian" placeholder="请输入会员卡期限"/>
|
|
</view>
|
|
<view class="ul">
|
|
<view class="name">
|
|
会员卡折扣/折
|
|
</view>
|
|
<input type="text" v-model="zhekou" placeholder="请输入会员卡折扣"/>
|
|
</view>
|
|
<view class="ul">
|
|
<view class="name">
|
|
会员卡使用次数/次
|
|
</view>
|
|
<input type="text" v-model="shangxian" placeholder="请输入会员卡使用次数"/>
|
|
</view>
|
|
<view class="ul">
|
|
<view class="name">
|
|
上限次数/次
|
|
</view>
|
|
<view class="sx">
|
|
<input v-model="day" type="text"/>/天 上限<input v-model="cishu" type="text"/>/次
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="anniu">
|
|
<view class="qx" @click="btnqx">
|
|
{{deltit}}
|
|
</view>
|
|
<view class="qd">
|
|
{{addtit}}
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
bgc: {
|
|
backgroundColor: '#fff'
|
|
},
|
|
tit:'',
|
|
deltit:'',
|
|
addtit:'',
|
|
name:'',
|
|
yuanjia:'',
|
|
xianjia:'',
|
|
qixian:'',
|
|
zhekou:'',
|
|
shangxian:'',
|
|
day:'',
|
|
cishu:''
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
if(option.id){
|
|
this.tit = '修改会员卡'
|
|
this.deltit = '删除'
|
|
this.addtit = '修改'
|
|
}else{
|
|
this.tit = '新增会员卡'
|
|
this.deltit = '取消'
|
|
this.addtit = '新增'
|
|
}
|
|
},
|
|
methods: {
|
|
getQiniuToken() {
|
|
this.$u.get("/common/qiniu/uploadInfo").then((res) => {
|
|
if (res.code == 200) {
|
|
this.token = res.token
|
|
}
|
|
})
|
|
},
|
|
// 点击取消或者删除
|
|
btnqx(){
|
|
if(this.deltit == '取消'){
|
|
uni.navigateBack()
|
|
}else{
|
|
|
|
}
|
|
},
|
|
// 点击新增或者修改
|
|
btnadd(){
|
|
if(this.addtit == '新增'){
|
|
|
|
}else{
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less">
|
|
.anniu{
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 0 60rpx;
|
|
box-sizing: border-box;
|
|
position: fixed;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
bottom: 50rpx;
|
|
.qx{
|
|
width: 300rpx;
|
|
height: 80rpx;
|
|
border-radius: 50rpx;
|
|
text-align: center;
|
|
line-height: 80rpx;
|
|
background-color: #ccc;
|
|
font-size: 32rpx;
|
|
}
|
|
.qd{
|
|
width: 300rpx;
|
|
height: 80rpx;
|
|
border-radius: 50rpx;
|
|
text-align: center;
|
|
line-height: 80rpx;
|
|
background-color: #8883F0;
|
|
font-size: 32rpx;
|
|
color: #fff;
|
|
}
|
|
}
|
|
.box{
|
|
width: 680rpx;
|
|
margin: auto;
|
|
margin-top: 40rpx;
|
|
border-radius: 30rpx;
|
|
box-sizing: border-box;
|
|
background-color: #fff;
|
|
.ul{
|
|
display: flex;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
height: 120rpx;
|
|
line-height: 120rpx;
|
|
padding: 0 20rpx;
|
|
box-sizing: border-box;
|
|
border-bottom: 1px solid #efefef;
|
|
.sx{
|
|
max-width: 460rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
input{
|
|
width: 60rpx;
|
|
height: 30rpx;
|
|
border-bottom: 1px solid #efefef;
|
|
text-align: right;
|
|
margin-left: 20rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
}
|
|
.name{
|
|
font-size: 28rpx;
|
|
}
|
|
input{
|
|
height: 120rpx;
|
|
line-height: 120rpx;
|
|
text-align: right;
|
|
}
|
|
}
|
|
}
|
|
|
|
</style> |