前端 模板的更新
This commit is contained in:
parent
99767393bc
commit
03b512ef75
@ -184,7 +184,7 @@
|
|||||||
<el-radio-group v-model="form.timeType">
|
<el-radio-group v-model="form.timeType">
|
||||||
<!-- 0 -->
|
<!-- 0 -->
|
||||||
<el-radio label="0" style="display: flex;align-items: center" >
|
<el-radio label="0" style="display: flex;align-items: center" >
|
||||||
<div class="h-box"> <span>领券后立即生效,有效期</span> <el-input placeholder="有效天数" type="number" style="width: 200px" v-model="form.validityZero">
|
<div class="h-box"> <span style="margin-right: 5px">领券后立即生效,有效期 </span> <el-input placeholder="有效天数" type="number" style="width: 200px" v-model="form.validityZero">
|
||||||
<template slot="append">天</template>
|
<template slot="append">天</template>
|
||||||
</el-input> </div>
|
</el-input> </div>
|
||||||
|
|
||||||
@ -193,64 +193,27 @@
|
|||||||
<!-- 1 -->
|
<!-- 1 -->
|
||||||
<el-radio label="1" style="display: flex;align-items: center" >
|
<el-radio label="1" style="display: flex;align-items: center" >
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<span> 固定有效周期,固定开始日期</span>
|
<span style="margin-right: 5px"> 固定有效周期,固定开始日期 </span>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.effectiveDate"
|
v-model="form.effectiveDate"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期">
|
placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<span>有效期</span>
|
<span style="margin-right: 5px; margin-left: 5px">有效期</span>
|
||||||
<el-input type="number" placeholder="有效天数" style="width: 200px" v-model="form.validityOne"><template slot="append">天</template></el-input>
|
<el-input type="number" placeholder="有效天数" style="width: 200px" v-model="form.validityOne"><template slot="append">天</template></el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
<!-- 2-->
|
<!-- 2-->
|
||||||
<el-radio label="2" style="display: flex;align-items: center">
|
<el-radio label="2" style="display: flex;align-items: center">
|
||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
领券后第 <el-input style="width: 200px" placeholder="1" v-model="form.validityDay">
|
<span style="margin-right: 5px">领券后第</span> <el-input style="width: 200px" placeholder="1" v-model="form.validityDay">
|
||||||
<template slot="append">天生效</template>
|
<template slot="append">天生效</template>
|
||||||
</el-input> 有效期 <el-input type="number" placeholder="有效天数" style="width: 200px" v-model="form.validityTwo"><template slot="append">天</template></el-input>
|
</el-input> <span style="margin-right: 5px; margin-left: 5px">有效期</span> <el-input type="number" placeholder="有效天数" style="width: 200px" v-model="form.validityTwo"><template slot="append">天</template></el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="可用时段" prop="availablePeriod">
|
|
||||||
<el-checkbox-group v-model="form.availablePeriod" size="mini" >
|
|
||||||
<el-checkbox-button v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox-button>
|
|
||||||
<!– <el-checkbox-button v-for="(item,index) in cities" :key="index" :label="index">{{item}}</el-checkbox-button>–>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="可用周期" prop="checkDateType">
|
|
||||||
<el-radio-group v-model="form.checkDateType">
|
|
||||||
<el-radio label="day">每天都可以使用</el-radio>
|
|
||||||
<el-radio label="week">每周都可以使用</el-radio>
|
|
||||||
<el-radio label="month">每月都可以使用</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="每周可用时段" prop="checkTime" v-if="form.checkDateType == 'week' ">
|
|
||||||
<el-checkbox-group v-model="form.checkTime" size="mini" >
|
|
||||||
<el-checkbox-button v-for="city in zhou" :label="city" :key="city">{{city}}</el-checkbox-button>
|
|
||||||
<!– <el-checkbox-button v-for="(item,index) in cities" :key="index" :label="index">{{item}}</el-checkbox-button>–>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="每月可用时段" prop="checkTime" v-if="form.checkDateType == 'month' " >
|
|
||||||
<el-checkbox-group v-model="form.checkTime" size="mini" @input="yueinput" >
|
|
||||||
<el-checkbox-button v-for="city in yue" :label="city" :key="city">{{city}}</el-checkbox-button>
|
|
||||||
|
|
||||||
<!– <el-checkbox-button v-for="(item,index) in cities" :key="index" :label="index">{{item}}</el-checkbox-button>–>
|
|
||||||
</el-checkbox-group>
|
|
||||||
<div>每个月的: <span style="color: red;" v-for="(item,index) in lookyue " :key="index">{{item }},</span> 号</div>
|
|
||||||
</el-form-item>-->
|
|
||||||
|
|
||||||
<!-- <el-form-item label="排除日期" prop="checkOutTime">-->
|
|
||||||
<!-- <el-date-picker clearable-->
|
|
||||||
<!-- v-model="form.checkOutTime"-->
|
|
||||||
<!-- type="date"-->
|
|
||||||
<!-- value-format="yyyy-MM-dd"-->
|
|
||||||
<!-- placeholder="请选择排除日期">-->
|
|
||||||
<!-- </el-date-picker>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="互斥功能" prop="exclusiveFunction">
|
<el-form-item label="互斥功能" prop="exclusiveFunction">
|
||||||
<el-radio-group v-model="form.exclusiveFunction">
|
<el-radio-group v-model="form.exclusiveFunction">
|
||||||
<el-radio label="0">满减活动</el-radio>
|
<el-radio label="0">满减活动</el-radio>
|
||||||
|
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
|
||||||
// baseUrl: 'http://192.168.0.196:8081/',
|
// baseUrl: 'http://192.168.0.196:8081/',
|
||||||
// baseUrl: 'http://192.168.1.4:8080/',
|
// baseUrl: 'http://192.168.1.4:8080/',
|
||||||
baseUrl: 'http://localhost:8008/',
|
baseUrl: 'http://192.168.0.138:8080/',
|
||||||
|
|
||||||
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
|
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,46 @@
|
|||||||
<view class="my-text">样版页</view>
|
<view class="my-text">样版页</view>
|
||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import request from '../../utils/request';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
List: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: '',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.resetting() //重置方法
|
||||||
|
this.getList() //调用请求
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
//下拉刷新
|
||||||
|
this.resetting() //重置方法
|
||||||
|
this.getList() //调用请求
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// 触底加载
|
||||||
|
if (this.pageNo >= this.totalPage) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '没有下一页数据',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.pageNo++
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -27,6 +53,36 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//滞空方法
|
||||||
|
resetting() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = 10
|
||||||
|
this.totalPage = ''
|
||||||
|
this.List = []
|
||||||
|
},
|
||||||
|
// 分页——网络请求
|
||||||
|
async getList() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
let res = await request({
|
||||||
|
url: '网络请求',
|
||||||
|
method: 'get',
|
||||||
|
data: {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.hideLoading(); //交互反馈
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.List = this.ruleList.concat(res.result.records)
|
||||||
|
} else {
|
||||||
|
this.List = res.result.records
|
||||||
|
}
|
||||||
|
this.totalPage = res.result.pages
|
||||||
|
}
|
||||||
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
@ -57,6 +113,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0px 15px;
|
padding: 0px 15px;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
|
z-index: 99999;
|
||||||
|
|
||||||
.my-icons {
|
.my-icons {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -204,6 +204,7 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data != null && res.data != "" && res.data != undefined) {
|
if (res.data != null && res.data != "" && res.data != undefined) {
|
||||||
this.user = res.data
|
this.user = res.data
|
||||||
|
uni.setStorageSync('userId', res.data.id)
|
||||||
this.user.mobile = res.data.mobile.slice(0, 3) + "****" + res.data.mobile.slice(res.data
|
this.user.mobile = res.data.mobile.slice(0, 3) + "****" + res.data.mobile.slice(res.data
|
||||||
.mobile.length - 5, res.data.mobile.length - 1)
|
.mobile.length - 5, res.data.mobile.length - 1)
|
||||||
}
|
}
|
||||||
@ -497,4 +498,4 @@
|
|||||||
.centenr-size {
|
.centenr-size {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -73,18 +73,26 @@
|
|||||||
allAmount: 0.0,
|
allAmount: 0.0,
|
||||||
activeRecommendRecordsList: [],
|
activeRecommendRecordsList: [],
|
||||||
title: '',
|
title: '',
|
||||||
|
userId: '',
|
||||||
|
storeId: '',
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
console.log(uni.getStorageSync('userId'));
|
||||||
|
console.log(uni.getStorageSync('storeId'));
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
return {
|
return {
|
||||||
title: '来个油惠',
|
title: '来个油惠1',
|
||||||
|
path: '/pages/index/index?userId=' + uni.getStorageSync('userId') + '&storeId=' + uni.getStorageSync(
|
||||||
|
'storeId') + '&type=yaoqingyouli',
|
||||||
success() {
|
success() {
|
||||||
console.log('分享成功');
|
console.log('分享成功');
|
||||||
},
|
},
|
||||||
@ -332,4 +340,16 @@
|
|||||||
border: none;
|
border: none;
|
||||||
box-shadow: 0px
|
box-shadow: 0px
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
|
button {
|
||||||
|
/* 清除默认边框 */
|
||||||
|
border: 0;
|
||||||
|
outline: none;
|
||||||
|
/*清除默认背景 */
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px !important;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user