Commit 1171161e by 赵雅纹

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

分享和种草

See merge request !38
parents c5133843 ef33f9df
......@@ -13,7 +13,10 @@
"pages/IntegralMall/IntegralMall",
"pages/integralMallDetail/integralMallDetail",
"pages/activateCard/activateCardCallback",
"component/bottom/bottom"
"component/bottom/bottom",
"pages/wantToBuyDetail/wantToBuyDetail",
"component/buyImageSwiper/buyImageSwiper",
"pages/myShare/myShare"
],
"subPackages": [
{
......
// component/imageSwiper/imageSwiper.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
Component({
/**
* 组件的属性列表
*/
properties: {
imageData: {
type: Array,
value: [],
},
},
attached() {
this.setData({
baseImgUrl: app.globalData.imageUrl
})
},
/**
* 组件的初始数据
*/
data: {
imgUrls: [],
indicatorDots: false,
autoplay: true,
circular: true,
interval: 3000,
duration: 1000,
isAuthorization: false, // false 不显示 true 显示
baseImgUrl: '',
swiperCurrent:0
},
/**
* 组件的方法列表
*/
methods: {
preview(e) {
const { appid, path, link, item } = e.currentTarget.dataset
// 获取当前帐号信息
const userInfo = wx.getStorageSync('_baseUserInfo')
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if (link.type == 1) {
// 触发父组件更新页面 外部小程序
this.setData({
isAuthorization: false
})
return false
} else if (!userInfo) {
this.setData({
isAuthorization: true
})
return false
} else if (userInfo && userInfo.member && !userInfo.member.mobile) {
wxService.openCard()
return false
}
if (link.type == 2) {
// 触发父组件更新页面
wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
})
} else if (link.type == 3) {
// 预览
wx.previewImage({
current: `${app.globalData.imageUrl}/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`${app.globalData.imageUrl}/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if (link.type == 4) {
wxService.router(`${currentClickType}`)
} else if (link.type == 5) {
if (currentClickType == 1) {
// wxService.openCardList()
wxService.openCard()
} else if (currentClickType == 2) {
wxService.openCard()
}
} else if (link.type == 6) {
wxService.router(`${currentClickType}`)
}
},
swiperChange(e){
console.log(e)
this.setData({
swiperCurrent: e.detail.current
})
}
}
})
{
"usingComponents": {}
}
\ No newline at end of file
<!--component/buyImageSwiper/buyImageSwiper.wxml-->
<view class="image-wrap">
<swiper
indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}"
interval="{{interval}}"
duration="{{duration}}"
circular="{{circular}}"
class="image-swiper"
bindchange="swiperChange"
>
<block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-item class="swiper-item">
<image wx:if="{{baseImgUrl}}" src="{{baseImgUrl}}{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindtap='preview' class="slide-image" />
</swiper-item>
</block>
</swiper>
<view class="dots">
<block wx:for="{{imageData}}" wx:key="index">
<view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view>
</block>
</view>
</view>
/* component/buyImageSwiper/buyImageSwiper.wxss */
.image-swiper{
height: 425.15rpx;
top: 20rpx;
}
.image-wrap{
position: relative;
width: 100%;
height: 500rpx;
}
.swiper-item{
height: 374rpx;
}
.slide-image {
width: 100%;
height: 100%;
}
.dots{
position: absolute;
left: 0;
right: 0;
top: 460rpx;
display: flex;
justify-content: center;
}
.dots .dot{
margin: 0 8rpx;
width: 10rpx;
height: 10rpx;
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.25);
transition: all .6s;
}
.dots .dot.active{
width: 22rpx;
height: 10rpx;
background: #C09A74;
border-radius: 20rpx;
}
\ No newline at end of file
// component/waterFlowLayout/waterFlowLayout.js
Component({
/**
* 组件的属性列表
*/
properties: {
imageData: {
type: Array,
value: [],
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/waterFlowLayout/waterFlowLayout.wxml-->
<view class="water-wrap">
<view class="left">
<block wx:for="{{imageData}}" wx:key="">
<template is="water-list" data="{{...item}}" wx:if="{{index%2==0}}"></template>
</block>
</view>
<view class="right">
<block wx:for="{{imageData}}" wx:key="">
<template is="water-list" data="{{...item}}" wx:if="{{index%2==1}}"></template>
</block>
</view>
</view>
<template name="water-list">
<view class="item">
<image class="item-img" src="{{url}}" mode="widthFix"></image>
<view class="item-title-box">
<view class="item-title">{{title}}</view>
</view>
<view class="share-wrap">
<view class="share-oprate">
<image class="share-img" src="/assets/imgs/heart-default.png"></image>
<text class="share-number">689</text>
</view> <view class="share-oprate">
<image class="share-img" src="/assets/imgs/share.png"></image>
<text class="share-number">298</text>
</view>
</view>
</view>
</template>
/* component/waterFlowLayout/waterFlowLayout.wxss */
page{
background-color: rgba(0,0,0,0.05)
}
.water-wrap{
margin: 20rpx 20rpx;
text-align: justify;
}
.item{
margin-bottom: 10rpx;
display: inline-block;
width: 349.86rpx;
border-radius: 10rpx;
box-shadow: 0px 2px 5px 0px rgba(199, 199, 199, 0.5);
}
.item-ava{
width: 40rpx;
height: 40rpx;
border-radius: 20rpx;
}
.heart{
width: 30rpx;
height: 26rpx;
margin-right: 8rpx;
}
.heart_{
display: flex;
align-items: center;
}
.item-img{
width: 100%;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.item-title{
font-size: 30rpx;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
font-family: 'PingFang SC-Medium';
color: #232220;
margin: 15rpx;
}
.item .name{
display: flex;
padding: 0 15rpx;
margin-top: 20rpx;
padding-bottom: 10rpx;
align-items: center;
font-size: 22rpx;
color: #1e1e1e;
font-family: 'PingFang SC-Medium';
}
.share-wrap{
display: flex;
justify-content: space-between;
padding: 10rpx;
}
.share-img{
width: 20rpx;
height: 20rpx;
}
.share-number{
font-size: 24rpx;
color: #999999;
margin-left: 10rpx;
}
.left,.right{
display: inline-block;
vertical-align: top;
width: 49%;
}
.right{
float: right;
}
\ No newline at end of file
// pages/coupons.js
const app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
wxService.page({
/**
* 页面的初始数据
*/
data: {
imageData: [
{
name: '大脸猫爱吃鱼大脸猫爱吃鱼大脸猫爱吃鱼大脸猫爱吃鱼大脸猫爱吃鱼',
heart_num: '1',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://f10.baidu.com/it/u=121654667,1482133440&fm=72',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
},
{
name: '大脸猫爱吃鱼',
heart_num: '2',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://img3.imgtn.bdimg.com/it/u=1417732605,3777474040&fm=26&gp=0.jpg',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
},
{
name: '大脸猫爱吃鱼',
heart_num: '3',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://img3.imgtn.bdimg.com/it/u=1417732605,3777474040&fm=26&gp=0.jpg',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
}, {
name: '大脸猫爱吃鱼',
heart_num: '4',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://f10.baidu.com/it/u=121654667,1482133440&fm=72',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
},
{
name: '大脸猫爱吃鱼',
heart_num: '5',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://f10.baidu.com/it/u=121654667,1482133440&fm=72',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
},
{
name: '大脸猫爱吃鱼',
heart_num: '6',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://img3.imgtn.bdimg.com/it/u=1417732605,3777474040&fm=26&gp=0.jpg',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
},
{
name: '大脸猫爱吃鱼',
heart_num: '7',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://img4.imgtn.bdimg.com/it/u=2748975304,2710656664&fm=26&gp=0.jpg',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
}, {
name: '大脸猫爱吃鱼',
heart_num: '8',
title: '你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识你所不知道的红酒知识',
url: 'http://img2.imgtn.bdimg.com/it/u=1561660534,130168102&fm=26&gp=0.jpg',
avatar: 'http://img4.imgtn.bdimg.com/it/u=349345436,3394162868&fm=26&gp=0.jpg'
}
],
baseImgUrl: app.globalData.imageUrl,
listData: [{
desc: "string",
imageUrl: "/group3/M00/00/0B/Cv6CBF0RvcuAXoDUAA5M5vbNswU382.png",
link: { linkId: "10", brandId: "2711", name: "会员服务", url: "5", type: 2, status: 0 },
number: 1,
redirectId: "10",
type: 0
}, {
desc: "string",
imageUrl: "/group3/M00/00/08/Cv6CBF0BqvyADM4iAABJQ-gxAy4311.png",
link: { linkId: "10", brandId: "2711", name: "会员服务", url: "5", type: 2, status: 0 },
number: 1,
redirectId: "10",
type: 0
},
{
desc: "string",
imageUrl: "/group3/M00/00/08/Cv6CBF0BqvyADM4iAABJQ-gxAy4311.png",
link: { linkId: "10", brandId: "2711", name: "会员服务", url: "5", type: 2, status: 0 },
number: 1,
redirectId: "10",
type: 0
},
{
desc: "string",
imageUrl: "/group3/M00/00/0B/Cv6CBF0RvcuAXoDUAA5M5vbNswU382.png",
link: { linkId: "10", brandId: "2711", name: "会员服务", url: "5", type: 2, status: 0 },
number: 1,
redirectId: "10",
type: 0
}],
pageNo: 1,
pageSize: 10,
invalidPageNo: 1,
totalPages: 0,
totalElements: 0,
invalidTotalElements: 0,
couponList: [],
invalidCouponList: [],
invalidTotalPages: 0,
invalidTotalElements: 0,
currentTab: 0,
noMoreCoupon: false,
noMoreCouponInvalid: false
},
//滑动切换
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)
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() { },
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 可使用 已失效
this.getCouponList(1, 10, 1)
this.getCouponList(1, 10, 0)
},
handelPresentCouponDetail(e) {
let { cardno } = e.currentTarget.dataset
wxService.router(`/pages/couponDetail/couponDetail`).search({ cardno })
},
handelPresentCouponCode(e) {
let { cardno } = e.currentTarget.dataset
wxService.router(`/pages/couponCodeDetail/couponCodeDetail`).search({ cardno })
},
//获取优惠券列表
getCouponList(pageNo, pageSize, statusNum) {
wx.showLoading({
title: '加载中'
})
let params;
if (statusNum == 1) {
params = {
status: 1
}
if (pageNo == 1) {
this.setData({
pageNo: 1,
couponList: [], // 清空数据
})
}
} else {
params = {
statusNot: 1
}
if (pageNo == 1) {
this.setData({
invalidCouponList: [],
invalidPageNo: 1
})
}
}
wxService.post(`/coupon/coupon/listWithMember4Mina?number=${pageNo}&size=${pageSize}`, params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
// 处理时间显示
if (!data.content) return false
data.content.forEach(item => {
item.startTime = item.startTime.substring(0, 10)
item.endTime = item.endTime.substring(0, 10)
})
// 可使用 or 已失效
if (statusNum == 1) {
// couponList
this.setData({
couponList: this.data.pageNo == 1 ? [...data.content] : [...this.data.couponList, ...data.content],
totalPages: data.totalPages,
totalElements: data.totalElements
})
} else {
// invalidCouponList
this.setData({
invalidCouponList: this.data.invalidPageNo == 1 ? [...data.content] : [...this.data.invalidCouponList, ...data.content],
invalidTotalPages: data.totalPages,
invalidTotalElements: data.totalElements
})
}
}
}).finally(() => {
wx.hideLoading();
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
// 可使用 0 or 已失效 1
const { currentTab, pageNo, pageSize, totalPages, invalidPageNo, invalidTotalPages } = this.data
if (currentTab == 0) {
if (pageNo < totalPages) {
this.setData({
pageNo: pageNo + 1,
})
// status 1
this.getCouponList(this.data.pageNo, pageSize, 1)
} else {
this.setData({
noMoreCoupon: true
})
}
} else {
if (invalidPageNo < invalidTotalPages) {
this.setData({
invalidPageNo: invalidPageNo + 1,
})
// status 0
this.getCouponList(this.data.invalidPageNo, pageSize, 0)
} else {
this.setData({
noMoreCouponInvalid: true
})
}
}
},
})
\ No newline at end of file
{
"navigationBarTitleText": "我的分享",
"usingComponents": {
"water-flow-layout": "/component/waterFlowLayout/waterFlowLayout"
}
}
\ No newline at end of file
<view class='page-want-buy'>
<view class="swiper-tab">
<view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">分享订单</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">分享会员</view>
<view class="swiper-tab-item {{currentTab==2?'active':''}}" data-current="2" bindtap="clickTab">发现分享</view>
</view>
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
11111
</swiper-item>
<swiper-item>
22222
</swiper-item>
<swiper-item>
<scroll-view scroll-y >
<water-flow-layout image-data="{{imageData}}"/>
</scroll-view>
</swiper-item>
</swiper>
</view>
/* pages/myShare/myShare.wxss */
@import './../../base/base.wxss';
page{
background: #ffffff;
}
scroll-view{
height: 100%;
}
.page-want-buy{
position: relative;
}
.swiper-tab{
width: 100%;
height: 46rpx;
line-height: 46rpx;
display: flex;
background-color: #ffffff;
color: #000000;
position:fixed;
z-index:1;
justify-content: space-around;
}
.swiper-tab-item{
text-align: center;
font-size: 26rpx;
}
.active{
color: #C09A74;
border-bottom: 5rpx solid #C09A74;
}
swiper {
width: 100%;
flex: 1;
height:100vh;
/* padding-bottom:20rpx; */
position: absolute;
overflow: scroll;
top: 46rpx;
}
// pages/coupons.js
const app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
wxService.page({
/**
* 页面的初始数据
*/
data: {
imageData: [{
desc: "string",
imageUrl: "/group3/M00/00/0B/Cv6CBF0RvcuAXoDUAA5M5vbNswU382.png",
link: { linkId: "10", brandId: "2711", name: "会员服务", url: "5", type: 2, status: 0 },
number: 1,
redirectId: "10",
type: 0
}, {
desc: "string",
imageUrl: "/group3/M00/00/0B/Cv6CBF0RvcuAXoDUAA5M5vbNswU382.png",
link: { linkId: "10", brandId: "2711", name: "会员服务", url: "5", type: 2, status: 0 },
number: 1,
redirectId: "10",
type: 0
}],
pageNo: 1,
pageSize: 10,
invalidPageNo: 1,
totalPages: 0,
totalElements: 0,
invalidTotalElements: 0,
couponList: [],
invalidCouponList: [],
invalidTotalPages: 0,
invalidTotalElements: 0,
currentTab: 0,
noMoreCoupon: false,
noMoreCouponInvalid: false
},
//滑动切换
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)
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() { },
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 可使用 已失效
this.getCouponList(1, 10, 1)
this.getCouponList(1, 10, 0)
},
handelPresentCouponDetail(e) {
let { cardno } = e.currentTarget.dataset
wxService.router(`/pages/couponDetail/couponDetail`).search({ cardno })
},
handelPresentCouponCode(e) {
let { cardno } = e.currentTarget.dataset
wxService.router(`/pages/couponCodeDetail/couponCodeDetail`).search({ cardno })
},
//获取优惠券列表
getCouponList(pageNo, pageSize, statusNum) {
wx.showLoading({
title: '加载中'
})
let params;
if (statusNum == 1) {
params = {
status: 1
}
if (pageNo == 1) {
this.setData({
pageNo: 1,
couponList: [], // 清空数据
})
}
} else {
params = {
statusNot: 1
}
if (pageNo == 1) {
this.setData({
invalidCouponList: [],
invalidPageNo: 1
})
}
}
wxService.post(`/coupon/coupon/listWithMember4Mina?number=${pageNo}&size=${pageSize}`, params).then(res => {
if (!res) return false
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
// 处理时间显示
if (!data.content) return false
data.content.forEach(item => {
item.startTime = item.startTime.substring(0, 10)
item.endTime = item.endTime.substring(0, 10)
})
// 可使用 or 已失效
if (statusNum == 1) {
// couponList
this.setData({
couponList: this.data.pageNo == 1 ? [...data.content] : [...this.data.couponList, ...data.content],
totalPages: data.totalPages,
totalElements: data.totalElements
})
} else {
// invalidCouponList
this.setData({
invalidCouponList: this.data.invalidPageNo == 1 ? [...data.content] : [...this.data.invalidCouponList, ...data.content],
invalidTotalPages: data.totalPages,
invalidTotalElements: data.totalElements
})
}
}
}).finally(() => {
wx.hideLoading();
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
// 可使用 0 or 已失效 1
const { currentTab, pageNo, pageSize, totalPages, invalidPageNo, invalidTotalPages } = this.data
if (currentTab == 0) {
if (pageNo < totalPages) {
this.setData({
pageNo: pageNo + 1,
})
// status 1
this.getCouponList(this.data.pageNo, pageSize, 1)
} else {
this.setData({
noMoreCoupon: true
})
}
} else {
if (invalidPageNo < invalidTotalPages) {
this.setData({
invalidPageNo: invalidPageNo + 1,
})
// status 0
this.getCouponList(this.data.invalidPageNo, pageSize, 0)
} else {
this.setData({
noMoreCouponInvalid: true
})
}
}
},
})
\ No newline at end of file
{
"navigationBarTitleText": "种草详情",
"usingComponents": {
"buy-image-swiper": "/component/buyImageSwiper/buyImageSwiper"
}
}
\ No newline at end of file
<view class='page-want-buy'>
<view class="swiper-tab">
<view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">达人</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">精选</view>
</view>
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<buy-image-swiper bind:updatePage="updatePage" image-data="{{imageData}}"/>
<view class="buy-desc">
<view>种草文案种草文案种草文案种草文案种草文案种草文案种草文案种草文案种</view>
<view class="share-wrap">
<view class="share-oprate">
<image class="share-img" src="/assets/imgs/heart-default.png"></image>
<text class="share-number">689</text>
</view>
<view class="share-oprate">
<image class="share-img" src="/assets/imgs/share.png"></image>
<text class="share-number">298</text>
</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="sale-btn">限时特价</view>
<view class="bottom-price">
<text class="price">¥299</text>
<text class="cost-price">¥456</text>
<view class="look-over">查看详情</view>
</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="sale-btn">限时特价</view>
<view class="bottom-price">
<text class="price">¥299</text>
<text class="cost-price">¥456</text>
<view class="look-over">查看详情</view>
</view>
</view>
</view>
</view>
</view>
</swiper-item>
<swiper-item>
22222
</swiper-item>
</swiper>
</view>
@import './../../base/base.wxss';
page{
background: #ffffff;
}
scroll-view{
height: 100%;
}
.page-want-buy{
position: relative;
}
.swiper-tab{
width: 100%;
height: 46rpx;
line-height: 46rpx;
display: flex;
background-color: #ffffff;
color: #000000;
position:fixed;
z-index:1;
justify-content: center;
}
.swiper-tab-item{
text-align: center;
font-size: 26rpx;
}
.swiper-tab-item:first-child{
margin-right: 105rpx;
}
.active{
color: #C09A74;
border-bottom: 5rpx solid #C09A74;
}
swiper {
width: 100%;
flex: 1;
height:100vh;
/* padding-bottom:20rpx; */
position: absolute;
overflow: scroll;
top: 46rpx;
}
.buy-desc{
padding: 0 30rpx;
}
.share-wrap{
display: flex;
justify-content: space-between;
margin-top: 31rpx;
}
.share-img{
width: 20rpx;
height: 20rpx;
}
.share-number{
font-size: 24rpx;
color: #999999;
margin-left: 10rpx;
}
.buy-product-wrap{
padding: 0 20rpx;
}
.buy-product-content{
width: 710rpx;
margin-top: 20rpx;
}
.buy-list{
width: 100%;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
display: flex;
margin-bottom: 20rpx;
}
.prod-img{
height: 220rpx;
}
.prod-img image{
width: 220rpx;
height: 220rpx;
}
.prod-info{
padding: 31rpx 26rpx 39rpx 24rpx;
}
.prod-name{
font-size: 26rpx;
width: 440rpx;
}
.sale-btn{
width: 74rpx;
height: 24rpx;
line-height: 24rpx;
text-align: center;
border-radius: 15rpx;
border: 1px solid rgba(203, 60, 60, 1);
font-size: 13rpx;
color: #CB3C3C;
margin-top: 9rpx;
}
.bottom-price{
margin-top: 11rpx;
}
.price{
font-size: 32rpx;
color: #CB3C3C;
}
.cost-price{
text-decoration:line-through;
font-size: 20rpx;
color: #aaaaaa;
margin-left: 10rpx;
}
.look-over{
width: 125rpx;
height: 39rpx;
line-height: 39rpx;
text-align: center;
border-radius: 19rpx;
background-color: rgba(203, 60, 60, 1);
border: 1px solid rgba(151, 151, 151, 1);
color: #ffffff;
font-size: 18rpx;
float: right;
}
......@@ -19,7 +19,9 @@
"hidedInDevtools": []
},
"isGameTourist": false,
"condition": {
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
......@@ -37,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 13,
"current": 15,
"list": [
{
"id": -1,
......@@ -122,6 +124,19 @@
"name": "subPage",
"pathName": "subPackage/page/pages/subPage/subPage",
"query": "pageId=4"
},
{
"id": 14,
"name": "种草详情",
"pathName": "pages/wantToBuyDetail/wantToBuyDetail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的分享",
"pathName": "pages/myShare/myShare",
"scene": null
}
]
}
......
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
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