Commit f42ab85f by 杨北旺

提交权益内容

1 parent 5cd9f8cf
Showing 90 changed files with 4780 additions and 7 deletions
import api from "../request/http";
const path = 'scrm.api.coupon.'
const ghPath = 'scrm.api.carlife.cgacar.'
module.exports = {
/**获取卡券列表 */
getCardData(data) {
return api.post({
method: `${path}app.list`,
...data
// discountTypes: [3, 7]
})
},
//获取领券中心优惠券列表
getCarCenterdData(data){
return api.post({
method: `${path}list.couponCenterList`,
...data
})
},
/**获取卡券数量 */
getCouponNum() {
return api.post({
method: 'scrm.api.coupon.list.by.account.id',
useMemberType: 0
})
},
/**获取首页可以领取的券 */
getHomeCardData(data) {
let merchantId = wx.$storage.get('srcm_shopmall_merchant_id')
if (merchantId) {
merchantId = Number(JSON.parse(merchantId))
data.merchantId = merchantId
}
if (merchantId) {
data.merchantId = merchantId
}
return api.post({
method: `${path}list.merchant.account`,
...data
})
},
/**领取优惠券 */
toReciveCard(data) {
return api.post({
method: `${path}customer.receive`,
...data,
receiveSource: 3
})
},
/**卡券详情 */
couponsDetail(data) {
return api.post({
method: `${path}verification.code.detail`,
...data
})
},
/**广汇卡券 卡券全部列表 */
ghCouponsData() {
return api.post({
method: `${ghPath}coupon.list.benefits`
})
},
/**广汇卡券 抵用记录列表 */
ghDealNote() {
return api.post({
method: `${ghPath}coupon.list.credit.cards`
})
},
/**广汇卡券 发布确认列表 */
ghDealPublish() {
return api.post({
method: `${ghPath}coupon.list.card.deal`
})
},
/**广汇卡券 抵用确认列表 */
ghDealResist() {
return api.post({
method: `${ghPath}coupon.list.resist.deal`
})
},
/**抵用确认提交 */
ghSumbitResist(data) {
return api.post({
method: `${ghPath}coupon.resist.deal`,
...data
})
},
/**发布确认提交 */
ghSumbitPublish(data) {
return api.post({
method: `${ghPath}coupon.card.deal`,
...data
})
},
/**免费领取体验卡 */
tolqFreecard(data) {
return api.post(
{
method: `scrm.api.equity.h5.free.card.receive`,
...data
},
true
)
},
/**获取体验卡天数 */
getFreeCardDay(data) {
return api.post({
method: `scrm.api.equity.class.free.day.get`,
...data
})
},
/** 获取企微分享优惠卷信息 */
getCouponInfo(data) {
return api.post({
method: `${path}share.info`,
...data
})
},
/**领取优惠券 */
receiveCoupon(data) {
return api.post(
{
method: `${path}share.receive`,
...data,
receiveSource: 4
},
true
)
},
/**获取套餐详情(权益) */
packageInfo(data) {
return api.post({
method: `scrm.api.equity.main.page.package.detail.get`,
...data
})
},
/**获取门店单号(权益) */
createOrderNum(data) {
return api.post({
method: `scrm.api.equity.merchant.order.code.create`,
...data
})
},
/**创建门店订单(权益) */
createOrder(data) {
return api.post({
method: `scrm.api.equity.merchant.order.create`,
...data
})
},
/**获取折扣券 兑换券详情 */
getWWCoupon(data) {
return api.post({
method: `scrm.api.coupon.verification.code.detail`,
...data
})
},
/** 检查是否领取优惠券 */
checkCoupon(data) {
return api.post({
method: `scrm.api.coupon.share.receive.check`,
...data
})
},
// 定向礼包详情
giftsDetail(data) {
return api.post({
method: `scrm.api.coupon.directional.gift.detail`,
...data
})
},
// 定向礼包领取
giftsRecive(data) {
return api.post({
method: `scrm.api.coupon.user.directional.gift.create`,
...data
})
},
// 获取优惠券详情--道路救援
getDigitalCoupons(data) {
return api.post({
method: `scrm.api.coupon.detail`,
...data
})
}
}
import api from "../request/http";
module.exports = {
/**激活卡(权益) */
activeEquity(data) {
return api.post({
method: `scrm.api.equity.open.card.by.cardno`,
...data,
});
},
/**获取代驾服务接口*/
getEdjurl(data) {
return api.post({
method: `scrm.api.equity.edj.url`,
...data,
});
},
/**获取所有权益 */
getAllEquity(data) {
return api.post({
method: `scrm.api.equity.third.get`,
...data,
});
},
//查询是否开通会员
checkOpenMember(data) {
return api.post(
{
method: `scrm.api.equity.info`,
...data,
},
true
);
},
// 获取商品信息
commodityMsg(data) {
return api.post({
method: `scrm.api.equity.coupon.detail`,
...data,
});
},
// 查询商品库存
checkStock(data) {
return api.post(
{
method: `scrm.api.equity.goods.stock.get`,
...data,
},
true
);
},
// 首页--附近优惠
lasteCommodity(data) {
return api.post({
method: `scrm.api.equity.main.page.carefully.chosen.get`,
...data,
});
},
// 首页--门店套餐
storePackage(data) {
return api.post({
method: `scrm.api.equity.main.page.merchant.package.get`,
...data,
});
},
// 首页--获取会员卡信息
memberCard(data) {
return api.post({
method: `scrm.api.equity.open.card.price.get.by.merchantid`,
...data,
});
},
// 购买权益卡
buyMemberCard(data) {
return api.post({
method: `scrm.api.equity.open.card.to.buy`,
...data,
});
},
// 首页--获取养车服务
serviceDataOfhome(data) {
return api.post({
method: `scrm.api.equity.service.h5.main.page.service.get`,
...data,
});
},
// 查询服务条款
serviceTerms(data) {
return api.post({
method: `scrm.api.equity.service.h5.items.terms.get`,
...data,
});
},
// 根据merchantId查询服务条款
serviceTermsById(data) {
return api.post({
method: `scrm.api.equity.serviceterms.get`,
...data,
});
},
// 根据身份证查询订单
checkOrderByIdcard(data) {
return api.post({
method: `scrm.api.equity.service.h5.order.by.card`,
...data,
});
},
// 首页--检测是否领取了权益卡
checkCustomCardNote(data) {
return api.post({
method: `scrm.api.equity.service.h5.customer.equity.card.get`,
...data,
});
},
// 通过购买售前权益套餐后领卡
openCardByPreSale(data) {
return api.post({
method: `scrm.api.equity.open.card.receive.by.package`,
...data,
});
},
// 购买商品获取订单号
getOrderCode(data) {
return api.post({
method: `scrm.api.equity.ordercode.get`,
...data,
});
},
// 支付订单号
payGoodsOrder(data) {
return api.post({
method: `scrm.api.equity.create.order`,
...data,
});
},
// 服务项目详情
serviceDetailMsg(data) {
return api.post({
method: `scrm.api.equity.service.h5.bill.detail.get`,
...data,
});
},
// 服务项目详情
serviceDetailById(data) {
return api.post({
method: `scrm.api.equity.service.h5.bill.merchant.get`,
...data,
});
},
// 门店订单套餐详情
packageOrderDetail(data) {
return api.post({
method: `scrm.api.equity.h5.package.order.detail.get`,
...data,
});
},
// 获取直充商品数据
chargeData(data) {
return api.post({
method: `scrm.api.equity.charge.detail`,
...data,
});
},
// 获取订单详情
orderDetailData(data) {
return api.post({
method: `scrm.api.equity.h5.order.detail.get`,
...data,
});
},
// 创建售后
createdSale(data) {
return api.post({
method: `scrm.api.equity.order.refund.detail.create`,
...data,
});
},
// 获取售后详情
saleDetailInfo(data) {
return api.post({
method: `scrm.api.equity.h5.order.refund.detail.get`,
...data,
});
},
// 套餐申请售后
packageApply(data) {
return api.post({
method: `scrm.api.equity.merchant.order.refund`,
...data,
});
},
// 我的卡券
cardListData(data) {
return api.post({
method: `scrm.api.equity.h5.order.list.get`,
...data,
});
},
// 确认收货
comfirmRevice(data) {
return api.post({
method: `scrm.api.equity.h5.order.finish.confirm`,
...data,
});
},
// 查询热线电话
hotLine(data) {
return api.post({
method: `scrm.api.equity.service.package.merchant.hotline.get`,
...data,
});
},
// 查询商户信息
getMerchantInfo(data) {
return api.post({
method: `scrm.api.equity.common.merchant.detail.det`,
...data,
});
},
// 查询是否开通售前权益配置
preSaleSetting(data) {
return api.post({
method: `scrm.api.equity.service.merchant.config.get`,
...data,
});
},
// 新增救援服务线索
addClueRescue(data) {
return api.post({
method: `scrm.api.carlife.weapp.clue.rescue`,
...data,
});
},
// 订单详情
orderDetail(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.detail`,
...data,
});
},
// 获取优惠券兑换码
getExchangecode(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.exchangecode.get`,
...data,
});
},
// 客户赠送权益列表查询
getCustomerEquityList(data) {
return api.post({
method: `scrm.api.equity.renew.customer.list`,
...data,
});
},
// 客户赠送权益列表查询前注册
setCustomerEquity(data) {
return api.post({
method: `scrm.api.shopmall.weapp.get.equity`,
...data,
});
},
// 手机号码快速直充
toRechargeByPhone(data) {
return api.post({
method: `scrm.api.shopmall.weapp.order.charge`,
...data,
});
},
// 获取国任省市区列表
areaList(data) {
return api.post({
method: `scrm.api.equity.service.claims.area`,
...data,
});
},
// 未开通服务项目查询服务条款
notOpenTerms(data) {
return api.post({
method: `scrm.api.equity.service.items.grade.detail`,
...data,
});
},
};
...@@ -5,6 +5,8 @@ import homeApi from './home' ...@@ -5,6 +5,8 @@ import homeApi from './home'
import discoveryApi from './discovery' import discoveryApi from './discovery'
import shopmallApi from './shopmall' import shopmallApi from './shopmall'
import mineApi from './mine' import mineApi from './mine'
import equityApi from './equity'
import couponsApi from './coupons'
module.exports = { module.exports = {
wechatApi, wechatApi,
entmicroApi, entmicroApi,
...@@ -12,5 +14,7 @@ module.exports = { ...@@ -12,5 +14,7 @@ module.exports = {
homeApi, homeApi,
discoveryApi, discoveryApi,
shopmallApi, shopmallApi,
mineApi mineApi,
equityApi,
couponsApi
} }
\ No newline at end of file \ No newline at end of file
import sha1 from '../../utils/lib/sha1.js' import sha1 from '../../lib/sha1'
import qs from '../../utils/lib/qs' import qs from '../../lib/qs'
import environment from '../env/index.js' import environment from '../env/index.js'
const sign = (params, secret, noSignAttr = []) => { const sign = (params, secret, noSignAttr = []) => {
delete params.sign delete params.sign
......
// app.js // app.js
// 初始化sentry // 初始化sentry
import sentryInit from '~/utils/sentryConfig/sentryInit' // import sentryInit from '~/utils/sentryConfig/sentryInit'
sentryInit() // sentryInit()
import api from './api/index' import api from './api/index'
import {router} from './router/index' import {router} from './router/index'
// 判断小程序是否需要更新 // 判断小程序是否需要更新
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
"pages/webView/webView", "pages/webView/webView",
"pages/Login/Login" "pages/Login/Login"
], ],
"requiredPrivateInfos": ["getLocation"], "requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -57,7 +59,22 @@ ...@@ -57,7 +59,22 @@
{ {
"root": "packageEquity", "root": "packageEquity",
"pages": [ "pages": [
"pages/index/index" "pages/index/index",
"pages/package/package",
"pages/directional/directional",
"pages/open/open",
"pages/agreement/index",
"pages/allEquity/allEquity",
"pages/chargeWait/chargeWait",
"pages/kaqDetail/kaqDetail",
"pages/packageDetail/packageDetail",
"pages/saleApply/saleApply",
"pages/saleDetail/saleDetail",
"pages/success/success",
"pages/commodity/detail/detail",
"pages/commodity/list/list",
"pages/commodity/charge/charge",
"pages/commodity/chargeDetail/chargeDetail"
] ]
}, },
{ {
......
...@@ -19,3 +19,19 @@ image { ...@@ -19,3 +19,19 @@ image {
height: 100%; height: 100%;
vertical-align: top; vertical-align: top;
} }
.flex_sc {
display: flex;
align-items: center;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb {
display: flex;
align-items: center;
justify-content: space-between;
}
\ No newline at end of file \ No newline at end of file
// component/test.js
Component({
properties: {
chargeInfo: Object
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
toDetail(){
let {chargeInfo} = this.data
let query = {
brandName:chargeInfo.brandName,
supplier:chargeInfo.supplier,
icon:chargeInfo.icon
}
const temp = JSON.stringify(query)
wx.navigateTo({
url: '/packageEquity/pages/commodity/chargeDetail/chargeDetail?param='+temp
})
},
toDetailPage(e){
let {item} = e.currentTarget.dataset
let {chargeInfo} = this.data
let query = {
brandName:chargeInfo.brandName,
supplier:chargeInfo.supplier,
id:item.id,
productName:item.productName,
icon:chargeInfo.icon
}
const temp = JSON.stringify(query)
wx.navigateTo({
url: '/packageEquity/pages/commodity/chargeDetail/chargeDetail?param='+temp
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="charge_element_wrapper flex_sc" catchtap="toDetail">
<image webp class="charge_banner" src="{{chargeInfo.bgurl}}" />
<view class="charge_content">
<view class="charge_title_wrapper">
<view class="flex_sc">
<view class="charge_title_text">{{chargeInfo.brandName}}</view>
<view class="charge_sign flex_ccc">直充</view>
</view>
<view class="chage_more">查看更多</view>
</view>
<view class="charge_scroll_wrap">
<scroll-view scroll-x="{{true}}" style="height:124rpx">
<block wx:for="{{chargeInfo.couponsGoodsList}}" wx:key="index">
<view class="charge_package_element" data-item="{{item}}" catchtap="toDetailPage">
<glsx-image webp class="charge_cou" src="equity/scrm_quan_bg.png" />
<view class="charge_name hide-text">{{item.productName}}</view>
<view class="charge_price_left">
<view class="charge_min_price">¥</view>
<view class="chage_max_price">{{item.salesPrice}}</view>
<view class="charge_price_right">¥{{item.lineationPrice}}</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/*直充元素样式*/
.charge_element_wrapper {
background: #FFFFFF;
height: 244rpx;
box-shadow: 0px 4rpx 16rpx 0px rgba(239, 240, 242, 1);
border-radius: 16rpx;
border: 1rpx solid #EFF0F2;
margin-bottom: 20rpx;
}
.charge_banner {
width: 168rpx;
height: 100%;
background: linear-gradient(90deg, #FFF1DB 0%, #FBE6E6 100%);
border-radius: 16rpx 0px 0rpx 16rpx;
}
.charge_content {
width: calc(100% - 168rpx);
height: 100%;
box-sizing: border-box;
padding-left: 20rpx;
}
.charge_title_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 38rpx 30rpx 22rpx 0;
}
.charge_title_text {
font-size: 28rpx;
font-weight: 600;
color: #282829;
}
.charge_sign {
width: 54rpx;
height: 30rpx;
background: linear-gradient(143deg, #FFEAD1 0%, #E6BB8A 100%);
border-radius: 4rpx;
font-size: 20rpx;
font-weight: 400;
color: #000000;
margin-left: 28rpx;
}
.chage_more {
font-size: 20rpx;
font-weight: 400;
color: #717171;
}
.charge_scroll_wrap {
/* width: 100%; */
overflow: hidden;
vertical-align: top;
white-space: nowrap;
height: 124rpx;
}
.charge_package_element {
display: inline-block;
width: 256rpx;
height: 124rpx;
position: relative;
margin-right: 20rpx;
}
.charge_cou {
width: 256rpx;
height: 124rpx;
}
.charge_name {
position: absolute;
left: 20rpx;
top: 12rpx;
width: 168rpx;
font-size: 24rpx;
font-weight: 400;
color: #2D2D2E;
}
.charge_price_left {
display: flex;
align-items: flex-end;
position: absolute;
left: 20rpx;
bottom: 16rpx;
}
.charge_min_price {
font-size: 20rpx;
font-weight: 400;
margin-right: 4rpx;
line-height: 20rpx;
}
.chage_max_price{
font-size: 33rpx;
font-weight: 600;
color: #282829;
line-height: 33rpx;
}
.charge_price_right {
font-size: 20rpx;
font-weight: 400;
color: #282829;
text-decoration: line-through;
margin-left: 10rpx;
line-height: 20rpx;
}
.hide-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.flex_sc {
display: flex;
align-items: center;
}
.flex_ccc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
\ No newline at end of file \ No newline at end of file
Component({
properties: {
businessInfo: Object,
address: Object
},
data: {
curErrorIndex:-1,
},
/**
* 组件的方法列表
*/
methods: {
toDetail() {
const { businessInfo, address } = this.data
let query = {
supplier: businessInfo.supplier,
brandName: businessInfo.brandName,
lat: address.location.lat,
lng: address.location.lng,
}
const temp = JSON.stringify(query)
wx.navigateTo({
url: '/packageEquity/pages/commodity/detail/detail?param=' + temp
})
},
toDetailPage(e) {
const { item } = e.currentTarget.dataset
const { businessInfo, address } = this.data
let query = {
supplier: businessInfo.supplier,
brandName: businessInfo.brandName,
lat: address.location.lat,
lng: address.location.lng,
id: item.id
}
const temp = JSON.stringify(query)
wx.navigateTo({
url: '/packageEquity/pages/commodity/detail/detail?param=' + temp
})
},
// 打开地图
openMap() {
const { businessInfo } = this.data
wx.openLocation({
latitude: parseFloat(businessInfo.lat),
longitude: parseFloat(businessInfo.lng),
address: businessInfo.localAddress
})
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="element_wrapper" catchtap="toDetail">
<view class="header_wrap">
<image webp class="header_icon" src="{{businessInfo.icon}}" />
<view class="header_desc">
<view class="desc_title_wrap">
<view class="desc_title hide-text">{{businessInfo.localShopName}}</view>
<view class="latest_sign">最近</view>
</view>
<view class="desc_address">
<view class="address_text hide-text">{{businessInfo.localAddress}}</view>
<view class="flex_sc" catchtap="openMap">
<view class="address_line"></view>
<view class="address_num">{{businessInfo.localAddressDistance}}km</view>
<glsx-image webp class="address_icon" src="equity/scrm_loca_icon_new.png" />
</view>
</view>
</view>
</view>
<view class="scroll_wrap">
<scroll-view scroll-x="{{true}}" style="height:216rpx">
<block wx:for="{{businessInfo.couponsGoodsList}}" wx:key="index">
<view class="scroll_item" data-item="{{item}}" catchtap="toDetailPage">
<view wx:if="{{!item.noMemberPrice}}" class="vip_sign flex_ccc">
<view class="vip_text">会员专属</view>
<glsx-image webp class="vip_icon" src="equity/member.png" />
</view>
<image webp bind:error="binderror" data-index="{{index}}" class="item_banner" src="{{item.goodsImage}}" />
<view class="item_text">
<view class="color_text"><text class="min_color_text">¥</text>{{item.salesPrice}}</view>
<view class="line_color_text">¥{{item.lineationPrice}}</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
.element_wrapper {
background: #FFFFFF;
height: 376rpx;
box-shadow: 0px 4rpx 16rpx 0px rgba(239, 240, 242, 1);
border-radius: 8rpx;
border: 1rpx solid #EFF0F2;
margin-bottom: 20rpx;
}
.header_wrap {
display: flex;
justify-content: space-between;
box-sizing: border-box;
padding: 32rpx 32rpx 0 32rpx;
}
.header_icon {
width: 82rpx;
height: 82rpx;
border-radius: 50%;
background: #FA8A59;
}
.header_desc {
width: calc(100% - 82rpx);
box-sizing: border-box;
padding-left: 22rpx;
}
.desc_title_wrap {
display: flex;
align-items: center;
}
.desc_title {
font-size: 28rpx;
font-weight: 600;
color: #282829;
line-height: 40rpx;
max-width: 392rpx;
}
.desc_address {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 8rpx;
width: 100%;
}
.address_text {
font-size: 24rpx;
font-weight: 400;
color: #656566;
line-height: 34rpx;
}
.address_line {
width: 2rpx;
height: 24rpx;
opacity: 0.24;
margin-right: 12rpx;
background-color: #656566;
}
.address_num {
font-size: 24rpx;
font-weight: 400;
color: #656566;
line-height: 34rpx;
}
.address_icon {
width: 40rpx;
height: 40rpx;
background: linear-gradient(129deg, #FFC08B 0%, #FA8A59 100%);
border-radius: 50%;
margin-left: 12rpx;
}
.hide-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.latest_sign {
border-radius: 4rpx;
border: 2rpx solid #FC5B32;
padding: 6rpx 8rpx;
font-size: 20rpx;
font-weight: 400;
color: #FC5B32;
margin-left: 14rpx;
}
.scroll_wrap {
margin-top: 26rpx;
box-sizing: border-box;
padding: 0 2rpx 20rpx 32rpx;
overflow: hidden;
white-space: nowrap;
vertical-align: top;
}
.scroll_item {
width: 256rpx;
height: 216rpx;
display: inline-block;
margin-right: 20rpx;
position: relative;
}
.vip_sign {
position: absolute;
right: 0;
top: 0;
width: 120rpx;
height: 28rpx;
}
.vip_icon {
width: 120rpx;
height: 28rpx;
position: absolute;
right: 0;
top: 0;
z-index: 2;
}
.vip_text {
position: relative;
z-index: 3;
font-size: 20rpx;
font-weight: 500;
color: #FFFFFF;
}
.item_banner {
width: 256rpx;
height: 158rpx;
border-radius: 16rpx;
}
.item_text {
display: flex;
align-items: flex-end;
justify-content: center;
}
.color_text {
font-size: 36rpx;
font-weight: 600;
color: #FC5B32;
}
.min_color_text {
font-size: 24rpx;
font-weight: 400;
}
.line_color_text {
font-size: 24rpx;
font-weight: 400;
color: #666666;
text-decoration: line-through;
margin-left: 10rpx;
padding-bottom: 5rpx;
}
.flex_sc {
display: flex;
align-items: center;
}
.flex_ccc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/agreement/index.js
Page({
/**
* 页面的初始数据
*/
data: {
localData: [{
title: '第1条 相关定义',
content: [
'1.1 权益卡:指签署本协议并根据权益卡开通流程所展示的收费标准支付相应费用或免费领取后获取的特殊权益(实际名称以开通流程及前端页面展示为准),权益卡包括无门槛卡、规则卡及付费卡。',
'权益卡权益可能包括以下部分或全部类型(实际权益类型可能出现新增或减少,以商家/我司/ 第三方实际设置为准):',
'1)特定商品的优惠,即在购买特定商品过程中,通过享受优惠价格、获得折扣让利、使用品类券等方式获取的特殊权益;',
'2)特定服务,即可直接享受特别服务的特殊权益;',
'3)专属权利;',
'4)其他权益。',
'1.2 权益卡权益:指您基于其权益卡资格所享有的特殊权益,具体权益内容由商家单独提供,请予以关注或及时与商家沟通确认。',
'1.3.商家:指自行或与我司共同制定收费标准以及领卡会员权益,并独立或与我司共同协商决定是否收取费用且提供服务的经我司认证的主体。',
'1.4.我司:指本协议中“权益卡”的所有权人(在尚未正式销售给您之前)。',
'1.1 权益卡:指签署本协议并根据权益卡开通流程所展示的收费标准支付相应费用或免费领取后获取的特殊权益(实际名称以开通流程及前端页面展示为准),权益卡包括无门槛卡、规则卡及付费卡。',
'1.1 权益卡:指签署本协议并根据权益卡开通流程所展示的收费标准支付相应费用或免费领取后获取的特殊权益(实际名称以开通流程及前端页面展示为准),权益卡包括无门槛卡、规则卡及付费卡。',
]
}, {
title: '第2条 本站服务条款的确认和接纳',
content: [
'2.1本协议所提供的汽车增值服务权益活动的解释权和运作权归我司所有。',
'2.2您在申请开通权益卡流程中点击同意本协议之前,应当认真阅读本协议。请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款、法律适用和争议解决条款。免除或者限制责任的条款将以粗体下划线标识,领卡/购卡您应重点阅读。如您对协议有任何疑问,可向商家或我司或客服咨询。',
'2.3您点击同意本协议的,即视为您确认自己同意汽车增值服务权益相关服务的条款,且同意按本协议内容履行,如产生相关责任的,同意承担相应法律责任。',
]
}, {
title: '第3条 活动时间',
content: [
'3.1汽车增值服务权益的开始时间和结束时间以 我司发布的活动规则中列明的时间为准。',
]
}, {
title: '第4条 用户权益',
content: [
'4.1 您申请开通权益卡服务时,需根据页面提示支付相应的会员服务费用后方可完成开通。基于权益调整、市场与业务的发展,可能会调整权益卡服务开通所需会员服务费用,或向您提供与会员权益相关的增值服务,并可能收取增值服务的费用。我司就前述权益调整将在相应服务页面进行通知或公告,您可以通过 商家公众号 平台查询最新的VIP您权益内容。您确认费用及权益的调整由我司/商家/ 第三方独立完成,如果非我司调整,与我司无关。',
]
}, {
title: '第5条 用户领权益卡注意事项',
content: [
'5.1提交申请领取时,您同意并提交本人手机号码和邮箱等本站所需的个人资料,并保证其提供的注册资料真实、准确、完整、合法有效,您注册资料如有变动的,应及时更新其注册资料。如果您提供的注册资料不合法、不真实、不准确、不详尽,您需承担因此引起的相应责任及后果,并且我司保留终止您参与该活动的权利。',
'5.2权益服务领取后,您应谨慎合理的保存、使用其您名和密码,不得将在本站注册获得的账户借给他人使用,否则您应承担由此产生的全部责任,同时我司在该种情况下有权做出独立判断,可采取暂停或关闭您参与资格等措施。',
'5.3您同意,我司拥有通过邮件、短信电话等形式,向其发送相关活动信息等必要信息的权利。',
'5.4您同意,领取汽车增值服务权益,除为实现您自身利益外,不得利用其享有的权益非法获利,不得以任何形式售卖其所享有的权益,不得滥用其所享有的权益,如因您不当行为致我司合理怀疑的或判定的,我司有权暂停或关闭该活动的权益,此外,您需承担因此引起的相应责任及后果。',
'5.1提交申请领取时,您同意并提交本人手机号码和邮箱等本站所需的个人资料,并保证其提供的注册资料真实、准确、完整、合法有效,您注册资料如有变动的,应及时更新其注册资料。如果您提供的注册资料不合法、不真实、不准确、不详尽,您需承担因此引起的相应责任及后果,并且我司保留终止您参与该活动的权利。',
'5.1提交申请领取时,您同意并提交本人手机号码和邮箱等本站所需的个人资料,并保证其提供的注册资料真实、准确、完整、合法有效,您注册资料如有变动的,应及时更新其注册资料。如果您提供的注册资料不合法、不真实、不准确、不详尽,您需承担因此引起的相应责任及后果,并且我司保留终止您参与该活动的权利。',
]
}, {
title: '第6条 协议变更',
content: [
'6.1我们可根据国家法律法规变化及服务内容调整、保护用户权益等需要修订本协议。一旦相关内容发生重大变更,我们将通过我们的网站或客户端公告、消息通知等方式通知您。',
'6.2如您不同意本协议的修订,您应立即停止使用本服务。如您继续使用本服务的,则视为您同意本协议的修订。',
]
}, {
title: '第7条 责任免除',
content: [
'因下列原因导致无法正常提供服务,我司不承担任何责任:',
'1.系统停机维护或升级;',
'2.因台风、地震、洪水、雷电或恐怖袭击等不可抗力原因;;',
'3.您的电脑软硬件和通信线路、供电线路出现故障的;',
'4.您操作不当或通过非授权或认可的方式使用本服务的;',
'5.因病毒、木马、恶意程序攻击、网络拥堵、系统不稳定、系统或设备故障、通讯故障、电力故障、第三方服务瑕疵或政府行为等原因。',
]
}, {
title: '第8条 法律管辖和适用',
content: [
'8.1如缔约方就本协议内容或其执行发生任何争议,合同各方应尽力友好协商解决;协商不成时,任何一方均可向深圳市南山区人民法院提起诉讼。',
]
}, {
title: '第9条 其他',
content: [
'9.1如因不可抗力或其它本站无法控制的原因使本站活动服务无法及时提供或无法按本协议进行的,我司会合理地尽力协助处理善后事宜。',
]
}]
},
onLoad: function(options) {
},
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "权益服务协议"
}
\ No newline at end of file \ No newline at end of file
<view class="agree-container-page">
<view class="agreement-title"> 汽车增值服务权益卡领取协议</view>
<view class="argeement-content">
<view class="first_info text_indenet">
本协议是您与 深圳市嘀加智慧云服务有限公司(以下简称为“我司”)、以及“商家”之间就汽车增值服务权益卡领取事项所订立的契约。请您仔细阅读本协议,您勾选“同意《汽车增值服务权益卡领取协议》”后,本协议即构成对双方有约束力的法律文件。
</view>
<view wx:for="{{localData}}" wx:key="index" class="element_item">
<view class="h3">{{item.title}}</view>
<view wx:for="{{item.content}}" wx:for-index="indexs" wx:for-item="ite" wx:key="indexs" class="p">{{ite}}</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
page {
background: white;
}
.agree-container-page {
box-sizing: border-box;
padding: 30rpx;
}
.agreement-title {
color: #666666;
line-height: 64rpx;
font-size: 28rpx;
text-align: center;
}
.argeement-content>view {
color: #666666;
line-height: 36rpx;
font-size: 24rpx;
}
.text_indenet {
text-indent: 48rpx;
}
.h3 {
line-height: 60rpx;
font-weight: bold;
font-size: 30rpx;
}
.p {
text-indent: 48rpx;
line-height: 36rpx;
}
\ No newline at end of file \ No newline at end of file
Page({
/**
* 页面的初始数据
*/
data: {
cHeight: 600,
curIndex: 0,
equityList: [],
to: 'to-0'
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let system = wx.getSystemInfoSync()
this.getAllMerchantList()
this.setData({
cHeight: system.windowHeight
})
if (options.showToast) {
setTimeout(()=>{
wx.$api.showToast('原商品及品牌均已下架,您可查看其他权益商品')
},500)
}
},
computerHeight() {
let query = wx.createSelectorQuery().in(this)
let heightArr = []
let s = 0
query
.selectAll('.scroll_item_wrap')
.boundingClientRect(react => {
react.forEach(item => {
s += item.height
heightArr.push(s)
})
this.data.heightArr = heightArr
})
.exec()
query
.select('.right_wrap')
.boundingClientRect(res => {
this.data.rightHeight = res.height
})
.exec()
},
scrollViewFn(e) {
let scrollTop = e.detail.scrollTop
let scrollArr = this.data.heightArr
if (this.data.isClickLeft) {
this.data.isClickLeft = false
return
}
if (scrollTop >= scrollArr[scrollArr.length - 1] - this.data.rightHeight) {
return
} else {
for (let i = 0; i < scrollArr.length; i++) {
if (scrollTop >= 0 && scrollTop < scrollArr[0]) {
this.setData({
curIndex: 0
})
} else if (scrollTop >= scrollArr[i - 1] - 110 && scrollTop < scrollArr[i] - 110) {
this.setData({
curIndex: i
})
}
}
}
},
slectLeftItem(e) {
const { index } = e.currentTarget.dataset
this.setData({
curIndex: index,
to: `to-${index}`,
isClickLeft: true
})
},
getAllMerchantList() {
let {merchantId} = wx.p.storage.get('merchant_info')
let para = {
merchantId
}
wx.p.api.equityApi.getAllEquity(para).then(res => {
let tempArr = res.goodsServiceList
this.setData(
{
equityList: tempArr
},
() => {
this.computerHeight()
}
)
})
},
toNewPage(e) {
const { item } = e.currentTarget.dataset
let url = ''
if (item.appearance == 1) {
let para = {
supplier: item.supplier,
brandName: item.brandName,
location: true
}
const temp = JSON.stringify(para)
url = '/packageEquity/pages/commodity/detail/detail?param=' + temp
} else if (item.appearance == 2) {
let para = {
supplier: item.supplier,
brandName: item.brandName,
icon: item.equityIcon
}
const temp = JSON.stringify(para)
url = '/packageEquity/pages/commodity/chargeDetail/chargeDetail?param=' + temp
}
wx.navigateTo({
url
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/allEquity/allEquity.wxss */
page {
background: #F7F8FA;
}
.allEquity-container {
display: flex;
}
.left_wrap {
width: 21.33%;
}
.right_wrap {
width: 78.67%;
overflow: hidden;
background: white;
box-sizing: border-box;
padding: 0rpx 30rpx 0rpx 32rpx;
}
.scroll_item_wrap {
width: 100%;
padding: 16rpx 0 0rpx 0;
}
.scroll_title {
font-size: 26rpx;
font-weight: 600;
color: #282829;
}
.scroll_content {
margin-top: 36rpx;
display: flex;
flex-wrap: wrap;
}
.element {
width: 25%;
min-height: 176rpx;
margin-bottom: 20rpx;
}
.element_icon {
width: 70%;
height: 92rpx;
}
.element_label {
font-size: 24rpx;
font-weight: 400;
color: #282829;
line-height: 34rpx;
margin-top: 10rpx;
}
.element_tip {
font-size: 20rpx;
font-weight: 400;
color: #FC5B32;
line-height: 40rpx;
text-align: center;
}
.common_element_text {
width: calc(100% - 21rpx);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.selecTab {
height: 120rpx;
position: relative;
background: #EFF0F2;
font-size: 26rpx;
font-weight: 400;
color: #656566;
}
.active_line {
position: absolute;
top: 50%;
left: 0;
transform: translate(0, -50%);
width: 8rpx;
height: 60rpx;
background: #FC5B32;
border-radius: 2rpx;
}
.actvie_class {
background: #FFFFFF;
color: #282829;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file \ No newline at end of file
<view class="allEquity-container">
<view style="height:{{cHeight}}px" class="left_wrap">
<block wx:for="{{equityList}}" wx:key="index">
<view bind:tap="slectLeftItem" data-index="{{index}}" class="selecTab flex_cc {{curIndex==index?'actvie_class':''}}">
<text>{{item.goodsCategory}}</text>
<view wx:if="{{curIndex==index}}" class="active_line"></view>
</view>
</block>
</view>
<view style="height:{{cHeight}}px" class="right_wrap">
<scroll-view scroll-y="{{true}}" scroll-with-animation scroll-into-view="{{to}}" bindscroll="scrollViewFn" style="height:{{cHeight}}px">
<block wx:for="{{equityList}}" wx:key="index">
<view id="to-{{index}}" class="scroll_item_wrap">
<view class="scroll_title">{{item.goodsCategory}}</view>
<view class="scroll_content">
<view wx:for="{{item.equityGoodsGroupDescDtos}}" wx:for-item="childItem" wx:for-index="indexs" wx:key="indexs" class="element" data-item="{{childItem}}" bind:tap="toNewPage">
<image webp class="element_icon" src="{{childItem.equityIcon}}" />
<view class="element_label common_element_text">
{{childItem.equityName}}
</view>
<view class="element_tip common_element_text">
{{childItem.equityDesc}}
</view>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/chargeWait/chargeWait.js
Page({
/**
* 页面的初始数据
*/
data: {
},
onLoad: function(options) {
let query = JSON.parse(options.query)
this.setData({
query
})
},
toOrderList() {
wx.redirectTo({
// url:'/packageShopmall/packageEquity/pages/orderList/orderList'
url:'/packageShopmall/packageMine/pages/order/index/index'
})
},
toBack() {
wx.navigateBack({
delta: 1
})
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/chargeWait/chargeWait.wxss */
\ No newline at end of file \ No newline at end of file
<view class="charge-wait-contaienr">
<view class="box_wrapper">
<view class="box_title">充值流程</view>
<view class="row_time_line">
<view class="row_icon"><view class="mini"></view></view>
<view class="row_text">支付成功</view>
</view>
<view class="col_line"></view>
<view class="row_time_line">
<view class="row_icon"><view class="mini"></view></view>
<view class="row_text">充值已提交,等待{{query.brandName}}处理</view>
</view>
<view class="col_line grey"></view>
<view class="row_time_line">
<view class="row_icon grey"></view>
<view class="row_text grey_color">预计10秒内到账</view>
</view>
<view class="row_pannel">
<view class="row_text grey_color">具体到账情况以运营商为准,如有疑问,请致电400-028-0503联系我们</view>
</view>
</view>
<view class="driver"></view>
<view class="box_wrapper_two">
<view class="box_title" style="margin-bottom:0;font-size: 32rpx;">{{query.brandName}}{{query.denomination}}</view>
<view class="box_tip">充值账号:{{query.rechageNum}}</view>
<view wx:if="{{!query.isGH}}" class="box_btn_wrap">
<view class="btn_item" bind:tap="toBack">继续充值</view>
<view class="btn_item leftBtn" bind:tap="toOrderList">查看订单</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
page {
background: white;
}
.box_wrapper {
box-sizing: border-box;
padding: 32rpx 60rpx 80rpx 40rpx;
}
.box_title {
font-size: 28rpx;
font-weight: 600;
color: #333333;
margin-bottom: 24rpx;
}
.row_time_line {
display: flex;
align-items: center;
}
.row_icon {
width: 32rpx;
height: 32rpx;
background: rgba(0, 143, 255, 0.2);
border-radius: 50%;
box-sizing: border-box;
padding: 6rpx;
}
.row_icon>.mini {
width: 100%;
height: 100%;
background: #008FFF;
border-radius: 50%;
}
.row_text {
font-size: 32rpx;
font-weight: 500;
color: #008FFF;
padding-left: 30rpx;
}
.col_line {
padding: 6rpx 0;
height: 60rpx;
background: #008FFF;
width: 2rpx;
margin-left: 16rpx;
}
.row_pannel {
margin-left: 32rpx;
margin-top: 22rpx;
}
.box_wrapper_two {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 60rpx;
}
.box_tip {
font-size: 28rpx;
font-weight: 400;
color: #666666;
margin-top: 20rpx;
margin-bottom: 28rpx;
}
.box_btn_wrap {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.btn_item {
width: 231rpx;
height: 56rpx;
background: rgba(0, 143, 255, 0.08);
border-radius: 140rpx;
border: 2rpx solid #008FFF;
font-size: 24rpx;
font-weight: 400;
color: #008FFF;
display: flex;
align-items: center;
justify-content: center;
}
.grey {
background: #E9E9E9;
}
.grey_color {
color: #666666;
}
.driver {
width: 100%;
height: 12rpx;
background: #F4F4F4;
}
.leftBtn {
margin-left: 16rpx;
border: 2rpx solid #E9E9E9;
background: white;
color: #666666;
}
\ No newline at end of file \ No newline at end of file
Page({
data: {
loadOver: false,
commodityList: [],
loadingMore: false,
pageParam: {
appearance: 2,
pageSize: 0,
pageCount: 10
}
},
onLoad: function (options) {
this.toGetCommodity()
},
// 获取直充数据
toGetCommodity() {
let { pageParam, loadingMore, commodityList, loadOver } = this.data
if (loadOver) {
return
}
wx.p.api.equityApi.lasteCommodity(pageParam).then(res => {
if (!res) {
this.setData({
loadOver: true
})
return
}
let tempArr = []
res.map(item => {
let newArr = []
if (item.chargeGoddsList) {
item.chargeGoddsList.forEach(ele => {
ele.denominationList.forEach(info => {
let tempObj = {
productName: ele.productName,
...info
}
newArr.push(tempObj)
})
})
}
item.couponsGoodsList = newArr
item.bgurl = this.matchImage(item.brandName)
if (item.couponsGoodsList) {
tempArr.push(item)
}
return item
})
if (loadingMore) {
commodityList = commodityList.concat(tempArr)
}
this.setData({
commodityList: loadingMore ? commodityList : tempArr,
loadingMore: false,
loadOver: false
})
})
},
onReachBottom: function () {
if (this.data.unauthorized) {
return
}
let { pageParam } = this.data
pageParam.pageSize++
this.setData(
{
pageParam,
loadingMore: true
},
() => {
this.toGetCommodity()
}
)
},
// 直充品牌对应的图标
matchImage(brandName){
const commonBaseURL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/'
const ImageConfig = [{
name: `qq音乐`,
url: `${commonBaseURL}equity/QQ_music.png`
}, {
name: `WPS`,
url: `${commonBaseURL}equity/WPS.png`
}, {
name: `qq阅读`,
url: `${commonBaseURL}equity/QQ_read.png`
}, {
name: `爱奇艺`,
url: `${commonBaseURL}equity/aiqiyi.png`
}, {
name: `百度网盘`,
url: `${commonBaseURL}equity/baiduwp.png`
}, {
name: `哔哩哔哩`,
url: `${commonBaseURL}equity/bili.png`
}, {
name: `凯叔讲故事`,
url: `${commonBaseURL}equity/kaishu.png`
}, {
name: `酷狗音乐`,
url: `${commonBaseURL}equity/kugou.png`
}, {
name: `芒果TV`,
url: `${commonBaseURL}equity/mgTv.png`
}, {
name: `美团`,
url: `${commonBaseURL}equity/mtdc.png`
}, {
name: `奈雪`,
url: `${commonBaseURL}equity/naixue.png`
}, {
name: `瑞幸`,
url: `${commonBaseURL}equity/ruixin.png`
}, {
name: `腾讯视频`,
url: `${commonBaseURL}equity/tenxun.png`
}, {
name: `网易云`,
url: `${commonBaseURL}equity/wangyiyun.png`
}, {
name: `优酷`,
url: `${commonBaseURL}equity/youku.png`
}, {
name: `知乎`,
url: `${commonBaseURL}equity/zhihu.png`
}, {
name: `作业帮`,
url: `${commonBaseURL}equity/workjob.png`
}, {
name: `喜马拉雅`,
url: `${commonBaseURL}equity/ximalaya.png`
}, {
name: `e袋洗`,
url: `${commonBaseURL}equity/edaixi.png`
}]
brandName = brandName.toLowerCase()
let url = 'https://img01.glsx.com.cn/weapp/resource/equity-h5-new/aiqiyi.png'
ImageConfig.forEach(item => {
if (brandName.indexOf(item.name.toLowerCase()) != -1) {
url = item.url
}
})
return url
},
})
{
"usingComponents": {
"commodityItem": "/components/chageItem/index"
},
"navigationBarTitleText": "充值优惠"
}
\ No newline at end of file \ No newline at end of file
<view class="charge-container-page">
<block wx:for="{{commodityList}}" wx:key="index">
<commodityItem chargeInfo="{{item}}"/>
</block>
</view>
\ No newline at end of file \ No newline at end of file
page {
background: white;
}
.charge-container-page {
box-sizing: border-box;
padding: 32rpx;
}
\ No newline at end of file \ No newline at end of file
import { decimal } from '~/utils/format'
Page({
data: {
curIndex: 0,
checkedItem: 0,
isOpen: false,
selectedItem: null,
listData: [],
isGameUse:false,
coupons:null,
showCoupons:false,
},
// 获取当前商品绑定的优惠券并且处理价格
getCouponsItem(e){
const couponsItem = e.detail
let {selectedItem} = this.data
selectedItem.payCouponsPrice = decimal(selectedItem.lineationPrice-(Number(couponsItem.denomination)), 2)
this.setData({
selectedItem,
coupons:couponsItem
})
},
toSelectCoupons(){
const isLogin = this.checkLogin()
if (!isLogin) {
return
}
if(this.data.isGH)return
this.setData({
showCoupons: true
})
},
bindInput(e) {
this.setData({
rechageNum: e.detail.value
})
},
changeMumberType(e) {
let { selectedItem, listData,coupons } = this.data
const { index } = e.currentTarget.dataset
selectedItem = listData[index].denominationList[0]
if(coupons){
selectedItem.payCouponsPrice = decimal(selectedItem.lineationPrice-(Number(coupons.denomination)), 2)
}
this.setData({ curIndex: index, selectedItem, checkedItem: 0 })
},
checkedMumberType(e) {
const { item, index } = e.currentTarget.dataset
let richText = decodeURIComponent(item.buysNotes)
richText = richText.replace(/\<span/g, '<span class="rich_text"')
this.setData({ checkedItem: index, selectedItem: item, richText })
},
toCheckMember() {
if(this.data.isGameUse)return
const SID = wx.p.storage.get('sessionId')
if (!SID) {
return
}
wx.p.api.equityApi.checkOpenMember().then(res => {
let flag = false
if (res.code == 0 && res.data) {
flag = true
}
this.setData({
isOpen: flag
})
wx.p.eventbus.off('EQUITYGOODS')
})
},
getChargeDetail(query,options) {
let para = {
brandName: query.brandName,
supplier: query.supplier
}
if(this.data.isGameUse){
para.id = query.id
}
wx.p.api.equityApi.chargeData(para).then(res => {
let { selectedItem, curIndex, checkedItem, richText,isGameUse,coupons } = this.data
if (!res) {
setTimeout(()=>{
wx.navigateBack({
delta: 1
});
},1500)
return
}
if (res.length) {
let brandLogo = res[0].brandLogo
query.icon = query.icon?query.icon:brandLogo
res.forEach(item => {
item.denominationList.map(el => {
if (el.noMemberPrice) {
el.diffPraice = decimal(el.noMemberPrice - el.salesPrice, 2)
} else {
el.diffPraice = 0
}
return el
})
})
}
if (!query.id) {
selectedItem = res[0].denominationList[0]
} else {
for (let i = 0; i < res.length; i++) {
if (res[i].productName == query.productName) {
curIndex = i
}
for (let j = 0; j < res[i].denominationList.length; j++) {
if (res[i].denominationList[j].id == query.id) {
checkedItem = j
selectedItem = res[i].denominationList[j]
}
}
}
}
richText = decodeURIComponent(selectedItem.buysNotes)
richText = richText.replace(/\<span/g, '<span class="rich_text"')
if(isGameUse){
selectedItem.payCouponsPrice = selectedItem.lineationPrice
}
this.setData({
listData: res,
query,
selectedItem,
checkedItem,
curIndex,
richText,
showLogin: false,
isGameUse,
showComponent:true
},()=>{
if(options.source=='GH'){
this.handleEquityOfGH(options.couponsItem)
}
})
})
},
toCoupons() {
wx.navigateTo({
url: '/packageMine/pages/order/index/index'
})
},
toOpenPage() {
this.modalOnCancel()
wx.navigateTo({
url: '/packageEquity/pages/open/open?page=business'
})
},
toMemberPage() {
this.toOpenPage()
},
toRecharge() {
const isLogin = this.checkLogin()
if (!isLogin) {
return
}
if (!this.data.rechageNum) {
wx.p.wxApi.showToast('请输入充值账号')
return
}
if(this.data.isGameUse)return this.comfirmBuyItem()
const { noMemberPrice, salesPrice } = this.data.selectedItem
let diffPrice = 0
if (noMemberPrice) {
diffPrice = decimal(noMemberPrice - salesPrice, 2)
}
this.setData({
showModal: true,
diffPrice
})
},
modalOnCancel() {
this.setData({
showModal: false
})
},
comfirmBuyItem() {
wx.p.wxApi.showLoading()
let para = {
supplier: this.data.query.supplier
}
wx.p.api.equityApi.getOrderCode(para).then(res => {
this.getPayParam(res)
this.modalOnCancel()
})
},
// 获取支付参数
getPayParam(orderCode) {
if (!orderCode) {
return
}
const { selectedItem, rechageNum,isGameUse,coupons } = this.data
let para = {
orderCode,
goodsId: selectedItem.id,
rechargeNumber: rechageNum,
goodsQuality: 1,
// payMannerId: 19,
paySource: 3
}
if(isGameUse&&coupons){
para.usedCouponIds = [coupons.id]
}
wx.p.api.equityApi.payGoodsOrder(para).then(res => {
wx.hideLoading()
this.handlePay(res)
})
},
// 处理支付
handlePay(payData) {
const { timeStamp, nonceStr, packages, signType, paySign } = payData
let self = this
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: nonceStr,
package: packages,
signType: signType,
paySign: paySign,
success() {
//跳转商品详情
let { query, selectedItem, rechageNum } = self.data
let obj = {
...query,
...selectedItem,
rechageNum,
}
const temp = JSON.stringify(obj)
wx.navigateTo({
url: '/packageEquity/pages/chargeWait/chargeWait?query=' + temp
})
},
fail() {}
})
},
// 设置标题名称
setNaviTitle(title) {
wx.setNavigationBarTitle({
title
})
},
onLoad(options) {
console.log(wx.p);
const query = options ? JSON.parse(decodeURIComponent(options.param)) : this.data.query
this.getChargeDetail(query,options)
this.setNaviTitle(query.brandName)
wx.p.eventbus.on('EQUITYGOODS', data => {
this.toCheckMember()
})
},
onShow() {
this.toCheckMember()
},
// 处理广汇权益明细进入的卡券
handleEquityOfGH(couponsItem){
let {selectedItem} = this.data
selectedItem.payCouponsPrice = decimal(selectedItem.lineationPrice-(Number(couponsItem.denomination)), 2)
this.setData({
selectedItem,
coupons:couponsItem
})
},
// 检测是否已经登录
checkLogin() {
const sessionId = wx.p.storage.get('sessionId')
let flag = true
if (!sessionId) {
flag = false
this.setData({
showLogin: true,
showComponent:false
})
}
return flag
},
loginCallBack(data) {
if (data) {
this.toCheckMember()
}
}
})
{
"navigationBarTitleText": "权益中心",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!-- pages/changeDetail/changeDetail.wxml -->
<view class="detail_container">
<view class="account_area">
<image webp src="{{query.icon}}"></image>
<view class="account_input">
<text class="title">充值账号</text>
<input placeholder-style="color:#B1B1B3;" bind:input="bindInput" placeholder="请输入要充值的账号" type="number" />
<view class="line"></view>
</view>
</view>
<!-- 充值会员选择 -->
<view class="member_area">
<text style="margin-left: 20rpx;" class="title">充值类型</text>
<scroll-view scroll-x="true" class="member_type">
<view class="member-box">
<view wx:for="{{listData}}" wx:key="index" bind:tap="changeMumberType" data-index="{{index}}" class="member_type_item {{index===curIndex ? 'activeNav' : ''}}">
<text class="type_name">{{item.productName}}</text>
</view>
</view>
</scroll-view>
<view class="sale_area">
<view wx:for="{{listData[curIndex].denominationList}}" wx:key="index" class="sale_item {{index===checkedItem ? 'selected_sale_item' : ''}}" bind:tap="checkedMumberType" data-item="{{item}}" data-index="{{index}}">
<text wx:if="{{!item.noMemberPrice&&!isGameUse}}" class="isMember">会员专属</text>
<view class="month">{{item.denomination}}</view>
<block wx:if="{{!isGameUse}}">
<text class="price"><text style="font-size: 22rpx;">¥</text>{{isOpen ||!item.noMemberPrice?item.salesPrice:item.noMemberPrice}}</text>
<text wx:if="{{!isOpen && item.noMemberPrice}}" class="discount">会员立减{{item.diffPraice}}元</text>
<view wx:else style="height:34rpx"></view>
<text class="authority_price">官方价<text style="text-decoration:line-through">¥{{item.lineationPrice}}</text></text>
</block>
<view wx:if="{{isGameUse}}" style="height:42rpx"></view>
<block wx:if="{{isGameUse}}">
<text class="price"><text style="font-size: 22rpx;">¥</text>{{item.lineationPrice}}</text>
</block>
</view>
</view>
</view>
<!-- 优惠券 -->
<!-- <view wx:if="{{isGameUse}}" class="coupons_widget" catch:tap="toSelectCoupons">
<view class="left_wrap">
<glsx-image class="logo" webp src="glsx/equity/comodity_use_logo.png"></glsx-image>
<view class="text">优惠券</view>
</view>
<view class="right_Wrap">
<view wx:if="{{coupons.denomination}}" class="price_text">¥{{coupons.denomination}}</view>
<glsx-image wx:if="{{!isGH}}" class="right_Wrap_icon" webp src="glsx/mine/arrow.png"></glsx-image>
</view>
</view> -->
<!-- 温馨提示 -->
<view class="tip">
<text class="title">温馨提示</text>
<view wx:if="{{richText}}" class="rich_wrapper">
<rich-text nodes="{{richText}}"></rich-text>
</view>
</view>
<!-- 购买按钮 -->
<view style="{{isGH?'padding:0 32rpx':''}}" class="buy_bar">
<view class="coupon" bind:tap="toCoupons">
<glsx-image webp src="equity/card-icon.png"></glsx-image>
<text>我的卡券</text>
</view>
<button style="width:468rpx" bind:tap="toRecharge" class="buy_btn">
立即购买(¥{{isOpen ||!selectedItem.noMemberPrice?selectedItem.salesPrice:selectedItem.noMemberPrice}})
</button>
<!-- <button wx:if="{{isGameUse}}" style="{{isGH?'width:100%;border-radius: 8rpx;':'width:468rpx'}}" bind:tap="toRecharge" class="buy_btn">
立即购买(¥{{selectedItem.payCouponsPrice}})
</button> -->
<!-- <button wx:if="{{isGH}}" style="width:100%;border-radius: 8rpx;" bind:tap="toRecharge" class="buy_btn">
立即充值
</button> -->
</view>
<!-- 弹框 -->
<view wx:if="{{showModal}}" class="overlay">
<view class="overlay_boxs">
<view class="box_body">
<!-- <glsx-image webp class="boxs_icon" webp src="equity/scrm_modal_top_icon.png" /> -->
<view class="boxs_content" style="height:{{!isOpen?'612':'438'}}rpx">
<view class="box_title">
<text class="box_title_text">温馨提示</text>
</view>
<view class="box_container" style="height:{{!isOpen?'536':'410'}}rpx">
<view class="box_content_text">
<view>请您核对账号,确保无误</view>
<view class="info_tip">充值账号</view>
<view class="info_num">{{rechageNum}}</view>
</view>
<block wx:if="{{!isOpen}}">
<view class="info_line"></view>
<view class="info_diff">
开通会员本商品可再减
<text class="spc_text">{{diffPrice}}元</text>
</view>
<view class="info_open_btn" catchtap="toOpenPage">点我开通</view>
</block>
<!-- <view wx:if="{{!isOpen&&!curentGoodsItem.noMemberPrice}}" class="box_content_text">
卡券<text class="spc_text">【{{curentGoodsItem.productName}}】</text>为会员专属商品,您可在成为会员后发起购买
</view> -->
<view class="box_btn_groups">
<view class="btn_wrap" catchtap="modalOnCancel">取消</view>
<view wx:if="{{!isOpen&&!selectedItem.noMemberPrice}}" class="btn_wrap spc_text" catchtap="toMemberPage">
开通会员
</view>
<view wx:else class="btn_wrap spc_text" catchtap="comfirmBuyItem">
确定购买
</view>
<view class="dr_line"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<login show="{{showLogin}}"></login>
<!-- <block wx:if="{{showComponent&&!isGH}}">
<coupons-list goodsId="{{selectedItem.id}}" couponsId="{{query.couponsId}}" bind:getCoupons="getCouponsItem" show="{{showCoupons}}"></coupons-list>
</block> -->
\ No newline at end of file \ No newline at end of file
/* pages/changeDetail/changeDetail.wxss */
page{
background: white;
}
.detail_container{
padding-bottom: 100rpx;
}
.account_area {
padding: 34rpx 40rpx 20rpx;
display: flex;
align-items: center;
}
.account_area image {
width: 92rpx;
height: 92rpx;
border-radius: 50%;
box-shadow: 0 23rpx 18rpx 0 rgba(0, 0, 0, 0.2);
}
.account_area .account_input {
flex: 1;
margin-left: 20rpx;
width: 100%;
position: relative;
}
.account_input input {
margin-top: 20rpx;
font-size: 36rpx;
font-family: PingFangSC-Regular, PingFang SC;
}
.account_input .line {
position: absolute;
height: 2rpx;
width: 100%;
background-color: #DEDEDE;
top: calc(100% + 20rpx);
}
.member_area {
margin-top: 82rpx;
}
.title {
width: 112rpx;
height: 40rpx;
font-size: 28rpx;
font-weight: 500;
color: #282829;
line-height: 40rpx;
}
.member_area .member_type {
margin-top: 20rpx;
flex-wrap: nowrap;
flex-direction: row;
white-space: nowrap;
/* box-shadow: 0 -3px 3px rgba(0, 0, 0, 0.1) inset; */
box-shadow: 0px -8rpx 8rpx 0rpx rgba(0,0,0,0.04) inset;
}
.member-box{
height: 95rpx;
display: flex;
align-items: flex-end;
}
.member_type_item {
height: 80rpx;
width: 188rpx;
display: inline-flex;
align-items: center;
justify-content: center;
white-space: nowrap;
font-size: 28rpx;
color: #B1B1B3;
background-color: #F2F2F2;
}
.activeNav{
color: #8A303A;
background-color: #fff;
height:90rpx;
box-shadow: 0px -4rpx 16rpx 0px rgba(0,0,0,0.04);
}
.type_name{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.sale_area{
padding: 44rpx 40rpx;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-column-gap: 20rpx;
grid-row-gap: 44rpx;
}
.sale_item{
height: 260rpx;
background: #FFFFFF;
border-radius: 8rpx;
box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, 0.1);
border: 2rpx solid #FFFFFF;
padding: 34rpx 0 32rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.sale_item .isMember{
position: absolute;
right: -10rpx;
top: 0;
transform: translateY(-50%);
z-index: 2;
width: 88rpx;
height: 30rpx;
line-height: 30rpx;
text-align: center;
border-radius: 40rpx 40rpx 40rpx 20rpx;
background-color: #B1B1B3;
font-size: 16rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
}
.sale_item .month{
width: 186rpx;
height: 44rpx;
font-size: 32rpx;
background: #F2F2F2;
border-radius: 22rpx;
line-height: 44rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #B1B1B3;
text-align: center;
}
.sale_item .price{
font-size: 40rpx;
font-weight: 500;
color: #656566;
line-height: 56rpx;
margin: 6rpx 0 18rpx;
display: inline-block;
height: 56rpx;
}
.sale_item .discount{
height: 34rpx;
border: 1rpx solid #8A303A;
font-size: 22rpx;
color: #8A303A;
line-height: 34rpx;
padding: 0 8rpx;
margin-bottom: 4rpx;
}
.sale_item .authority_price{
height: 32rpx;
font-size: 22rpx;
color: #B1B1B3;
line-height: 32rpx;
white-space: nowrap;
}
.selected_sale_item{
border: 2rpx solid #8A303A;
box-shadow: 0 4rpx 16rpx 0 rgba(252, 91, 50, 0.2);
}
.selected_sale_item .month{
background: rgba(252, 91, 50, 0.1);
color: #8A303A;
}
.selected_sale_item .price{
color: #8A303A;
}
.selected_sale_item .isMember{
background-color: #8A303A;
}
/* 温馨提示 */
.tip {
padding: 0 40rpx;
}
.rich_text{
word-break: break-all;
white-space:pre-wrap;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
color: #656566;
line-height: 44rpx;
}
.rich_text a{
color: #8A303A;
}
/* 按钮区域 */
.buy_bar{
position: fixed;
box-sizing: border-box;
background-color: #fff;
/* padding: 10rpx 30rpx; */
padding: 0 32rpx 0 90rpx;
height: 100rpx;
left: 0;
right: 0;
bottom: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.coupon{
height: 100%;
width: 80rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
margin-right: 20rpx;
}
.coupon image{
width: 40rpx;
height: 40rpx;
}
.coupon text{
height: 28rpx;
font-size: 20rpx;
color: #282829;
line-height: 28rpx;
}
.buy_btn{
width: 468rpx;
height: 80rpx;
background: #8A303A;
border-radius: 200rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
}
.overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .7);
z-index: 999;
}
.overlay_boxs {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.box_body {
width: 72%;
height: 612rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.boxs_icon {
width: 288rpx;
height: 60rpx;
margin: 0 auto;
}
.boxs_content {
border-radius: 8rpx;
height: 438rpx;
position: relative;
width: 100%;
}
.box_title {
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, 0);
height: 56rpx;
width: 320rpx;
background-image: linear-gradient(142deg, #ffead1 0%, #e6bb8a 100%);
border-radius: 36rpx;
z-index: 1;
text-align: center;
line-height: 56rpx;
}
.box_title_text::before {
content: "";
position: absolute;
top: 50%;
left: -70%;
transform: translate(0, -50%);
width: 62rpx;
height: 2rpx;
background: #683800;
}
.box_title_text {
color: #683800;
font-size: 28rpx;
position: relative;
}
.box_title_text::after {
content: "";
position: absolute;
top: 50%;
right: -70%;
transform: translate(0, -50%);
width: 62rpx;
height: 2rpx;
background: #683800;
}
.box_container {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 410rpx;
background: #ffffff;
width: 100%;
border-radius: 8px;
}
.box_content_text {
width: 100%;
box-sizing: border-box;
padding: 68rpx 48rpx 40rpx 48rpx;
font-size: 28rpx;
color: #606060;
/* line-height: 56rpx; */
text-align: center;
}
.info_tip{
color: #666666;
font-size: 24rpx;
margin-top: 34rpx;
}
.info_num{
color: #8A303A;
font-size: 28rpx;
font-weight: 500;
margin-top: 4px;
}
.info_line{
width: calc(100% - 48rpx);
height: 2rpx;
background: rgba(0, 0, 0, 0.1);
margin: 0 auto;
margin-bottom: 24rpx;
}
.info_diff{
color: #333;
font-size: 28rpx;
text-align: center;
}
.info_open_btn{
color: #19c34e;
font-size: 24rpx;
text-decoration: underline;
margin-top: 6rpx;
text-align: center;
}
.box_btn_groups {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 88rpx;
display: flex;
border-top: 2px solid #e5e5e5;
}
.btn_wrap {
text-align: center;
line-height: 88rpx;
color: #333333;
font-size: 28rpx;
width: 50%;
}
.dr_line {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
width: 1px;
transform: translate(-50%, 0);
background: #e5e5e5;
}
.spc_text {
color: #8A303A;
}
.bottom_modal {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 80%;
background: white;
display: flex;
flex-direction: column;
}
.bottom_title_wrapper {
position: absolute;
left: 0;
right: 0;
top: 0;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 40rpx;
background: white;
z-index: 1000;
}
.title_label {
font-size: 32rpx;
color: #282829;
}
.bottom_scoll_wrap {
width: 100%;
height: calc(100% - 196rpx);
overflow: hidden;
overflow-y: scroll;
box-sizing: border-box;
padding: 20rpx;
}
.bottem_item_width {
width: 224rpx;
}
.bottem_item_title_height {
height: 98rpx;
}
/* 优惠券 */
.coupons_widget{
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 40rpx;
margin-top: 16rpx;
margin-bottom: 32rpx;
}
.coupons_widget > .left_wrap{
display: flex;
align-items: center;
}
.coupons_widget > .left_wrap >.logo{
width: 40rpx;
height: 40rpx;
margin-right: 8rpx;
}
.coupons_widget > .left_wrap >.text{
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.right_Wrap{
display: flex;
align-items: center;
}
.price_text{
font-weight: 400;
font-size: 28rpx;
color: #F10016;
}
.right_Wrap_icon{
width: 14rpx;
height: 28rpx;
margin-left: 8rpx;
}
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "权益中心",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
page {
background: white;
}
.goods_scroll_wrapper {
padding: 46rpx 0 40rpx 40rpx;
position: relative;
overflow: hidden;
white-space: nowrap;
}
.scroll_element {
width: 288rpx;
height: 380rpx;
border-radius: 16rpx;
border: 2rpx solid #FFFFFF;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
margin-right: 10rpx;
display: inline-block;
position: relative;
vertical-align: top;
}
.image_icon_wrapper {
position: relative;
}
.image_icon {
width: 288rpx;
height: 178rpx;
border-radius: 16rpx 16rpx 0 0;
}
.image_vip {
position: absolute;
right: 0rpx;
top: 0rpx;
width: 120rpx;
height: 28rpx;
}
.vip_text {
position: absolute;
right: 16rpx;
top: 0rpx;
z-index: 3;
font-size: 20rpx;
font-weight: 500;
color: #FFFFFF;
}
.element_title {
box-sizing: border-box;
padding: 18rpx 14rpx 0 18rpx;
min-height: 88rpx;
font-size: 32rpx;
font-weight: 400;
color: #999999;
line-height: 44rpx;
white-space: pre-wrap;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.element_sale_price {
box-sizing: border-box;
padding: 10rpx 0 0 18rpx;
display: flex;
font-size: 40rpx;
font-weight: 600;
color: #999999;
line-height: 56rpx;
/* align-items: flex-end; */
}
.price_min_icon {
font-size: 24rpx;
font-weight: 400;
line-height: 60rpx;
margin-right: 6rpx;
}
.element_o_price {
font-size: 24rpx;
font-weight: 400;
line-height: 34rpx;
text-decoration: line-through;
box-sizing: border-box;
/* padding: 0 0 0 18rpx; */
color: #999999;
position: absolute;
left: 18rpx;
bottom: 4rpx;
}
.scroll_element_active {
box-shadow: 0px 4rpx 8rpx 0px #ffebe6;
border: 2rpx solid #8A303A;
}
.selected {
color: #8A303A;
}
.selected1 {
color: #282829;
font-size: 500;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.more_btn {
width: 80rpx;
height: 348rpx;
background: rgba(228, 228, 228, 0.95);
border-radius: 12rpx;
position: absolute;
right: 0;
top: 56rpx;
font-size: 28rpx;
font-weight: 600;
color: #666666;
line-height: 40rpx;
flex-direction: column;
}
.roate {
width: 0;
height: 0;
border-right: 10rpx solid transparent;
border-left: 10rpx solid transparent;
border-top: 10rpx solid #666666;
margin-top: 20rpx;
}
.goods_desc_wrapper {
box-sizing: border-box;
padding: 0 40rpx;
}
.line_wrapper {
border-bottom: 2rpx solid #DEDEDE;
padding: 28rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.line_label {
font-size: 28rpx;
font-weight: 500;
color: #282829;
line-height: 40rpx;
display: flex;
align-items: center;
}
.line_label > .logo{
width: 40rpx;
height: 40rpx;
margin-right: 8rpx;
}
.line_tip {
font-size: 24rpx;
font-weight: 400;
color: #717171;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 16rpx;
width: 350rpx;
}
.line_con {
font-size: 24rpx;
font-weight: 400;
color: #656566;
}
.line_con > .logo {
width: 16rpx;
height: 24rpx;
margin-left: 8rpx;
}
.line_icon {
width: 40rpx;
height: 40rpx;
margin-left: 10rpx;
}
.class1 {
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
.class2 {
font-size: 28rpx;
font-weight: 400;
color: #8A303A;
}
.class3 {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
.class4 {
color: #8A303A;
font-weight: 500;
}
.class5{
font-weight: 400;
color: #8A303A;
}
.class6{
font-weight: 600;
font-size: 40rpx;
color: #8A303A;
}
.rich_title {
margin-top: 30rpx;
padding-left: 40rpx;
display: flex;
align-items: center;
margin-bottom: 18rpx;
}
.title_icon {
width: 6rpx;
height: 32rpx;
background: #8A303A;
}
.title_text {
font-size: 32rpx;
font-weight: 600;
color: #282829;
margin-left: 16rpx;
}
.rich_wrapper {
padding: 0 40rpx;
}
.rich_text {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #282829 !important;
line-height: 44rpx;
background: white !important;
}
.fixed_btn {
position: fixed;
left: 0;
right: 0;
bottom: 0;
min-height: 100rpx;
display: flex;
align-items: center;
justify-content: space-between;
background: white;
box-sizing: border-box;
padding: 0 32rpx 0 90rpx;
}
.buy_btn {
width: 468rpx;
height: 80rpx;
background: #8A303A;
border-radius: 200rpx;
font-size: 28rpx;
font-weight: 600;
color: #FFFFFF;
}
.icon_text {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.card_icon {
width: 52rpx;
height: 52rpx;
}
.card_text {
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 34rpx;
}
.disableBtn {
background-color: #999 !important;
}
.noStorck {
padding: 28rpx 0;
font-size: 32rpx;
font-weight: 600;
color: #8A303A;
background: rgba(252, 91, 50, 0.2);
}
.overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .7);
z-index: 999;
}
.overlay_boxs {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.box_body {
width: 72%;
height: 612rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.boxs_icon {
width: 288rpx;
height: 60rpx;
margin: 0 auto;
}
.boxs_content {
border-radius: 8rpx;
height: 438rpx;
position: relative;
width: 100%;
}
.box_title {
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, 0);
height: 56rpx;
width: 320rpx;
background-image: linear-gradient(142deg, #ffead1 0%, #e6bb8a 100%);
border-radius: 36rpx;
z-index: 1;
text-align: center;
line-height: 56rpx;
}
.box_title_text::before {
content: "";
position: absolute;
top: 50%;
left: -70%;
transform: translate(0, -50%);
width: 62rpx;
height: 2rpx;
background: #683800;
}
.box_title_text {
color: #683800;
font-size: 28rpx;
position: relative;
}
.box_title_text::after {
content: "";
position: absolute;
top: 50%;
right: -70%;
transform: translate(0, -50%);
width: 62rpx;
height: 2rpx;
background: #683800;
}
.box_container {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 410rpx;
background: #ffffff;
width: 100%;
border-radius: 8px;
}
.box_content_text {
width: 100%;
box-sizing: border-box;
padding: 68rpx 48rpx 40rpx 48rpx;
font-size: 28rpx;
color: #606060;
line-height: 56rpx;
}
.info_diff{
color: #333;
font-size: 28rpx;
text-align: center;
text-align: center;
}
.info_open_btn{
color: #19c34e;
font-size: 24rpx;
text-decoration: underline;
margin-top: 6rpx;
text-align: center;
}
.box_btn_groups {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 88rpx;
display: flex;
border-top: 2px solid #e5e5e5;
}
.btn_wrap {
text-align: center;
line-height: 88rpx;
color: #333333;
font-size: 28rpx;
width: 50%;
}
.dr_line {
position: absolute;
left: 50%;
top: 0;
bottom: 0;
width: 1px;
transform: translate(-50%, 0);
background: #e5e5e5;
}
.spc_text {
color: #8A303A;
}
.bottom_modal {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 80%;
background: white;
display: flex;
flex-direction: column;
}
.bottom_title_wrapper {
position: absolute;
left: 0;
right: 0;
top: 0;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 40rpx;
background: white;
z-index: 1000;
}
.title_label {
font-size: 32rpx;
color: #282829;
}
.bottom_scoll_wrap {
width: 100%;
height: calc(100% - 19rpx);
overflow: hidden;
overflow-y: scroll;
box-sizing: border-box;
padding: 20rpx;
}
.bottem_item_width {
width: 224rpx;
}
.bottem_item_title_height {
height: 98rpx;
}
.check_icon_sty {
width: 36rpx;
height: 36rpx;
position: absolute;
right: 20rpx;
bottom: 20rpx;
}
.check_icon_sty_max {
position: absolute;
right: 20rpx;
bottom: 45rpx;
}
\ No newline at end of file \ No newline at end of file
import mapApi from '../../../../utils/mapapi/mapapi'
Page({
data: {
loadOver: false,
commodityList: [],
loadingMore: false,
pageParam: {
appearance: 1,
pageSize: 0,
pageCount: 10
}
},
onLoad: function (options) {
this.getLocation()
},
// 定位
getLocation() {
wx.getLocation({
type: 'gcj02'
})
.then(({ latitude, longitude }) => {
mapApi.detailedAdrress([latitude, longitude]).then(detail => {
this.toGetCommodity(detail.location.lat, detail.location.lng)
this.setData({
currentAddress: detail,
unauthorized: false
})
wx.p.storage.set('unauthorized', false)
})
})
.catch(err => {
// wx.$api.showToast('获取位置失败')
})
},
// 获取附近优惠数据
toGetCommodity(lat, lng) {
let { pageParam, loadingMore, commodityList, loadOver } = this.data
let para = {
lat,
lng,
...pageParam
}
if (loadOver) {
return
}
wx.p.api.equityApi.lasteCommodity(para).then(res => {
if (!res) {
this.setData({
loadOver: true
})
return
}
let tempArr = []
res.forEach(item => {
if (item.couponsGoodsList) {
tempArr.push(item)
}
})
if (loadingMore) {
commodityList = commodityList.concat(tempArr)
}
this.setData({
commodityList: loadingMore ? commodityList : tempArr,
loadingMore: false,
loadOver: false
})
})
},
// 重新收起获取定位
relocation() {
this.setData({
showAuth: true
})
},
/**授权失败 */
authFail() {
this.setData({
unauthorized: true
})
wx.p.storage.set('unauthorized', true)
},
/**授权成功 */
authSuccess() {
this.getLocation()
},
onReachBottom: function () {
if (this.data.unauthorized) {
return
}
let { pageParam } = this.data
pageParam.pageSize++
this.setData(
{
pageParam,
loadingMore: true
},
() => {
let { currentAddress } = this.data
const { lat, lng } = currentAddress.location
this.toGetCommodity(lat, lng)
}
)
}
})
{
"usingComponents": {
"commodityItem": "/components/commodityItem/index"
},
"navigationBarTitleText": "惠享生活"
}
\ No newline at end of file \ No newline at end of file
<view class="commodity-list-container">
<view wx:if="{{unauthorized}}" class="reLocation_wrap flex_cc">
<image webp class="loca_icon" webp src="{{IMGURL}}equity/location_icon.png?v={{img_version}}" />
<view bind:tap="relocation" class="loca_text">定位一下,发现附近优惠</view>
</view>
<block wx:for="{{commodityList}}" wx:key="index">
<commodityItem address="{{currentAddress}}" businessInfo="{{item}}"/>
</block>
</view>
<authorize scopeType="userLocation" bindfail="authFail" bindsuccess="authSuccess"
show="{{showAuth}}"></authorize>
\ No newline at end of file \ No newline at end of file
page {
background: white;
}
.commodity-list-container {
box-sizing: border-box;
padding: 32rpx;
}
.reLocation_wrap {
width: 100%;
height: 240rpx;
}
.loca_icon {
width: 40rpx;
height: 48rpx;
}
.loca_text {
margin-left: 8rpx;
font-size: 24rpx;
color: #282828;
text-decoration: underline;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file \ No newline at end of file
Page({
data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/',
IMGURKBASE: 'equity/version/1_0_0/',
show:false,
statusMap:{
0:{
img:'direct_vip_icon'
},
1:{
img:'direct_sliver_vip_icon'
},
2:{
img:'direct_gold_vip_icon'
},
},
status:0
},
onLoad() {
},
// getScreenInfo(){
// const system = wx.p.storage.get('system_info')
// this.setData({
// screenW:system.safeArea.width,
// screenH:system.safeArea.height
// })
// }
toGetMemeber(){
this.toShowSuccess()
},
toShowSuccess() {
this.setData({
show: true
})
wx.setPageStyle({
style: {
overflow: 'hidden'
}
})
},
// 关闭弹框放开页面滚动
toCloseModal() {
this.setData({
show: false
})
wx.setPageStyle({
style: {
overflow: 'unset'
}
})
},
})
{
"usingComponents": {},
"navigationBarTitleText":" "
}
\ No newline at end of file \ No newline at end of file
.container {
position: relative;
min-height: 1448rpx;
}
.page_title {
background: linear-gradient(125deg, #FEE2CB 0%, #E8AD80 100%) !important;
-webkit-background-clip: text !important;
background-clip: text !important;
color: transparent !important;
font-weight: 600;
font-size: 76rpx;
position: absolute;
top: 128rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
text-align: center;
}
.page_bg_icon {
width: 100%;
height: 576rpx;
position: absolute;
left: 50%;
top: 72rpx;
transform: translateX(-50%);
}
.footer_bg_icon {
position: absolute;
bottom: 0;
right: 0;
left: 0;
height: 261.64rpx;
}
.btn_wrap_bg {
position: absolute;
left: 50%;
bottom: 128rpx;
transform: translateX(-50%);
height: 528rpx;
width: calc(100% - 48rpx);
display: flex;
flex-direction: column;
align-items: center;
.title::before {
content: "";
position: absolute;
top: 50%;
left: -70%;
transform: translate(0, -50%);
width: 62rpx;
height: 2rpx;
background: linear-gradient(125deg, #FEE2CB 0%, #E8AD80 100%);
}
.title {
margin-top: 68rpx;
background: linear-gradient(125deg, #FEE2CB 0%, #E8AD80 100%) !important;
-webkit-background-clip: text !important;
background-clip: text !important;
color: transparent !important;
font-weight: 600;
font-size: 40rpx;
position: relative;
}
.title::after {
content: "";
position: absolute;
top: 50%;
right: -70%;
transform: translate(0, -50%);
width: 62rpx;
height: 2rpx;
background: linear-gradient(125deg, #E8AD80 0%, #FEE2CB 100%);
}
.input_wrap {
width: 606rpx;
height: 104rpx;
background: #30343E;
border: 2rpx solid #A9A9A9;
border-radius: 16rpx;
margin-top: 48rpx;
box-sizing: border-box;
padding-left: 32rpx;
}
.input-placeholder {
font-weight: 400;
font-size: 28rpx;
color: #A2A2A2;
}
.int_widget {
color: white;
height: 104rpx;
}
.btn_icon {
width: 460.98rpx;
height: 104rpx;
margin-top: 30rpx;
}
}
.modal_container {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
background: rgba($color: #000000, $alpha: 0.5);
z-index: 99;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
.modal_close_icon {
position: absolute;
right: 40rpx;
top: 108rpx;
width: 60rpx;
height: 60rpx;
}
.inner {
width: 580rpx;
height: 682rpx;
background: #343845;
border: 2rpx solid #979797;
box-shadow: 0 2rpx 198rpx 0 #eec9962e;
border-radius: 32rpx;
margin-top: 320rpx;
box-sizing: border-box;
padding: 40rpx;
position: relative;
.list_wrap {
height: 364rpx;
overflow: hidden;
overflow-y: scroll;
}
.coupons_item {
width: 500rpx;
height: 120rpx;
background-image: linear-gradient(86deg, #FFE1C8 0%, #FFF8EC 28%, #FFC49A 100%);
margin-bottom: 24rpx;
border-radius: 8rpx;
position: relative;
.left_box {
padding-left: 16rpx;
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
.c_title {
font-weight: 500;
font-size: 24rpx;
color: #333333;
}
.c_tip {
font-weight: 400;
font-size: 20rpx;
color: #333333;
margin-top: 8rpx;
}
}
.right_box {
width: 120rpx;
height: 48rpx;
background-image: linear-gradient(180deg, #FFE5C0 0%, #F7DCBC 23%, #E5BB90 99%);
border-radius: 46rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 20rpx;
color: #333333;
position: absolute;
right: 22rpx;
top: 50%;
transform: translateY(-50%);
}
.circle_up {
position: absolute;
top: -10rpx;
right: 161rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: #343845;
}
.circle_bottom {
position: absolute;
bottom: -10rpx;
right: 161rpx;
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: #343845;
}
.line {
width: 2rpx;
height: 86rpx;
opacity: 0.32;
background: #C59A7A;
position: absolute;
top: 50%;
right: 171rpx;
transform: translateY(-50%);
}
}
// .footer::before {
// content: '';
// left: 0;
// right: 0;
// width: 100%;
// border-radius: 50%;
// background: transparent;
// position: absolute;
// height: 48rpx;
// top: -24rpx;
// z-index: 999;
// box-shadow: 0 2rpx 198rpx 0 #eec9962e;
// }
.footer {
width: 580rpx;
height: 318rpx;
background: #353946;
box-shadow: 0 2rpx 40rpx 0 #eec9964a, 0 4rpx 4rpx 0 #00000080, inset 0 4rpx 12rpx 0 #717481;
border-radius: 0 0 0 32rpx 32rpx;
position: absolute;
left: 0;
right: 0;
bottom: 0;
.successText {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 172.32rpx;
font-weight: 600;
font-size: 36rpx;
width: 100%;
text-align: center;
color: #F9DBB5;
}
.look_btn {
width: 290rpx;
height: 92rpx;
background-image: linear-gradient(180deg, #FAE6CA 0%, #F7DCBC 24%, #E2B795 39%, #D7A682 61%, #C79C78 78%, #CFAC87 100%);
box-shadow: inset 0 2rpx 6rpx 0 #624e3480;
border-radius: 46rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 36rpx;
color: #353946;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 37.2rpx;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!-- <view class="container">
<image webp mode="widthFix" webp class="page_bg_icon" src="{{IMGURL}}equity/gifts_bg_new.png?v={{img_version}}" />
<image webp mode="widthFix" webp class="page_bg_title" src="{{IMGURL}}equity/gifts_title.png?v={{img_version}}" />
<image wx:if="{{showInput}}" mode="widthFix" webp class="page_bg_btn {{giftsData.receiveRule==3?'noStatus':''}}" bind:tap="toRecivedGifts" src="{{IMGURL}}equity/gifts_lingq_btn.png?v={{img_version}}" />
<block wx:if="{{showAuthBtn&&phoneNum&&!errorPhone&&giftsData.receiveRule!=3}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="auth-button"></button>
</block>
<block wx:if="{{showAuthBtn&&giftsData.receiveRule==3}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="auth-button-3"></button>
</block>
<view wx:if="{{showInput&&giftsData.receiveRule!=3}}" class="page_bg_content flex_cc">
<view class="input_wrap flex_ccc">
<view wx:if="{{isFocus}}" class="input_box flex_ccc">
<input bindblur="onbindblur" focus="{{isFocus}}" class="input_sty" value="{{phoneNum}}" bind:input="intPhoneNum" maxlength="{{giftsData.receiveWay==1?11:6}}" placeholder="" placeholder-class="input-placeholder" />
<image wx:if="{{phoneNum}}" webp class="input_delete_icon" bind:tap="deleteInput" src="{{IMGURL}}equity/gifts_delete_icon.png?v={{img_version}}" />
</view>
<view wx:if="{{!phoneNum&&!isFocus}}" class="input_box flex_ccc input-placeholder" bind:tap="clickFocus">{{giftsData.receiveWay==1?'请输入手机号领取':'请输入您车架号后6位领取'}}</view>
<view wx:if="{{phoneNum&&!isFocus}}" class="input_box flex_ccc input-placeholder" bind:tap="clickFocus">{{phoneNum}}</view>
</view>
</view>
<view wx:if="{{errorMsg}}" class="error_msg">{{errorMsg}}</view>
</view> -->
<view style="height:1448rpx;background: url({{IMGURL}}{{IMGURKBASE}}direction_bg_icon.png);background-size: 100% 100%;" class="container">
<view class="page_title">生活权益会员</view>
<view style="background: url({{IMGURL}}{{IMGURKBASE}}direct_bg_icon_2.png);background-size: 100% 100%;" class="btn_wrap_bg">
<view class="title">领取会员</view>
<view class="input_wrap">
<input maxlength="11" class="int_widget" placeholder="请输入领取手机号" placeholder-class="input-placeholder" />
</view>
<glsx-image bind:tap="toGetMemeber" webp class="btn_icon" src="{{IMGURKBASE}}direct_btn_bg.png" />
</view>
<glsx-image webp class="page_bg_icon" src="{{IMGURKBASE}}{{statusMap[status].img}}.png" />
<glsx-image webp class="footer_bg_icon" src="{{IMGURKBASE}}direct_bg_icon_1.png?v=1.0" />
<!-- 弹框 -->
<view wx:if="{{show}}" class="modal_container">
<glsx-image catch:tap="toCloseModal" webp class="modal_close_icon" src="{{IMGURKBASE}}modal_close_icon.png" />
<view class="inner">
<view class="list_wrap">
<block wx:for="{{[1,2,3,4,5]}}" wx:key="index">
<view class="coupons_item">
<view class="left_box">
<view class="c_title">优惠券名称</view>
<view class="c_tip">有效期:4444444444</view>
</view>
<view class="right_box">去使用</view>
<view class="circle_up"></view>
<view class="circle_bottom"></view>
<view class="line"></view>
</view>
</block>
<view style="height: 120rpx;"></view>
</view>
<view class="footer">
<view class="successText">恭喜您获得了三张优惠券!</view>
<view class="look_btn">去查看</view>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
{}
\ No newline at end of file \ No newline at end of file
import { equityApi } from '~/api/api'
Page({
data: {},
onLoad: function (options) {
this.getOrderInfo(options.orderCode)
},
getOrderInfo(orderCode) {
equityApi.orderDetailData({ orderCode }).then(res => {
let richText = res.useNotes
res.warrantyDate = res.warrantyDate ? new Date(res.warrantyDate).format('yyyy-MM-dd hh:mm:ss') : ''
if (richText) {
richText = decodeURIComponent(richText)
}
this.setData({
order: res,
richText
})
})
},
previewImage() {
wx.$api.previewImage({
current: this.data.order.qrcode,
urls: [this.data.order.qrcode]
})
},
setCopyData(e) {
wx.$api.setCopyData(e.currentTarget.dataset.item, () => {
wx.$api.showToast('复制成功')
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/kaqDetail/kaqDetail.wxss */
\ No newline at end of file \ No newline at end of file
<view>
<view class="coupon_info">
<image webp class="logo" src="{{order.brandLogo}}"></image>
<text class="name">{{order.brandName}}{{order.productName}}</text>
<text wx:if="{{order.warrantyDate}}" class="valid_date">质保期至 {{order.warrantyDate}}</text>
<text class="order">订单编号 {{order.orderCode}}</text>
</view>
<view wx:if="{{order.cardType==0 || order.cardType==1 || order.cardType==2}}" style="text-align: center;margin: 60rpx 0 136rpx;">
<image webp bind:tap="previewImage" class="qrcode" mode="widthFix" src="{{order.qrcode}}"></image>
</view>
<view wx:if="{{order.cardType>2}}" class="card_pannel">
<view class="card_panner_conten" style="margin-top:0">
<view class="card_line">{{ order.brandName }}丨{{ order.productName }}</view>
</view>
<view wx:if="{{order.cardType==3}}" class="card_panner_conten">
<view class="card_line">URL:{{order.linkUrl}}</view>
<view class="card_btn" data-item="{{order.linkUrl}}" bind:tap="setCopyData">复制</view>
</view>
<view wx:if="{{order.cardType==4}}" class="card_panner_conten">
<view class="card_line">兑换码:{{order.cardPwd}}</view>
<view class="card_btn" data-item="{{order.cardPwd}}" bind:tap="setCopyData">复制</view>
</view>
<view wx:if="{{order.cardType==5}}" class="card_panner_conten">
<view class="card_line">账号:{{order.cardPwd}}</view>
<view class="card_btn" data-item="{{order.cardPwd}}" bind:tap="setCopyData">复制</view>
</view>
<view wx:if="{{order.cardType==5}}" class="card_panner_conten">
<view class="card_line">密码:{{order.cardPwd}}</view>
<view class="card_btn" data-item="{{order.cardPwd}}" bind:tap="setCopyData">复制</view>
</view>
</view>
<view style="padding: 0 40rpx;">
<view style="text-align: center;margin-bottom: 20rpx;">
<text class="title">使用须知</text>
</view>
<rich-text class="tip" nodes="{{richText}}"></rich-text>
</view>
<view style="height:30rpx"></view>
</view>
/* pages/couponDetail/couponDetail.wxss */
page{
background: white;
}
.coupon_info{
display: flex;
flex-direction: column;
align-items: center;
}
.logo{
height: 92rpx;
width: 92rpx;
margin: 62rpx 0 40rpx;
}
.name{
height: 44rpx;
font-size: 32rpx;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333333;
line-height: 44rpx;
}
.valid_date{
margin: 10rpx 0;
}
.order, .valid_date{
height: 28rpx;
font-size: 20rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #999999;
line-height: 28rpx;
}
.qrcode{
width: 320rpx;
height: 320rpx;
border: 1rpx solid #999999;
}
.card_pannel{
margin: 40rpx;
background: linear-gradient(164deg, #ff9900 0%, rgba(254, 190, 0, 0.81) 100%);
height: 354rpx;
border-radius: 32rpx;
box-sizing: border-box;
padding: 46rpx;
opacity: 0.86;
margin-bottom: 80rpx;
position: relative;
}
.card_panner_conten{
display: flex;
align-items: center;
margin-top: 40rpx;
}
.card_line{
max-width: 470tpx;
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
line-height: 40rpx;
text-shadow: 0px 4rpx 8rpx rgba(254, 96, 0, 0.24);
}
.card_btn{
margin-left: 20rpx;
display: inline-block;
text-align: center;
width: 72rpx;
height: 36rpx;
line-height: 36rpx;
background: #ffffff;
border-radius: 32rpx;
font-size: 20rpx;
color: #666666;
}
.title{
height: 44rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666666;
}
.tip{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
\ No newline at end of file \ No newline at end of file
const defaultMerchantId = ''
Page({
/**
* 页面的初始数据
*/
data: {
isOpen: false,
openingStatus: false,
IMGURKBASE:'equity/version/1_0_0/',
},
// 获取门店会员卡信息
getMemberCardData() {
const {merchantId} = wx.p.storage.get('merchant_info')
let newMerchantId = merchantId || defaultMerchantId
let para = {
merchantId: newMerchantId
}
wx.p.api.equityApi.memberCard(para).then(res => {
this.setData({
memberInfo: res
})
// wx.$Track.setTrack(
// {
// memberInfo: res
// },
// 6
// )
})
},
// 获取用户会员信息
toCheckMember() {
wx.p.api.equityApi.checkOpenMember().then(res => {
if (res.code == 0 && res.data.cardNo) {
wx.p.storage.set('isVIP', true)
this.setData({
openingStatus: false
})
if (this.data.pageForm) {
if (this.data.pageForm == 'oil') {
wx.p.storage.set('refresh_oil_oage', true)
}
wx.navigateBack({
delta: 1
})
return
}
// wx.$router.reLaunch('/pages/tab/shopMall/index?tabIndex=1')
wx.switchTab({
url: '/pages/tab/equity/index',
});
}
})
},
// 去购买会员
async openMemberFn() {
let sid = wx.$util.getSessionId()
if (!sid) {
this.setData({
showLogin: true
})
return
}
const { memberInfo } = this.data
wx.$api.showLoading()
let para = {
equityClassId: memberInfo.equityClassId,
orderCode: memberInfo.orderCode,
orderSource: 3
}
wx.$Track.setTrack(
{
...para,
type: '购买权益卡'
},
7
)
wx.p.api.equityApi.buyMemberCard(para).then(res => {
wx.hideLoading()
this.handlePay(res)
})
},
// 处理购买参数拉起支付
handlePay(payData) {
const { timeStamp, nonceStr, packages, signType, paySign } = payData
let self = this
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: nonceStr,
package: packages,
signType: signType,
paySign: paySign,
success() {
setTimeout(() => {
self.toCheckMember()
}, 1500)
this.setData({
openingStatus: true
})
},
fail() {}
})
},
onLoad: function (options) {
this.getMemberCardData()
this.data.pageForm = options.page
},
toLook() {
wx.navigateTo({
url: '/packageEquity/pages/agreement/index'
})
},
// toActive() {
// wx.navigateTo({
// url: '/packageShopmall/packageEquity/pages/active/active'
// })
// }
})
{
"usingComponents": {},
"navigationBarTitleText": "权益中心"
}
\ No newline at end of file \ No newline at end of file
page{
background: white;
}
.open-container-page {
box-sizing: border-box;
padding: 33rpx 0;
position: relative;
}
.top_widget {
box-sizing: border-box;
margin: 0 20rpx;
height: 360rpx;
position: relative;
}
.top_icon_bg {
height: 360rpx !important;
}
.mini_title {
position: absolute;
right: 40rpx;
top: 40rpx;
font-size: 24rpx;
color: #8b470f;
text-shadow: 0 4rpx 8rpx rgba(254, 96, 0, 0.24);
}
.card_title {
position: absolute;
left: 40rpx;
top: 36rpx;
font-size: 36rpx;
color: #8e5310;
text-shadow: 0 4rpx 8rpx rgba(254, 96, 0, 0.24);
}
.card_title_1 {
position: absolute;
left: 40rpx;
top: 102rpx;
font-size: 24rpx;
color: #8e5310;
text-shadow: 0 4rpx 8rpx rgba(254, 96, 0, 0.24);
}
.mid_bg_wrap {
height: 100%;
}
.mid_desc_bg {
box-sizing: border-box;
margin: 0 32rpx;
margin-top: 32rpx;
}
.device_icon {
margin: 60rpx 32rpx;
width: 296rpx;
height: 180rpx;
}
.fixed_wrapper {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #ffffff;
padding-bottom: 33rpx;
}
.btn_wrap {
margin-top: 16rpx;
display: flex;
justify-content: center;
}
.btn_element {
width: calc(100% - 64rpx);
height: 70rpx;
background: #aaaaaa;
border-radius: 35rpx;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 70rpx;
}
.btn_element_active {
background: #8A303A;
}
.card_desc {
margin-top: 18rpx;
margin-bottom: 33rx;
display: flex;
align-items: center;
justify-content: center;
}
.desc_tip {
font-size: 28rpx;
color: #565656;
}
.desc_tip_a {
font-size: 28rpx;
color:#565656;
text-decoration: underline;
margin-left: 10rpx;
}
.overlay {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .7);
z-index: 999;
}
.loading_wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.new_open_loading {
width: 444rpx;
height: 470rpx;
position: relative;
}
.loading_icon {
width: 444rpx;
height: 406rpx;
}
.loading_title {
position: absolute;
left: 50%;
top: 112rpx;
transform: translate(-50%, 0);
font-size: 28rpx;
color: #ffffff;
}
.loading_title_max {
position: absolute;
left: 50%;
top: 154rpx;
transform: translate(-50%, 0);
font-size: 36rpx;
color: #ffffff;
}
.loading_icon_status {
position: absolute;
left: 50%;
top: 226rpx;
transform: translate(-50%, 0);
width: 160rpx;
height: 160rpx;
display: flex;
align-items: center;
justify-content: center;
}
.loading_icon_gif {
width: 80rpx;
height: 80rpx;
}
\ No newline at end of file \ No newline at end of file
<view class="open-container-page">
<view class="top_widget">
<glsx-image webp class="top_icon_bg" webp src="{{IMGURKBASE}}pt_vip_bg.png" />
<!-- <glsx-image webp mode="widthFix" class="top_icon_bg" webp src="equity/scrm_index_bg.png" />
<view class="mini_title">{{ isOpen ? "已开通" : "未开通" }}</view>
<view class="card_title">{{memberInfo.equityName}}</view>
<view class="card_title_1">尊享100+专属权益</view> -->
</view>
<view class="mid_desc_bg">
<glsx-image webp mode="widthFix" webp class="desc_icon" src="{{IMGURKBASE}}scrm_opening_vip.png" />
</view>
<!-- <glsx-image webp class="device_icon" bind:tap="toActive" mode="widthFix" webp src="equity/scrm_device_bg_new.png" /> -->
<view style="height:220rpx"></view>
<view class="fixed_wrapper">
<view class="btn_wrap">
<view wx:if="{{!isOpen&&memberInfo.goodPrice}}" class="btn_element btn_element_active" catchtap="openMemberFn">¥{{memberInfo.goodPrice}} 立即开通</view>
<view wx:else class="btn_element">{{ isOpen ? "已开通" : "暂不支持付费购买" }}</view>
</view>
<view class="card_desc">
<view class="desc_tip"> 开通权益代表接受</view>
<view class="desc_tip_a" catchtap="toLook"> 《权益服务协议》</view>
</view>
</view>
<view wx:if="{{openingStatus}}" class="overlay">
<view class="loading_wrapper">
<view class="new_open_loading">
<glsx-image webp class="loading_icon" src="equity/scrm_opening_loading.png" />
<view class="loading_title">支付成功</view>
<view class="loading_title_max">正在开卡中...</view>
<view class="loading_icon_status">
<glsx-image webp class="loading_icon_gif" webp src="equity/loading_icon.gif" />
</view>
</view>
</view>
</view>
</view>
<login show="{{showLogin}}"></login>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/package/package.js
// import USER from '~/api/usersApi/index'
// import { setNavigationBarTitleText } from '~/utils/cache/storageApi'
// import { decodeUrlLink } from '~/utils/format'
Page({
/**
* 页面的初始数据
*/
data: {
packageInfo: {},
showAuthBtn: false,
shareStaff: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(wx.p);
this.setNaviTitle()
// decodeUrlLink(options)
if (!options.id) {
return
}
this.getPackageDetail(options.id)
// if (options.shareStaffUuid) {
// this.data.shareStaff = {
// shareStaffUuid: options.shareStaffUuid,
// shareStaffName: options.shareStaffName
// }
// options.item_type = 4
// options.action_type = 1
// options.item_id = options.id
// this.data.recommandOptions = options
// wx.$util.reportData(options, false, false, true)
// }
// if (options.activity_id) {
// this.data.options = options
// wx.$util.reportData(options, true, false)
// }
},
// 登录
// login() {
// USER.login().then(res => {
// if (res.data) {
// wx.$authStatus = res.data.phone ? false : true
// this.setNaviTitle(res.data.merchantName)
// this.setData({
// sessionId: res.data.sessionId,
// showAuthBtn: res.data.phone ? false : true
// })
// if (res.data.isLogin) {
// wx.$util.setUserInfo(res.data)
// wx.$util.setSessionId(res.data.sessionId)
// this.handlerCustomerId()
// }
// }
// })
// },
// 设置标题名称
setNaviTitle(tile) {
const MERCHANT_INFO = wx.p.storage.get('merchant_info')
wx.setNavigationBarTitle({
title:MERCHANT_INFO.merchantName
})
},
// getPhoneNumber({ detail }) {
// const { sessionId } = this.data
// if (!sessionId) return
// USER.authUserPhone(detail, sessionId).then(({ data, code, message }) => {
// wx.hideLoading()
// if (code == '0') {
// wx.$Track.setTrack({}, 3)
// wx.$authStatus = false
// wx.$util.setUserInfo(data)
// wx.$util.setSessionId(data.sessionId)
// this.toCreatePackageNum()
// this.handlerCustomerId()
// } else wx.p.wxApi.showToast(message)
// })
// },
// 获取套餐详情
getPackageDetail(id) {
wx.p.api.couponsApi
.packageInfo({
id
})
.then(res => {
if (res.couponsDetailList.length) {
res.couponsDetailList.map(item => {
item.effectiveEndTime = new Date(item.effectiveEndTime).format('yyyy-MM-dd hh:mm:ss')
// item.shopTotalPrice = this.priceFormat(item.shopTotalPrice)
return item
})
}
this.setData({
packageInfo: res,
packageId: id
})
})
},
// 获取门店单号
toCreatePackageNum() {
wx.p.wxApi.showLoading()
wx.p.api.couponsApi.createOrderNum().then(res => {
wx.hideLoading()
if (res) {
// this.setData({
// orderCode:res
// })
this.createStoreOrder(res)
}
})
},
// 创建订单
createStoreOrder(orderCode) {
let { packageId, sessionId, packageInfo, shareStaff } = this.data
let para = {
packageId,
paySource: 3,
sessionId,
orderCode,
...shareStaff
}
let jumpParam = {
orderCode,
name: packageInfo.packageName,
price: packageInfo.packagePrice
}
wx.p.wxApi.showLoading()
let _this = this
wx.p.api.couponsApi.createOrder(para).then(res => {
wx.hideLoading()
if (res) {
const { timeStamp, nonceStr, packages, signType, paySign } = res
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: nonceStr,
package: packages,
signType: signType,
paySign: paySign,
success() {
let temp = JSON.stringify(jumpParam)
wx.navigateTo({
url: '/packageShopmall/packageEquity/pages/success/success?order=' + temp
})
if (_this.data.options) {
wx.$util.reportData(_this.data.options, false, true)
}
if (_this.data.recommandOptions) {
let options = _this.data.recommandOptions
options.item_type = 4
options.action_type = 3
options.item_id = options.id
options.order_id = orderCode
wx.$util.reportData(options, false, false, true)
}
},
fail(res) {
if (res.errMsg == 'requestPayment:fail cancel') {
wx.p.wxApi.showToast('取消支付')
}
}
})
}
})
},
// 客户id
handlerCustomerId() {
let customerId = wx.$storage.get('srcm_shopmall_customer_id')
if (customerId) USER.updataCustomerPhone()
},
// 价格格式化
// priceFormat(num, point = 2) {
// let numStr = num.toString().split('.')[0]
// if (numStr.length < 6) { // 判断数字有多长,如果小于6,,表示10万以内的数字,让其直接显示
// return numStr;
// } else if (numStr.length >= 6 && numStr.length <= 8) { // 如果数字大于6位,小于8位,让其数字后面加单位万
// point = 0
// let decimal = numStr.substring(numStr.length - 4, numStr.length - 4 + point)
// console.log(decimal);
// // 由千位,百位组成的一个数字
// return parseFloat(parseInt(num / 10000) + '.' + decimal) + '万'
// } else if (numStr.length > 8) { // 如果数字大于8位,让其数字后面加单位亿
// let decimal = numStr.substring(numStr.length - 8, numStr.length - 8 + point);
// console.log(decimal);
// return parseFloat(parseInt(num / 100000000) + '.' + decimal) + '亿'
// }
// },
onUnload: function () {
// wx.$util.customerbehavior(2)
}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="package-container">
<view class="top_wrapper">{{packageInfo.packageName }}</view>
<view class="title_widget">
现在购买尊享<text class="title_num">{{packageInfo.count }}项</text
>超值权益
</view>
<view class="package_content_wrapper">
<block wx:for="{{packageInfo.couponsDetailList}}" wx:key="index">
<view class="package_element">
<view class="ele_top">{{ index + 1 }}、{{ item.couponName }}</view>
<view class="ele_right">数量:x{{ item.serviceQuantity }}</view>
<view wx:if="{{item.effectiveType == 3}}" class="ele_left">
有效期:无有效期
</view>
<view wx:if="{{item.effectiveType == 1}}" class="ele_left">
有效期:{{ item.effectiveDays }}天
</view>
<view wx:if="{{item.effectiveType == 2}}" class="ele_left">
有效期:{{item.effectiveEndTime}}
</view>
<view wx:if="{{item.useType == 1}}" class="ele_bottom">
可用{{ item.useAmount }}次
</view>
<view wx:if="{{item.useType == 2}}" class="ele_bottom">
{{ item.useLimitDays }}天可用{{ item.useAmount }}次
</view>
<view wx:if="{{item.useType == 0}}" class="ele_bottom">不限次数</view>
</view>
</block>
<view wx:if="{{packageInfo.notes}}" class="content_tip">
附:{{ packageInfo.notes }}
</view>
</view>
<!-- <block wx:if="{{packageInfo.switchStatus}}">
<view class="price_total_title">权益计价器</view>
<view class="total_desc"> 套餐内权益实际价值总计约<text class="price_text">{{packageInfo.totalPrice}}</text>元</view>
<view class="statistical_wrapper">
<block wx:for="{{packageInfo.couponsDetailList}}" wx:key="index">
<view class="price_line_item">
<view class="line_label">{{item.couponName}}</view>
<view class="line_num">数量:x{{item.serviceQuantity}}</view>
<view class="line_price">
<view>价值约</view>
<view class="price_text" style="width:110rpx">{{item.shopTotalPrice}}</view>
<view>元</view>
</view>
</view>
</block>
</view>
</block> -->
<view class="fixed-button-wrap">
<block wx:if="{{showAuthBtn}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="auth-button"></button>
</block>
<view class="button-item" bind:tap="toCreatePackageNum"> 限时特价仅需¥{{packageInfo.packagePrice }},点击购买</view>
</view>
<view style="height: 164rpx"></view>
</view>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/package/package.wxss */
.package-container {
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
}
.top_wrapper {
width: 100%;
height: 160rpx;
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/glsx/equity/scrm_package_bg.png");
background-size: 100% 160rpx;
box-sizing: border-box;
padding-left: 128rpx;
display: flex;
align-items: center;
font-size: 36rpx;
color: #fff;
}
.title_widget {
width: 100%;
color: #282829;
font-size: 36rpx;
margin: 32rpx 0 24rpx 0;
text-align: center;
font-weight: 500;
}
.title_num {
color: #C57463;
margin: 0 10rpx;
}
.package_content_wrapper {
box-sizing: border-box;
background: #fff;
border-radius: 8rpx;
width: 100%;
padding: 24rpx;
}
.package_element {
position: relative;
height: 82rpx;
margin-bottom: 48rpx;
}
.ele_top {
width: 70%;
color: #282829;
font-size: 28rpx;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ele_right {
color: #282829;
font-size: 24rpx;
position: absolute;
right: 0;
top: 4rpx;
font-weight: 500;
}
.ele_left {
color: #b1b1b3;
font-size: 24rpx;
position: absolute;
left: 40rpx;
bottom: 0;
}
.ele_bottom {
color: #b1b1b3;
font-size: 24rpx;
position: absolute;
right: 0;
bottom: 0;
}
.content_tip {
color: #656566;
font-size: 22rpx;
box-sizing: border-box;
padding-left: 24rpx;
word-wrap: break-word;
}
.fixed-button-wrap {
position: fixed;
left: 0;
right: 0;
bottom: 0;
background: #F5F5F5;
box-sizing: border-box;
padding: 0 32rpx;
padding-bottom: 40rpx;
padding-top: 20rpx;
}
.button-item {
width: 100%;
height: 88rpx;
background: #892F3B;
border-radius: 8rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
.auth-button {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
opacity: 0;
z-index: 102;
}
.price_total_title {
font-size: 36rpx;
font-weight: 500;
color: #282829;
margin: 32rpx 0 24rpx 0;
text-align: center;
}
.statistical_wrapper {
/* margin: 0 32rpx; */
box-sizing: border-box;
padding: 32rpx 24rpx;
background: #FFFFFF;
border-radius: 16rpx;
}
.price_line_item {
display: flex;
align-items: center;
}
.line_label {
font-size: 24rpx;
font-weight: 500;
color: #282829;
line-height: 34rpx;
width: 40%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.line_num {
width: 20%;
font-size: 24rpx;
font-weight: 500;
color: #656566;
line-height: 34rpx;
text-align: center;
}
.line_price {
width: 40%;
font-size: 24rpx;
font-weight: 500;
color: #656566;
line-height: 34rpx;
text-align: right;
display: flex;
align-items: center;
justify-content: flex-end;
}
.total_desc {
font-size: 28rpx;
font-weight: 500;
color: #282829;
line-height: 40rpx;
text-align: center;
margin-bottom: 22rpx;
}
.price_text {
font-size: 32rpx;
font-weight: 500;
color: #FC5B32;
line-height: 44rpx;
margin: 0 10rpx;
}
\ No newline at end of file \ No newline at end of file
import { equityApi } from '~/api/api'
Page({
data: {
orderStatus: 2
},
getPackageDetail(orderCode) {
equityApi.packageOrderDetail({ orderCode }).then(res => {
if (res.createDate) {
res.createDate = new Date(res.createDate).format('yyyy-MM-dd hh:mm:ss')
}
if (res.refundDate) {
res.refundDate = new Date(res.refundDate).format('yyyy年MM月dd日 hh:mm')
}
this.setData({
packageInfo: res,
orderStatus: res.orderStatus
})
})
},
toUserCoupons(e) {
let { item } = e.currentTarget.dataset
// 页面接受的参数为id,所以这里得另起变量存
item.id = item.userCouponsId
let temp = JSON.stringify(item)
let { discountType, useChannel, useMemberType } = item
let detailInfo = { xx: 'xx' }
if (discountType == 2 || discountType == 4) {
wx.$router.go('/packageShopmall/packageMall/pages/coupon/coupon', {
userCouponId: item.id,
useMemberType,
detailInfo
})
return
}
/**线上商品代金券 */
if (discountType == 3 && useChannel == 1) {
// if(this.data.useMemberType == 1) {
// wx.$api.showToast('代金券已使用')
// return
// }
wx.$router.go('/packageShopmall/packageMine/pages/coupon/recommend/recommend', {
couponInfo: item
})
return
}
wx.navigateTo({
url: '/packageShopmall/packageMine/pages/coupon/detail/detail?item=' + temp
})
},
// 套餐提交申请售后
packageSumbit() {
wx.$api.showLoading()
const { packageInfo } = this.data
let para = {
orderCode: packageInfo.orderCode,
reason: packageInfo.reason
}
equityApi.packageApply(para).then(res => {
wx.hideLoading()
this.getPackageDetail(packageInfo.orderCode)
})
},
openMap() {
const { packageInfo } = this.data
wx.openLocation({
latitude: parseFloat(packageInfo.latitude),
longitude: parseFloat(packageInfo.longitude),
address: packageInfo.merchantAddress
})
},
onLoad: function (options) {
this.getPackageDetail(options.orderCode)
}
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!