Commit e5e53600 by liimin

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents 40247ef6 517c45c9
Showing 116 changed files with 855 additions and 3680 deletions
......@@ -2,13 +2,14 @@
"pages": [
"pages/loading/loading",
"pages/tab/index/index",
"pages/tab/equity/index",
"pages/tab/mall/index",
"pages/tab/cart/index",
"pages/tab/mine/index",
"pages/webView/webView",
"pages/Login/Login"
],
"requiredPrivateInfos": ["getLocation"],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents",
"window": {
"backgroundTextStyle": "light",
......@@ -16,22 +17,22 @@
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#937F82",
"selectedColor": "#8A303A",
"color": "#9DA4B3",
"selectedColor": "#4B5466",
"backgroundColor": "#FFFFFF",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/tab/index/index",
"text": "首页",
"iconPath": "assets/images/home.png",
"selectedIconPath": "assets/images/home_active.png"
"text": "商城",
"iconPath": "assets/images/index.png",
"selectedIconPath": "assets/images/index_active.png"
},
{
"pagePath": "pages/tab/mall/index",
"text": "商城",
"iconPath": "assets/images/mall.png",
"selectedIconPath": "assets/images/mall_active.png"
"pagePath": "pages/tab/cart/index",
"text": "购物车",
"iconPath": "assets/images/cart.png",
"selectedIconPath": "assets/images/cart_active.png"
},
{
"pagePath": "pages/tab/mine/index",
......@@ -47,11 +48,15 @@
"pages": [
"pages/bannerJumpPage/bannerJumpPage",
"pages/common/contact/contact",
"pages/serviceCode/serviceCode"
"pages/serviceCode/serviceCode",
"pages/integral/index/index",
"pages/integral/withdrawal/withdrawal",
"pages/bankAccount/add/add",
"pages/bankAccount/list/list"
]
},
{
"root": "packageMall",
"root": "packageCart",
"pages": [
"pages/shoppingCart/shoppingCart",
"pages/pay/pay",
......@@ -104,4 +109,4 @@
"weui": true
},
"__usePrivacyCheck__": true
}
}
\ No newline at end of file

5.36 KB | W: | H:

2.11 KB | W: | H:

assets/images/mine.png
assets/images/mine.png
assets/images/mine.png
assets/images/mine.png
  • 2-up
  • Swipe
  • Onion skin

6.3 KB | W: | H:

3.32 KB | W: | H:

