修复发布优惠券日期选择器部分手机无法显示按钮卡顿等问题调整添加员工接口问题

This commit is contained in:
唐明明
2021-09-30 15:35:34 +08:00
parent 9591400bb9
commit b8cbd8d565
17 changed files with 55 additions and 29 deletions

View File

@@ -79,7 +79,20 @@
<label class="input-label">{{timeIndex == 0 ? '券有效期': '延期天数'}}</label>
<block v-if="timeIndex === 0">
<view class="input-text" @click="showDatePicker = true">{{datePickerValue.length == 0 ? '选择优惠券有效期区间': datePickerValue[0] + ' ' + datePickerValue[1]}}<uni-icons class="picker-icon" type="arrowdown" size="14" /></view>
<tn-date-picker :show="showDatePicker" :monthNum="12" color="#8b64fd" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/>
<u-calendar
:safe-area-inset-bottom="true"
v-model="showDatePicker"
mode="range"
active-bg-color="#8b64fd"
range-bg-color="rgba(139,100,253, .2)"
range-color="#8b64fd"
btn-type="default"
max-date="2099-12-12"
:min-date="minDate"
@change="confirmDatePicker"
>
</u-calendar>
<!-- <tn-date-picker :show="showDatePicker" :monthNum="12" color="" :showTips="true" beginText="开始日期" endText="结束日期" @confirm="confirmDatePicker" @cancel="showDatePicker = false"/> -->
</block>
<block v-if="timeIndex === 1">
<view class="input-number">
@@ -107,13 +120,10 @@
</template>
<script>
import TnDatePicker from "@/components/tn-datepicker/tn-datepicker";
import date from '@/public/date'
import { uploads } from '@/apis/interfaces/uploading'
import { pushCoupons } from '@/apis/interfaces/coupons'
export default {
components:{
TnDatePicker
},
data() {
return {
loding : true,
@@ -139,10 +149,14 @@
price : '', // 减少金额
description : '', // 使用规则
coupongoods : [], // 关联商品
timeNumber : 1 // 延期券时间
timeNumber : 1 ,// 延期券时间
minDate : ''
};
},
onShow(){
new date().then(res => {
this.minDate = res
})
this.coupongoods = this.$store.getters.getCoupongoods
},
methods:{
@@ -168,7 +182,7 @@
},
// 日期
confirmDatePicker(e){
this.datePickerValue = e.value
this.datePickerValue = [e.startDate , e.endDate]
this.showDatePicker = false
},
// 上传优惠券封面

View File

@@ -38,7 +38,7 @@
<label>
<view class="item-title">设为推荐</view>
<view class="item-info">设为推荐员工将在企业自媒体中优先展示</view>
<switch class="item-switch" :checked="isPosition" color="#e93340" @change="switchChange" />
<switch class="item-switch" :checked="isPosition" color="#8b64fd" @change="switchChange" />
</label>
</view>
</view>
@@ -50,7 +50,7 @@
<label>
<view class="item-title">{{item.title}}</view>
<view class="item-info">{{item.description}}</view>
<checkbox class="item-checkbox" :checked="item.check" color="#e93340" :value="item.permission_id" />
<checkbox class="item-checkbox" :checked="item.check" color="#8b64fd" :value="String(item.permission_id)"/>
</label>
</view>
</checkbox-group>
@@ -93,8 +93,16 @@
}
employeesConfig().then(res => {
this.section = res.store
console.log(res)
if(this.$Route.query.type === 'PUT'){
employeesInfo(this.$Route.query.id || 4).then(res => {
console.log(111)
employeesInfo(this.$Route.query.id).then(res => {
console.log(11111)
console.log(res)
let permissionIds = []
for(let val of res.permission){
if(val.check){

View File

@@ -59,7 +59,7 @@
text : '编辑',
type : 'PUT',
style : {
backgroundColor: '#3688ee'
backgroundColor: '#8b64fd'
}
},{
text : '删除',
@@ -83,7 +83,7 @@
let type = e.content.type,
val = this.lists[upIndex].data[index]
if(type == 'PUT'){
this.$Router.push({name: 'addEmployees', params: {type: 'PUT', id: val.employee_id}})
this.$Router.push({name: 'employeesAdd', params: {type: 'PUT', id: val.employee_id}})
return
}
uni.showModal({
@@ -92,7 +92,7 @@
cancelText : '取消',
cancelColor : '#555',
confirmText : '确认',
confirmColor: '#e93340',
confirmColor: '#8b64fd',
success : res => {
if(res.confirm) {
employeesDelete(val.employee_id).then(res => {
@@ -120,7 +120,7 @@
cancelText : '稍后创建',
cancelColor : '#555',
confirmText : '立即创建',
confirmColor: '#e93340',
confirmColor: '#8b64fd',
success : res => {
if(res.confirm) {
this.$Router.push({name: 'shopCreate'})

View File

@@ -26,7 +26,7 @@
<image class="newCont-close" src="/static/user/order-cancelPay.png" mode="aspectFill" @click="newEject()"></image>
</view>
<!-- 消息列表弹出 end -->
<!-- @scrolltoupper="onScrolltoupper" -->
<scroll-view class="content-scroll" scroll-y="true">
<view class="header">
<!-- 工具 -->
@@ -244,17 +244,17 @@ export default {
newState : false, // 消息 显示状态
newnextShow : false, // 消息 下一条按钮状态
newPopIndex : '', // 消息列表选择index
animatedShow : false, // vip上下跳动效果
customer : {
customerShow: false, // 专属客服弹出
customerCode: '', // 专属客服二维码
},
// 滚动
coverTransform: 'translateY(0px)',
coverTransition: '0s',
startY: 0, // 落点
moving: false, //开启卡片
moveY: 0,
ScrollTop: false
};
},
onShow(){
@@ -390,6 +390,9 @@ export default {
}
},
// 滑动部分
onScrolltoupper(){
this.ScrollTop = true
},
coverTouchstart(e) {
this.coverTransition = 'transform .1s linear'
this.startY = e.touches[0].clientY
@@ -553,6 +556,7 @@ export default {
border: 3rpx solid #b197ff;
color: #f6e9fa;
box-sizing: border-box;
padding-bottom: 40rpx;
.userVip-top {
display: flex;
padding: 30rpx;