Commit 74c7b841 by 赵雅纹

Merge branch 'feature-zyw-sc' into 'dev_7.1.0'

Feature zyw sc

See merge request !62
parents b978acbf 4ccb786a
......@@ -31,7 +31,8 @@
"pages/refundDetail/refundDetail",
"pages/refund/refund",
"pages/orderDetail/orderDetail",
"pages/logistics/logistics"
"pages/logistics/logistics",
"pages/extendProduct/extendProduct"
],
"subPackages": [
{
......
// pages/extendProduct/extendProduct.js
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 0,
isAllSelect: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
//滑动切换
swiperTab: function (e) {
const { current } = e.detail
if (this.data.currentTab == current) {
return false;
} else {
this.setData({
currentTab: current
})
}
// 可使用
if (current == 0) {
// this.getCouponList(1, 10, 1)
} else if (current == 1) {
// 失效
// this.getCouponList(1, 10, 0)
}
},
// 点击切换
clickTab: function (e) {
const { current } = e.target.dataset
if (this.data.currentTab == current) {
return false;
} else {
this.setData({
currentTab: current,
// couponList: [], // 清空数据
// invalidCouponList: [],
})
}
// 可使用
if (current == 0) {
// this.getCouponList(1, 10, 1)
} else if (current == 1) {
// 失效
// this.getCouponList(1, 10, 0)
}
},
//全选
allSelect() {
this.setData({
isAllSelect: !this.data.isAllSelect
})
if (this.data.isAllSelect) {
this.setData({
cartList: this.data.cartList.map((item) => {
item.isSelect = true
return item
})
})
} else {
this.setData({
cartList: this.data.cartList.map((item) => {
item.isSelect = false
return item
})
})
}
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "推广商品",
"usingComponents": {}
}
\ No newline at end of file
<!--pages/extendProduct/extendProduct.wxml-->
<view class='page-extend-product'>
<view class="swiper-tab">
<view class="swiper-tab-item {{currentTab==0 ? 'active' : ''}}" data-current="0" bindtap="clickTab">
推广商品
<view class="line" wx-if="{{currentTab==0}}"></view>
</view>
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}" data-current="1" bindtap="clickTab">我的推广
<view class="line" wx-if="{{currentTab==1}}"></view>
</view>
</view>
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<view class="extend-img">
<image mode="widthFix"></image>
</view>
<view class="pro-nav-wrap">
<view class="nav-list">
<view class="nav-item nav-active">推荐</view>
<view class="nav-item">最新</view>
<view class="nav-item">最热</view>
<view class="nav-item">价格</view>
</view>
<view class="select-radio all-radio" bindtap="allSelect">
<text class="all" >全选</text>
<view class="{{isAllSelect ? 'theme-color' : ''}} circle-radio " >
<image wx:if="{{isAllSelect}}" class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="buy-product-wrap">
<view class="buy-product-content">
<view class="buy-list">
<view class="prod-img">
<image src="/assets/imgs/avatar.png"></image>
</view>
<view class="prod-info">
<view class="prod-name">商品名称商品名称商品名称商品名称商品名称</view>
<view class="hongbao">
<button class="btn btn-primary">预计赚5元红包</button>
</view>
</view>
<view class="select-radio pro-radio" catchtap="selectPro" data-index="{{index}}">
<view class="{{item.isSelect ? 'theme-color' : ''}} circle-radio" >
<image wx:if="{{item.isSelect}}" class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="buy-list">
<view class="prod-img">
<image src="/assets/imgs/avatar.png"></image>
</view>
<view class="prod-info">
<view class="prod-name">商品名称商品名称商品名称商品名称商品名称</view>
<view class="hongbao">
<button class="btn btn-primary">预计赚5元红包</button>
</view>
</view>
<view class="select-radio pro-radio" catchtap="selectPro" data-index="{{index}}">
<view class="{{item.isSelect ? 'theme-color' : ''}} circle-radio" >
<image wx:if="{{item.isSelect}}" class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
</view>
</view>
</view>
</view>
</view>
<view class="share-wrap">
<view class="share-button">
<image mode="widthFix"></image>
<text>快速分享</text>
</view>
<view class="share-button">
<image mode="widthFix"></image>
<text>生成卡片</text>
</view>
</view>
</swiper-item>
<swiper-item>
<view>222222</view>
</swiper-item>
</swiper>
</view>
/* pages/extendProduct/extendProduct.wxss */
@import './../../base/base.wxss';
page{
background: #ffffff;
}
scroll-view{
height: 100%;
}
.page-extend-product{
position: relative;
}
.swiper-tab{
width: 100%;
height: 60rpx;
display: flex;
background-color: #ffffff;
color: #000000;
position:fixed;
z-index:1;
justify-content: space-around;
padding-top: 32rpx;
}
.swiper-tab-item{
text-align: center;
font-size: 26rpx;
}
.active{
color: #C09A74;
}
.line{
width: 60rpx;
height: 5rpx;
margin: 0 auto;
background-color: #C09A74;
margin-top: 8rpx;
border-radius: 8rpx;
}
swiper {
width: 100%;
flex: 1;
height:100vh;
/* padding-bottom:20rpx; */
position: absolute;
overflow: scroll;
top: 92rpx;
}
.extend-img image{
width: 750rpx;
height: 174rpx;
background-color: #C09A74;
}
.all-radio{
display: flex;
align-items: center;
}
.all{
margin-right: 26rpx;
font-size: 24rpx;
color: #333333;
}
.tick-success{
width: 18rpx;
}
.circle-radio{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 1rpx solid rgba(0, 0, 0, 0.2);
line-height: 26rpx;
text-align: center;
}
.pro-nav-wrap{
padding: 16rpx 54rpx 16rpx 30rpx;
display: flex;
justify-content: space-between;
}
.nav-list{
display: flex;
}
.nav-item{
margin-right: 50rpx;
font-size: 24rpx;
color: #787878;
}
.nav-active{
color: #c09a74;
}
.buy-product-wrap{
padding: 0 20rpx;
}
.buy-product-content{
width: 710rpx;
}
.buy-list{
width: 100%;
border-radius: 10rpx;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
display: flex;
margin-bottom: 25rpx;
}
.prod-img{
height: 200rpx;
}
.prod-img image{
width: 200rpx;
height: 200rpx;
border-top-left-radius: 10rpx;
border-bottom-left-radius: 10rpx;
}
.prod-info{
padding: 31rpx 15rpx 39rpx 35rpx;
}
.prod-name{
font-size: 26rpx;
width: 394rpx;
}
.hongbao{
margin-top: 22rpx;
}
.hongbao button{
width: 143rpx;
height: 40rpx;
border-radius: 5rpx;
line-height: 36rpx;
font-size: 18rpx;
}
.pro-radio{
margin-top: 88rpx;
}
.share-wrap{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
background-color: #ffffff;
display: flex;
justify-content: space-around;
height: 88rpx;
line-height: 88rpx;
}
.share-button image{
width: 18rpx;
height: 18rpx;
}
<view class='page-want-buy'>
<view class="swiper-tab">
<view class="swiper-tab-item" data-current="0" bindtap="clickTab">
<view class="swiper-tab-item {{currentTab==0 ? 'active' : ''}}" data-current="0" bindtap="clickTab">
分享订单
<view class="line" wx-if="{{currentTab==0}}"></view>
</view>
<view class="swiper-tab-item" data-current="1" bindtap="clickTab">分享会员
<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}" data-current="1" bindtap="clickTab">分享会员
<view class="line" wx-if="{{currentTab==1}}"></view>
</view>
<view class="swiper-tab-item" data-current="2" bindtap="clickTab">发现分享
<view class="swiper-tab-item {{currentTab==2 ? 'active' : ''}}" data-current="2" bindtap="clickTab">发现分享
<view class="line" wx-if="{{currentTab==2}}"></view>
</view>
</view>
......
......@@ -24,11 +24,9 @@ scroll-view{
text-align: center;
font-size: 26rpx;
}
/* .active{
.active{
color: #C09A74;
border-bottom: 5rpx solid #C09A74;
} */
}
.line{
width: 60rpx;
height: 5rpx;
......
......@@ -70,9 +70,9 @@ swiper {
}
.buy-list{
width: 100%;
border-radius: 10px;
border-radius: 10rpx;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
display: flex;
margin-bottom: 20rpx;
}
......@@ -82,6 +82,8 @@ swiper {
.prod-img image{
width: 220rpx;
height: 220rpx;
border-top-left-radius: 10rpx;
border-bottom-left-radius: 10rpx;
}
.prod-info{
padding: 31rpx 26rpx 39rpx 24rpx;
......
......@@ -218,6 +218,13 @@
},
{
"id": -1,
"name": "推广商品",
"pathName": "pages/extendProduct/extendProduct",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的发布",
"pathName": "subPackage/page/pages/myRelease/myRelease",
"query": "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment