Commit f42ab85f by 杨北旺

提交权益内容

1 parent 5cd9f8cf
Showing 90 changed files with 7315 additions and 59 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"
] ]
}, },
{ {
...@@ -95,4 +112,4 @@ ...@@ -95,4 +112,4 @@
} }
}, },
"plugins": {} "plugins": {}
} }
\ No newline at end of file \ No newline at end of file
...@@ -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
import { decimal } from '~/utils/format'
import mapApi from '../../../../utils/mapapi/mapapi'
Page({
data: {
isOpen: false,
isHaveInventory: true,
goodsList: [],
curentGoodsItem: null,
currentAddress: null,
currentIndex: 0,
richText: '',
showModal: false,
noScroll: wx.p.wxApi.noScroll(),
isGameUse:false,
coupons:null,
showCoupons:false,
showComponent:false
},
onShow: function () {
this.toCheckMember()
},
onLoad: function (options) {
options = JSON.stringify(options)==='{}'?this.options:options
const query = options ? JSON.parse(decodeURIComponent(options.param)) : this.data.query
this.setNaviTitle(query.brandName)
if (!query.lat) {
const tem = wx.p.storage.get('address_info')
query.lat = tem ? tem.location.lat : ''
query.lng = tem ? tem.location.lng : ''
}
if (options.shortlink) {
query.shortlink = options.shortlink
}
// 获取定位 获取会员信息 获取商品信息 //获取库存
// const unauthorized = wx.p.storage.get('unauthorized')
// if (query.location && !unauthorized) {
// this.getLocation(query)
// return
// }
wx.p.wxApi.showLoading()
this.toGetCommodity(query,options)
this.setData({
// unauthorized,
showLogin: false,
query,
})
wx.p.eventbus.on('EQUITYGOODS', data => {
this.toCheckMember()
})
},
// 处理广汇权益明细进入的卡券
handleEquityOfGH(couponsItem){
let {curentGoodsItem} = this.data
curentGoodsItem.payCouponsPrice = decimal(curentGoodsItem.lineationPrice-(Number(couponsItem.denomination)), 2)
this.setData({
curentGoodsItem,
coupons:couponsItem
})
},
// 获取当前商品绑定的优惠券并且处理价格
getCouponsItem(e){
const couponsItem = e.detail
let {curentGoodsItem} = this.data
curentGoodsItem.payCouponsPrice = decimal(curentGoodsItem.lineationPrice-(Number(couponsItem.denomination)), 2)
this.setData({
curentGoodsItem,
coupons:couponsItem
})
},
// 选择优惠券
// toSelectCoupons(){
// const isLogin = this.checkLogin()
// if (!isLogin) {
// return
// }
// if(this.data.isGH)return
// this.setData({
// showCoupons:true
// })
// },
// 选择商品
selectGoodsItem(e) {
const { index, item } = e.currentTarget.dataset
let richText = ''
if (item.buysNotes) {
richText = decodeURIComponent(item.buysNotes)
richText = richText.replace(/\<span/g, '<span class="rich_text"')
}
this.toGetCommodityStock(item.id)
this.setData({
currentIndex: index,
curentGoodsItem: item,
richText,
to: `to-${index}`,
showBottomModal: false
})
},
// 查询会员开通情况
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')
})
},
// 获取商品信息
toGetCommodity(query,options) {
let { curentGoodsItem, currentIndex,isGameUse,coupons } = this.data
let tem = {...query}
if(tem.id&&!isGameUse){
delete tem.id
}
wx.p.api.equityApi.commodityMsg(tem).then(res => {
res.goodsDetailList = res.goodsDetailList || []
let tempList = res.goodsDetailList.map((item, index) => {
item.warrantyDate = new Date(item.warrantyDate).format('yyyy-MM-dd hh:mm:ss')
if (query.id && query.id == item.id) {
curentGoodsItem = item
currentIndex = index
}
return item
})
let tempObj = {
...res
}
delete tempObj.goodsDetailList
if (!curentGoodsItem && query.shortlink) {
wx.p.wxApi.showToast('原商品已下架,已为您推荐其他商品')
}
if (!query.id || !curentGoodsItem) {
currentIndex = 0
curentGoodsItem = tempList[0]
}
let richText = ''
if (curentGoodsItem && curentGoodsItem.buysNotes) {
richText = decodeURIComponent(curentGoodsItem.buysNotes)
richText = richText.replace(/\<span/g, '<span class="rich_text"')
richText = richText.replace(/\<a/g, '<a class="rich_text_a"')
}
if(isGameUse){
curentGoodsItem.payCouponsPrice = curentGoodsItem.lineationPrice
}
if(this.data.isGameUse){
tempList = tempList.filter(item=>item.id===query.id)
currentIndex = 0
}
this.setData({
goodsList: tempList,
curentGoodsItem,
addressInfo: tempObj,
richText,
query,
currentIndex,
to: `to-${currentIndex}`,
showComponent:true,
showLogin: false
})
if (!tempList.length) {
wx.p.wxApi.showToast('原商品已下架,已为您推荐其他商品')
setTimeout(()=>{
wx.navigateBack({
delta: 1
});
},1500)
return
}
this.toGetCommodityStock(query.id || tempList[0].id)
})
},
// 获取商品库存
toGetCommodityStock(id) {
let para = {
id
}
wx.hideLoading()
wx.p.api.equityApi.checkStock(para).then(res => {
const { code, data } = res
let flag = false
if (code == 0 && data != 0) {
flag = true
} else {
flag = false
}
this.setData({
isHaveInventory: flag
})
})
},
toMemberPage() {
wx.navigateTo({
url: '/packageEquity/pages/open/open?page=business'
})
},
// 去购买
toBuyItem() {
const isLogin = this.checkLogin()
if (!isLogin) {
return
}
const { curentGoodsItem, isHaveInventory,isGameUse } = this.data
if (!isHaveInventory) {
return
}
if(isGameUse)return this.comfirmBuyItem()
const { noMemberPrice, salesPrice } = curentGoodsItem
let diffPrice = 0
if (noMemberPrice) {
diffPrice = decimal(noMemberPrice - salesPrice, 2)
}
this.setData({
diffPrice,
showModal: true
})
},
// 确定购买
comfirmBuyItem() {
wx.p.wxApi.showLoading()
this.toGetCode()
this.modalOnCancel()
},
// 获取订单号
toGetCode() {
let para = {
supplier: this.data.query.supplier
}
wx.p.api.equityApi.getOrderCode(para).then(res => {
this.getPayParam(res)
})
},
// 获取支付参数
getPayParam(orderCode) {
if (!orderCode) {
return
}
const { curentGoodsItem,coupons,isGameUse } = this.data
let para = {
orderCode,
goodsId: curentGoodsItem.id,
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, orderCode)
})
},
// 处理支付
handlePay(payData, orderCode) {
const { timeStamp, nonceStr, packages, signType, paySign } = payData
let self = this
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: nonceStr,
package: packages,
signType: signType,
paySign: paySign,
success() {
//跳转商品详情
wx.navigateTo({
url: '/packageEquity/pages/kaqDetail/kaqDetail?orderCode=' + orderCode
})
},
fail() {}
})
},
modalOnCancel() {
this.setData({
showModal: false
})
},
toMyCoupons() {
wx.navigateTo({
url: '/packageMine/pages/order/index/index'
})
},
openBottomModal() {
this.setData({
showBottomModal: true
})
},
closeBottomModal() {
this.setData({
showBottomModal: false
})
},
// /**获取当前位置 */
getLocation(query) {
this.getAddressInfo().then(({ location }) => {
query.lat = location.lat
query.lng = location.lng
this.toGetCommodity(query)
this.setData({
currentAddress: location
})
})
},
// 重新收起获取定位
relocation() {
const { query } = this.data
const tem = wx.p.storage.get('address_info')
query.lat = tem ? tem.location.lat : ''
query.lng = tem ? tem.location.lng : ''
if (!tem) {
this.setData({
showAuth: true
})
return
}
this.toGetCommodity(query)
this.setData({ query })
},
/**授权失败 */
authFail() {
this.setData({
unauthorized: true
})
},
/**授权成功 */
authSuccess() {
this.getLocation(this.data.query)
},
// 打开地图
openMap() {
const { addressInfo } = this.data
if (!addressInfo || !addressInfo.latitude) {
this.relocation()
return
}
wx.openLocation({
latitude: parseFloat(addressInfo.latitude),
longitude: parseFloat(addressInfo.longitude),
address: addressInfo.localAddress
})
},
// 设置标题名称
setNaviTitle(title) {
wx.setNavigationBarTitle({
title
})
},
// 检测是否已经登录
checkLogin() {
const sessionId = wx.p.storage.get('sessionId')
let flag = true
if (!sessionId) {
flag = false
this.setData({
showLogin: true,
showComponent:false
})
}
return flag
},
// 获取a标签链接
getALabel(str) {
let reg = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g
if (reg.test(str)) {
return str.match(reg)[0]
} else {
return ''
}
},
// 点击富文本
toClickRich() {
let str = this.getALabel(this.data.richText)
if (!str) return
const url = encodeURIComponent(str)
wx.navigateTo({
url: '/pages/webView/webView?url=' + url
})
},
loginCallBack(data) {
if (data) {
this.toCheckMember()
}
},
async getAddressInfo() {
let addressInfo = wx.p.storage.get('address_info')
return new Promise(resolve => {
if (addressInfo && Date.now() - addressInfo.createTime < 2 * 60 * 1e3) resolve(addressInfo)
else
wx.getLocation({
type: 'gcj02'
}).then(({ latitude, longitude }) => {
mapApi.detailedAdrress([latitude, longitude]).then(detail => {
let info = {
...detail,
createTime: Date.now()
}
resolve(info)
wx.p.storage.set('address_info', info)
})
})
})
}
})
{
"navigationBarTitleText": "权益中心",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="commodity-detail-container">
<view class="goods_scroll_wrapper">
<scroll-view scroll-x enhanced="{{true}}" show-scrollbar="{{false}}" scroll-with-animation scroll-into-view="{{to}}" style="height:426rpx">
<block wx:for="{{goodsList}}" wx:key="index">
<view id="to-{{index}}" class="scroll_element {{currentIndex==index?'scroll_element_active':''}}" bind:tap="selectGoodsItem" data-index="{{index}}" data-item="{{item}}">
<view class="image_icon_wrapper">
<image webp class="image_icon" src="{{item.goodsImage}}" />
<glsx-image wx:if="{{!item.noMemberPrice&&!isGameUse}}" mode="widthFix" class="image_vip" webp src="equity/vip_icon_spc.png" />
<!-- <view wx:if="{{!item.noMemberPrice}}" class="vip_text">会员专属</view> -->
</view>
<view class="element_title {{currentIndex==index?'selected1':''}}">{{item.productName}}</view>
<view class="element_sale_price {{currentIndex==index?'selected':''}}">
<view class="price_min_icon">¥</view>
<view>{{isOpen || !item.noMemberPrice?item.salesPrice:item.noMemberPrice}}</view>
</view>
<view class="element_o_price">官方价¥{{item.lineationPrice}}</view>
<glsx-image wx:if="{{currentIndex==index}}" class="check_icon_sty" webp src="equity/checked_icon.png" />
</view>
</block>
</scroll-view>
<view wx:if="{{goodsList.length>3}}" class="more_btn flex_cc" bind:tap="openBottomModal">
<text>更</text>
<text>多</text>
<text class="roate"></text>
</view>
</view>
<view wx:if="{{!isHaveInventory}}" class="noStorck flex_cc">已抢光</view>
<view class="goods_desc_wrapper">
<view class="line_wrapper">
<view class="line_label">
<text style="width:124rpx">附近门店</text>
<view wx:if="{{addressInfo.localAddress}}" class="line_tip">{{addressInfo.localAddress}}</view>
</view>
<view class="line_con flex_cc" bind:tap="openMap">
<text wx:if="{{addressInfo.latitude}}">{{addressInfo.localAddressDistance || ''}}km</text>
<text wx:else>重新定位</text>
<glsx-image webp class="line_icon" webp src="equity/scrm_loca_icon_new.png" />
</view>
</view>
<view class="line_wrapper">
<view class="line_label">质保期至</view>
<view class="line_con class1">{{curentGoodsItem.warrantyDate}}</view>
</view>
<view wx:if="{{curentGoodsItem.validityPeriod}}" class="line_wrapper">
<view class="line_label">卡券有效期</view>
<view class="line_con class2">兑换到账户内有效期{{ curentGoodsItem.validityPeriod }}天</view>
</view>
<view class="line_wrapper">
<view class="line_label">商品金额</view>
<view class="line_con class3">
<text class="price_min_icon">¥</text>
<view>{{isOpen || !curentGoodsItem.noMemberPrice?curentGoodsItem.salesPrice:curentGoodsItem.noMemberPrice}}</view>
</view>
</view>
<!-- <view wx:if="{{isGameUse}}" class="line_wrapper">
<view class="line_label">
<glsx-image class="logo" webp src="glsx/equity/comodity_use_logo.png"></glsx-image>
优惠券
</view>
<view catch:tap="toSelectCoupons" class="line_con class3 class4 class5">
<block wx:if="{{coupons}}">
<text class="price_min_icon">¥</text>
<view>{{coupons.denomination}}</view>
</block>
<glsx-image wx:if="{{!isGH}}" class="logo" webp src="glsx/mine/arrow.png"></glsx-image>
</view>
</view> -->
<view class="line_wrapper">
<view class="line_label">应付金额</view>
<view class="line_con class3 class4 {{isGameUse?'class6':''}}">
<text class="price_min_icon">¥</text>
<view>{{isOpen || !curentGoodsItem.noMemberPrice?curentGoodsItem.salesPrice:curentGoodsItem.noMemberPrice}}</view>
</view>
</view>
</view>
<view class="goods_rich_text">
<view class="rich_title">
<view class="title_icon"></view>
<view class="title_text">使用须知</view>
</view>
<view wx:if="{{richText}}" class="rich_wrapper">
<rich-text nodes="{{richText}}" bind:tap="toClickRich"></rich-text>
</view>
</view>
<view style="height:254rpx"></view>
<view class="fixed_btn isFullSucreen">
<view class="icon_text" bind:tap="toMyCoupons">
<glsx-image webp class="card_icon" webp src="equity/card-icon.png" />
<view class="card_text">我的卡券</view>
</view>
<view class="buy_btn flex_cc {{isHaveInventory?'':'disableBtn'}}" bind:tap="toBuyItem">{{isHaveInventory?'立即购买':'该商品已售罄'}}<text wx:if="{{isHaveInventory}}">(¥{{isOpen || !curentGoodsItem.noMemberPrice?curentGoodsItem.salesPrice:curentGoodsItem.noMemberPrice}})</text></view>
</view>
<view wx:if="{{showModal}}" class="overlay">
<view class="overlay_boxs">
<view class="box_body" style="height:{{!isOpen?'700':'612'}}rpx">
<glsx-image webp class="boxs_icon" webp src="equity/scrm_modal_top_icon.png" />
<view class="boxs_content" style="height:{{!isOpen&&curentGoodsItem.noMemberPrice?'564':'438'}}rpx">
<view class="box_title"><text class="box_title_text">温馨提示</text></view>
<view class="box_container" style="height:{{!isOpen&&curentGoodsItem.noMemberPrice?'536':'410'}}rpx">
<view wx:if="{{isOpen || curentGoodsItem.noMemberPrice}}" class="box_content_text">
卡券<text class="spc_text">【{{curentGoodsItem.productName}}】</text>
有效期为<text class="spc_text">{{curentGoodsItem.warrantyPeriod || 0}}</text>
小时,为避免过期导致卡券失效,请于<text class="spc_text">{{curentGoodsItem.warrantyPeriod || 0}}</text>
小时内兑换使用,如介意请勿拍哦
</view>
<view wx:if="{{!isOpen&&!curentGoodsItem.noMemberPrice}}" class="box_content_text">
卡券<text class="spc_text">【{{curentGoodsItem.productName}}】</text>为会员专属商品,您可在成为会员后发起购买
</view>
<view wx:if="{{!isOpen && diffPrice&&curentGoodsItem.noMemberPrice}}" class="info_diff">
开通会员本商品可再减 <text class="spc_text">{{diffPrice}}元</text>
</view>
<view wx:if="{{!isOpen && diffPrice&&curentGoodsItem.noMemberPrice}}" class="info_open_btn" catchtap="toMemberPage">点我开通</view>
<view class="box_btn_groups">
<view class="btn_wrap" catchtap="modalOnCancel">取消</view>
<view wx:if="{{!isOpen&&!curentGoodsItem.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 wx:if="{{showBottomModal}}" class="overlay">
<view class="bottom_modal">
<view class="bottom_title_wrapper">
<view class="title_label">更多商品</view>
<view class="title_close title_label" bind:tap="closeBottomModal">X</view>
</view>
<view style="height:88rpx"></view>
<view class="bottom_scoll_wrap">
<block wx:for="{{goodsList}}">
<view style="margin-bottom:20rpx" class="scroll_element bottem_item_width {{currentIndex==index?'scroll_element_active':''}}" bind:tap="selectGoodsItem" data-index="{{index}}" data-item="{{item}}">
<view class="image_icon_wrapper">
<image webp mode="widthFix" class="image_icon bottem_item_width" src="{{item.goodsImage}}" />
<glsx-image wx:if="{{!item.noMemberPrice}}" mode="widthFix" class="image_vip" webp src="equity/vip_icon_spc.png" />
<!-- <view wx:if="{{!item.noMemberPrice}}" class="vip_text">会员专属</view> -->
</view>
<view class="element_title bottem_item_title_height {{currentIndex==index?'selected1':''}}">{{item.productName}}</view>
<view class="element_sale_price {{currentIndex==index?'selected':''}}">
<view class="price_min_icon">¥</view>
<view>{{isOpen || !item.noMemberPrice?item.salesPrice:item.noMemberPrice}}</view>
</view>
<view class="element_o_price">官方价¥{{item.lineationPrice}}</view>
<glsx-image wx:if="{{currentIndex==index}}" class="check_icon_sty" webp src="equity/checked_icon.png" />
</view>
</block>
</view>
</view>
</view>
</view>
<block wx:if="{{showAuth}}">
<authorize scopeType="userLocation" buttonType="openSetting" bindfail="authFail" bindsuccess="authSuccess"
show="{{showAuth}}"></authorize>
</block>
<login show="{{showLogin}}"></login>
<!-- <block wx:if="{{showComponent&&!isGH}}">
<coupons-list bind:getCoupons="getCouponsItem" couponsId="{{query.couponId}}" show="{{showCoupons}}" goodsId="{{curentGoodsItem.id}}"></coupons-list>
</block> -->
\ 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)
}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/packageDetail/packageDetail.wxss */
\ No newline at end of file \ No newline at end of file
<view class="package-detail-container">
<view wx:if="{{orderStatus>3}}" class="afterSale_wrapper">
<view wx:if="{{orderStatus==4}}" class="after_title flex_cc">
<image webp class="sale_icon" src="{{IMGURL}}equity/return_icon.png?v={{img_version}}" />
<view class="sale_text">退款中</view>
</view>
<view wx:if="{{orderStatus==5}}" class="after_title flex_cc">
<image webp class="sale_icon" src="{{IMGURL}}equity/return_fail.png?v={{img_version}}" />
<view class="sale_text">退款失败</view>
</view>
<view wx:if="{{orderStatus==6}}" class="after_title flex_cc">
<image webp class="sale_icon" src="{{IMGURL}}equity/return_success.png?v={{img_version}}" />
<view class="sale_text">已退款</view>
</view>
<view wx:if="{{orderStatus==4}}" class="return_message">
<view class="title_one">退款金额<text class="price_icon">{{packageInfo.orderPrice}}</text></view>
<view class="title_two">预计三个工作日内退回至原账户</view>
</view>
<view wx:if="{{orderStatus==5}}" class="return_message">
<view class="title_one">退款金额<text class="price_icon">{{packageInfo.orderPrice}}</text></view>
<view class="restBtn" bind:tap="packageSumbit">重新发起</view>
<view class="title_two">退款失败,别慌,重新发起试试</view>
<view wx:if="{{packageInfo.refundDate}}" class="title_two">{{packageInfo.refundDate}}</view>
</view>
<view wx:if="{{orderStatus==6}}" class="return_message">
<view class="title_one">退款金额<text class="price_icon">{{packageInfo.orderPrice}}</text></view>
<view class="title_two">已退回至原账户</view>
<view wx:if="{{packageInfo.refundDate}}" class="title_two">{{packageInfo.refundDate}}</view>
</view>
</view>
<view class="wrapper">
<block wx:for="{{packageInfo.couponsDetails}}" wx:key="index">
<view class="line_widget">
<view class="left_wrap flex_sc">
<view class="color_icon"></view>
<view class="line_label hide-text">{{index+1}}、{{item.couponName}}</view>
</view>
<view wx:if="{{orderStatus!=4&&orderStatus!=6&&orderStatus!=3}}" data-item="{{item}}" bind:tap="toUserCoupons" class="right_btn flex_cc">去使用</view>
</view>
</block>
<view wx:if="{{packageInfo.notes}}" class="textarea_text">附:{{packageInfo.notes}}</view>
</view>
<view style="height:32rpx"></view>
<view class="wrapper">
<view class="image_icon_text" bind:tap="openMap">
<image webp class="image_icon" src="{{IMGURL}}equity/scrm_location_icon.png?v={{img_version}}" />
<view class="image_text">导航</view>
</view>
<view class="row_wrap flex_sc">
<view class="row_label">服务门店</view>
<view class="row_value">{{packageInfo.merchantName}}</view>
</view>
<view class="row_wrap flex_sc">
<view class="row_label">付款金额</view>
<view class="row_value">{{packageInfo.orderPrice}}</view>
</view>
<view class="row_wrap flex_sc">
<view class="row_label">订单编号</view>
<view class="row_value">{{packageInfo.orderCode}}</view>
</view>
<view class="row_wrap flex_sc">
<view class="row_label">下单时间</view>
<view class="row_value">{{packageInfo.createDate}}</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
page {
background: #F5F5F5;
}
.package-detail-container {
box-sizing: border-box;
padding: 32rpx;
}
.wrapper {
background: #FFFFFF;
border-radius: 8rpx;
box-sizing: border-box;
padding: 36rpx 24rpx 44rpx 24rpx;
position: relative;
}
.line_widget {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
}
.left_wrap {
width: 80%;
}
.color_icon {
width: 20rpx;
height: 20rpx;
border-radius: 50%;
background: linear-gradient(180deg, rgba(252, 91, 50, 0.14) 0%, #FC5B32 100%);
margin-right: 10rpx;
}
.line_label {
font-size: 28rpx;
font-weight: 600;
color: #282829;
width: 90%;
}
.right_btn {
width: 138rpx;
height: 48rpx;
border-radius: 24rpx;
border: 2rpx solid #FC5B32;
font-size: 24rpx;
font-weight: 400;
color: #FC5B32;
}
.textarea_text {
font-size: 24rpx;
font-weight: 500;
color: #656566;
line-height: 34rpx;
word-break: break-all;
}
.row_wrap {
margin-bottom: 20rpx;
}
.row_label {
font-size: 24rpx;
font-weight: 500;
color: #282829;
}
.row_value {
font-size: 24rpx;
font-weight: 400;
color: #B1B1B3;
margin-left: 32rpx;
}
.image_icon_text {
position: absolute;
right: 32rpx;
top: 32rpx;
}
.image_icon {
width: 40rpx;
height: 40rpx;
}
.image_text {
font-size: 18rpx;
font-weight: 400;
color: #FC5B32;
line-height: 22rpx;
margin-top: 6rpx;
}
.flex_sc {
display: flex;
align-items: center;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.hide-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.afterSale_wrapper{
width: 100%;
background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
border-radius: 8rpx;
box-sizing: border-box;
padding: 37rpx 24rpx 24rpx 24rpx;
margin-bottom: 32rpx;
}
.sale_icon{
width: 60rpx;
height: 60rpx;
}
.sale_text{
margin-left: 12rpx;
font-size: 40rpx;
color: #2c2c2c;
}
.return_message{
margin-top: 59rpx;
position: relative;
}
.title_one{
font-size: 36rpx;
color: #282829;
position: relative;
}
.price_icon {
font-size: 36rpx;
color: #fc5b32;
margin-left: 28rpx;
}
.title_two {
font-size: 24rpx;
color: #282829;
margin-top: 20rpx;
}
.restBtn{
position: absolute;
top: 0;
right: 0;
border: 2rpx solid #fc5b32;
border-radius: 24rpx;
width: 138rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #fc5b32;
}
\ No newline at end of file \ No newline at end of file
import { commonApi, equityApi } from '~/api/api'
Page({
/**
* 页面的初始数据
*/
data: {
upImageURL: [],
showWaiting: false,
query: null
},
onLoad: function (options) {
let query = null
let isPackage = false
if (options.item) {
let temp = JSON.parse(options.item)
query = {
orderCode: temp.orderCode,
orderPrices: temp.payPrice
}
isPackage = temp.pageFrom == 'package' ? true : false
}
this.setData({
query,
isPackage
})
},
//填写描述
bindinput(e) {
this.data.desc = e.detail.value
},
// 上传图片
toUploadImage() {
let _this = this
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success(res) {
const [tempFiles] = res.tempFilePaths
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success(_res) {
wx.$api.showLoading('上传中...')
commonApi
.uploadImg({
file: `${type}@${_res.data}`
})
.then(img => {
wx.$api.hideLoading()
_this.data.upImageURL = []
_this.data.upImageURL.push(img)
_this.setData({
upImageURL: _this.data.upImageURL
})
})
}
})
}
})
},
// 提交
sumbit() {
if (this.data.isPackage) {
wx.$api.showLoading()
this.packageSumbit()
return
}
if (!this.data.desc) {
wx.$api.showToast('请输入申请描述')
return
}
if (!this.data.upImageURL.length) {
wx.$api.showToast('请上传图片')
return
}
const { query, desc, upImageURL, isPackage } = this.data
wx.$api.showLoading()
let para = {
orderCode: query.orderCode,
reason: desc,
refundImg: upImageURL[0]
}
equityApi.createdSale(para).then(res => {
wx.hideLoading()
this.setData({
showWaiting: true
})
setTimeout(() => {
if (isPackage) {
wx.redirectTo({
url: '/packageShopmall/packageEquity/pages/packageDetail/packageDetail?orderCode=' + query.orderCode
})
} else {
wx.redirectTo({
url: '/packageShopmall/packageEquity/pages/saleDetail/saleDetail?orderCode=' + query.orderCode
})
}
}, 3000)
})
},
// 套餐提交申请售后
packageSumbit() {
const { query, desc } = this.data
let para = {
orderCode: query.orderCode,
reason: desc
}
equityApi.packageApply(para).then(res => {
wx.hideLoading()
this.setData({
showWaiting: true
})
setTimeout(() => {
wx.redirectTo({
url: '/packageShopmall/packageEquity/pages/packageDetail/packageDetail?orderCode=' + query.orderCode
})
// wx.navigateBack({
// delta: 1
// })
}, 3000)
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/saleApply/saleApply.wxss */
\ No newline at end of file \ No newline at end of file
<view class="apply-container">
<block wx:if="{{!showWaiting}}">
<view class="box">
<view class="box_title">申请描述</view>
<view class="box_input">
<textarea class="textarea_wrap" bind:input="bindinput" disable-default-padding maxlength="230" placeholder-class="textarea-placeholder" placeholder="请您详细描述申请说明"></textarea>
</view>
</view>
<view wx:if="{{!isPackage}}" class="box">
<view class="box_title">上传图片</view>
<image webp wx:if="{{!upImageURL.length}}" bind:tap="toUploadImage" class="image_up_load" src="{{IMGURL}}equity/upload.png?v={{img_version}}" />
<image webp wx:else bind:tap="toUploadImage" class="image_up_load" src="{{upImageURL[0]}}" />
</view>
<view class="box_wrap">
<view class="box_title">申请金额</view>
<view class="box_price">¥{{query.orderPrices}}</view>
</view>
<view class="apply_btn" bind:tap="sumbit">提交申请</view>
</block>
<block wx:if="{{showWaiting}}">
<view class="sales-h">
<image webp class="successIcon" src="{{IMGURL}}coupons/success.png?v={{img_version}}" />
<view class="sales-status-1">等待处理</view>
<view class="sales-status-2">已提交申请,等待处理</view>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
.apply-container{
box-sizing: border-box;
padding: 30rpx;
}
.box{
background: #FFFFFF;
border-radius: 12rpx;
padding: 0px 32rpx;
margin-bottom: 20rpx;
}
.box_title{
font-size: 32rpx;
line-height: 60rpx;
font-weight: 500;
color: #333333;
}
.textarea-placeholder{
padding: 0;
}
/* .box_input{
min-height: 240rpx;
} */
.textarea_wrap{
width: 100%;
min-height: 240rpx;
word-break: break-all;
}
.image_up_load{
margin: 20rpx 0px;
width: 160rpx;
height: 160rpx;
position: relative;
}
.box_wrap{
height: 100rpx;
background: #FFFFFF;
border-radius: 12rpx;
padding: 0px 32rpx;
margin-bottom: 30rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.box_price{
font-size: 40rpx;
font-weight: 500;
color: #008FFF;
}
.apply_btn{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 88rpx;
color: #FFFFFF;
font-weight: 500;
background: #008FFF;
border-radius: 44rpx;
margin: 40rpx auto;
font-size: 36rpx;
}
.sales-h{
margin-bottom: 60rpx;
text-align: center;
line-height: 60rpx;
}
.successIcon{
width: 100rpx;
height: 100rpx;
margin-top: 200rpx;
}
.sales-icon {
font-size: 100rpx;
color: #19c341;
margin-top: 100rpx;
}
.sales-status-1{
height: 66rpx;
font-size: 48rpx;
font-weight: 500;
color: #333333;
line-height: 66rpx;
}
.sales-status-2 {
font-size: 32rpx;
font-weight: 400;
color: #999999;
line-height: 44rpx;
margin-top: 16rpx;
}
\ No newline at end of file \ No newline at end of file
import { equityApi } from '~/api/api'
Page({
/**
* 页面的初始数据
*/
data: {},
onLoad: function (options) {
this.getSaleDetail(options.orderCode)
},
// 获取售后详情
getSaleDetail(orderCode) {
equityApi.saleDetailInfo({ orderCode }).then(res => {
res.reason = decodeURIComponent(res.reason)
res.createDate = new Date(res.createDate).format('yyyy-MM-dd hh:mm:ss')
this.setData({
detail: res
})
})
},
previewImage() {
wx.$api.previewImage({
current: this.data.detail.img,
urls: [this.data.detail.img]
})
}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/saleDetail/saleDetail.wxss */
\ No newline at end of file \ No newline at end of file
<view class="sale_detail_page">
<view wx:if="{{detail.refundStatus==1}}" class="box">
<view class="title">售后中</view>
<view class="tip">等待平台处理</view>
</view>
<view wx:if="{{detail.refundStatus==3}}" class="box">
<view class="title">已退款</view>
<view class="tip">钱款将原路退回至您的账户</view>
</view>
<view wx:if="{{detail.refundStatus==2}}" class="box">
<view class="title">拒绝售后</view>
<view class="tip">该商品已退换兑换或不支持售后</view>
</view>
<view class="sale_content">
<view class="content_line">
<view class="title_line">售后商品:</view>
<view class="content_info">{{detail.productName}}</view>
</view>
<view class="content_line">
<view class="title_line">申请金额:</view>
<view class="content_info title_price">{{detail.orderPrice}}</view>
</view>
<view class="content_line">
<view class="title_line">申请时间:</view>
<view class="content_info">{{detail.createDate}}</view>
</view>
<view class="content_line">
<view class="title_line">申请描述:</view>
<view class="content_info">{{detail.reason}}</view>
</view>
<view class="content_line">
<view class="title_line">售后编号:</view>
<view class="content_info">{{detail.refundCode}}</view>
</view>
<view class="content_line">
<view class="title_line">订单编号:</view>
<view class="content_info">{{detail.orderCode}}</view>
</view>
</view>
<view class="iamge_wrap">
<image webp bind:tap="previewImage" mode="widthFix" class="sale_image" src="{{detail.img}}" />
</view>
</view>
\ No newline at end of file \ No newline at end of file
page{
background: white;
}
.sale_detail_page{
box-sizing: border-box;
padding: 30rpx;
width: 100%;
}
.box{
display: flex;
flex-direction: column;
justify-content: center;
}
.title{
text-align: center;
height: 66rpx;
font-size: 48rpx;
font-weight: 500;
color: #333333;
line-height: 66rpx;
}
.tip{
text-align: center;
font-size: 32rpx;
font-weight: 400;
color: #999999;
line-height: 44rpx;
margin-top: 16rpx;
}
.sale_content{
margin-top: 40rpx;
}
.content_line{
display: flex;
align-items: center;
margin-top: 20rpx;
}
.title_line{
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.content_info{
font-size: 28rpx;
font-weight: 500;
color: #999999;
}
.title_price{
color: #FF9900;
}
.iamge_wrap{
width: 100%;
display: flex;
justify-content: center;
}
.sale_image{
margin-top: 40rpx;
width: 192rpx;
height: auto;
}
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/success/success.js
import { defaultMerchantId, equityAppId, domain } from '~/utils/request/environment'
Page({
/**
* 页面的初始数据
*/
data: {},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
// let aaa = '{"orderCode":"GL467176510294597632","name":"全车精品套餐","price":"0.01"}'
let temp = JSON.parse(options.order)
// let temp = JSON.parse(aaa)
this.setData({
order: temp
})
},
toMyCoupons() {
wx.redirectTo({
url: '/packageShopmall/packageMine/pages/coupon/index/index'
})
// wx.$router.redirectTo('packageMine.coupon.index', {
// success: true
// })
},
toHtmlOrder() {
const { orderCode, name } = this.data.order
// const sessionId = wx.$util.getSessionId()
// let merchantId = wx.$storage.get('srcm_shopmall_merchant_id')
// merchantId = merchantId || defaultMerchantId
// let para = {
// sessionId,
// merchantId,
// appId: equityAppId,
// orderCode,
// name,
// refresh: true
// }
// let urlParam = JSON.stringify(para)
// // 需要的参数,订单号,套餐名字
// let url = `${domain}/scrm-equity-h5/#/commodity/packageDetail?urlParam=${urlParam}`
// wx.$router.jumpH5(url)
// wx.redirectTo({
// url: `/pages/webView/webView?url=${encodeURIComponent(url)}`
// })
wx.redirectTo({
url: '/packageShopmall/packageEquity/pages/packageDetail/packageDetail?orderCode=' + orderCode
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/success/success.wxss */
\ No newline at end of file \ No newline at end of file
<view class="pay-after-page">
<image webp class="status-icon" src="{{IMGURL}}coupons/success.png?v={{img_version}}" />
<view class="status-title">支付成功</view>
<view class="pay-price">¥{{order.price}}</view>
<view class="btn-group">
<view class="button-item margin1" bind:tap="toHtmlOrder">查看订单</view>
<view class="button-item" bind:tap="toMyCoupons">去卡包使用</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/success/success.wxss */
.pay-after-page {
display: flex;
flex-direction: column;
align-items: center;
}
.status-icon {
width: 140rpx;
height: 140rpx;
margin-top: 112rpx;
}
.status-title {
font-size: 32rpx;
font-weight: 500;
color: #282829;
margin-top: 40rpx;
}
.pay-price {
font-size: 32rpx;
font-weight: 500;
color: #FC5B32;
margin-top: 20rpx;
}
.btn-group {
display: flex;
align-items: center;
justify-content: center;
margin-top: 76rpx;
}
.button-item {
width: 226rpx;
height: 88rpx;
border-radius: 8rpx;
border: 2rpx solid #FC5B32;
font-size: 32rpx;
font-weight: 400;
color: #FC5B32;
display: flex;
align-items: center;
justify-content: center;
}
.margin1 {
margin-right: 40rpx;
}
\ No newline at end of file \ No newline at end of file
// pages/tab/equity/index.js import mapApi from '../../../utils/mapapi/mapapi'
Page({ const MERCHANT_ID = 44210895
Component({
/** options: {
* 页面的初始数据 styleIsolation: 'shared'
*/
data: {
}, },
/** /**
* 生命周期函数--监听页面加载 * 组件的属性列表
*/ */
onLoad(options) { properties: {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 组件的初始数据
*/ */
onReady() { data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/',
IMGURKBASE: 'equity/version/1_0_0/',
userInfo: {},
isOpen: true,
menuList: [
{
title: '惠享生活',
desc: '5折起',
icon: 'share_icon',
url: '/packageEquity/pages/commodity/list/list'
},
{
title: '充值优惠',
desc: '5折起',
icon: 'charge_vip',
url: '/packageEquity/pages/commodity/charge/charge'
},
{
title: '全部服务',
desc: '更多',
icon: 'all_icon',
url: '/packageEquity/pages/allEquity/allEquity'
}
],
storePackageList: [],
showMorePack: false,
tabList: ['附近优惠'],
curTabIndex: 0,
pageParam: {
appearance: 1,
pageSize: 0,
pageCount: 10
},
commodityList: [],
loadingMore: false,
loadOver: false,
controlShowBanner: false,
// 是否登录
showLogin: false,
showPage: true,
// 会员类型-背景
vipStatus: {
0: '',
1: 'pt_vip_bg',
2: 'silver_vip_bg',
3: 'gold_vip_bg'
}
}, },
/** /**
* 生命周期函数--监听页面显示 * 组件的方法列表
*/ */
onShow() { methods: {
onLoad() {
this.getShopPackage()
this.getMemberCardData()
// let freecard = wx.p.storage.get('bindInfo')
// if (freecard) {
// // 体验卡
// let bingInfo = JSON.parse(decodeURIComponent(freecard))
// const sid = bingInfo.data.sessionId
// wx.p.util.setSessionId(sid)
// this.handleFreeCard(bingInfo)
// }
this.setData({
isOpen: wx.p.storage.get('sessionId') ? true : false
})
},
onShow() {
let authComponent = this.selectComponent('#authorize')
if (authComponent) authComponent.check()
if (this.data.userInfo && !this.data.userInfo.phone) return
this.toCheckMember()
},
onPullDownRefresh() {
this.getShopPackage()
this.toCheckMember()
this.setData(
{
'pageParam.pageSize': 0,
loadingMore: false
},
() => {
let { currentAddress } = this.data
const { lat, lng } = currentAddress.location
this.toGetCommodity(lat, lng)
}
)
},
onReachBottom() {
if (this.data.unauthorized) {
return
}
if (!this.data.commodityList.length) {
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)
}
)
},
navbarReady(e) {
let { height } = e.detail
this.setData({
navHeight: height
})
},
// 新版
openMorePack(e) {
const { show } = e.currentTarget.dataset
this.setData({
showMorePack: !show
})
},
// 页面跳转
// toAllEquityPage() {
// wx.navigateTo({
// url: '/packageEquity/pages/allEquity/allEquity'
// })
// },
toBuyMember() {
wx.navigateTo({
url: '/packageEquity/pages/open/open'
})
},
toNewPage(e) {
const { index, item } = e.currentTarget.dataset
wx.navigateTo({
url: item.url
})
},
/** // 定位
* 生命周期函数--监听页面隐藏 async getLocation() {
*/ try {
onHide() { const res = await this.getAddressInfo()
this.toGetCommodity(res.location.lat, res.location.lng, 1)
this.setData({
currentAddress: res,
unauthorized: false
})
wx.p.storage.set('unauthorized', false)
} catch (error) {
console.log(error)
}
},
}, // 获取附近优惠数据
toGetCommodity(lat, lng, page) {
let { pageParam, loadingMore, commodityList, loadOver } = this.data
let para = {
lat,
lng,
...pageParam
}
if (loadOver) {
return
}
if (page) {
para.pageSize = 0
}
wx.p.api.equityApi.lasteCommodity(para).then(res => {
if (!res) {
this.setData({
loadOver: true
})
return
}
let tempArr = []
if (res) {
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({
onUnload() { showAuth: true
})
},
/**授权失败 */
authFail() {
wx.p.storage.set('unauthorized', true)
this.setData({
unauthorized: true
})
},
/**授权成功 */
authSuccess() {
this.getLocation()
},
// 获取门店套餐
getShopPackage() {
let para = {
merchantId: MERCHANT_ID
}
wx.p.api.equityApi.storePackage(para).then(res => {
this.setData({
storePackageList: res || []
})
})
},
}, // 去套餐详情页
toPackageDetail(e) {
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: '/packageEquity/pages/package/package?id=' + id
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/** // 获取用户会员信息
* 页面上拉触底事件的处理函数 toCheckMember() {
*/ let sid = wx.p.storage.get('sessionId')
onReachBottom() { if (!sid) {
this.setData({
isOpen: false
})
return
}
wx.p.api.equityApi.checkOpenMember().then(res => {
let flag = false
if (res.data && res.data.validitDate) {
res.data.time = new Date(res.data.validitDate).format('yyyy.MM.dd')
}
if (res.code == 0 && res.data) {
flag = true
}
wx.p.storage.set('isVIP', flag)
this.setData({
isOpen: flag,
vipInfo: res.data,
controlShowBanner: true
})
})
},
}, // 获取门店会员卡信息
getMemberCardData() {
let para = {
merchantId: MERCHANT_ID
}
wx.p.api.equityApi.memberCard(para).then(res => {
this.setData({
memberInfo: res
})
})
},
// 处理免费领取权益页面带来的参数---弹框显示
// handleFreeCard(bindInfo) {
// wx.p.storage.rm('bindInfo')
// const { code, errId, message } = bindInfo
// if (code == 0) {
// wx.showModal({
// title: '提示',
// content: '领取成功',
// confirmText: '确定',
// showCancel: false,
// confirmColor: '#F13C3D'
// })
// this.toCheckMember()
// } else if (code == -1 && errId == 20321) {
// wx.showModal({
// title: '提示',
// content: message,
// confirmText: '续费开通',
// cancelText: '不用了',
// confirmColor: '#F13C3D'
// }).then(res => {
// if (res.confirm) {
// this.toBuyMember()
// }
// })
// } else if (errId == 20320 || errId == 20322) {
// wx.showModal({
// title: '提示',
// content: message,
// confirmText: '确定',
// showCancel: false,
// confirmColor: '#F13C3D'
// })
// }
// },
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
// 检测是否已经登录
checkLogin() {
return wx.$authStatus
},
async getAddressInfo() {
let addressInfo = wx.p.storage.get('address_info')
return new Promise(resolve => {
if (addressInfo && Date.now() - addressInfo.createTime < 2 * 60 * 1e3) resolve(addressInfo)
else
wx.getLocation({
type: 'gcj02'
}).then(({ latitude, longitude }) => {
mapApi.detailedAdrress([latitude, longitude]).then(detail => {
let info = {
...detail,
createTime: Date.now()
}
resolve(info)
wx.p.storage.set('address_info', info)
})
})
})
}
} }
})
\ No newline at end of file \ No newline at end of file
})
{ {
"usingComponents": {} "navigationBarTitleText": "权益中心",
"usingComponents": {
"commodity-item": "/components/commodityItem/index"
}
} }
\ No newline at end of file \ No newline at end of file
/* pages/tab/equity/index.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/pages/equity/equity.wxss */
/* pages/tab/equity/equity.wxss */
page {
background: white;
}
.equity-container {
padding: 16rpx 20rpx;
}
// 顶部普通身份
.pt_vip_pannel {
position: relative;
width: 100%;
height: 136rpx;
background-image: linear-gradient(126deg, #303030 2%, #070707 98%);
border-radius: 16rpx;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 24rpx;
.logo {
width: 72rpx;
height: 60rpx;
}
.title_pannel {
margin-left: 24rpx;
.card_title {
font-weight: 600;
font-size: 28rpx;
color: #EECC9C;
}
.card_tip {
font-weight: 400;
font-size: 20rpx;
color: #EECC9C;
}
}
.open_btn {
width: 156rpx;
height: 56rpx;
background-image: radial-gradient(circle at 12% 25%, #FDE8BF 0%, #DDA15F 98%);
border-radius: 28rpx;
font-weight: 400;
font-size: 24rpx;
color: #070707;
position: absolute;
right: 32rpx;
top: 50%;
transform: translateY(-50%)
}
}
// 会员身份
.vip_pannel {
width: 100%;
height: 360rpx;
border-radius: 16rpx;
box-sizing: border-box;
padding: 40rpx 0 0 40rpx;
.card_title {
background: linear-gradient(125deg, #F0EED7 100%, #F2EAAB 100%) !important;
-webkit-background-clip: text !important;
background-clip: text !important;
color: transparent !important;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
}
}
// 金刚区
.menu_widget {
margin-top: 40rpx;
.title {
font-weight: 500;
font-size: 32rpx;
color: #1F1F1F;
}
.wrap {
display: flex;
align-items: center;
justify-content: space-around;
padding-top: 24rpx;
.menu_item {
position: relative;
.cover {
width: 100rpx;
height: 100rpx;
}
.text {
margin-top: 16rpx;
font-weight: 400;
font-size: 24rpx;
color: #000000;
}
.tip {
position: absolute;
top: -8rpx;
right: -16rpx;
width: 68rpx;
height: 32rpx;
}
}
}
}
.top_wrapper {
position: relative;
height: 606rpx;
}
.top_bg_img {
height: 420rpx;
}
.top_idCard_con {
position: absolute;
left: 0;
top: 0;
right: 0;
box-sizing: border-box;
padding: 32rpx 32rpx 0 32rpx;
}
.vip_icon {
position: absolute;
left: 66rpx;
top: 100rpx;
width: 92rpx;
height: 88rpx;
}
.card_box {
width: 60%;
position: absolute;
left: 172rpx;
top: 100rpx;
}
.card_title {
font-size: 34rpx;
font-weight: 500;
color: #8E5310;
line-height: 48rpx;
width: 89%;
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;
}
.onopenText {
color: #333333;
}
.card_date {
font-size: 24rpx;
font-weight: 400;
color: #8E5310;
line-height: 34rpx;
margin-top: 6rpx;
}
.card_date_grey {
color: #333333;
opacity: 0.7;
}
.open_btn {
position: absolute;
top: 124rpx;
right: 62rpx;
width: 120rpx;
height: 44rpx;
background: linear-gradient(128deg, #F5DBBD 0%, #EAC07E 100%);
border-radius: 22rpx;
font-size: 20rpx;
font-weight: 500;
color: #8E5310;
}
.member_back_img {
height: 226rpx !important;
}
.top_btn_con {
position: absolute;
left: 0;
right: 0;
top: 266rpx;
box-sizing: border-box;
padding: 28rpx 32rpx 0 32rpx;
}
.top_btn_title {
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 44rpx;
}
.top_btn {
font-size: 24rpx;
font-weight: 400;
color: #FFFFFF;
line-height: 34rpx;
opacity: 0.49;
}
.home_right_icon {
width: 8rpx;
height: 16rpx;
margin-left: 8rpx;
}
.fiex_menu_wrapper {
position: absolute;
right: 0;
left: 0;
bottom: 0;
height: 256rpx;
}
.home_menu_bg {
height: 272rpx;
}
.pos_wrap {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 272rpx;
box-sizing: border-box;
padding-top: 28rpx;
padding: 28rpx 12rpx 0 12rpx;
display: flex;
justify-content: space-between;
}
.image_text_box {
/* width: 100rpx; */
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
}
.box_icon {
width: 100rpx;
height: 100rpx;
}
.box_label {
font-size: 24rpx;
font-weight: 500;
color: #282829;
line-height: 34rpx;
margin-bottom: 8rpx;
}
.box_tip {
font-size: 20rpx;
font-weight: 400;
color: #999999;
line-height: 28rpx;
}
.service_title_wrap {
margin-top: 40rpx;
margin-bottom: 32rpx;
box-sizing: border-box;
display: flex;
align-items: flex-end;
}
.service_title {
font-size: 32rpx;
font-weight: 500;
color: #1F1F1F;
}
.service_info {
font-size: 20rpx;
font-weight: 600;
color: #8E5310;
margin-left: 12rpx;
}
.service_list_wrap {
box-sizing: border-box;
padding: 32rpx 4rpx 0 4rpx;
display: flex;
flex-wrap: wrap;
/* justify-content: space-between; */
}
.service_box_wrap {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 32rpx;
width: 25%;
position: relative;
}
.service_icon {
width: 88rpx;
height: 88rpx;
}
.lock_icon {
width: 20rpx;
height: 20rpx;
position: absolute;
right: 28rpx;
top: 0rpx;
}
.service_label {
font-size: 24rpx;
font-weight: 400;
color: #282829;
margin-top: 12rpx;
width: 120rpx;
text-align: center;
}
.unOpenColor {
color: #999999;
}
.swiper_wrapper {
box-sizing: border-box;
margin: 24rpx 32rpx 40rpx 32rpx;
height: 160rpx;
}
.image_swiper_item {
height: 160rpx !important;
border-radius: 16rpx;
}
.package_wrapper {
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.package_element_one,
.package_element_two {
width: 47.8%;
height: 220rpx;
border-radius: 16rpx;
position: relative;
}
.package_element_three {
width: 47.8%;
height: 460rpx;
border-radius: 16rpx;
position: relative;
}
.right_wid {
width: 47.8%;
height: 460rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.right_wid_w {
width: 100%;
}
.package_pos_box {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
box-sizing: border-box;
padding: 40rpx 0 0 20rpx;
}
.one_title {
font-size: 32rpx;
font-weight: 400;
color: #333333;
line-height: 44rpx;
width: 63.5%;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.two_title {
color: #333333;
}
.three_title {
color: #333333;
}
.ont_desc {
font-size: 24rpx;
font-weight: 400;
color: #7D7D7D;
line-height: 34rpx;
width: 63.5%;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.max_num {
font-size: 28rpx;
}
.pack_icon_max {
height: 460rpx !important;
}
.pack_icon {
height: 220rpx !important;
}
.marbottom {
margin-bottom: 20rpx;
}
.more_btn_wrap {
width: 100%;
}
.more_btn_text {
font-size: 24rpx;
font-weight: 500;
color: #282829;
}
.more_icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
// 附近优惠
.tab_wrap {
margin-top: 40rpx;
margin-bottom: 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.tab_item {
position: relative;
}
.tab_text {
font-size: 32rpx;
font-weight: 500;
color: #282829;
}
.tab_text_active {
color: #BC192B;
}
.tab_line {
width: 48rpx;
height: 8rpx;
background: linear-gradient(138deg, #C18C25 0%, #8E5310 100%);
border-radius: 4rpx;
position: absolute;
left: 50%;
bottom: -20rpx;
transform: translate(-50%, 0);
}
.commodity_list_widget {
margin-top: 20rpx;
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;
}
.preModal {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .7);
z-index: 999;
}
.modal_content_wrap {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.flex_cc {
display: flex;
align-items: center;
justify-content: center;
}
.flex_sbc {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex_sc {
display: flex;
align-items: center;
}
.text_hide {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.preImage_icon {
width: 69.3%;
height: 38.3%;
}
.preImage_btn {
width: 230rpx;
height: 110rox;
}
.orderBtn_wrap {
position: absolute;
right: 64rpx;
bottom: 36rpx;
display: flex;
align-items: center;
}
.order_icon {
width: 20rpx;
height: 22rpx;
margin-right: 8rpx;
}
.order_text_title {
font-size: 24rpx;
font-weight: 500;
color: #8E5310;
line-height: 34rpx;
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/equity/index.wxml--> <block wx:if="{{showPage}}">
<text>pages/tab/equity/index.wxml</text> <!-- <navigation-bar bindnavbarReady="navbarReady" page-title="权益中心">权益中心</navigation-bar> -->
<view class="equity-container" id="equity">
<!-- 顶部个人信息 -->
<!-- <view class="top_wrapper">
<view class="top_idCard_con">
<view class="card_box">
<view class="card_title {{isOpen?'':'onopenText'}}">
{{memberInfo.equityName}}
</view>
<view wx:if="{{isOpen&&vipInfo.cardNo&&controlShowBanner}}" class="card_date">
到期:{{vipInfo.time}}
</view>
<view wx:elif="{{isOpen&&!vipInfo.cardNo&&controlShowBanner}}" class="card_date">
{{vipInfo.renewDay}}天后到期
</view>
<view wx:else class="card_date card_date_grey">开通会员尊享优质权益</view>
</view>
<view wx:if="{{!isOpen}}" class="open_btn flex_cc" bind:tap="toBuyMember">去开通</view>
<view wx:elif="{{isOpen&&!vipInfo.cardNo&&controlShowBanner}}" class="open_btn flex_cc" bind:tap="toBuyMember">
去续费
</view>
<image webp class="vip_icon" webp src="{{IMGURKBASE}}{{isOpen?'scrm_mini_vip.png':'scrm_mini_no_vip.png'}}" />
<image webp mode="widthFix" webp class="member_back_img" src="{{IMGURKBASE}}{{isOpen?'home_member_bg':'no_open_vip'}}.png" />
</view>
<view class="top_btn_con flex_sbc">
<view class="top_btn_title">会员优享</view>
</view>
<view class="fiex_menu_wrapper">
<view class="pos_wrap">
<block wx:for="{{menuList}}" wx:key="index">
<view class="image_text_box" data-index="{{index}}" data-item="{{item}}" bind:tap="toNewPage">
<image webp class="box_icon" src="{{IMGURKBASE}}{{item.icon}}.png" />
<view class="box_label">{{item.title}}</view>
<view class="box_tip">{{item.desc}}</view>
</view>
</block>
</view>
<image webp mode="widthFix" class="home_menu_bg" webp src="{{IMGURKBASE}}home_diceng_icon.png" />
</view>
<image webp class="top_bg_img" mode="widthFix" webp src="{{IMGURKBASE}}scrm_new_bg.png" />
</view> -->
<!-- 普通身份 -->
<view wx:if="{{!isOpen}}" class="pt_vip_pannel">
<glsx-image class="logo" webp src="{{IMGURKBASE}}vip_logo_icon.png"></glsx-image>
<view class="title_pannel">
<view class="card_title">{{memberInfo.equityName}}</view>
<view class="card_tip">生活权益|专享超百项生活权益</view>
</view>
<view bind:tap="toBuyMember" class="open_btn flex_cc">开通会员</view>
</view>
<!-- 会员 -->
<view wx:else style="background: url({{IMGURL}}{{IMGURKBASE}}pt_vip_bg.png);background-size: 100% 100%;" class="vip_pannel">
<view class="card_title">{{memberInfo.equityName}}</view>
<!-- <view class="card_date">{{memberInfo.equityName}}</view> -->
</view>
<!-- 金刚区 -->
<view class="menu_widget">
<view class="title">会员优享</view>
<view class="wrap">
<block wx:for="{{menuList}}" wx:key="index">
<view data-index="{{index}}" data-item="{{item}}" bind:tap="toNewPage" class="menu_item">
<glsx-image class="cover" webp src="{{IMGURKBASE}}{{item.icon}}.png"></glsx-image>
<view class="text">{{item.title}}</view>
<glsx-image wx:if="{{index<2}}" class="tip" webp src="{{IMGURKBASE}}five_icon.png"></glsx-image>
</view>
</block>
</view>
</view>
<!-- 门店套餐 -->
<block wx:if="{{storePackageList.length}}">
<view class="service_title_wrap">
<view class="service_title">精选套餐服务</view>
</view>
<view class="package_wrapper">
<block wx:if="{{storePackageList.length<3}}">
<view class="package_element_one" bind:tap="toPackageDetail" data-id="{{storePackageList[0].packageId}}">
<view class="package_pos_box">
<view class="one_title">{{storePackageList[0].packageName}}</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[0].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}scrm_bg1.png" />
</view>
<view wx:if="{{storePackageList.length==2}}" class="package_element_two" bind:tap="toPackageDetail" data-id="{{storePackageList[1].packageId}}">
<view class="package_pos_box">
<view class="one_title two_title">
{{storePackageList[1].packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[1].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}scrm_bg2.png" />
</view>
</block>
<block wx:elif="{{storePackageList.length==3}}">
<view class="package_element_three" bind:tap="toPackageDetail" data-id="{{storePackageList[0].packageId}}">
<view class="package_pos_box">
<view class="one_title three_title">
{{storePackageList[0].packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[0].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon_max" webp src="{{IMGURKBASE}}scrm_bg3.png" />
</view>
<view class="right_wid">
<view class="package_element_one right_wid_w" bind:tap="toPackageDetail" data-id="{{storePackageList[1].packageId}}">
<view class="package_pos_box">
<view class="one_title">{{storePackageList[1].packageName}}</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[1].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}scrm_bg1.png" />
</view>
<view class="package_element_two right_wid_w" bind:tap="toPackageDetail" data-id="{{storePackageList[2].packageId}}">
<view class="package_pos_box">
<view class="one_title two_title">
{{storePackageList[2].packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[2].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}scrm_bg2.png" />
</view>
</view>
</block>
<block wx:elif="{{storePackageList.length==4}}">
<block wx:for="{{storePackageList}}" wx:key="index">
<view class="{{index%3==0?'package_element_one':'package_element_two'}} marbottom" bind:tap="toPackageDetail" data-id="{{item.packageId}}">
<view class="package_pos_box">
<view class="one_title {{index%3==0?'':'two_title'}}">
{{item.packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{item.num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}{{index%3==0?'scrm_bg1':'scrm_bg2'}}.png" />
</view>
</block>
</block>
<block wx:elif="{{storePackageList.length>4}}">
<view class="package_element_three marbottom" bind:tap="toPackageDetail" data-id="{{storePackageList[0].packageId}}">
<view class="package_pos_box">
<view class="one_title three_title">
{{storePackageList[0].packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[0].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon_max" webp src="{{IMGURKBASE}}scrm_bg3.png" />
</view>
<view class="right_wid marbottom">
<view class="package_element_one right_wid_w" bind:tap="toPackageDetail" data-id="{{storePackageList[1].packageId}}">
<view class="package_pos_box">
<view class="one_title">{{storePackageList[1].packageName}}</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[1].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}scrm_bg1.png" />
</view>
<view class="package_element_two right_wid_w" bind:tap="toPackageDetail" data-id="{{storePackageList[2].packageId}}">
<view class="package_pos_box">
<view class="one_title two_title">
{{storePackageList[2].packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{storePackageList[2].num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}scrm_bg2.png" />
</view>
</view>
<block wx:if="{{showMorePack}}">
<block wx:for="{{storePackageList}}" wx:key="index">
<view wx:if="{{index>2}}" class="{{index%3==0?'package_element_one':'package_element_two'}} marbottom" bind:tap="toPackageDetail" data-id="{{item.packageId}}">
<view class="package_pos_box">
<view class="one_title {{index%3==0?'':'two_title'}}">
{{item.packageName}}
</view>
<view class="ont_desc">
内含
<text class="max_num">{{item.num}}</text>
项超值套餐服务
</view>
</view>
<glsx-image webp mode="widthFix" class="pack_icon" webp src="{{IMGURKBASE}}{{index%3==0?'scrm_bg1':'scrm_bg2'}}.png" />
</view>
</block>
</block>
<view class="more_btn_wrap flex_cc" data-show="{{showMorePack}}" bind:tap="openMorePack">
<glsx-image webp class="more_icon" webp src="equity/{{showMorePack?'scrm_up_icon':'scrm_down_icon'}}.png" />
<view class="more_btn_text">{{showMorePack?'收起':'查看更多'}}</view>
</view>
</block>
</view>
</block>
<!-- 附近优惠 -->
<view wx:if="{{commodityList.length}}" class="tab_wrap">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab_item">
<view class="tab_text {{curTabIndex==index?'tab_text_active':''}}">
{{item}}
</view>
<view wx:if="{{curTabIndex==index}}" class="tab_line"></view>
</view>
</block>
</view>
<view wx:if="{{commodityList.length}}" class="commodity_list_widget">
<block wx:for="{{commodityList}}" wx:key="index">
<commodity-item address="{{currentAddress}}" businessInfo="{{item}}" />
</block>
</view>
<view wx:if="{{unauthorized}}" class="reLocation_wrap flex_cc">
<glsx-image webp class="loca_icon" webp src="location_icon.png" />
<view bind:tap="relocation" class="loca_text">定位一下,发现附近优惠</view>
</view>
</view>
<authorize id="authorize" scopeType="userLocation" isShowCheck="{{false}}" bindfail="authFail" bindsuccess="authSuccess" show="{{showAuth}}"></authorize>
<login show="{{showLogin}}"></login>
</block>
\ No newline at end of file \ No newline at end of file
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"tabSize": 2 "tabSize": 2
}, },
"condition": {}, "condition": {},
"libVersion": "2.24.4",
"packOptions": { "packOptions": {
"ignore": [ "ignore": [
{ {
...@@ -56,7 +57,5 @@ ...@@ -56,7 +57,5 @@
], ],
"include": [] "include": []
}, },
"appid": "wxfe82b8d65d07808f", "appid": "wxfe82b8d65d07808f"
"projectname": "hmd",
"libVersion": "2.24.4"
} }
\ No newline at end of file \ No newline at end of file
...@@ -15,6 +15,8 @@ export const STORAGE_OBJECTkEY = { ...@@ -15,6 +15,8 @@ export const STORAGE_OBJECTkEY = {
address_info: 'address_info', address_info: 'address_info',
userInfo: 'userInfo', userInfo: 'userInfo',
sessionId: 'sessionId', sessionId: 'sessionId',
bindInfo:'bindInfo',
unauthorized:'unauthorized'
} }
// 图片版本号 // 图片版本号
......
import wxqrcode from '~/utils/lib/wxqrcode.js' import wxqrcode from '~/lib/wxqrcode.js'
/** /**
* 禁止滑动 * 禁止滑动
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!