1.提交代码

yj-dev
杨杰 4 years ago
parent 1940149081
commit fd2134a444
  1. 2
      Utils/Api.js
  2. 2
      pages.json
  3. 8
      pages/goods/coupon-details/coupon-details.vue
  4. 17
      pages/goods/coupons-info-details/coupons-info-details.vue
  5. 7
      pages/goods/externalCoupon/externalCoupon.vue
  6. 4
      pages/goods/goods.vue
  7. 7
      pages/pay/success/success.vue
  8. 2
      pages/tabBar/user/user.vue
  9. 119
      pages/user/agentCoupons/agentCoupons.vue
  10. 8
      pages/user/mineCouponsDestails/mineCouponsDestails.vue

@ -147,7 +147,7 @@ export const getCodeListByAgentCoupon = params => {
}
// 生成二维码
export const generateCode = params => {
return POSTBREST('GET', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data);
return POSTBREST('POST', `${brestBase}/highCouponAgent/generateCode`, params).then(res => res.data);
}
// 查看二维码
export const getCodeById = params => {

@ -293,7 +293,7 @@
}, {
"path": "pages/goods/coupons-info-details/coupons-info-details",
"style": {
"navigationBarTitleText": "优惠券详情",
"navigationBarTitleText": "券详情",
"enablePullDownRefresh": false
}

@ -7,7 +7,7 @@
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.highUserCoupon.status == 0">已过期
</view>
<view class="line1"></view>
<view class="coupon-cont width90">
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image>
</view>
@ -210,11 +210,6 @@
line-height: 35px;
}
.coupon-cont {
height: 100px;
margin-bottom: 10px;
}
.coupon-mes {
margin-right: 90px;
}
@ -222,7 +217,6 @@
.coupon-img {
width: 80px;
height: 80px;
margin-top: 10px;
}
.coupon-qr {

@ -7,20 +7,23 @@
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponAgentCode.status == 3">已使用
</view>
<view class="line1"></view>
<view class="coupon-cont width90">
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image>
</view>
<view class="coupon-mes mart10">
<view class="fcor333 fontwig6 font24 width100 text2">{{couponDesInfo.couponInfo.couponName}}</view>
<view class="fcor666 font13 width100 mart5" v-if="oneTime">
领取时间:{{oneTime | formatDate('-')}}</view>
出售时间:{{oneTime | formatDate('-')}}</view>
<view class="fcor666 font13 width100 mart5" v-if="twoTime">
使用有效期:{{twoTime | formatDate('-')}}</view>
<view class="fcorred font15 width100 mart5" v-if="threeTime">
消费时间:{{threeTime | formatDate('-')}}</view>
</view>
</view>
<view class="width90 mart5 font13 fcor666">加油站点:{{couponDesInfo.couponCode.storeName}}</view>
<view class="width90 mart5 font13 fcor666">备注:{{couponDesInfo.couponAgentCode.remark}}</view>
<view class="line1 mart15"></view>
<view class="width90 mart10 fcor666" v-if="couponDesInfo.highUserCoupon.status != 0">核销码(商户扫客户)</view>
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0">
@ -93,9 +96,7 @@
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
}
},
onReachBottom() {
this.getCodeById();
},
methods: {
//
getCodeById() {
@ -170,11 +171,6 @@
line-height: 35px;
}
.coupon-cont {
height: 100px;
margin-bottom: 10px;
}
.coupon-mes {
margin-right: 90px;
}
@ -182,7 +178,6 @@
.coupon-img {
width: 80px;
height: 80px;
margin-top: 10px;
}
.coupon-qr {

@ -1,6 +1,6 @@
<template>
<view>
<view class="coupon-cont width90">
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponsDetails.highDiscount.discountImg"></image>
</view>
@ -261,10 +261,6 @@
</script>
<style lang="scss">
.coupon-cont {
height: 100px;
margin-bottom: 10px;
}
.coupon-mes {
// margin-right: 90px;
@ -273,7 +269,6 @@
.coupon-img {
width: 80px;
height: 80px;
margin-top: 10px;
}
.product-list {

@ -3,10 +3,10 @@
<!-- 底部菜单 -->
<view class="footer">
<button v-if="user == '' " class="width100 fotct btnfot" @click="getuserinfo">
立即购买
立即兑换
</button>
<button v-else class="width100 fotct btnfot" @click="buy">
立即购买
立即兑换
</button>
</view>
<!-- 商品主图轮播 -->

@ -8,7 +8,7 @@
未使用
</view>
<view class="line1"></view>
<view class="coupon-cont width90">
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponDesInfo.couponInfo.couponImg"></image>
</view>
@ -182,10 +182,6 @@
line-height: 35px;
}
.coupon-cont {
height: 100px;
margin-bottom: 10px;
}
.coupon-mes {
margin-right: 90px;
@ -194,7 +190,6 @@
.coupon-img {
width: 80px;
height: 80px;
margin-top: 10px;
}
.coupon-qr {

@ -50,7 +50,7 @@
</view>
<!-- 工具栏 -->
<view class="toolbar">
<view class="title">我的工具栏</view>
<view class="title">卡券中心</view>
<view class="list">
<view class="box" v-for="(row,index) in mytoolbarList" :key="index" @tap="toPage(row.url,row.text)">
<!-- <view style="width: 10px;height: 10px;">

@ -7,14 +7,15 @@
</view>
</view>
<view class="width90 height120 backcorfff mart15" v-for="(agent,index) in agentCouponList" :key="index">
<image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null" src='../../../static/img/logo.png'></image>
<image class="flleft agent_img margle mart10" v-if="agent.merchantLogo == null"
src='../../../static/img/logo.png'></image>
<image class="flleft agent_img margle mart10" v-else :src="image_url+agent.merchantLogo"></image>
<view class="agent_title paddtop13">
<view class="font18 fcor333 width100">{{agent.highCoupon.couponName}}</view>
<view class="width100 mart5 font14 fcor333 height22">
<view class="agent_left_num flleft text1">
<!-- <view class="agent_left_num flleft text1">
{{agent.highCouponCode.salesCode}}
</view>
</view> -->
<view class="agent_right_num flright fotrt">
{{agent.highCoupon.salesPrice}}.00
</view>
@ -26,11 +27,24 @@
v-if="typeId == 1">生成油码</button>
<button class="flright backcorf06 fcorfff font15 agent_btn mart10" @click="jumpCouponDes(agent.id)"
v-if="typeId == 2">查看详情</button>
<view class="agent_ts font15 fcor333 fotrt" v-if="typeId == 2">
出售时间:{{agent.highCouponCode.receiveTime | formatDate('-')}}</view>
<view class="agent_ts font15 fcor333 fotlt text1" v-if="typeId == 2">
备注:{{agent.remark}}</view>
</view>
</view>
<!-- / -->
<view :hidden="userFeedbackHidden" class="popup_content">
<view class="popup_title">填写备注</view>
<view class="popup_textarea_item">
<textarea class="popup_textarea" placeholder='请填写您的备注信息...' v-model="feedbackContent">
</textarea>
<view @click="submitFeedback()">
<button class="popup_button">提交备注</button>
</view>
</view>
</view>
<view class="popup_overlay" :hidden="userFeedbackHidden" @click="hideDiv()"></view>
</view>
</template>
<script>
@ -38,7 +52,7 @@
getCodeListByAgentCoupon,
generateCode
} from "../../../Utils/Api.js";
let app =getApp();
let app = getApp();
export default {
data() {
return {
@ -49,7 +63,10 @@
typeId: '',
reFreshs: '',
couponId: '',
image_url : app.globalData.imgUrl
image_url: app.globalData.imgUrl,
userFeedbackHidden: true, //
feedbackContent: '', //
couId: ''
}
},
filters: {
@ -70,6 +87,9 @@
return `${year}${spe}${month}${spe}${day}`;
}
},
onReachBottom() {
this.getCodeListByAgentCoupon();
},
onLoad(option) {
this.typeId = option.id;
this.couponId = option.couponsId;
@ -105,7 +125,7 @@
status: 1,
pageSize: this.pageSize
}
} else if(this.typeId == 2){
} else if (this.typeId == 2) {
params = {
pageNum: pagenum,
couponId: this.couponId,
@ -131,17 +151,34 @@
//
generateCode(item) {
this.userFeedbackHidden = false;
this.couId = item;
},
hideDiv() { //
this.userFeedbackHidden = true;
},
//
submitFeedback() {
if (this.feedbackContent == '') {
uni.showToast({
title: '请填写备注信息',
icon: 'none',
duration: 2000
})
} else {
uni.showLoading({
title: '油码生成中...'
})
let datas = {
couponAgentCodeId: item
couponAgentCodeId: this.couId,
remark: this.feedbackContent
}
generateCode(datas).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.userFeedbackHidden = true;
uni.navigateTo({
url: '../../goods/coupons-info-details/coupons-info-details?id=' + item
url: '../../goods/coupons-info-details/coupons-info-details?id=' + this.couId
})
} else {
uni.showToast({
@ -150,8 +187,10 @@
duration: 2000
})
}
})
});
}
},
//
jumpCouponDes(ids) {
uni.navigateTo({
@ -220,4 +259,62 @@
margin-right: 95px;
padding-top: 18px;
}
//
.popup_overlay {
position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.8;
opacity: .80;
filter: alpha(opacity=88);
}
.popup_content {
position: fixed;
top: 50%;
left: 50%;
width: 520upx;
height: 550upx;
margin-left: -270upx;
margin-top: -270upx;
border: 10px solid white;
background-color: white;
z-index: 1002;
overflow: auto;
border-radius: 20upx;
}
.popup_title {
padding-top: 20upx;
width: 480upx;
text-align: center;
font-size: 40rpx;
}
.popup_textarea_item {
padding-top: 20rpx;
height: 240rpx;
width: 90%;
background-color: #F1F1F1;
margin-top: 30rpx;
margin-left: 5%;
}
.popup_textarea {
width: 410upx;
font-size: 26upx;
margin-left: 20upx;
}
.popup_button {
color: white;
background-color: #4399FC;
border-radius: 10upx;
}
</style>

@ -1,6 +1,6 @@
<template>
<view>
<view class="coupon-cont width90">
<view class="width90">
<view class="flright fotct">
<image class="coupon-img" :src="imageUrl+couponsDetails.highDiscount.discountImg"></image>
</view>
@ -131,11 +131,6 @@
</script>
<style lang="scss">
.coupon-cont {
height: 100px;
margin-bottom: 10px;
}
.coupon-mes {
// margin-right: 90px;
}
@ -143,7 +138,6 @@
.coupon-img {
width: 80px;
height: 80px;
margin-top: 10px;
}
.product-list {

Loading…
Cancel
Save