Commit 81021594 by 谢中龙

新增功能

parent 0d32ae7d
......@@ -106,7 +106,10 @@
"pages/shareArticle/shareArticle",
"pages/pointActicityGroup/pointActivityGroup",
"pages/pointExchangeCoupon/pointExchangeCoupon",
"pages/pointExchangeGoods/pointExchangeGoods"
"pages/pointExchangeGoods/pointExchangeGoods",
"pages/payCardInfo/payCardInfo",
"pages/moneyBuyCoupon/moneyBugCoupon",
"pages/moneyBuyCouponInfo/moneyBuyCouponInfo"
]
},
{
......
......@@ -17,6 +17,10 @@
background-color: #cb3c3c;
}
.theme-border-left{
border-left: 4rpx solid #cb3c3c;
}
.theme-text-color {
color: #cb3c3c;
}
......
......@@ -2,55 +2,30 @@
<view class="nav-container search-top">
<scroll-view class="nav-menu" scroll-y="true">
<view
wx:for="{{navData}}"
wx:key="{{j}}"
wx:for-index="j"
wx:for-item="menuSec"
class="menu-item{{j == curMenu[1] ? ' active' : ''}}"
>
<view
class="menu-name{{j == curMenu[1] ? ' theme-text-color' : ''}}"
<view wx:for="{{navData}}" wx:key="*this" wx:for-index="j" wx:for-item="menuSec"
class="menu-item {{j == curMenu[1] ? ' active' : ''}}">
<view class="menu-name {{j == curMenu[1] ? ' theme-text-color' : ''}}"
data-j="{{j}}"
data-name="{{menuSec.label}}"
data-id="{{menuSec.id}}"
bindtap="selectMenu"
>{{menuSec.label}}
bindtap="selectMenu">
{{menuSec.label}}
</view>
</view>
</scroll-view>
<scroll-view class="nav-contents" scroll-y="true">
<view
wx:for="{{navData}}"
wx:key="{{j}}"
wx:for-index="j"
wx:for-item="menuSec"
class="nav-content{{j == curMenu[1] ? ' active' : ''}}"
>
<navigator
hover-class="none"
class="sec-menu-image"
open-type="navigate"
url="/subPackage/page/pages/categoryPro/categoryPro?id={{menuSec.id}}&name={{menuSec.label}}"
>
<view wx:for="{{navData}}" wx:key="{{j}}" wx:for-index="j" wx:for-item="menuSec"
class="nav-content{{j == curMenu[1] ? ' active' : ''}}">
<navigator hover-class="none" class="sec-menu-image" open-type="navigate"
url="/subPackage/page/pages/categoryPro/categoryPro?id={{menuSec.id}}&name={{menuSec.label}}">
<image src="{{menuSec.image}}" mode="widthFix" />
</navigator>
<view class="menu-list">
<view
wx:for="{{menuSec.children}}"
wx:key="{{k}}"
wx:for-index="k"
wx:for-item="menuThr"
class="menu-third"
>
<view wx:for="{{menuSec.children}}" wx:key="{{k}}" wx:for-index="k" wx:for-item="menuThr" class="menu-third">
<view data-id="{{menuThr.id}}" data-name="{{menuThr.label}}" bindtap="navPage">
<navigator
hover-class="none"
class="sec-menu-image"
open-type="navigate"
url="/subPackage/page/pages/categoryPro/categoryPro?id={{menuThr.id}}&name={{menuThr.label}}"
>
<navigator hover-class="none" class="sec-menu-image" open-type="navigate"
url="/subPackage/page/pages/categoryPro/categoryPro?id={{menuThr.id}}&name={{menuThr.label}}">
<image src="{{menuThr.image}}" class="thr-menu-image" />
<view class="thr-menu-name">{{menuThr.label}}</view>
</navigator>
......
......@@ -12,16 +12,21 @@ page {
flex: 0;
width: 25%;
padding-bottom: 50px;
border-right: solid 1rpx #dddddd;
}
.nav-menu .menu-item {
position: relative;
/* padding: 0 16rpx; */
padding: 0 28rpx;
font-size: 26rpx;
color: #000000;
line-height: 100rpx;
text-align: center; }
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
/* .nav-menu .menu-item::after {
content: '';
......@@ -40,7 +45,11 @@ page {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 26rpx; }
font-size: 26rpx;
padding: 0 20rpx;
width: 100%;
}
.nav-contents {
flex: 1;
......
......@@ -63,12 +63,16 @@ wxService.page({
})
}
// 可使用
// 所有可使用优惠券
if( current == 0 ){
this.getCouponList(1,10,1)
}else if( current == 1){
// 失效
this.getCouponList(1,10,0)
//微信支付券
}
else if(current == 2){
//包邮券
}
},
/**
......@@ -83,7 +87,6 @@ wxService.page({
onShow () {
// 可使用 已失效
this.getCouponList(1,10,1)
this.getCouponList(1,10,0)
},
handelPresentCouponDetail(e) {
let {cardno} = e.currentTarget.dataset
......
<!--pages/userCenter.wxml-->
<view class='page-coupons'>
<view class="swiper-tab">
<view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">可使用 ({{totalElements}})</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">已失效 ({{invalidTotalElements}})</view>
<view class="swiper-tab-item {{currentTab==0?'active':''}}"
data-current="0" bindtap="clickTab">优惠券</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}"
data-current="1" bindtap="clickTab">微信支付券</view>
<view class="swiper-tab-item {{currentTab==2?'active':''}}"
data-current="2" bindtap="clickTab">包邮券</view>
</view>
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<!-- 优惠券 -->
<scroll-view scroll-y wx:if="{{couponList.length}}" bindscrolltolower="onBottom">
<view class='coupon-wrap'>
<view
......@@ -14,8 +19,47 @@
wx:for="{{couponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
>
wx:key="{{k}}">
<view
data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}"
data-id="{{item.couponId}}"
bindtap="handelPresentCouponDetail">
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' mode="aspectFit"/>
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}" catchtap="handelPresentCouponCode">出示劵码</view>
</view>
</view>
</view>
<no-more wx:if="{{noMoreCoupon}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.length}}">
<view class='empty-info'>
<image class='empty-img'
src='https://img3.bigaka.com/prd/3001/202003/20200309/30012bce7628-f373-4fa7-a6a4-ada9c1c721d6.png' />
<view class='empty-text'>没有任何卡劵</view>
</view>
</view>
</swiper-item>
<!-- 微信支付券 -->
<swiper-item>
<scroll-view scroll-y wx:if="{{couponList.length}}">
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{couponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="*this">
<view
data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}"
......@@ -33,13 +77,13 @@
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}" catchtap="handelPresentCouponCode">出示劵码</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}">查看详情</view>
</view>
</view>
</view>
<no-more wx:if="{{noMoreCoupon}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.length}}">
<view class='empty-info'>
<image class='empty-img'
......@@ -48,41 +92,42 @@
</view>
</view>
</swiper-item>
<!-- 包邮券 -->
<swiper-item>
<scroll-view scroll-y wx:if="{{invalidCouponList.length}}">
<scroll-view scroll-y wx:if="{{couponList.length}}">
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{invalidCouponList}}"
wx:for="{{couponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
>
<view class='invalid-coupon' />
<!--5 已使用 !5 过期-->
<image wx:if="{{item.status == 5}}"
src='https://img3.bigaka.com/prd/3001/202003/20200309/3001c35498ca-ec0d-42b5-a46a-afb8f66ce996.png' class='invalid-img' />
<image wx:else
src='https://img3.bigaka.com/prd/3001/202003/20200309/30018297bfb0-e2b0-4687-838e-e78463eae06f.png' class='invalid-img' />
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
<view
data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}"
data-id="{{item.couponId}}"
bindtap="handelPresentCouponDetail"
>
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' />
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}">查看详情</view>
</view>
<view class='coupon-code fs-24'>出示劵码</view>
</view>
</view>
<view class='no-more-exp'>--- 已失效优惠券最多显示10条 ---</view>
<no-more wx:if="{{noMoreCouponInvalid}}" />
<no-more wx:if="{{noMoreCoupon}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!invalidCouponList.length}}">
<view class='empty-wrap' wx:if="{{!couponList.length}}">
<view class='empty-info'>
<image class='empty-img'
src='https://img3.bigaka.com/prd/3001/202003/20200309/30012bce7628-f373-4fa7-a6a4-ada9c1c721d6.png' />
......
......@@ -44,6 +44,7 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
let memberId = options.memberId;
if (memberId) {
let tentacleInfo = {
......@@ -56,48 +57,26 @@ wxService.page({
this.generatePointObject(tentacleInfo);
}
this.getOptionsData();
},
watch: {
// experAccessible(newVal, oldVal) {
// if(newVal) {
// this.getOptionsData();
// } else {
// // 去别的页面
// wxService.router(`/subPackage/page/pages/goToHome/goToHome`).replace()
// }
// }
this.getOptionsData(options);
},
//获取集点详情
getOptionsData(){
getOptionsData(options){
// 登录接口返回err
const reLoginErrFlag = wx.getStorageSync('reLoginErr')
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
let id
if (baseUserInfo && !reLoginErrFlag) {
let id = options.id;
this.data.isAuthorization = false;
this.data.id = id;
this.getPointDetail(this.data.id)
this.setData({
isAuthorization: false
}, () => {
const option = this.options || {}
const { scene } = option
if (scene) {
let idParam = decodeURIComponent(scene).split('&')[0]
let shareId = idParam && idParam.split('=')[1] || 0
id = shareId
} else {
id = option.id
}
isAuthorization: false,
id : id,
});
if (id) {
this.setData({
id
}, () => {
this.getPointDetail(id)
})
}
// 隐藏 dialog
this.isShowDialog(false)
})
this.isShowDialog(false)
}
else if (!baseUserInfo && reLoginErrFlag) {
this.setData({
......
......@@ -645,6 +645,27 @@
"pathName": "pages/pointList/pointList",
"query": "",
"scene": null
},
{
"id": 89,
"name": "支付券信息",
"pathName": "subPackageA/page/pages/payCardInfo/payCardInfo",
"query": "id=704053422655279104",
"scene": null
},
{
"id": -1,
"name": "现金购买券列表",
"pathName": "subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon",
"query": "",
"scene": null
},
{
"id": 91,
"name": "现金购买券详情",
"pathName": "subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo",
"query": "id=704317444864479232",
"scene": null
}
]
}
......
// subPackage/page/pages/valueCard/valueCard.js
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
wxService.page({
/**
* 页面的初始数据
*/
data: {
cardList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// wx.hideShareMenu();
this.getActivityList();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
//跳转活动详情
onTapToCardInfo(e){
let item = e.currentTarget.dataset.item;
wx.navigateTo({
url: '/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo?id=' + item.acvivityId,
});
},
//获取有效活动列表
getActivityList(refresh){
wx.showLoading({
title: '加载中..',
});
wxService.post(`/coupon/couponMoneyBuyActivity/buyer/getValidList`,{},null,true).then(res => {
if(res){
let list = res.data.data ? res.data.data : [];
this.data.cardList = list;
this.setData({
cardList: this.data.cardList
});
}
wx.hideLoading();
if(refresh){
setTimeout(() => {
wx.showToast({
title: '刷新成功',
});
wx.hideNavigationBarLoading();
wx.stopPullDownRefresh();
}, 300);
}
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
wx.showNavigationBarLoading();
this.getActivityList(true);
},
})
\ No newline at end of file
{
"navigationBarTitleText": "现金购券",
"backgroundTextStyle": "dark",
"enablePullDownRefresh": true,
"usingComponents": {
"empty": "../../../../component/empty/empty"
}
}
\ No newline at end of file
<!--subPackage/page/pages/valueCard/valueCard.wxml-->
<view class='cards-list' wx:if="{{cardList.length > 0}}">
<view class='card-item'
wx:for="{{cardList}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this"
data-item="{{item}}"
bindtap='onTapToCardInfo'>
<image src='{{item.listPicture}}' mode='widthFix'></image>
<view class='card-buy-btn'>立即抢购</view>
</view>
</view>
<empty text="暂无超值卡活动~" wx:else/>
<view class='no-more' wx:if="{{cardList.length > 5}}">-- 我也是有底线滴 --</view>
\ No newline at end of file
/* subPackage/page/pages/valueCard/valueCard.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.cards-list{
width: 100%;
height: auto;
padding: 30rpx;
}
.cards-list .card-item{
width: 100%;
margin-bottom: 20rpx;
position: relative;
}
.cards-list .card-item .card-buy-btn{
position: absolute;
bottom: 20rpx;
right: 20rpx;
width: 174rpx;
height: 54rpx;
border-radius: 27rpx;
background-color: rgba(5, 195, 91, 1);
box-shadow: 0px 3rpx 10rpx 0px rgba(5, 195, 91, 0.3);
color: #ffffff;
display: flex;
align-items: center;
font-size: 24rpx;
justify-content: center;
}
.cards-list .card-item .card-buy-btn:active{
opacity: 0.7;
}
.cards-list .card-item:last-child{
margin-bottom: 0;
}
.cards-list .card-item image{
width: 100%;
display: block;
border-radius: 6rpx;
}
.no-more{
width: 100%;
height: auto;
padding: 30rpx 0;
color: #999999;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
// subPackage/page/pages/valueCardInfo/valueCardInfo.js
const wxService = require('../../../../utils/wxService')
const utils = require('../../../../utils/util')
wxService.page({
/**
* 页面的初始数据
*/
data: {
id: null,
checked: false,
showModal: false,
valueCardInfo: {},
userHasBaseInfo: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.id = options.id;
console.log(options)
// wx.hideShareMenu();
this.getValueCardActivityInfo();
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.userHasLogin();
},
//获取当前用户是否登录
userHasLogin() {
const baseUserInfo = wx.getStorageSync('_baseUserInfo');
if (baseUserInfo) {
this.setData({
userHasBaseInfo: true
})
}
else {
this.setData({
userHasBaseInfo: false
})
}
},
//获取活动详情
getValueCardActivityInfo() {
wx.showLoading({
title: '加载中..',
});
wxService.post(`/coupon/couponMoneyBuyActivity/getDetail?id=${this.data.id}`,{},null,true).then(res => {
if (res) {
let obj = res.data.data ? res.data.data : null;
if (obj) {
console.log(obj)
obj.activityDesc = obj.definition ? JSON.parse(obj.definition) : [];
obj.acPayMoney = parseFloat(obj.buyPrice / 10 / 10).toFixed(2);
obj.startTime = obj.startTime.substring(0, 10);
obj.endTime = obj.endTime.substring(0, 10);
obj.hasDate = obj.activityDesc.filter(item => item.type == 1).length > 0;
//处理说明文本
let descArr = JSON.parse(JSON.stringify(obj.activityDesc));
descArr = descArr.filter(item => item.type != 1);
// let tempArr = descArr.map(item => {
// return item.value;
// });
// console.log(obj)
obj.descArr = descArr;
this.data.valueCardInfo = obj;
this.setData({
valueCardInfo: this.data.valueCardInfo
});
}
}
wx.hideLoading();
});
},
//修改选中状态
onTapSwitchChecked() {
this.data.checked = !this.data.checked;
this.setData({
checked: this.data.checked
});
},
//关闭modal
onTapCloseModal() {
this.setData({
showModal: false,
});
},
//查看rule
onTapViewRule() {
this.setData({
showModal: true
})
},
//同意并阅读
onTapModalAgree() {
this.setData({
showModal: false,
checked: true,
});
},
//立即购买
onTapBuy() {
if (!this.data.checked) {
return;
}
const { member } = wx.getStorageSync('_baseUserInfo');
if (!member) {
wx.showToast({
title: '请先去登录',
icon: 'none'
})
return;
}
if(!member.cardNoWeixin){
wx.showToast({
title: '请先开卡后购买',
});
wxService.openCard()
return ;
}
//buyWayType 1微信 2支付宝
let memeberId = member.id ,buyWayType = 1;
let activityId = this.data.id;
let url = `/coupon/couponMoneyBuyActivity/buyer/buy?activityId=${activityId}&memberId=${memeberId}&buyWayType=${buyWayType}`;
wx.showLoading({
title: '支付中..',
});
wxService.post(url).then(res => {
wx.hideLoading();
if (res.data.result == 0) {
console.log(res)
this.setData({
checked: false,
});
let data = res.data.data ? res.data.data : null;
if (data) {
let wxParams = data.wxParams;
wx.requestPayment({
timeStamp: wxParams.timeStamp,
nonceStr: wxParams.nonceStr,
package: wxParams.package,
signType: wxParams.signType,
paySign: wxParams.paySign,
success: res => {
wx.showToast({
title: '支付成功!',
});
wx.showLoading({
title: '跳转中...',
});
setTimeout(() => {
wx.hideLoading();
wx.navigateTo({
url: '/pages/coupons/coupons',
});
}, 500);
},
fail: error => {
wx.showToast({
title: '已取消支付',
icon: 'none'
});
}
})
}
}
else {
wx.showToast({
title: '购买失败,请稍后再试!',
icon: 'none'
});
}
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
})
\ No newline at end of file
{
"navigationBarTitleText": "现金购券详情",
"enablePullDownRefresh": false,
"usingComponents": {}
}
\ No newline at end of file
<!--subPackage/page/pages/valueCardInfo/valueCardInfo.wxml-->
<image src='{{valueCardInfo.detailPicture ? valueCardInfo.detailPicture : valueCardInfo.listPicture}}'
class='card-info' mode='widthFix'></image>
<view class='card-info-body'>
<view class='card-title'>{{valueCardInfo.activityName}}</view>
<view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
<view class='lf'>活动时间</view>
<view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
</view>
<view class='card-desc-item'>
<view class='lf'>现金支付</view>
<view class='rg'>¥{{valueCardInfo.acPayMoney}}</view>
</view>
<view class='card-desc-item'
wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this">
<view class='lf'>{{item.label ? item.label : '说明内容'}}</view>
<view class='rg'>
<view class='list-item'> {{item.value}}</view>
</view>
</view>
</view>
<!-- 底部 -->
<view class='bottom-buy'>
<view class='lf-info'>
<!-- 选中 active -->
<view class='check-box {{checked ? "active" : ""}}' bindtap='onTapSwitchChecked'>
<image src='/assets/imgs/tick-success.png' mode='aspectFit'></image>
</view>
<view class='explain'>
<label> 阅读并同意 </label>
<text bindtap='onTapViewRule'>《活动规则》</text>
</view>
</view>
<view class='rg-button positionRe {{checked ? "" : "disabled"}}' wx:if="{{!userHasBaseInfo}}">
<button class="positionAbs clear-btn"
bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
{{buyType == 1 ? "立即购买" : "立即兑换"}}
</view>
<view class='rg-button {{checked ? "" : "disabled"}}'
wx:if="{{userHasBaseInfo}}" bindtap='onTapBuy'>立即购买</view>
</view>
<!-- 超值卡规则 -->
<view class='rule-modal' wx:if="{{showModal}}">
<view class='modal-body'>
<view class='modal-body-title'>
《活动规则》
<image class='modal-body-close' src='/assets/imgs/gray_close.png' mode='aspectFit' bindtap='onTapCloseModal'></image>
</view>
<view class='modal-body-con'>
<image src="{{valueCardInfo.rulePicture}}" mode="widthFix"></image>
</view>
<view class='modal-body-bottom'>
<label bindtap='onTapModalAgree'>阅读并同意</label>
</view>
</view>
</view>
\ No newline at end of file
/* subPackage/page/pages/valueCardInfo/valueCardInfo.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding-bottom: 100rpx;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.card-info{
width: 100%;
display: block;
}
.card-info-body{
width: 100%;
padding: 30rpx;
}
.card-title{
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-bottom: 20rpx;
}
.card-desc-item{
width: 100%;
height: auto;
display: flex;
font-size: 28rpx;
margin-bottom: 10rpx;
}
.card-desc-item .lf{
flex: 0;
min-width: 120rpx;
max-width: 120rpx;
color: #666666;
}
.card-desc-item .rg{
flex: 1;
padding-left: 10rpx;
color: #333333;
}
.card-desc-item .rg .list-item{
margin-bottom: 8rpx;
white-space: pre-line;
}
.bottom-buy{
bottom: 0;
left: 0;
position: fixed;
z-index: 2;
border-top: solid 2rpx #ddd;
width: 100%;
height: 100rpx;
display: flex;
align-items: center;
background: #ffffff;
}
.bottom-buy .rg-button{
flex: 0;
min-width: 200rpx;
max-width: 200rpx;
height: 100%;
background: #05C35B ;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.bottom-buy .rg-button:active{
opacity: 0.7;
}
.bottom-buy .rg-button.disabled{
background: #cccccc;
}
.bottom-buy .rg-button.disabled:active{
opacity: 1;
}
.bottom-buy .lf-info{
flex: 1;
padding-left: 30rpx;
display: flex;
justify-content: flex-start;
align-items: center;
}
.check-box{
width: 42rpx;
height: 42rpx;
border-radius: 50%;
border: solid 1px #dddddd;
display: flex;
align-items: center;
justify-content: center;
}
.check-box image{
display: none;
}
.check-box.active{
background: #ff3333;
border: solid 1px #ff3333;
}
.check-box.active image{
display: block;
width: 25rpx;
height: 25rpx;
}
.explain{
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 10rpx;
font-size: 28rpx;
}
.explain label{
color: #333333;
padding-left: 8rpx;
}
.explain text{
color: #558ACB;
font-size: 22rpx;
}
.rule-modal{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
align-items: center;
justify-content: center;
}
.rule-modal .modal-body{
width: 80vw;
height: 80vh;
background: #ffffff;
border-radius: 8rpx;
display: flex;
flex-direction: column;
}
.rule-modal .modal-body .modal-body-title{
flex: 0;
min-height: 80rpx;
max-height: 80rpx;
width: 100%;
border-bottom: solid 2rpx #dddddd;
position: relative;
display: flex;
justify-content: center;
align-items: center;
color: #333333;
font-size: 28rpx;
}
.rule-modal .modal-body .modal-body-title .modal-body-close{
position: absolute;
width: 32rpx;
height: 32rpx;
top: 24rpx;
right: 24rpx;
}
.rule-modal .modal-body .modal-body-title .modal-body-close:active{
opacity: 0.7;
}
.rule-modal .modal-body .modal-body-con{
flex: 1;
padding: 20rpx;
overflow: hidden;
overflow-y: auto;
font-size: 24rpx;
color: #666666;
}
.rule-modal .modal-body .modal-body-con image{
width: 100%;
}
.rule-modal .modal-body .modal-body-bottom{
flex: 0;
min-height: 120rpx;
max-height: 120rpx;
display: flex;
align-items: center;
justify-content: center;
}
.rule-modal .modal-body .modal-body-bottom label{
width: 280rpx;
height: 80rpx;
background: #ff3333;
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.rule-modal .modal-body .modal-body-bottom label:active{
opacity: 0.7;
}
// subPackage/page/pages/couponCenterInfo/couponCenterInfo.js
const wxService = require('../../../../utils/wxService')
const util = require('../../../../utils/util')
wxService.page({
/**
* 页面的初始数据
*/
data: {
activityId : null,
activityInfo : {},
showDialog : false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let id = options.id;
if(id){
this.data.activityId = id;
this.getPayCardInfo();
}
},
//获取支付券详情
getPayCardInfo(){
wxService.get(`/coupon/wechatCouponSet/get/${this.data.activityId}`).then(res => {
if(res){
let obj = res.data.data ? res.data.data : null;
if (obj){
let detailInfo = obj.detailInfo ? JSON.parse(obj.detailInfo) : [];
this.data.activityInfo = obj;
this.data.activityInfo.desc = detailInfo;
this.setData({
activityInfo : this.data.activityInfo
});
}
}
})
},
//领取优惠券
onTapGetCoupon(){
wx.showLoading({
title: '领取中..',
});
//调用接口领取
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
let url = this.data.activityInfo.activityImgUrl ? this.data.activityInfo.activityImgUrl : 'https://img3.bigaka.com/prd/3001/202003/20200331/3001649f2f08-3b4e-4b5b-97c1-30cdf646651c.png';
return {
title: `我分享给你一张“${this.data.activityInfo.couponName}”的支付券,赶快领取吧~`,
path: `/subPackageA/page/pages/payCardInfo/payCardInfo?id=${this.data.activityId}`,
imageUrl: url, // 可以更换分享的图片
}
}
});
\ No newline at end of file
{
"navigationBarTitleText": "支付券信息",
"usingComponents": {
}
}
\ No newline at end of file
<!--subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxml-->
<view class="coupon-info-con">
<!-- 修改为新的布局 -->
<view class="coupon-package">
<image src="{{activityInfo.activityImgUrl}}" mode="widthFix"></image>
</view>
<!-- 活动说明 -->
<view class='integral-detail' style="margin-top:20rpx;" wx:if="{{activityInfo.desc.length > 0}}">
<view class='integral-list' wx:for="{{activityInfo.desc}}" wx:key="*this">
<text class='integral-title'>{{item.label}}</text>
<text class='integral-desc wpl'>{{item.value}}</text>
</view>
</view>
<!-- 按钮 -->
<view class="get-btn positionRe">
<button wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'
class="clear-btn positionAbs">立即领取</button>
<view wx:else class="view-btn" bindtap="onTapGetCoupon">立即领取</view>
</view>
</view>
/* subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.coupon-info-con{
padding: 30rpx;
}
.coupon-info-bg{
width: 100%;
height: 174rpx;
background-position: center;
background-size: 100%;
background-repeat: no-repeat;
position: relative;
padding-left: 170rpx;
}
.coupon-info-bg .lf-coupon-Bg{
position: absolute;
left: 0;
top: 0;
width: 170rpx;
height: 100%;
padding: 15rpx;
}
.coupon-package{
width: 100%;
height: auto;
}
.coupon-package image{
width: 100%;
}
.coupon-info-bg .lf-coupon-Bg image{
width: 100%;
height: 100%;
}
.coupon-info-bg .rg-coupon-info{
width: 100%;
height: 100%;
padding: 15rpx;
font-size: 24rpx;
}
.coupon-title{
font-size: 28rpx;
color: #333333;
margin-bottom: 8rpx;
font-weight: 550;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.coupon-date{
font-size: 22rpx;
color: #999999;
margin-bottom: 5rpx;
}
.exp-intro{
margin-top: 60rpx;
}
.exp-intro .exp-intro-item{
display: flex;
font-size: 28rpx;
color: #333333;
}
.exp-intro .exp-intro-item .intro-title{
flex: 0;
min-width: 100rpx;
max-width: 100rpx;
}
.exp-intro .exp-intro-item .intro-desc{
flex: 1;
color: #999999;
}
.integral-detail{
margin-top: 60rpx;
}
.integral-list{
margin-bottom: 20rpx;
font-size: 24rpx;
color: #999999;
}
.integral-title{
font-size: 24rpx;
color: #333333;
margin-right: 8rpx;
}
.integral-title,.integral-desc{
display: inline-block;
}
.get-btn{
width: 100%;
height: 90rpx;
margin-top: 80rpx;
background: -webkit-linear-gradient(left,rgb(203,60,60,0.7),rgb(203,60,60,1));
border-radius: 8rpx;
color: #ffffff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}
.get-btn button{
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.get-btn .view-btn{
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
}
.get-btn:active{
opacity: 0.7;
}
\ No newline at end of file
......@@ -122,7 +122,6 @@ class WXService extends Http {
param.appid = app.globalData.appId
}
_this.post(`/member/minaLogin`, param).then(response => {
if (response) {
let dataResp = response.data.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment