Browse Source

Merge branch 'master' of ssh://8.134.10.79:222/Leadfyy.co/uniapp-qxk

master
mike 3 years ago
parent
commit
5e6455776e
  1. 3
      packages/article/article.vue
  2. 4
      pages/index/index.vue
  3. 24
      pages/write/baseInfo.vue
  4. 9
      service/index.js

3
packages/article/article.vue

@ -1,5 +1,5 @@
<template>
<view>
<view class="content">
<u-parse :content="article"></u-parse>
</view>
</template>
@ -95,4 +95,5 @@
</script>
<style>
.content{font-size:16px;padding:20px;line-height:2em;}
</style>

4
pages/index/index.vue

@ -294,7 +294,6 @@
<style scoped lang="scss">
.tips_panel{
margin-top: 30rpx;
background-color: white;
}
@ -314,13 +313,12 @@
}
}
.bottom-group {
position: relative;
}
.section_4 {
margin-top: 30rpx;
border-top:solid 1px #F1F1F1;
padding: 40rpx 32rpx;
background-color: rgb(255, 255, 255);
}

24
pages/write/baseInfo.vue

@ -128,7 +128,7 @@
</view>
<view class="flex-row group_15">
<text class="text_11">优惠券</text>
<u-input v-model="couponText" placeholder="非必填,请输入优惠券码"></u-input>
<u-input @change="checkCoupon" v-model="couponText" placeholder="非必填,请输入优惠券码"></u-input>
</view>
<view class="flex-col group_21">
<view class="flex-col items-center button" @click="next">
@ -144,6 +144,7 @@
<script>
import { dispose } from '@/common/directoss.js';
import { checkAgentCode } from '@/service/index.js';
export default {
data() {
@ -163,6 +164,8 @@
columns:[],
columnsData:null,
columnsIndex:0,
couponStatus:true,
couponTimer:null,
};
},
// computed:{
@ -196,6 +199,22 @@
}
},
methods: {
checkCoupon(event){
if(this.couponTimer){
clearTimeout(this.couponTimer);
}
this.couponTimer = setTimeout(async () => {
let res = await checkAgentCode(event);
if(res.code > 0){
this.couponStatus = false;
uni.showToast({
title:res.msg,
});
}else{
this.couponStatus = true;
}
},500);
},
async afterRead(event){
let imageList = await dispose(event.file);
this.fileList.push(...imageList);
@ -220,6 +239,9 @@
if(!sonpingInfo.name) return this.$msg('请填写送评人信息');
if(!sonpingInfo.phone) return this.$msg('请填写送评人手机号');
if(!sonpingInfo.number) return this.$msg('请填写送评数量');
if(this.couponStatus == false){
this.coupon = '';
}
this.$url('/pages/write/distribution');
}
}

9
service/index.js

@ -8,6 +8,15 @@ export async function my() {
})
}
// 获取优惠码
export async function checkAgentCode(code) {
return await request({
url: '/api/v1/check_agent_code',
data:{code:code},
method: 'post',
})
}
// 获取优惠码
export async function couponSearch() {
return await request({

Loading…
Cancel
Save