assets/images/mine_active.png
assets/images/mine_active.png
assets/images/mine_active.png
assets/images/mine_active.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -10,4 +10,4 @@ export const preReleaseAppId = 'wx6e40cfb83ce4ffb1'
export const dsnUrl = 'https://70845376de464a7d9588639fd7c4b5f9@sentry.glsx.com.cn/46'
// cdn图片地址
export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/'
export const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall'
{
"name": "glsk-points-mall",
"version": "1.0.0",
"lockfileVersion": 3,
"lockfileVersion": 1,
"requires": true,
"packages": {
"": {
"name": "glsk-points-mall",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"glsx-applet-component": "^1.1.24",
"glsx-map-sdk": "^0.2.0",
"number-precision": "^1.6.0"
}
},
"node_modules/glsx-applet-component": {
"dependencies": {
"glsx-applet-component": {
"version": "1.1.29",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz",
"integrity": "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw=="
},
"node_modules/glsx-map-sdk": {
"glsx-map-sdk": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/glsx-map-sdk/-/glsx-map-sdk-0.2.0.tgz",
"integrity": "sha512-uEFlXvJEDofYjasR4mwkmF5yNTRs5QA2ZAynGPHiKpKdpjQkVFPJH0zGupmQEkxmh4f5B0wPbDobHvLgld7mVw=="
},
"node_modules/number-precision": {
"number-precision": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
......
// packageMall/pages/search/search.js
// packageCart/pages/coupon/coupon.js
Page({
/**
* 页面的初始数据
*/
data: {
searchList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData(options)
this.getSearchList(options.value)
},
getSearchList(value) {
wx.p.wxApi.showLoading()
let {
goodsList
} = this.data
const searchList = []
goodsList.map(e => {
if (e.goodsName.indexOf(value) != -1) searchList.push(e)
})
this.setData({
searchList,
flag: true
})
wx.hideLoading()
},
search(e) {
this.getSearchList(e.detail)
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/coupon/coupon.wxss */
\ No newline at end of file
<!--packageCart/pages/coupon/coupon.wxml-->
<text>packageCart/pages/coupon/coupon.wxml</text>
\ No newline at end of file
// packageCart/pages/detail/detail.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/detail/detail.wxss */
\ No newline at end of file
<!--packageCart/pages/detail/detail.wxml-->
<text>packageCart/pages/detail/detail.wxml</text>
\ No newline at end of file
// packageCart/pages/pay/pay.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/pay/pay.wxss */
\ No newline at end of file
<!--packageCart/pages/pay/pay.wxml-->
<text>packageCart/pages/pay/pay.wxml</text>
\ No newline at end of file
// packageCart/pages/search/search.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/search/search.wxss */
\ No newline at end of file
<!--packageCart/pages/search/search.wxml-->
<text>packageCart/pages/search/search.wxml</text>
\ No newline at end of file
// packageCart/pages/shoppingCart/shoppingCart.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCart/pages/shoppingCart/shoppingCart.wxss */
\ No newline at end of file
<!--packageCart/pages/shoppingCart/shoppingCart.wxml-->
<text>packageCart/pages/shoppingCart/shoppingCart.wxml</text>
\ No newline at end of file
// packageIndex/pages/bankAccount/add/add.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageIndex/pages/bankAccount/add/add.wxss */
\ No newline at end of file
<!--packageIndex/pages/bankAccount/add/add.wxml-->
<text>packageIndex/pages/bankAccount/add/add.wxml</text>
// packageIndex/pages/bankAccount/list/list.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"navigationStyle": "custom"
"usingComponents": {}
}
\ No newline at end of file
/* packageIndex/pages/bankAccount/list/list.wxss */
\ No newline at end of file
<!--packageIndex/pages/bankAccount/list/list.wxml-->
<text>packageIndex/pages/bankAccount/list/list.wxml</text>
// packageIndex/pages/integral/index/index.js
let navBarHeight = 38
Page({
/**
* 页面的初始数据
*/
data: {
navStyle : "background-color: transparent;"
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
navbarReady(e) {
// let {
// height
// } = e.detail;
// this.setData({
// user_box_style: `padding-top:${height + 10}px`,
// count_box_style: `padding-top:${height}px`,
// });
navBarHeight = e.detail.height
},
back() {
wx.p.router.back()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"navigationStyle": "custom",
"usingComponents": {
"coupon-goods": "../../components/CouponGoods/CouponGoods",
"sku": "../../components/Sku/Sku"
}
"usingComponents": {}
}
\ No newline at end of file
/* packageIndex/pages/integral/index/index.wxss */
.integral-container {
position: fixed;
top: 0;
left: 0;
z-index: 2;
.navigation {
width: 750rpx;
height: 474rpx;
background-size: 100%;
background-repeat: no-repeat;
background-image:url('https://img02.glsx.com.cn/weapp/resource/miniprogram/points-mall/integral/bg.png');
.bar-text {
font-weight: 500;
font-size: 34rpx;
color: #0A0D14;
text-align: center;
}
}
}
\ No newline at end of file
<!--packageIndex/pages/integral/index/index.wxml-->
<!--积分中心 -->
<view class="integral-container">
<!-- 导航栏 -->
<view class="navigation">
<navigation-bar bindnavbarReady="navbarReady" custom="{{true}}" navStyle="{{navStyle}}" page-title="积分中心">
<view class="nav-wrap">
<view class="back text-center y-center" bindtap="back">
<glsx-image webp src="integral/back.png" class="icon"></glsx-image>
</view>
<view class="bar-text">积分中心</view>
</view>
</navigation-bar>
</view>
</view>
\ No newline at end of file
// packageIndex/pages/integral/withdrawal/withdrawal.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageIndex/pages/integral/withdrawal/withdrawal.wxss */
\ No newline at end of file
<!--packageIndex/pages/integral/withdrawal/withdrawal.wxml-->
<!-- 提现 -->
<text>packageIndex/pages/integral/withdrawal/withdrawal.wxml</text>
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) setTimeout(() => {}, 0.5 * 1000)
}
},
only: {
type: Boolean,
value: true
},
couponData: {
type: Object,
observer(n) {
if (n.length)
this.setData({
noData: true
})
return n
}
},
order: {
type: Number
},
defaultData: String
},
observers: {
couponData: function (newVal) {
return newVal
}
},
/**
* 组件的初始数据
*/
data: {
noData: false,
IMGURL: wx.$imgUrl
},
/**
* 组件的方法列表
*/
methods: {
getCoupon(e) {
return
let {merchantId} = wx.p.storage.get('merchant_info')
let { item } = e.currentTarget.dataset
wx.p.wxApi.showLoading('领取中...')
wx.p.api.shopmallApi
.getCoupon({
couponIdList: [item.couponId],
receiveWay: 1,
receiveSource: 3,
merchantId: Number(merchantId)
})
.then(({ code, data, message }) => {
console.log(data)
wx.hideLoading()
if (code == '0') {
wx.showToast({
title: '领取成功',
icon: 'none'
})
let thisPage = wx.p.router.getPageInstance()
if (thisPage.getGoodscouponList) thisPage.getGoodscouponList()
}
})
},
// 更换优惠券
selectCoupon(e) {
let { index } = e.currentTarget.dataset
for (let i = 0; i < this.data.couponData.length; i++) {
if (index == i) {
this.data.couponData[i].isChecked = !this.data.couponData[i].isChecked
} else {
this.data.couponData[i].isChecked = false
}
this.setData({
couponData: this.data.couponData
})
}
},
//确认
confirm() {
this.triggerEvent('click', this.data.couponData)
this.setData({
couponData: this.data.couponData
})
}
},
lifetimes: {
attached() {}
}
})
<popup title="优惠详情" show="{{show}}" only="{{only}}" bindconfirm="confirm" height="75%">
<view class="coupon-box">
<view class="box">
<scroll-view style="height:100%;" scroll-y>
<block wx:if="{{noData}}">
<view class="coupon-wrap" wx:for="{{couponData}}" wx:key="index">
<view class="left_icon_box">
<glsx-image webp wx:if="{{true}}" class="left_bg" src="coupons/coupons_active.png" />
<glsx-image webp wx:else class="left_bg" src="coupons/coupons.png" />
<view class="left_text_one left_text_two">
<text class="price_icon">¥</text>
<text>{{(item.denomination)/100}}</text>
</view>
<view class="left_text_five left_text_three" wx:if="{{item.full}}">满{{(item.full)/100}}可用</view>
</view>
<view class="main_box">
<view class="title_text">{{item.couponName}}</view>
<view class="h4_text" wx:if="{{item.useBarriers == 1}}">无限制</view>
<view class="h4_text" wx:if="{{item.useBarriers == 2}}">满减</view>
<!-- 已领取,effectiveType == 1 或者2,都显示时间段,effectiveType == 3 无限制 -->
<view class="h4_text drive" wx:if="{{item.effectiveType == 1||item.effectiveType == 2 }}">{{item.receiveStartTime}}-{{item.receiveEndTime}}</view>
<view class="h4_text drive" wx:if="{{item.effectiveType == 3}}">无期限</view>
</view>
<block wx:if="{{order == 0}}">
<!-- <view class="box_btn box_btn_color box_btn_color_grey" bindtap="toDetail" wx:if="{{item.couponStatus == 0&&item.residueAmount >0}}" data-item="{{item}}" bindtap="getCoupon">领取</view>
<view class="box_btn_color_been_gray " bind:tap="toDetail" wx:elif="{{item.couponStatus != 1&&item.residueAmount ==0}}">已抢光</view>
<view class="box_btn_color_been" bind:tap="toDetail" wx:elif="{{item.couponStatus == 1}}">已领取</view> -->
<block wx:if="{{item.couponStatus == 1}}">
<view class="already">
<glsx-image webp src="coupons/been.png" />
</view>
</block>
</block>
<block wx:else>
<view class="circle-selected" data-item="{{item}}" data-index="{{index}}" wx:if="{{item.isChecked}}" bindtap="selectCoupon">
<glsx-image webp src="coupons/select.png" />
</view>
<view class="noSelect" data-item="{{item}}" data-index="{{index}}" wx:if="{{!item.isChecked}}" bindtap="selectCoupon"></view>
</block>
</view>
</block>
<!-- <block>
<view class="dissatisfy">以下不满足使用条件</view>
<view class="coupon-wrap gray" >
<view class="left_icon_box">
<image webp class="left_bg" src="../../packageMall/images/coupons.png" />
<view class="left_text_one left_text_two">
<text class="price_icon">¥</text>
<text>50</text>
</view>
<view class="left_text_five left_text_three">满99可用</view>
</view>
<view class="main_box">
<view class="title_text">优惠券名称</view>
<view class="h4_text">满300减50,仅限会场商品</view>
<view class="h4_text drive">无限期</view>
</view>
<view class="circle-gray"></view>
<view class="reason">不可用原因:仅可购买XXX商品A</view>
</view>
</block> -->
</scroll-view>
</view>
</view>
<view wx:if="{{!noData}}" class="no_data">
<glsx-image webp class="nodata_bg" src="coupons/no_card_bg.png" />
<view class="nodata_text">暂无优惠券</view>
</view>
</popup>
\ No newline at end of file
/* components/CarBrands/CarBrands.wxss */
.coupon-wrap {
width: 686rpx;
height: 196rpx;
background: rgba(252, 91, 50, 0.05);
border-radius: 8rpx;
box-sizing: border-box;
padding: 20rpx;
display: flex;
align-items: center;
position: relative;
margin: 24rpx auto;
}
.gray {
width: 686rpx;
height: 196rpx;
background: rgba(201, 202, 204, 0.1) !important;
border-radius: 8rpx;
box-sizing: border-box;
padding: 20rpx;
display: flex;
align-items: center;
position: relative;
margin-top: 24rpx auto 0;
}
.left_icon_box {
width: 156rpx;
height: 156rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
}
.left_bg {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
width: 156rpx;
height: 156rpx;
z-index: 1;
}
.left_text_one {
font-size: 36rpx;
font-weight: 600;
color: #FFFFFF;
z-index: 2;
}
.left_text_two {
display: flex;
align-items: flex-end;
}
.left_text_four {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.left_text_three {
font-size: 28rpx;
margin-top: 6rpx;
width:156rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
.left_text_five {
font-size: 28rpx;
color: #FFFFFF;
z-index: 2;
}
.anText {
font-size: 70rpx;
/* color: rgba(white, white, white, 0.45); */
font-weight: 600;
color: #FFF;
opacity: 0.45;
}
.price_icon {
font-size: 20rpx;
margin-right: 4rpx;
margin-bottom: 7rpx;
}
.main_box {
height: 156rpx;
box-sizing: border-box;
padding: 4rpx 0 4rpx 20rpx;
}
.box_btn {
position: absolute;
right: 20rpx;
top: 50%;
transform: translate(0, -50%);
width: 132rpx;
height: 50rpx;
background: #B1B1B3;
border-radius: 22rpx;
color: #FFF;
font-size: 20rpx;
text-align: center;
line-height: 50rpx;
}
.box_btn_color {
background: var(--btnColor);
color: #FFFFFF;
}
.box_btn_color_grey {
background: #B1B1B3;
}
.title_text {
color: #282829;
font-weight: 600;
color: #282829;
font-size: 28rpx;
width: 420rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.box_btn_color_been {
font-size: 28rpx;
font-weight: 400;
color: var(--btnColor);
line-height: 40rpx;
white-space: nowrap;
position: absolute;
right: 20rpx;
top: 50%;
transform: translate(0, -50%);
}
.h4_text {
font-weight: 400;
color: #B1B1B3;
font-size: 24rpx;
}
.drive {
margin-top: 38rpx;
}
.y-center {
display: flex;
align-items: center;
}
.no_data {
padding-top: 48rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.nodata_bg {
width: 320rpx;
height: 320rpx;
}
.nodata_text {
color: #B1B1B3;
font-size: 28rpx;
line-height: 44rpx;
margin-top: 8rpx;
}
.already {
width: 75rpx;
height: 74rpx;
position: absolute;
bottom: 0;
right: 0;
z-index: 99;
}
.dissatisfy {
font-size: 28rpx;
font-weight: 500;
color: #282829;
line-height: 44rpx;
margin-top: 32rpx;
}
.circle-gray {
width: 40rpx;
height: 40rpx;
background: #E3E3E6;
border: 2rpx solid rgba(177, 177, 179, 1);
border-radius: 50%;
}
.reason {
width: 686rpx;
height: 60rpx;
background: rgba(253, 194, 62, 0.06);
font-size: 24rpx;
font-weight: 400;
color: #F13C3D;
line-height: 60rpx;
padding: 0 20rpx;
box-sizing: border-box;
position: absolute;
bottom: -60rpx;
left: 0;
}
.reason::before {
content: '!';
width: 28rpx;
height: 28rpx;
border: 1rpx solid #F13C3D;
color: #F13C3D;
box-sizing: border-box;
border-radius: 50%;
display: inline-block;
text-align: center;
line-height: 24rpx;
margin-right: 12rpx;
}
.circle-selected {
width: 40rpx;
height: 40rpx;
}
.noSelect {
width: 40rpx;
height: 40rpx;
background: #ffffff;
border: 2rpx solid rgba(177, 177, 179, 1);
border-radius: 50%;
}
.box{
height:55vh;
overflow-y: scroll;
padding-bottom: 50rpx;
}
.box_btn_color_been_gray{
font-size: 28rpx;
font-weight: 400;
color: #B1B1B3;
line-height: 40rpx;
white-space: nowrap;
position: absolute;
right: 20rpx;
top: 50%;
transform: translate(0, -50%);
}
\ No newline at end of file
// components/Sku/Sku.js
import { centsToyuan } from '~/utils/format'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer(n) {
if (n)
this.setData({
close: false
})
}
},
showName: String,
skuData: {
type: Object,
observer(n) {
this.setDefaultSku(n)
}
},
isActivity: Boolean
},
/**
* 组件的初始数据
*/
data: {
goodsNumber: 1
},
/**
* 组件的方法列表
*/
methods: {
noScroll() {},
setDefaultSku(skuData) {
let { isActivity } = this.data
let { specificationList } = skuData
let [specificationDetailList] = isActivity ? skuData.specificationExtraList : skuData.specificationDetailList
let defaultGoods = specificationDetailList.specificationData.split('&')
specificationList.map(e => {
defaultGoods.map(i => {
let [key, value] = i.split('-')
if (key == e.specificationName) {
e.specificationValueList.map(c => {
if (c.specificationValue == value) c.active = true
})
}
})
})
specificationDetailList.retailPrice = centsToyuan(specificationDetailList.retailPrice)
this.setData({
skuObj: skuData,
goodsInfo: specificationDetailList
})
},
choose(e) {
let { ind, index } = e.currentTarget.dataset
let {
skuObj: { specificationList, id, specificationExtraList },
isActivity
} = this.data
let activeList = []
if (specificationList[index].specificationValueList[ind].active) return
specificationList[index].specificationValueList.map(i => (i.active = false))
specificationList[index].specificationValueList[ind].active = true
specificationList.map(i => {
i.specificationValueList.map(c => {
if (c.active) activeList.push(`${i.specificationName}-${c.specificationValue}`)
})
})
let specificationData = activeList.join('&')
this.setData({
[`skuObj.specificationList[${index}]`]: specificationList[index]
})
if (isActivity) {
specificationExtraList.map((i, i_index) => {
if (i.specificationData == specificationData) {
let retailPrice = i.retailPrice
if (i_index != 0) retailPrice = centsToyuan(i.retailPrice)
this.setData({
goodsInfo: {
retailPrice,
stock: i.stock,
specificationData,
specificationKey: i.specificationKey
}
})
}
})
} else {
wx.p.api.shopmallApi
.getGoodsSpecificationExtra({
goodsId: id,
specificationData
})
.then(data => {
data.retailPrice = centsToyuan(data.retailPrice)
this.setData({
goodsInfo: data
})
console.log(this.data.goodsInfo)
})
}
this.setData({
goodsNumber: 1
})
const thisPage = wx.p.router.getPageInstance()
thisPage.setData({
activeSku: specificationData
})
},
changeCount(e) {
let goodsNumber = e.detail
this.setData({
goodsNumber
})
},
closeSku() {
let thisPage = wx.p.router.getPageInstance()
let { showName } = this.data
this.setData({
close: true
})
setTimeout(() => {
thisPage.setData({
[showName]: false
})
}, 0.5 * 1000)
},
click(e) {
let { type } = e.currentTarget.dataset
let {
goodsInfo: { goodsId, specificationKey, stock },
goodsNumber
} = this.data
if (stock === 0) return
this.triggerEvent(type, {
goodsId,
specificationKey,
goodsNumber,
stock
})
this.closeSku()
}
}
})
<view class="sku" catchtouchmove="noScroll" hidden="{{!show}}">
<view class="sku-bg" bindtap="closeSku"></view>
<view class="sku-box isFullSucreen {{close?'close':''}}">
<scroll-view class="sku-content" scroll-y>
<view class="view">
<view class="goods-box">
<view class="preview">
<image webp src="{{skuObj.goodsImage || skuObj.activityImg}}"></image>
</view>
<view class="goods-info">
<view class="price">
<text class="unit">¥</text>{{goodsInfo.retailPrice}}
</view>
<view class="count">
<block wx:if="{{goodsInfo.stock}}">
有货(库存{{goodsInfo.stock}})
</block>
<block wx:else>无货</block>
</view>
<view class="active text-hide">已选:{{goodsInfo.specificationData}}</view>
</view>
</view>
<view class="sku-list">
<block wx:for="{{skuObj.specificationList}}" wx:key="index">
<view class="sku-title">{{item.specificationName}}</view>
<view class="sku-item">
<block wx:for="{{item.specificationValueList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item text-center {{i.active?'active':''}} {{i.stock ===0?'disabled':''}}" bindtap="choose" data-index="{{index}}"
data-ind="{{ind}}">{{i.specificationValue}}</view>
</block>
</view>
</block>
<view class="sku-title">
数量
<stepper count="{{goodsNumber}}" max="{{goodsInfo.stock}}" bindchange="changeCount"></stepper>
</view>
<view class="sku-title">
发货
<view class="value">快递:{{skuObj.expressFee||'免运费(请以提交订单时为准)'}}</view>
</view>
</view>
</view>
</scroll-view>
<view class="sku-btn-box">
<view class="sku-btn">
<block wx:if="{{!isActivity}}">
<view class="join text-center {{goodsInfo.stock === 0?'disabled':''}}" bindtap="click" data-type="join">加入购物车</view>
</block>
<view class="pay text-center {{goodsInfo.stock === 0?'disabled':''}} " bindtap="click" data-type="pay">立即购买</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* components/Sku/Sku.wxss */
@import '/assets/style/common.wxss';
.sku {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
z-index: 9;
}
.sku-bg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .5);
}
.sku-box {
position: absolute;
width: 100%;
height: 76%;
background: #FFFFFF;
border-radius: 16rpx 16rpx 0 0;
left: 0;
animation: show-sku-box .5s forwards;
z-index: 2;
}
.sku-box.close {
animation: hide-popup-box .5s forwards;
}
.sku-box.isFullSucreen {
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
@keyframes show-sku-box {
0% {
bottom: -100%;
}
100% {
bottom: 0;
}
}
@keyframes hide-popup-box {
0% {
bottom: 0;
}
100% {
bottom: -100%;
}
}
.sku-content {
box-sizing: border-box;
height: calc(100% - 100rpx);
}
.sku-content .view {
padding: 0 40rpx;
}
.sku-content .goods-box {
display: flex;
align-items: center;
position: sticky;
background-color: #fff;
z-index: 2;
top: 0;
padding-bottom: 18rpx;
}
.sku-content .goods-box .preview {
width: 180rpx;
height: 180rpx;
border-radius: 4rpx;
margin-right: 40rpx;
overflow: hidden;
margin-top: 40rpx;
}
.sku-content .goods-box .goods-info {
width: calc(100% - 220rpx);
}
.sku-content .goods-box .price {
color: var(--btnColor);
font-size: 64rpx;
margin-bottom: 10rpx;
}
.sku-content .goods-box .price .unit {
font-size: 40rpx;
}
.sku-content .goods-box .count {
color: #B9BABB;
font-size: 20rpx;
margin-bottom: var(--borderRadius);
}
.sku-content .goods-box .active {
font-size: 20rpx;
color: #707071;
}
.sku-box .sku-list {
padding-bottom: 40rpx;
}
.sku-box .sku-title {
color: #2D2D2E;
font-weight: 500;
padding-top: var(--margin);
display: flex;
align-items: center;
justify-content: space-between;
}
.sku-title .value {
color: #565759;
font-weight: normal;
}
.sku-box .sku-item {
display: flex;
flex-wrap: wrap;
}
.sku-box .sku-item .item {
height: 52rpx;
background: #F9F7F7;
padding: 0 20rpx;
margin: 20rpx 20rpx 0 0;
font-size: 24rpx;
color: #656566;
border: 2rpx solid #F7F8FA;
box-sizing: border-box;
border-radius: 4rpx;
}
.sku-box .sku-item .item.active {
border-color: rgb(252, 91, 50);
color: rgb(252, 91, 50);
background-color: rgba(252, 91, 50, .06);
}
.sku-btn-box {
height: 100rpx;
padding: 10rpx var(--margin);
}
.sku-btn {
border-radius: var(--borderRadius);
display: flex;
overflow: hidden;
}
.sku-btn .join,
.sku-btn .pay {
flex: 1;
height: 80rpx;
color: #fff;
}
.sku-btn .join {
background-color: #FDC23E;
}
.sku-btn .pay {
background-color: var(--btnColor);
}
.disabled{
background-color: #B1B1B3 !important;
/* border-color: #B1B1B3 !important; */
color: #000000!important;
}
\ No newline at end of file
// packageMall/pages/coupon/coupon.js
import {
wxqrcode as QR
} from "~/lib/index";
Page({
/**
* 页面的初始数据
*/
data: {
shareStaff: {},
discountType: {
1: '满减券',
2: '折扣券',
3: '代金券',
4: '兑换券',
5: '购车代金券',
6: '商品折扣券',
7: '会员服务券'
},
useMemberType: 0,
list: [],
pageNum: 1
},
unique(arr) {
let res = new Set()
return arr.filter(item => {
let id = JSON.stringify(item)
if (res.has(id)) {
return false
} else {
res.add(id)
return true
}
})
},
getCouponGoodsPage(res) {
wx.p.wxApi.showLoading()
let total = 0
let {
list,
pageNum
} = this.data
wx.p.api.shopmallApi
.getCouponGoodsPage({
pageNum,
couponId: res.couponId || res.id,
merchantId: res.merchantId
})
.then(data => {
console.log(data)
// let lists = this.unique([...list, ...data.list])
this.setData({
list: data.list,
total
})
wx.hideLoading()
})
},
jumpCommodity(e) {
let {
item
} = e.currentTarget.dataset
// console.log('item',item);
let {
id
} = item
let isActivity = false
wx.p.router.go('/packageMall/pages/detail/detail', {
id,
isActivity,
notIntercept: true
})
},
jump(e) {
let {
item
} = e.currentTarget.dataset
wx.openLocation({
latitude: item.lat,
longitude: item.lng,
name: item.merchantName,
address: item.merchantAddress
})
},
jumpMap() {
let {
couponDetail
} = this.data
wx.openLocation({
latitude: couponDetail.lat,
longitude: couponDetail.lng,
name: couponDetail.merchantName,
address: couponDetail.merchantAddress
})
},
jump() {
console.log()
let {
length
} = getCurrentPages()
if (length == 1) wx.p.router.redirectTo('/packageMine/pages/coupon/index/index')
else wx.p.router.back()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
// 0616添加推荐人
if (options.shareStaffUuid) {
this.data.shareStaff = {
shareStaffUuid: options.shareStaffUuid,
shareStaffName: options.shareStaffName
}
options.item_type = 2
options.action_type = 1
options.item_id = options.couponId
this.data.recommandOptions = options
// wx.$util.reportData(options, false, false, true)
}
// console.log('options',options);
const {
userCouponId,
useMemberType,
detailInfo
} = options
wx.p.wxApi.showLoading('加载中...')
if (userCouponId) {
console.log(userCouponId)
this.setData({
useMemberType,
detailInfo
})
wx.p.api.couponsApi.getWWCoupon({
userCouponId
}).then(res => {
wx.hideLoading()
wx.nextTick(() => {
this.setCouponData(res)
})
let code = res.verificationCode.replace(/(.{4})/g, '$1 ')
this.setData({
qr: QR.createQrCodeImg(`t=2&c=${res.verificationCode}`),
verificationCode: code
})
})
}
if (options && options.couponId) {
console.log(options)
wx.p.wxApi.showLoading('加载中...')
this.checkCoupon(options)
if (options.activity_id) {
this.data.activiOptions = options
// wx.$util.reportData(options, true, false)
}
} else {
let {
isReceive
} = this.data
if (isReceive) this.confirm()
}
},
checkCoupon(options, callBack) {
wx.p.api.couponsApi.checkCoupon(options).then(couponInfo => {
console.log(couponInfo)
if (couponInfo) {
couponInfo.receiveEndTime = new Date(couponInfo.receiveEndTime).format('yyyy.MM.dd hh:mm:ss')
couponInfo.receiveStartTime = new Date(couponInfo.receiveStartTime).format('yyyy.MM.dd hh:mm:ss')
couponInfo.receiveTime = new Date(couponInfo.receiveTime).format('yyyy.MM.dd hh:mm:ss')
}
this.setData({
detailInfo: couponInfo
})
wx.p.api.couponsApi.getCouponInfo(options).then(res => {
this.setCouponData(res)
this.setData({
...options
})
if (couponInfo) {
let code = couponInfo.verificationCode.replace(/(.{4})/g, '$1 ')
console.log(couponInfo.verificationCode)
this.setData({
useMemberType: couponInfo.useMemberType,
qr: QR.createQrCodeImg(`t=2&c=${couponInfo.verificationCode}`),
verificationCode: code
})
} else {
if (callBack) callBack(couponInfo)
}
wx.hideLoading()
})
})
},
setCouponData(res) {
if (res.receiveStartTime) res.receiveStartTime = new Date(res.receiveStartTime).format('yyyy.MM.dd hh:mm:ss')
if (res.receiveEndTime) res.receiveEndTime = new Date(res.receiveEndTime).format('yyyy.MM.dd hh:mm:ss')
if (res.receiveTime) res.receiveTime = new Date(res.receiveTime).format('yyyy.MM.dd hh:mm:ss')
if (res.list) {
res.list.map(val => (val.verificationTime = new Date(val.verificationTime).format('yyyy.MM.dd hh:mm:ss')))
}
if (res.effectiveStartTime) res.effectiveStartTime = res.effectiveStartTime.replace(/-/g, '.')
if (res.effectiveEndTime) res.effectiveEndTime = res.effectiveEndTime.replace(/-/g, '.')
if (res.full) res.full = res.full / 100
if (res.discountType == 3 && res.useChannel == 1) {
this.getCouponGoodsPage(res)
}
console.log(res, '///////////')
this.setData({
couponDetail: res
})
// setTimeout(() => {
// this.setData({
// flag: true
// })
// }, 500)
},
confirm() {
let {
couponId,
issueName,
issueDate,
userCouponId,
merchantId,
shareSource
} = this.data
if (!couponId && !userCouponId) return
// wx.p.router.intercept().then(response => {
// if (response) {
// this.setData({
// isReceive: true
// })
// return
// }
// let obj = {
// ...this.data.shareStaff
// }
// if (userCouponId) obj.userCouponId = userCouponId
// if (couponId) obj.couponId = couponId
// if (issueName) obj.issueName = issueName
// if (issueDate) obj.issueDate = issueDate
// if (merchantId) obj.merchantId = merchantId
// if (shareSource) obj.shareSource = shareSource
// this.checkCoupon(obj, () => {
// wx.p.api.couponsApi.receiveCoupon(obj).then(({
// code,
// data,
// message
// }) => {
// if (code == '0') {
// // wx.$Track.setTrack({
// // data,
// // type: '领取优惠券'
// // },
// // 7
// // )
// console.log(data)
// if (data.discountType == 3) {
// this.jump()
// return
// }
// this.setData({
// qr: QR.createQrCodeImg(`t=2&c=${data.verificationCode}`),
// verificationCode: data.verificationCode
// })
// wx.p.wxApi.showToast('领取成功')
// this.checkCoupon(obj)
// if (this.data.activiOptions) {
// // wx.$util.reportData(this.data.activiOptions, false, true)
// }
// if (this.data.recommandOptions) {
// let options = this.data.recommandOptions
// options.item_type = 2
// options.action_type = 2
// options.item_id = options.couponId
// // wx.$util.reportData(options, false, false, true)
// }
// } else {
// wx.p.wxApi.showToast(message)
// }
// })
// })
// })
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
// wx.$util.customerbehavior(2)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {}
})
\ No newline at end of file
/* packageMall/pages/coupon/coupon.wxss */
.navigation-bar {
position: fixed;
top: 0;
left: 0;
z-index: 2;
}
.navigation {
width: 100%;
height: 100%;
position: relative;
}
.navigation .back {
width: 64rpx;
height: 64rpx;
background: rgba(255, 255, 255, 0.5);
border-radius: var(--margin);
position: absolute;
left: 20rpx;
}
.navigation .back .icon {
width: 36rpx;
height: 36rpx;
}
.navigation .text {
max-width: 50%;
font-size: 32rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
box-sizing: border-box;
text-align: center;
letter-spacing: 1rpx;
}
.layout {
padding: 32rpx;
}
.layout .box {
background: #ffffff;
box-shadow: 0px 8rpx 16rpx 0px rgba(224, 224, 224, 0.5);
border-radius: 8rpx;
}
.layout .qr-box {
padding: 32rpx 32rpx 20rpx 32rpx;
margin-bottom: 20rpx;
position: relative;
}
.layout .qr-box .type {
position: absolute;
right: 0;
top: 0;
width: 140rpx;
height: 120rpx;
background-color: var(--btnColor);
}
.layout .qr-box .type text {
color: #fff;
display: block;
transform: rotate(45deg);
font-size: 24rpx;
}
.layout .qr-box .top {
position: relative;
z-index: 2;
/* border-bottom: 2rpx solid #eeeeee;
padding-bottom: 32rpx; */
box-sizing: border-box;
}
.layout .qr-box .top .title {
font-weight: 600;
font-size: 36rpx;
color: #3a3a3a;
padding-bottom: 20rpx;
}
.layout .qr-box .top .title .coupon {
background-color: var(--btnColor);
margin-left: 20rpx;
font-size: 24rpx;
border-radius: 8rpx;
padding: 4rpx 20rpx;
color: #fff;
flex-shrink: 0;
}
.layout .qr-box .top .title .disabled {
background-color: #999999;
}
.layout .qr-box .top .time {
font-size: 24rpx;
color: #bebebe;
}
.layout .qr-box .bottom {
/* min-height: 506rpx; */
flex-direction: column;
}
.layout .qr-box .bottom .title {
padding: 22rpx 0 24rpx;
font-size: 32rpx;
}
.layout .qr-box .bottom .qr {
width: 280rpx;
height: 280rpx;
margin-bottom: 44rpx;
position: relative;
}
.layout .qr-box .bottom .qr .qr-text {
font-size: 24rpx;
color: #bebebe;
width: 200%;
text-align: center;
}
.layout .qr-box .bottom .qr .mask {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 28rpx;
font-weight: 500;
line-height: 32rpx;
width: 181rpx;
height: 84rpx;
background: #000;
border-radius: 8rpx;
opacity: 0.7;
color: #FFFFFF;
}
.layout .qr-box .bottom .qr .mask.lose {
font-size: 28rpx;
color: #999999;
}
.layout .qr-box .btn-box {
height: 304rpx;
background: #FFF5F3;
border-radius: 8rpx;
padding: 32rpx;
}
.layout .qr-box .btn-box .text {
width: 100%;
text-align: center;
font-size: 20rpx;
color: #FC5B32;
line-height: 28px;
}
.layout .qr-box .btn {
/* animation: huxi 2.5s infinite; */
/* margin-bottom: 40rpx; */
font-size: 28rpx;
color: #FFFFFF;
margin-top: 38rpx;
width: 400rpx;
height: 68rpx;
background: #FC5B32;
box-shadow: 0px 4rpx 12rpx 4rpx rgba(252, 91, 50, 0.1);
border-radius: 34rpx;
}
/* @keyframes huxi {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
} */
.layout .qr-box .bottom .code {
font-size: 28rpx;
}
.layout .info {
padding: 32rpx;
line-height: 40rpx;
font-size: 28rpx;
color: #666666;
}
.layout .info .title {
color: #333333;
}
.layout .info .title .sprite-icon {
margin-right: 16rpx;
}
.icon-explain {
width: 32rpx;
height: 32rpx;
}
.layout .info .item {
margin-top: 24rpx;
word-break: break-all;
position: relative;
}
.layout .info .item .num {
position: absolute;
left: 0;
top: 0;
}
.bottom-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
z-index: 2;
background-color: #fff;
padding-top: 10rpx;
}
.default-btn {
margin: 0 auto 10rpx;
}
.isFullSucreen {
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.isFullSucreen-btn {
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.box-X {
border-radius: 8rpx;
background-color: #fff;
padding: 24rpx 24rpx 40rpx;
}
.associationBox .title {
font-size: 32rpx;
padding-bottom: 24rpx;
font-weight: 500;
}
.associationBox .goods {
margin-top: 24rpx;
display: flex;
align-items: center;
height: 160rpx;
}
.associationBox .goods .icon {
width: 160rpx;
height: 100%;
overflow: hidden;
border-radius: 8rpx;
margin-right: 20rpx;
}
.associationBox .goods .info {
width: calc(100% - 180rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.associationBox .goods .info .name {
font-size: 30rpx;
color: #333;
}
.associationBox .goods .info .price {
display: flex;
color: var(--btnColor);
font-weight: 500;
}
.associationBox .goods .info .price-X {
margin-top: -8rpx;
font-size: 36rpx;
font-family: DINAlternate-Bold, DINAlternate;
}
.top .title .title_text {
font-size: 36rpx;
font-weight: 600;
max-width: 510rpx;
}
.top .title .baseImage {
width: 140rpx;
height: 138rpx;
background-size: cover;
position: absolute;
right: -40rpx;
top: -41rpx;
}
.qrText {
color: #FC5B32;
}
.changeColor {
color: #333;
}
.lines {
height: 2rpx;
background: #EEE;
margin: 32rpx 0 0;
}
.title .discount {
font-size: 40rpx;
font-weight: 600;
}
.title .discount_text {
font-size: 24rpx;
padding-top: 8rpx;
}
.title .discount_text_x {
font-size: 32rpx;
padding-left: 10rpx;
}
.numberColor {
color: #B4B4B4;
}
.darkColor {
color: #666;
}
.box .process {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 4rpx;
}
.process .process_text {
margin-left: 4rpx;
font-size: 24rpx;
color: #333;
}
.process image {
width: 24rpx;
height: 24rpx;
}
.process .rightArrow {
padding: 0 40rpx;
}
.qr-box .storeTitle {
font-size: 32rpx;
font-weight: 500;
color: #333;
margin-bottom: 32rpx;
}
.qr-box .store-box {
background: #F9F9F9;
border: 2rpx solid #E9E9E9;
border-radius: 8rpx;
padding: 16rpx 32rpx;
margin-bottom: 18rpx;
}
.qr-box .store-box:last-child {
margin-bottom: 0;
}
.qr-box .storeName {
font-size: 28rpx;
color: #333;
margin-top: -4rpx;
}
.qr-box .businessTime {
font-size: 24rpx;
color: #999;
margin-top: 4rpx;
padding-bottom: 18rpx;
}
.qr-box .line {
height: 2rpx;
background: #EEE;
}
.qr-box .addressBox {
padding-top: 20rpx;
font-size: 24rpx;
color: #666;
display: flex;
align-items: center;
}
.qr-box .addressBox .navigation-X {
width: 32rpx;
height: 32rpx;
}
.qr-box .couponBox-X {
max-width: 610rpx;
line-height: 48rpx;
}
.qr-box .couponBox-X .titleDay {
font-size: 28rpx;
font-weight: 500;
color: #333;
}
.titleDay_text {
font-size: 24rpx;
color: #666;
}
.darkColor {
color: #666;
}
.an_title_text {
font-size: 32rpx;
font-weight: 500;
color: #333;
margin-bottom: 20rpx;
}
.note_line {
box-sizing: border-box;
line-height: 48rpx;
}
.note_line .line_text_name {
font-size: 28rpx;
color: #333;
}
.note_line .line {
height: 2rpx;
background: #EEE;
margin: 16rpx 0 14rpx;
}
.line_text {
font-size: 24rpx;
color: #666;
}
.btn-box .title_text_X {
font-size: 36rpx;
font-weight: 600;
max-width: 510rpx;
}
.btn-box .baseImage{
width: 138rpx;
height: 138rpx;
background-size: cover;
position: absolute;
right: -9rpx;
top: -13rpx;
}
.btn-box .times {
font-size: 24rpx;
color: #D83C14;
margin: 20rpx 0 32rpx;
}
.qr-box .good {
display: flex;
padding-bottom: 12rpx;
}
.qr-box .good .icons {
width: 144rpx;
height: 144rpx;
}
.qr-box .good .infos {
margin-left: 32rpx;
}
.qr-box .good .infos .names {
font-size: 28rpx;
color: #282829;
}
.qr-box .good .infos .prices {
display: flex;
margin-top: 50rpx;
font-size: 36rpx;
font-weight: 600;
color: #FC5B32;
}
.qr-box .good .icons image {
border-radius: 8rpx;
}
.qr-box .good .infos .prices .prices-X {
margin-left: 10rpx;
}
.qr-box .liness {
height: 2rpx;
background: #EFF0F2;
margin: 20rpx 0 32rpx 0;
}
.coupon-X {
height: 203rpx;
margin: 0 -8rpx;
position: relative;
}
.coupon-X .left_box {
width: 230rpx;
height: 150rpx;
color: #FFFFFF;
font-size: 56rpx;
font-weight: 600;
text-align: center;
line-height: 150rpx;
}
.coupon-X .left_box .price_icon {
font-size: 24rpx;
font-weight: 500;
}
.coupon-X .right_box {
padding: 28rpx 28rpx 0 28rpx;
width: 464rpx;
}
.top_box {
height: 120rpx;
border-bottom: 2rpx dashed rgba(216, 60, 20, 0.1);
}
.top_box .voucherName {
font-size: 28rpx;
font-weight: 600;
padding-bottom: 8rpx;
}
.h4_text {
font-size: 20rpx;
font-weight: 400;
}
.brightColor {
color: #FC5B32;
}
.describeColor {
color: #D83C14;
}
.timeColor {
color: #999;
}
.bottom_box {
height: 42rpx;
line-height: 42rpx;
}
.coupon-X .bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.coupon-X .infoss {
position: relative;
z-index: 2;
display: flex;
width: 100%;
height: 100%;
right: 0;
top: 0;
}
\ No newline at end of file
/* packageMall/pages/detail/detail.wxss */
.flex {
display: flex;
align-items: center;
position: relative;
}
.layout{
padding-bottom: calc(140rpx + var(--constantSafeAreaInsetBottom));
padding-bottom: calc(140rpx + var(--envSafeAreaInsetBottom));
animation: show-box-opacity .5s forwards;
}
.navigation-bar {
position: fixed;
top: 0;
left: 0;
z-index: 2;
}
.empty-page {
box-sizing: border-box;
width: 100%;
height: calc(100vh - 128rpx);
padding-top: 128rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 28rpx;
color: #ACACAC;
}
.empty-img {
width: 446rpx;
height: 240rpx;
margin-bottom: 60rpx;
}
.navigation {
width: 100%;
height: 100%;
position: relative;
}
.navigation .back {
width: 64rpx;
height: 64rpx;
background: #F9F7F7;
border-radius: var(--margin);
position: absolute;
left: 10rpx;
}
.navigation .back .icon {
width: 36rpx;
height: 36rpx;
}
.navigation .text {
max-width: 50%;
font-size: 32rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
box-sizing: border-box;
text-align: center;
letter-spacing: 1rpx;
}
.box {
margin-bottom: 16rpx;
background-color: #fff;
}
.banner-box {
height: 750rpx;
position: relative;
}
.banner {
height: 100%;
}
.dot-box {
position: absolute;
bottom: 24rpx;
border-radius: 2rpx;
overflow: hidden;
display: flex;
}
.banner video {
width: 100%;
height: 100%;
}
.dot {
width: 20rpx;
height: var(--borderRadius);
background: rgba(255, 255, 255, 0.3);
transition: all .5s;
}
.dot.active {
background-color: #fff;
}
.activity-box {
height: 100rpx;
position: relative;
}
.activity-box .activity-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.activity-box .activity-info {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 23rpx 0 15rpx;
color: #fff;
}
.activity-box .activity-info .price,
.activity-box .activity-info .now,
.activity-box .activity-info .text {
display: flex;
font-size: 24rpx;
}
.activity-box .activity-info .price {
align-items: baseline;
}
.activity-box .activity-info .text {
align-items: center;
}
.activity-box .activity-info .now {
font-size: 40rpx;
align-items: baseline;
margin-left: var(--borderRadius);
}
.activity-box .activity-info .now .num {
font-size: 60rpx;
line-height: 60rpx;
letter-spacing: -2rpx;
}
.activity-box .activity-info .activity-unit {
font-size: 40rpx;
margin-left: 6rpx;
transform: translateY(-5rpx);
}
.activity-box .activity-info .count {
opacity: .5;
font-size: 20rpx;
transform: translateY(-5rpx);
}
.activity-box .activity-info .text .old {
padding: 0 12rpx;
height: 28rpx;
background: #FFEAD1;
border-radius: 14rpx;
font-size: 20rpx;
color: var(--themeColor);
flex-direction: column;
margin-left: 6rpx;
}
.activity-box .activity-info .activity-time {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: var(--themeColor);
animation: show-activity-time .5s forwards;
}
@keyframes show-activity-time {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.activity-box .activity-info .activity-time .time {
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: flex-end;
color: var(--themeColor);
margin-top: 10rpx;
}
.activity-box .activity-info .activity-time .day {
margin-right: var(--borderRadius);
}
.activity-box .activity-info .time-box {
background: var(--themeColor);
border-radius: 4rpx;
width: 36rpx;
height: 36rpx;
color: #fff;
}
.activity-box .activity-info .unit {
text-align: center;
width: 16rpx;
}
.activity-time .finished {
font-size: 32rpx;
}
.goods-info {
padding: 28rpx 40rpx 32rpx;
}
.goods-info .price {
margin-bottom: 2rpx;
}
.goods-info .price,
.goods-info .price .now {
display: flex;
align-items: baseline;
}
.goods-info .price .now {
font-size: 64rpx;
color: var(--btnColor);
margin-right: 8rpx;
line-height: 64rpx;
}
.goods-info .price .now .unit {
font-size: 40rpx;
}
.goods-info .price .now .up {
transform: translateY(-2rpx);
}
.goods-info .price .old {
color: #B1B1B3;
text-decoration: line-through;
}
.goods-info .name {
font-size: 36rpx;
font-weight: 500;
position: relative;
width: 85%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.goods-info .count {
margin-top: 20rpx;
font-size: 24rpx;
color: #B1B1B3;
display: flex;
position: relative;
}
.goods-info .count view:nth-child(2) {
margin-left: 100rpx;
}
.goods-param {
padding: 0 40rpx;
}
.goods-param .item {
position: relative;
height: 98rpx;
border-bottom: 2rpx solid #EFF0F2;
display: flex;
align-items: center;
font-size: 24rpx;
}
.goods-param .item:last-child {
border-bottom: none;
}
.goods-param .item .label {
width: 136rpx;
color: #656566;
}
.goods-param .item .value {
width: 490rpx;
color: #3B3B3D;
}
.goods-param .item .coupon {
font-size: 24rpx;
padding: 0 20rpx;
font-weight: 500;
color: var(--btnColor);
line-height: 40rpx;
height: 40rpx;
width: auto;
background: rgba(252, 91, 50, 0.12);
border-radius: 4rpx;
box-sizing: border-box;
}
.goods-param .address {
height: 134rpx;
align-items: flex-start;
box-sizing: border-box;
padding: var(--margin) 0;
position: relative;
}
.goods-param .address .tips {
position: absolute;
color: #B1B1B3;
left: 136rpx;
bottom: var(--margin);
}
.goods-param .item .icon-mine-arrow {
margin-left: auto;
transform: scale(1.3) translateY(9rpx);
}
.goods-param .address .icon-mine-arrow {
position: absolute;
right: 0;
top: 50%;
transform: scale(1.3) translateY(0);
}
.activity-detail {
background-color: #fff;
}
.activity-detail .title {
display: flex;
align-items: center;
padding: 0 40rpx 20rpx;
}
.activity-detail .title .icon {
width: 32rpx;
height: 32rpx;
margin-right: var(--borderRadius);
}
.detail-time {
margin-bottom: 20rpx;
}
.content {
font-size: 24rpx;
background-color: #fff;
padding: 0 40rpx;
}
.content:first-of-type,
.activity-detail .title:first-of-type {
padding-top: 40rpx;
}
.content:last-of-type {
padding-bottom: 40rpx;
}
.goods-comment {
padding: 40rpx 32rpx;
}
.goods-comment .comment-head {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 12rpx;
}
.goods-comment .comment-content {
font-size: 28rpx;
font-weight: 400;
color: #282829;
line-height: 40rpx;
padding: 0 0 20rpx 0;
white-space: normal;
word-break: break-all;
}
.goods-comment .comment-head .comment-total {
font-size: 32rpx;
font-weight: 500;
color: #282829;
line-height: 44rpx;
}
.comment-all {
font-size: 24rpx;
font-weight: 400;
color: #3B3B3D;
line-height: 34rpx;
display: flex;
align-items: center;
}
.comment-all .icon-mine-arrow {
margin-left: 12rpx;
}
.comment-user {
padding: 16rpx 0 20rpx 0;
display: flex;
align-items: center;
}
.comment-user .user-portrait {
width: 72rpx;
height: 72rpx;
margin-right: 16rpx;
background-color: #333333;
border-radius: 50%;
}
.user-portrait image {
border-radius: 50%;
}
.comment-user .user-info .name {
font-size: 32rpx;
font-weight: 600;
color: #282829;
line-height: 44rpx;
}
.comment-user .user-info .comment-time {
font-size: 20rpx;
font-weight: 400;
color: #B1B1B3;
line-height: 28rpx;
}
.goods-comment .comment-images {
display: flex;
align-items: center;
flex-wrap: wrap;
margin-right: -40rpx;
}
.goods-comment .comment-images .icon {
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
box-sizing: border-box;
margin-right: 16rpx;
background-color: #e7e7e7;
margin-bottom: 10rpx;
}
.goods-comment .comment-images .icon image {
border-radius: 8rpx;
}
.share {
width: 108rpx;
height: 44rpx;
background: #EFDEE0;
border-radius: 22rpx;
font-size: 24rpx;
color: var(--btnColor);
display: flex;
align-items: center;
position: absolute;
right: 0;
padding-left: 16rpx;
box-sizing: border-box;
&-icon {
width: 20rpx;
height: 22rpx;
margin-left: 8rpx;
}
}
.share text {
flex-shrink: 0;
}
.model {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 999999;
display: flex;
align-items: center;
justify-content: center;
&-bg{
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
}
.poster {
width: 540rpx;
height: 924rpx;
animation: show-box-inset .5s forwards;
}
.goods-param .items {
min-height: 34rpx;
display: flex;
font-size: 24rpx;
padding: 32rpx 0;
}
.goods-param .items .labels {
width: 136rpx;
color: #656566;
}
.goods-param .items .values {
width: 490rpx;
color: #3B3B3D;
}
.tab-widget {
width: 100%;
height: 88rpx;
background: white;
position: fixed;
left: 0;
top: 88rpx;
right: 0;
z-index: 999;
}
.tab-widget .tab-item {
width: 50%;
height: 100%;
position: relative;
}
.tab-widget .tab-item .text {
font-size: 28rpx;
color: #656566;
line-height: 40rpx;
}
.tab-widget .tab-item .text-ative {
font-weight: 500;
font-size: 28rpx;
color: #2C2C2C;
}
.tab-widget .tab-item .line {
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 66rpx;
height: 6rpx;
background: var(--btnColor);
border-radius: 2rpx;
}
\ No newline at end of file
<view class="navigation-bar">
<navigation-bar custom navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="{{isActivity?goodsInfo.activityName:goodsInfo.goodsName}}">
<view class="navigation">
<view class="back text-center y-center" bindtap="back">
<glsx-image webp src="mall/{{showHomeBtn?'home':'back'}}.png" class="icon"></glsx-image>
</view>
</view>
</navigation-bar>
</view>
<view class="empty-page" wx:if="{{!goodsFlag && !isLoading}}">
<glsx-image webp class="empty-img" src="mall/active-empty.png" />
活动重新配置中,请稍后重试
</view>
<block wx:if="{{goodsFlag}}">
<view class="layout">
<view class="banner-box">
<swiper class="banner" bindchange="changeBanner">
<block wx:for="{{goodsInfo.goodsDetailImageList}}" wx:key="index">
<swiper-item>
<block wx:if="{{item.resType == 1}}">
<image webp src="{{item.content}}" bindtap="previewImage" data-current="{{item.content}}" data-item="{{goodsInfo.goodsDetailImageList}}"></image>
</block>
<block wx:elif="{{item.resType == 3}}">
<video src="{{item.content}}"></video>
</block>
</swiper-item>
</block>
</swiper>
<block wx:if="{{goodsInfo.goodsDetailImageList.length > 1}}">
<view class="dot-box x-center">
<block wx:for="{{goodsInfo.goodsDetailImageList}}" wx:key="index">
<view class="dot {{bannerIndex == index ? 'active':''}}">
</view>
</block>
</view>
</block>
</view>
<block wx:if="{{isActivity}}">
<view class="activity-box">
<view class="activity-info">
<view class="price-info">
<view class="price">
<text>秒杀价</text>
<view class="text">
<view class="now">
<text>¥</text>
<view class="num">{{goodsInfo.retailPrice}}</view>
<block wx:if="{{goodsInfo.unit}}">
<view class="activity-unit">{{goodsInfo.unit}}</view>
</block>
</view>
<view class="old text-center">
限时直降{{goodsInfo.priceReduce}}
</view>
</view>
</view>
<view class="count">已售出{{goodsInfo.saleAmount || 0}}件</view>
</view>
<!-- activityStatus:1:未开始,2进行中,3已结束 -->
<block wx:if="{{goodsInfo.activityStatus != 3}}">
<view class="activity-time" wx:if="{{timeFlag}}">
<view class="title">{{activityTime.type}}还剩:</view>
<view class="time">
<view class="day">{{activityTime.day || ''}}</view>
<block wx:for="{{activityTime.dayList}}" wx:key="index">
<view class="time-box text-center">
{{item}}
</view>
<view class="unit" wx:if="{{index < 2}}"> :</view>
</block>
</view>
</view>
</block>
<block wx:else>
<view class="activity-time">
<view class="finished">{{finished}}</view>
</view>
</block>
</view>
<view class="activity-bg">
<glsx-image webp src="mall/activity.png"></glsx-image>
</view>
</view>
</block>
<view class="goods-info box">
<block wx:if="{{!isActivity}}">
<view class="price">
<view class="now">
<text class="unit">¥</text>
<block wx:if="{{activeSku}}">
{{goodsInfo.skuPrice}}
<text class="unit up">起</text>
</block>
<block wx:else>
{{goodsInfo.retailPrice}}
<block wx:if="{{goodsInfo.unit}}">
<text class="unit">{{goodsInfo.unit}}</text>
</block>
</block>
</view>
<view class="old">¥{{goodsInfo.originalPrice}}</view>
</view>
</block>
<view class="flex">
<view class="name"> {{isActivity?goodsInfo.activityName:goodsInfo.goodsName}}
</view>
<view class="share" bindtap="sharePoster">
<text>分享</text>
<view class="share-icon">
<glsx-image src="mall/share.png"></glsx-image>
</view>
</view>
</view>
<block wx:if="{{!isActivity}}">
<view class="count">
<view>剩余: {{goodsInfo.goodsStock || goodsInfo.specificationDetailList[0].stock || 0}}</view>
<view>销售: {{goodsInfo.goodsStatistics.saleAmount || 0}}</view>
</view>
</block>
</view>
<view class="goods-param box">
<block wx:if="{{!isActivity}}">
<block wx:if="{{couponData.length>0}}">
<view class="item" bindtap="showCouponFun">
<view class="label">优惠</view>
<view class="value coupon">优惠券</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</block>
</block>
<block wx:if="{{activeSku}}">
<view class="item" bindtap="showSkuFun">
<view class="label">已选</view>
<view class="value text-hide">{{activeSku}}</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</block>
<block wx:if="{{goodsInfo.deliveryType != 1}}">
<view class="item address" bindtap="jump" data-url="/packageMine/pages/address/index/index" data-is-choose-address>
<view class="label">配送</view>
<view class="value text-hide">
<block wx:if="{{addressFlag}}">
{{contactAddress||'填写地址'}}
</block>
</view>
<view class="tips">支付后,预计48小时内发货</view>
<view class="sprite-icon icon-mine-arrow"></view>
</view>
</block>
<block wx:if="{{goodsInfo.deliveryType != 1}}">
<view class="item">
<view class="label">运费</view>
<view class="value text-hide">
<block wx:if="{{goodsInfo.expressFee}}">{{goodsInfo.expressFee}}元</block>
<block wx:else>免运费(请以提交订单时为准)</block>
</view>
</view>
</block>
<block wx:if="{{isActivity && goodsInfo.limitPurchaseFlag == 2}}">
<view class="item">
<view class="label">说明</view>
<view class="value text-hide">
<text>此商品活动期间每人限购{{goodsInfo.limitPurchaseNumber}}件</text>
</view>
</view>
</block>
<block wx:if="{{goodsInfo.serviceDesc}}">
<view class="items">
<view class="labels">服务说明</view>
<view class="values">
<text>{{goodsInfo.serviceDesc}}</text>
</view>
</view>
</block>
</view>
<view class="activity-detail">
<block wx:if="{{isActivity}}">
<view class="title">
<view class="sprite-icon icon-goods-time"></view>
活动时间
</view>
<view class="content detail-time">
{{goodsInfo.startTime}} - {{goodsInfo.endTime}}
</view>
<view class="title">
<view class="sprite-icon icon-goods-text"></view>
活动详情
</view>
</block>
<block wx:for="{{goodsInfo.goodsDescList}}" wx:key="index">
<view class="content">
<block wx:if="{{item.resType == 1}}">
<image webp src="{{item.content}}" mode="widthFix" bindtap="previewImage" data-current="{{item.content}}" data-item="{{goodsInfo.goodsDescList}}" lazy-load></image>
</block>
<block wx:elif="{{item.resType == 2}}">
{{item.content}}
</block>
<block wx:else>
<video src="{{item.content}}" style="height:{{item.height}}px;"></video>
</block>
</view>
</block>
</view>
</view>
</block>
<coupon-goods show="{{showCoupon}}" only="{{only}}" couponData="{{couponData}}" bindclick="showCouponFun"></coupon-goods>
<block wx:if="{{navHeight && goodsFlag}}">
<goods-action pay-disabled="{{goodsInfo.activityStatus != 2 }}" stock="{{goodsInfo.goodsStock === 0}}" buyFlag="{{goodsInfo.buyFlag == 2}}" bindclick="goodsActionClick" hideShop="{{isActivity}}"></goods-action>
<block wx:if="{{activeSku}}">
<sku show="{{showSku}}" showName="showSku" isActivity="{{isActivity}}" skuData="{{goodsInfo}}" bindpay="pay" bindjoin="join"></sku>
</block>
</block>
<block wx:if="{{showPoster && posterUrl}}">
<view class="model" catchtouchmove="noScroll">
<view class="model-bg" bindtap="hidden"></view>
<view class="poster" bindlongpress='save'>
<image webp src="{{posterUrl}}"></image>
</view>
</view>
</block>
<glsx-privacy appletName="海马刀"></glsx-privacy>
\ No newline at end of file
{
"navigationBarTitleText": "确认订单",
"usingComponents": {
"stepper": "../shoppingCart/components/Stepper/Stepper"
}
}
\ No newline at end of file
/* packageMall/pages/pay/pay.wxss */
@import "../shoppingCart/shoppingCart.scss";
.address-box {
padding: var(--margin) 20rpx;
height: 164rpx;
background-color: #fff;
border-radius: var(--borderRadius);
box-sizing: border-box;
margin-bottom: 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.address-box .left {
width: 580rpx;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
padding-left: 8rpx;
}
.address-box .left .top {
display: flex;
align-items: center;
}
.address-box .default {
width: 120rpx;
height: 40rpx;
font-size: 24rpx;
color: #fff;
background-color: var(--themeColor);
border-radius: 4rpx;
margin: 0 20rpx;
flex-shrink: 0;
}
.address-box .bottom{
color: #B1B1B3;
}
.address-box .phone {
margin-left: auto;
}
.address-box .right {
width: calc(100% - 580rpx);
justify-content: flex-end;
}
.address-box .right .icon {
width: 28rpx;
height: 28rpx;
}
.content-box{
padding-left: 24rpx;
background-color: #fff;
border-radius: 8px;
}
.merchantName{
display: flex;
height: 82rpx;
align-items: center;
padding-right: 24rpx;
border-bottom: 2rpx solid #EFF0F2;
}
.box .item .content .goods-info {
width: 100%;
}
.text .description {
font-size: 24rpx;
margin-top: 4rpx;
color: #B1B1B3;
}
.tips {
box-sizing: border-box;
height: 100rpx;
padding: 0 var(--margin);
border-radius: var(--borderRadius);
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
color: #666;
background-color: #fff;
}
.tips .price {
font-size: 36rpx;
color: var(--btnColor);
font-weight: 500;
}
.goods-action .left {
display: flex;
align-items: center;
justify-content: space-between;
width: calc(100% - 360rpx);
font-size: 24rpx;
}
.goods-action .left .total{
width: auto;
}
.discounts {
margin-top: 24rpx;
position:relative;
}
.discounts .selected {
height: 40rpx;
background: rgba(252, 91, 50, 0.12);
border-radius: 4rpx;
font-size: 24rpx;
font-weight: 500;
color: #8A303A;
line-height: 40rpx;
padding:0 20rpx;
position:absolute;
left:104rpx;
top: 50%;
transform: translate(0, -50%);
}
/*支付成功*/
.modal-container{
background: rgba(0,0,0,0.8000);
z-index: 9999;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.modal-body{
width: 83%;
height: 364rpx;
background: #FFFFFF;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.modal-body .icon{
width: 100rpx;
height: 100rpx;
margin-top: 48rpx;
}
.modal-body .text{
font-size: 32rpx;
font-weight: 500;
color: #2D2D2E;
margin-top: 24rpx;
}
.modal-body .btn{
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1rpx;
border-top: 1rpx solid #e5e5e5;
height: 98rpx;
font-size: 32rpx;
font-weight: 500;
color: #8A303A;
}
.flex_ccc{
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
<view class="layout" style="padding-bottom:{{padding_bottom }}px">
<view class="box">
<block wx:if="{{addressFlag}}">
<block wx:if="{{shopFlag && shopCartFlag}}">
<view class="address-box" bindtap="jump">
<block wx:if="{{contactInfo.contactAddress}}">
<view class="left">
<view class="top">
<view class="name text-hide">{{contactInfo.contactName}}</view>
<block wx:if="{{isDefault}}">
<view class="default text-center">默认地址</view>
</block>
<view class="phone">{{contactInfo.contactPhone}}</view>
</view>
<view class="bottom text-hide">{{contactInfo.contactAddress}}</view>
</view>
</block>
<block wx:else>
选择收货地址
</block>
<view class="right text-center">
<view class="icon">
<glsx-image src="mine/mine-arrow.png"></glsx-image>
</view>
</view>
</view>
</block>
</block>
<view class="content-box">
<view class="merchantName text-hide">
{{merchantName}}
</view>
<block wx:for="{{goodsList}}" wx:key="index">
<view class="item">
<view class="content">
<view class="goods-info">
<view class="preview">
<image webp src="{{item.goodsImage}}"></image>
</view>
<view class="text">
<view class="name">
<view class="text-hide">
{{item.goodsName}}
</view>
<view class="text-hide description">{{item.specificationData || ''}}</view>
</view>
<view class="price-box">
<view class="price">
<text class="unit">¥</text>{{item.retailPrice}}
</view>
<view wx:if="{{!isPay}}">
x{{item.goodsNumber}}
</view>
<stepper wx:if="{{isPay}}" count="{{item.goodsNumber}}" max="{{item.stock}}" data-id="{{isActivity?item.goodsId:item.id}}" bindchange="changeCount" data-index="{{index}}"></stepper>
</view>
</view>
</view>
</view>
</view>
</block>
</view>
<block wx:if="{{expressFee != null}}">
<view class="tips" wx:if="{{shopFlag}}">
运费:
<view class="price">¥{{expressFee}}</view>
</view>
</block>
<block wx:if="{{!isActivity}}">
<block wx:if="{{orderCouponDTO}}">
<view class="tips discounts" bindtap="showCouponFun">
优惠:
<block wx:if="{{orderCouponDTO.isChecked}}">
<view class="selected">已选一张</view>
<view class="price">-¥{{(orderCouponDTO.denomination)/100}}</view>
</block>
<block wx:else>
<view>不使用优惠券</view>
</block>
</view>
</block>
</block>
</view>
</view>
<coupon-goods show="{{showCoupon}}" order="{{1}}" couponData="{{userCouponDTOS}}" bindclick="changeCoupon"></coupon-goods>
<block wx:if="{{addressFlag}}">
<goods-action bindready="goodsActionReady" custom>
<view class="goods-action">
<view class="left">
<view class="radio">
共{{goodsNumber}}件,合计:
</view>
<view class="total">
<view class="price">
<text class="unit">¥</text>{{money|| 0}}
</view>
</view>
</view>
<view class="btn text-center" bindtap="checkOut">结算({{goodsList.length}})</view>
</view>
</goods-action>
</block>
<!-- 支付成功 -->
<view wx:if="{{showSuccessModal}}" class="modal-container flex_ccc">
<view class="modal-body">
<view class="icon">
<glsx-image webp src="equity/return_success.png"></glsx-image>
</view>
<view class="text">支付成功</view>
<view class="btn flex_ccc" catch:tap="closeSuccessModal">我知道了</view>
</view>
</view>
\ No newline at end of file
{
"usingComponents": {
"search-box": "/pages/tab/mall/components/SearchBox/SearchBox",
"goods": "/pages/tab/mall/components/Goods/Goods"
},
"navigationBarTitleText": "商城"
}
\ No newline at end of file
/* packageMall/pages/search/search.wxss */
.box{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: var(--margin) 60rpx;
}
.goods{
width: 252rpx;
padding: 18rpx;
margin-bottom: 18rpx;
background-color: #fff;
}
\ No newline at end of file
<view class="layout">
<view class="sticky">
<search-box bindsearch="search" search-type="2" value="{{value}}"></search-box>
</view>
<view class="box">
<block wx:if="{{flag}}">
<block wx:if="{{searchList.length}}">
<block wx:key="index" wx:for="{{searchList}}">
<view class="goods">
<goods item="{{item}}"></goods>
</view>
</block>
</block>
<block wx:else>
<view class="list-nothing ">
<view class="list-not">没找到相关商品</view>
</view>
</block>
</block>
</view>
</view>
\ No newline at end of file
// components/Stepper/Stepper.js
Component({
/**
* 组件的属性列表
*/
properties: {
count: Number,
min: {
type: Number,
value: 1
},
max: {
type: Number,
value: 99,
observer(n) {
if (n && this.data.count > n) {
this.setData({ count: n })
this.triggerEvent('change', Number(n))
}
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
input(e) {
let { value } = e.detail
let {
max,
} = this.data
if (value > max) value = max
this.setData({ count: value })
},
tap() { },
blur(e) {
let { value } = e.detail
let {
min,
} = this.data
if (value < min) value = min
this.setData({ count: value })
this.triggerEvent('change', Number(value))
},
change(e) {
let {
add
} = e.currentTarget.dataset
let num = add ? 1 : -1
let {
count,
min,
max
} = this.data
if (count == min && !add) return
if (count == max && add) return
count += num
this.triggerEvent('change', Number(count))
}
}
})
\ No newline at end of file
<view class="stepper-box">
<view class="minus count-box text-center {{count == min?'opacity':''}}" catchtap="change"></view>
<input class="num count-box text-center" type="number" catchinput="input" value="{{count}}" catchblur="blur" catchtap="tap" />
<view class="add count-box text-center {{count == max?'opacity':''}}" catchtap="change" data-add>
</view>
</view>
\ No newline at end of file
/* components/Stepper/Stepper.wxss */
@import "/assets/style/common.wxss";
.stepper-box {
display: flex;
align-items: center;
}
.stepper-box .count-box {
width: 52rpx;
height: 52rpx;
background: #F0F0F0;
margin-left: 7rpx;
font-size: 26rpx;
text-align: center;
color: #323233;
font-weight: normal;
position: relative;
}
.stepper-box .count-box.opacity::after ,.stepper-box .count-box.opacity::before{
opacity: .25;
}
.stepper-box .minus {
border-radius: 7rpx 0 0 7rpx;
background: transparent;
}
.stepper-box .num {
width: 59rpx;
}
.stepper-box .add {
border-radius: 0 7rpx 7rpx 0;
background: transparent;
}
.stepper-box .add::before,
.stepper-box .add::after,
.stepper-box .minus::after {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
content: '';
background-color: #2C2C2C;
border-radius: 2rpx;
}
.stepper-box .add::before,.stepper-box .minus::after {
width: 25rpx;
height: 2rpx;
}
.stepper-box .add::after{
width: 2rpx;
height: 25rpx;
}
\ No newline at end of file
Page({
/**
* 页面的初始数据
*/
data: {
goodsList: [],
chooseIndex: null
},
goodsActionReady(e) {
this.setData({
padding_bottom: e.detail
})
},
jump() {
wx.p.router.switchTab('/pages/tab/mall/index')
},
changeCount(e) {
console.log(e)
let count = e.detail
let {
index,
item,
ind
} = e.currentTarget.dataset
if (item.goodsNumber == count) return
let {
chooseIndex
} = this.data
this.setData({
[`goodsList[${index}].list[${ind}].goodsNumber`]: count
})
if (chooseIndex == index) this.cheackAll(index)
wx.p.wxApi.showLoading('正在加载...')
let params = {
id: item.id,
goodsId: item.goodsId,
goodsNumber: count
}
if (item.specificationKey) params.specificationKey = item.specificationKey
wx.p.api.shopmallApi.updateShoppingcart(params).then(res => {
wx.hideLoading()
})
},
choose(e) {
let {
index,
ind
} = e.currentTarget.dataset
let {
goodsList,
chooseIndex
} = this.data
if (chooseIndex != null && chooseIndex != index) return
if (goodsList[index].list[ind].showDel) {
this.hide(e)
return
}
this.setData({
[`goodsList[${index}].list[${ind}].active`]: !goodsList[index].list[ind].active
})
this.cheackAll(index)
},
cheackAll(index) {
let count = 0
let sum = 0
let {
goodsList
} = this.data
let allActive = true
try {
goodsList[index].list.map(e => {
if (!e.active) throw false
})
} catch (error) {
allActive = error
}
goodsList[index].list.map(e => {
if (e.active) {
count += e.goodsNumber
sum += e.retailPrice * e.goodsNumber
}
})
this.setData({
[`goodsList[${index}].active`]: allActive,
count,
sum: sum == 0 ? 0 : Number(sum).toFixed(2),
chooseIndex: count == 0 ? null : index
})
},
chooseAll(e) {
let {
index
} = e.currentTarget.dataset
let {
goodsList,
chooseIndex
} = this.data
if (chooseIndex != null && chooseIndex != index) return
let all = true
try {
goodsList[index].list.map(i => {
if (!i.active) throw false
})
} catch (error) {
goodsList[index].list.map(i => (i.active = true))
all = error
}
if (all) goodsList[index].list.map(i => (i.active = false))
this.setData({
goodsList
})
this.cheackAll(index)
},
checkOut() {
let {
chooseIndex,
goodsList
} = this.data
let {
list,
payeeMerchantName,
} = goodsList[chooseIndex]
let data = []
list.map(e => (e.active ? data.push(e) : ''))
wx.p.router.go('/packageMall/pages/pay/pay', {
goodsList: data,
merchantName: payeeMerchantName
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getShoppingcartList()
},
getShoppingcartList() {
wx.p.wxApi.showLoading('加载中...')
let para = {
cartType: 1
}
wx.p.api.shopmallApi
.getShoppingcartList(para)
.then(data => {
data.map(e => {
e.list.map(i => (i.retailPrice = Number(i.retailPrice).toFixed(2)))
})
this.setData({
goodsList: data,
shoppingcartFlag: true,
count: 0,
sum: 0,
chooseIndex: null
})
wx.hideLoading()
})
.catch(() => {
this.setData({
shoppingcartFlag: true
})
})
},
del(e) {
wx.p.wxApi.showLoading('请稍后...')
let {
id
} = e.target.dataset
let para = {
cartType: 1,
id
}
wx.p.api.shopmallApi.delShoppingcart(para).then(res => {
wx.p.wxApi.showToast('删除成功')
// wx.$Track.setTrack({
// id,
// type: '购物车移除商品'
// },
// 7
// )
setTimeout(() => {
this.getShoppingcartList()
}, 1.5 * 1000)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
hide(e) {
let {
goodsList
} = this.data
let {
index,
ind
} = e.currentTarget.dataset
if (goodsList[index].list[ind].showDel)
this.setData({
[`goodsList[${index}].list[${ind}].showDel`]: false
})
},
start(e) {
let cell = e.changedTouches[0]
this.startX = cell.clientX
this.startY = cell.clientY
},
move(e) {
let {
startX,
startY
} = this
let {
index,
ind
} = e.currentTarget.dataset
let {
clientX,
clientY
} = e.changedTouches[0]
let X = clientX - startX
let Y = clientY - startY
let angle = (360 * Math.atan(Y / X)) / (2 * Math.PI)
let result = clientX < startX
if (Math.abs(angle) > 30) return
this.setData({
[`goodsList[${index}].list[${ind}].showDel`]: result
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "购物车",
"usingComponents": {
"stepper": "./components/Stepper/Stepper"
}
}
\ No newline at end of file
/* packageMall/pages/shoppingCart/shoppingCart.wxss */
.nothing-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: #fff;
}
.nothing {
padding-top: 140rpx;
text-align: center;
color: #B1B1B3;
}
.nothing .icon {
margin: 0 auto 8rpx;
width: 322rpx;
height: 320rpx;
}
.nothing .btn {
margin: 64rpx auto 0;
width: 332rpx;
height: 88rpx;
border-radius: 8rpx;
border: 2rpx solid #B1B1B3;
color: #656566;
font-size: 32rpx;
}
.box {
padding: 24rpx var(--margin);
}
.item-box {
margin-bottom: 24rpx;
background: #FFFFFF;
border-radius: 8rpx;
padding-left: 24rpx;
}
.item-box.disabled {
opacity: .5;
}
.item-box .top {
height: 80rpx;
display: flex;
align-items: center;
padding-right: 24rpx;
}
.item-box .top .icon {
margin-right: 18rpx;
}
.item-box .top .name {
width: calc(100% - 50rpx);
}
.item-box .list {
border-top: 2rpx solid #EFF0F2;
}
.box .item {
width: 100%;
height: 208rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin-bottom: 24rpx;
overflow: hidden;
display: flex;
justify-content: space-between;
position: relative;
}
.box .item .content {
width: 100%;
padding-right: 24rpx;
box-sizing: border-box;
transition: all .5s;
transform: translateX(112rpx);
margin-left: -112rpx;
position: relative;
display: flex;
align-items: center;
}
.box .item .content .icon,
.box .item .content .goods-info .preview {
margin-right: 20rpx;
}
.box .item .content .goods-info {
width: calc(100% - 60rpx);
display: flex;
align-items: center;
}
.box .item .content .goods-info .preview {
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
overflow: hidden;
}
.box .item .content .goods-info .text {
width: calc(100% - 180rpx);
height: 160rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.box .item .content .goods-info .text .price-box {
display: flex;
align-items: baseline;
justify-content: space-between;
}
.box .item .content .goods-info .text .price-box .price {
color: var(--btnColor);
font-size: 36rpx;
display: flex;
align-items: baseline;
font-weight: 500;
}
.box .item .content .goods-info .text .price-box .price .unit {
font-size: 24rpx;
}
.box .item .del {
width: 112rpx;
height: 100%;
background: var(--themeColor);
transform: translateX(112rpx);
transition: all .5s;
color: #fff;
}
.box .touch-move-active .content,
.box .touch-move-active .del {
transform: translateX(0);
}
.goods-action {
padding: 10rpx var(--margin);
box-sizing: border-box;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.goods-action .btn {
width: 332rpx;
height: 80rpx;
color: #FFFFFF;
background: var(--btnColor);
border-radius: var(--borderRadius);
font-weight: 500;
padding: 0 !important;
margin: 0 !important;
font-size: 28rpx;
&[disabled]:not([type]) {
background: #CCCED1 !important;
border-color: #CCCED1 !important;
color: #fff !important;
box-shadow: none;
}
}
.goods-action .total {
width: calc(100% - 360rpx);
font-size: 24rpx;
display: flex;
align-items: baseline;
}
.goods-action .total .price {
color: var(--btnColor);
font-size: 40rpx;
display: flex;
align-items: baseline;
font-weight: 500;
}
.goods-action .total .price .unit {
font-size: 24rpx;
}
.specification {
font-size: 24rpx;
color: #B1B1B3;
}
\ No newline at end of file
<view class="layout" style="padding-bottom:{{padding_bottom }}px">
<block wx:if="{{shoppingcartFlag}}">
<block wx:if="{{!goodsList.length}}">
<view class="nothing-box">
<view class="nothing">
<view class="icon">
<glsx-image webp src="mall/shoppingcart.png" />
</view>
购物车还是空的
<view class="btn text-center" bindtap="jump">随便看看</view>
</view>
</view>
</block>
<block wx:else>
<view class="box">
<block wx:for="{{goodsList}}" wx:key="index">
<view class="item-box {{chooseIndex != null && chooseIndex != index?'disabled':''}}">
<view class="top" catchtap="chooseAll" data-index="{{index}}" >
<view class="icon text-center">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#8A303A':'#B1B1B3'}}" size="20">
</icon>
</view>
<view class="name text-hide">
{{item.payeeMerchantName}}
</view>
</view>
<view class="list">
<block wx:for="{{item.list}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="item {{i.showDel?'touch-move-active':''}}" data-index="{{index}}" data-ind="{{ind}}"
bindtouchstart="start" bindtouchmove="move">
<view class="content" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}">
<view class="icon">
<icon type="{{i.active?'success':'circle'}}" color="{{i.active?'#8A303A':'#B1B1B3'}}" size="20">
</icon>
</view>
<view class="goods-info">
<view class="preview">
<image webp src="{{i.goodsImage}}"></image>
</view>
<view class="text">
<view class="text-hide">{{i.goodsName}}</view>
<view class="specification" wx:if="{{i.specificationData}}">{{i.specificationData}}</view>
<view class="price-box">
<view class="price">
<text class="unit">¥</text>{{i.retailPrice || 0}}
</view>
<stepper count="{{i.goodsNumber}}" max="{{i.goodsStock}}" catchchange="changeCount"
data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}"></stepper>
</view>
</view>
</view>
</view>
<view class="del text-center" catchtap="del" data-id="{{i.id}}">删除</view>
</view>
</block>
</view>
</view>
</block>
</view>
</block>
</block>
</view>
<block wx:if="{{goodsList.length}}">
<goods-action bindready="goodsActionReady" custom>
<view class="goods-action">
<view class="total">合计:
<view class="price">
<text class="unit">¥</text>{{sum||0}}
</view>
</view>
<button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count||0}})</button>
</view>
</goods-action>
</block>
\ No newline at end of file
......@@ -8,7 +8,10 @@ Page({
isAgree: false,
mobile: '',
captcha: '',
count: 0
count: 0,
showChooseSource: false,
showEnableWallet: false,
showEnableSuccess: false
},
changeLoginType() {
const {
......@@ -173,6 +176,26 @@ Page({
})
},
// 选择积分来源
pointSourceEvent() {
},
// 关闭开通积分钱包弹窗
closeWallet() {
this.setData({ showEnableWallet: false })
},
// 一键开通积分钱包
enableWalletConfirm() {
},
// 开通成功
successConfirm() {
},
back() {
wx.p.router.back()
}
......
{
"usingComponents": {},
"usingComponents": {
"points-source": "./components/PointsSource/PointsSource",
"enable-wallet": "./components/EnableWallet/EnableWallet",
"enable-success": "./components/EnableSuccess/EnableSuccess"
},
"navigationStyle": "custom"
}
\ No newline at end of file
<view class="layout">
<view class="login-bg x-center">
<view class="bg-top">
<glsx-image src="login/login-bg.png"></glsx-image>
</view>
<navigation-bar navStyle="background:transparent;" custom page-title="登录">
<view class="nav-bar flex">
<view class="back flex" bindtap="back">
<view class="icon">
<glsx-image src="login/login-back.png"></glsx-image>
</view>
</view>
登录
</view>
</navigation-bar>
<navigation-bar navStyle="background:transparent;" showBack page-title="登录"><text class="page-title">登录</text></navigation-bar>
<view class="content" style="margin-top: {{navHeight}}px;">
<block wx:if="{{loginType==0}}">
<view class="h1">
欢迎使用
<view class="logo">
<glsx-image src="login/logo.png"></glsx-image>
</view>
<view class="h1">您好</view>
<view class="h2">
欢迎使用积分商城小程序
</view>
<view class="login-img">
<glsx-image src="login/login-img.png"></glsx-image>
</view>
<view class="wx-box">
<block wx:if="{{!isAgree}}">
<button class="wx-auth-button text-center {{isAgree}}" bindtap="showTips">登录</button>
<button class="wx-auth-button text-center {{isAgree}}" bindtap="showTips">微信登录</button>
</block>
<block wx:else>
<button open-type="getPhoneNumber" catchgetphonenumber="getPhoneNumber" class="wx-auth-button text-center">登录</button>
<button open-type="getPhoneNumber" catchgetphonenumber="getPhoneNumber" class="wx-auth-button text-center">微信登录</button>
</block>
</view>
</block>
......@@ -38,31 +30,37 @@
<input maxlength="11" type="number" adjust-position="{{false}}" placeholder-class="placeholderClass" placeholder="填写手机号" bindinput="input" data-name="mobile" class="input" value="{{mobile}}" />
</view>
<view class="login-item flex">
<input maxlength="4" type="number" adjust-position="{{false}}" placeholder-class="placeholderClass" placeholder="填写验证码" bindinput="input" data-name="captcha" class="input" value="{{captcha}}" />
<input maxlength="4" type="number" adjust-position="{{false}}" placeholder-class="placeholderClass" placeholder="填写验证码" bindinput="input" data-name="captcha" class="input" value="{{captcha}}" />
<button disabled="{{!mobile}}" class="code-btn" bindtap="getSmsCode">{{count? count + 's':'获取验证码'}}</button>
</view>
</view>
<button class="wx-auth-button text-center" bindtap="phoneLogin">登录</button>
</block>
<view class="type-box flex">
<view class="title" bindtap="changeLoginType">
{{loginType==0?'手机号登录':'微信登录'}}
<view class="title">
其他方式
</view>
<!-- <view class="type" bindtap="changeLoginType">
<view class="type" bindtap="changeLoginType">
<view class="icon">
<glsx-image src="common/{{loginType == 0?'phone':'wx'}}.png"></glsx-image>
<glsx-image src="login/{{loginType == 0?'phone':'wx'}}.png"></glsx-image>
</view>
{{loginType == 0?'手机号':'微信登录'}}
</view> -->
</view>
</view>
<view class="tips text-center" bindtap="handleChangeAgree">
<view class="check {{isAgree}}">
<glsx-image src="login/check.png" class="icon"></glsx-image>
</view>
阅读并同意以下协议
我已阅读并同意
<text class="txt-orange" catchtap="handleAgree" data-name="privacy">《隐私协议》</text>
<text class="txt-orange" catchtap="handleAgree" data-name="agreement">《服务使用协议》</text>
</view>
</view>
</view>
<glsx-privacy appletName="海马刀"></glsx-privacy>
\ No newline at end of file
<glsx-privacy appletName="积分商城"></glsx-privacy>
<!-- 积分来源选择 -->
<points-source show="{{showChooseSource}}" bindconfirm="pointSourceEvent"></points-source>
<!-- 开通钱包 -->
<enable-wallet show="{{showEnableWallet}}" bindclose="closeWallet" bindconfirm="enableWalletConfirm"></enable-wallet>
<!-- 钱包开通成功 -->
<enable-success show="{{showEnableSuccess}}" bindconfirm="successConfirm"></enable-success>
\ No newline at end of file
/* pages/login/login.wxss */
.login-bg {
position: fixed;
z-index: -2;
width: 1350rpx;
height: 1664rpx;
top: -60rpx;
page{
background-color: #FAFBFF !important;
}
.layout::before{
.bg-top {
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 600rpx;
background-image: linear-gradient(0deg, #0a030300 22%, #0A0303 100%);
z-index: -1;
content: '';
}
.layout::after {
position: fixed;
width: 100%;
height: 974rpx;
top: 0;
left: 0;
bottom: 0;
width: 100vw;
height: 400rpx;
transform: scaleY(-1);
background-image: linear-gradient(0deg, #0a030300 22%, #0A0303 90%);
z-index: -1;
content: '';
animation: opacity .25s forwards;
}
.nav-bar {
height: 100%;
position: relative;
.page-title {
color: #2D2D2E;
font-weight: 600;
font-size: 34rpx;
color: #FFFFFF;
justify-content: center;
}
.nav-bar .back {
height: 100%;
justify-content: center;
padding: 0 40rpx;
position: absolute;
top: 0;
left: 0;
}
.nav-bar .back .icon {
width: 16rpx;
height: 28rpx;
}
@keyframes opacity {
0% {
opacity: 0;
......@@ -66,35 +28,37 @@
.h1 {
padding: 20rpx 0;
font-size: 44rpx;
color: #fff;
text-align: center;
margin: 0 0 24rpx 80rpx;
padding-top: 90rpx;
font-size: 60rpx;
color: #323436;
font-weight: 600;
}
.h2 {
margin: 0 0 60rpx 80rpx;
font-size: 44rpx;
color: #323436;
}
.h1 .logo {
width: 402rpx;
height: 144rpx;
margin: 44rpx auto 0;
.login-img {
width: 468rpx;
height: 468rpx;
margin: 60rpx auto;
}
.h3 {
font-weight: 500;
font-size: 44rpx;
color: #fff;
padding: 146rpx 106rpx 0;
}
.wx-box {
margin: 472rpx auto 0;
color: #323436;
padding: 176rpx 0 0 106rpx;
}
.wx-auth-button {
width: 590rpx !important;
height: 96rpx;
background: var(--btnColor);
border-radius: 16rpx;
background: #FB8A32;
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
......@@ -106,6 +70,7 @@
border-color: #CCCED1 !important;
color: #fff !important;
box-shadow: none;
}
.wx-auth-button[disabled]:not([type])::after {
......@@ -115,8 +80,8 @@
.type-box {
flex-direction: column;
margin-top: 33rpx;
font-size: 28rpx;
color: #fff;
font-size: 24rpx;
color: #8A8C90;
}
.type .icon {
......@@ -127,7 +92,7 @@
.tips {
font-size: 24rpx;
color: #C9C9C9;
color: #858A94;
position: fixed;
bottom: 56rpx;
left: 0;
......@@ -140,13 +105,13 @@
height: 24rpx;
box-sizing: border-box;
border-radius: 100%;
border: 2rpx solid #fff;
border: 2rpx solid #FB8A32;
margin-right: 8rpx;
position: relative;
}
.tips .check.true {
border-color: var(--btnColor);
border-color: #FB8A32;
}
.tips .check .icon {
......@@ -161,7 +126,7 @@
.txt-orange {
color: #fff;
color: #5092FF;
}
......@@ -179,7 +144,6 @@
.login-item .input {
flex: 1;
color: #fff;
}
.placeholderClass {
......@@ -188,19 +152,16 @@
.code-btn {
font-size: 24rpx;
color: #fff;
color: #5092FF;
flex-shrink: 0;
margin-left: auto;
padding: 8rpx 16rpx !important;
padding: 0 !important;
width: fit-content !important;
background-color: #AA656B;
font-weight: 400;
}
.code-btn[disabled]:not([type]) {
background-color: #8A8C90;
color: #fff;
.code-btn[disabled]:not([type]){
background-color: transparent;
}
.code-btn::after {
display: none;
}
\ No newline at end of file
// pages/Login/components/EnableSuccess/EnableSuccess.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
confirm() {
this.triggerEvent('confirm')
}
}
})
\ No newline at end of file
/* pages/Login/components/EnableSuccess/EnableSuccess.wxss */
.success {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
z-index: 9;
.success-bg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .6);
}
.success-content {
position: absolute;
width: calc(100% - 208rpx);
height: 578rpx;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
.content-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
.content-box {
position: absolute;
z-index: 2;
margin-top: 226rpx;
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
.success-text {
font-size: 48rpx;
font-weight: 700;
color: #FB8A32;
margin-bottom: 20rpx;
}
.success-tips {
line-height: 50rpx;
}
.success-btn {
width: 352rpx;
height: 96rpx;
background-image: linear-gradient(119deg, #FFB14E 11%, #FB8A32 96%);
box-shadow: 0 12rpx 12rpx 4rpx #fb8a321a;
border-radius: 48rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
font-size: 32rpx;
font-weight: 500;
margin-top: 24rpx;
}
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!