前端 模板的更新

This commit is contained in:
@QQNZX 2024-01-03 14:24:24 +08:00
parent 99767393bc
commit 03b512ef75
5 changed files with 91 additions and 50 deletions

View File

@ -184,7 +184,7 @@
<el-radio-group v-model="form.timeType">
<!-- 0 -->
<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>
</el-input> </div>
@ -193,64 +193,27 @@
<!-- 1 -->
<el-radio label="1" style="display: flex;align-items: center" >
<div class="h-box">
<span> 固定有效周期固定开始日期</span>
<span style="margin-right: 5px"> 固定有效周期固定开始日期 </span>
<el-date-picker
v-model="form.effectiveDate"
type="date"
placeholder="选择日期">
</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>
</div>
</el-radio>
<!-- 2-->
<el-radio label="2" style="display: flex;align-items: center">
<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>
</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>
</el-radio>
</el-radio-group>
</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>
&lt;!&ndash; <el-checkbox-button v-for="(item,index) in cities" :key="index" :label="index">{{item}}</el-checkbox-button>&ndash;&gt;
</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>
&lt;!&ndash; <el-checkbox-button v-for="(item,index) in cities" :key="index" :label="index">{{item}}</el-checkbox-button>&ndash;&gt;
</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>
&lt;!&ndash; <el-checkbox-button v-for="(item,index) in cities" :key="index" :label="index">{{item}}</el-checkbox-button>&ndash;&gt;
</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-radio-group v-model="form.exclusiveFunction">
<el-radio label="0">满减活动</el-radio>

View File

@ -3,7 +3,7 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8081/',
// 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',
@ -29,4 +29,4 @@ module.exports = {
}
]
}
}
}

View File

@ -6,20 +6,46 @@
<view class="my-text">样版页</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
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: {
//
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() {
uni.navigateBack()
}
@ -57,6 +113,7 @@
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
z-index: 99999;
.my-icons {
width: 20px;

View File

@ -204,6 +204,7 @@
}).then(res => {
if (res.data != null && res.data != "" && res.data != undefined) {
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
.mobile.length - 5, res.data.mobile.length - 1)
}
@ -497,4 +498,4 @@
.centenr-size {
font-size: 14px;
}
</style>
</style>

View File

@ -73,18 +73,26 @@
allAmount: 0.0,
activeRecommendRecordsList: [],
title: '',
userId: '',
storeId: '',
}
},
onLoad() {
console.log(uni.getStorageSync('userId'));
console.log(uni.getStorageSync('storeId'));
},
components: {
},
onShareAppMessage() {
return {
title: '来个油惠',
title: '来个油惠1',
path: '/pages/index/index?userId=' + uni.getStorageSync('userId') + '&storeId=' + uni.getStorageSync(
'storeId') + '&type=yaoqingyouli',
success() {
console.log('分享成功');
},
@ -332,4 +340,16 @@
border: none;
box-shadow: 0px
}
</style>
button {
/* 清除默认边框 */
border: 0;
outline: none;
/*清除默认背景 */
margin: 0px;
padding: 0px !important;
background-color: transparent;
}
</style>