[新增]商城,订单,优惠券,收货地址

This commit is contained in:
张慢慢
2020-12-28 09:16:11 +08:00
parent 17ea653313
commit c56fd8b471
175 changed files with 9259 additions and 96 deletions

View File

@@ -0,0 +1,32 @@
/**
* Web唐明明
* 一个梦想做木雕手艺人的程序员
* explain: userInfoLayer
*/
Component({
/**
* 组件的属性列表
*/
properties:{
freeCoupon:{
type : Array,
value : []
}
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
jumpUrl(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url : '/pages/mall_details/mall_details?id=' + id,
})
}
},
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,29 @@
<!-- 免费券专区 -->
<view class="coupon">
<view class="coupon-title">
<view class="coupon-name">
免费券专区
</view>
<navigator hover-class="none" url="/pages/mall_goods/mall_goods?type=couponCut" class="coupon-more">
更多<image class="coupon-more-icon" src="/static/mall_icon/mallIndex_more.png"></image>
</navigator>
</view>
<scroll-view class="coupon-list" scroll-x>
<view class="coupon-label" wx:for="{{freeCoupon}}" wx:key="freeCoupon" bindtap="jumpUrl" data-id="{{item.goods_id}}">
<view class="coupon-img">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="coupon-cont">
<view class="nowrap coupon-cont-name">{{item.title}}</view>
<view class="coupon-cont-tips">
<text> ¥{{item.prices.price}}</text>
<view class="coupon-cont-price">协会 {{item.prices.association}}</view>
</view>
<view class="recommend-mark">
<text class="recommend-vip">vip</text>
¥{{item.prices.vip}}
</view>
</view>
</view>
</scroll-view>
</view>

View File

@@ -0,0 +1,116 @@
/*
* 手太欠
* 企获客商城模块
*/
/* 商城优惠券专区 */
.coupon {
background-color: white;
border-radius: 10rpx;
padding: 20rpx;
box-sizing: border-box;
margin-top: 30rpx;
}
.coupon-title {
display: flex;
margin-bottom: 20rpx;
}
.coupon-name {
flex: 1;
}
.coupon-more {
font-size: 30rpx;
color: #666666;
display: flex;
}
.coupon-more-icon {
width: 34rpx;
height: 34rpx;
margin: 4rpx 0 0 10rpx;
vertical-align: middle;
}
/* 优惠券列表 */
.coupon-list {
white-space: nowrap;
margin: 30rpx 10rpx 0;
height: 340rpx;
}
.coupon-label {
height: 340rpx;
width: 180rpx;
margin-right: 40rpx;
overflow: hidden;
display: inline-block;
}
.coupon-label:last-child {
margin-right: 0;
}
.coupon-img {
position: relative;
width: 100%;
padding-top: 100%;
margin: 0 auto;
border-radius: 10rpx;
margin-bottom: 20rpx;
overflow: hidden;
}
.coupon-img image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.coupon-cont-tips {
display: flex;
font-size: 26rpx;
margin: 5rpx 0 10px;
}
.coupon-cont-tips text {
display: block;
margin-right: 10rpx;
font-weight: 600;
}
.coupon-cont-price {
font-size: 24rpx;
color: #999;
}
.recommend-mark {
background-color: #f2e4c0;
border-radius: 6rpx;
display: inline-block;
font-size: 24rpx;
overflow: hidden;
height: 38rpx;
line-height: 38rpx;
padding-right: 10rpx;
}
.recommend-vip {
display: inline-block;
line-height: 38rpx;
background-color: #333333;
color: #f2e4c0;
padding: 0 10rpx;
}
.recommend-sell {
float: right;
font-size: 24rpx;
line-height: 38rpx;
color: #aaabab;
}

View File

@@ -0,0 +1,29 @@
/**
* 手太欠
* 5g星光网-商城
*/
Component({
/**
* 组件的属性列表
*/
properties:{
hotSale:{
type : Array,
value : []
}
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
hotTap(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url : '/pages/mall_details/mall_details?id=' + id,
})
}
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,24 @@
<!-- 优惠热卖 -->
<view class="hot">
<view class="hot-title">
<view class="hot-name">
优惠热卖
</view>
<navigator hover-class="none" url="/pages/mall_goods/mall_goods?type=hotCut" class="hot-more">
更多<image class="hot-more-icon" src="/static/mall_icon/mallIndex_more.png"></image>
</navigator>
</view>
<scroll-view class="hot-scroll" scroll-x>
<view class="hot-list" wx:for="{{hotSale}}" wx:key="hotSale" data-id="{{item.goods_id}}" bindtap="hotTap">
<image class="hot-img" src="{{item.cover}}" mode="aspectFill"></image>
<view class="hot-cont">
<view class="nowrap hot-name">{{item.title}}</view>
<view class="hot-price"><text>¥</text>{{item.prices.price}}<view class="hot-cost">协会 ¥{{item.prices.association}}</view></view>
<view class="recommend-mark">
<text class="recommend-vip">vip</text>
¥{{item.prices.vip}}
</view>
</view>
</view>
</scroll-view>
</view>

View File

@@ -0,0 +1,120 @@
/*
* 手太欠
* 企获客商城模块
*/
/* 商城优惠热卖 */
.hot {
background-color: white;
border-radius: 10rpx;
padding: 20rpx;
box-sizing: border-box;
margin-top: 30rpx;
}
.hot-title {
display: flex;
margin-bottom: 30rpx;
}
.hot-name {
flex: 1;
}
.hot-more {
font-size: 30rpx;
color: #666666;
display: flex;
}
.hot-more-icon {
width: 34rpx;
height: 34rpx;
margin: 4rpx 0 0 10rpx;
vertical-align: middle;
}
/* 热卖列表 */
.hot-scroll {
white-space: nowrap;
}
.hot-list {
width: 420rpx;
background-image: linear-gradient(to top, #fff, #fcf5f3);
border-radius: 10rpx;
display: inline-block;
position: relative;
padding: 20rpx;
box-sizing: border-box;
margin-right: 20rpx;
border: 2rpx #eeeeee dashed;
}
.hot-list:last-child {
margin-right: 0;
}
.hot-img {
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
}
.hot-price {
color: #ea4e2f
}
.hot-price text {
font-size: 24rpx;
line-height: 40rpx;
}
.hot-cont {
position: absolute;
left: 180rpx;
top: 20rpx;
right: 20rpx;
}
.hot-price {
margin: 10rpx 0;
font-size: 28rpx;
display: flex;
}
.hot-cost {
font-size: 24rpx;
color: #999;
/* text-decoration:line-through; */
margin-left: 20rpx;
line-height: 38rpx;
}
.recommend-mark {
background-color: #f2e4c0;
border-radius: 6rpx;
display: inline-block;
font-size: 24rpx;
overflow: hidden;
height: 38rpx;
line-height: 38rpx;
padding-right: 10rpx;
}
.recommend-vip {
display: inline-block;
line-height: 38rpx;
background-color: #333333;
color: #f2e4c0;
padding: 0 10rpx;
}
.recommend-sell {
float: right;
font-size: 24rpx;
line-height: 38rpx;
color: #aaabab;
}

View File

@@ -0,0 +1,38 @@
/**
* 手太欠
* 5g星光网-商城
*/
Component({
/**
* 组件的属性列表
*/
properties:{
pushList :{
type : Array,
value : []
},
lodingStats :{
type : Boolean,
value : false
},
hasMore :{
type : Boolean,
value : false
},
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
push(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url : '/pages/mall_details/mall_details?id=' + id,
})
}
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,43 @@
<!-- 商城为您推荐 -->
<view class="recommend">
<view class="recommend-title">
为您推荐
</view>
<view class="recommend-list">
<view class="recommend-label" wx:for="{{pushList}}" wx:key="pushList" bindtap="push"
data-id="{{item.goods_id}}">
<view class="recommend-img">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="recommend-cont">
<view class="nowrap recommend-name">
{{item.title}}
</view>
<view class="recommend-price">
<view class="recommend-ruling">
<text>¥</text>{{item.prices.price}}
</view>
<view class="recommend-cost">
协会: ¥{{item.prices.association}}
</view>
</view>
<view class="recommend-tips">
<view class="recommend-mark">
<text class="recommend-vip">vip</text>
¥{{item.prices.vip}}
</view>
<view class="recommend-sell">已售{{item.sell_number}}</view>
</view>
</view>
</view>
<view class="pagesLoding" wx:if="{{lodingStats}}">
<block wx:if="{{has_more}}">
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block wx:else>
没有更多了~
</block>
</view>
</view>
</view>

View File

@@ -0,0 +1,96 @@
/*
* 手太欠
* 企获客商城模块
*/
@import "/app.wxss";
/* 商城首页为您推荐 */
.recommend {
margin-top: 30rpx;
}
.recommend-title {
padding: 0 10rpx 30rpx;
}
.recommend-list {
overflow: hidden;
margin: 0 -10rpx;
}
.recommend-label {
float: left;
width: calc(50% - 20rpx);
margin: 0 10rpx 20rpx;
border-radius: 10rpx;
overflow: hidden;
background-color: white ;
}
.recommend-img {
position: relative;
width: 100%;
padding-top: 100%;
}
.recommend-img image {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.recommend-cont {
padding: 20rpx;
box-sizing: border-box;
}
.recommend-price {
margin: 20rpx 0;
display: flex;
font-size: 28rpx;
}
.recommend-ruling {
color: #ea4e2f;
font-weight: 600;
}
.recommend-ruling text {
font-size: 24rpx;
}
.recommend-cost {
font-size: 24rpx;
color: #999;
/* text-decoration:line-through; */
margin: 2rpx 0 0 20rpx;
}
.recommend-mark {
background-color: #f2e4c0;
border-radius: 6rpx;
display: inline-block;
font-size: 24rpx;
overflow: hidden;
height: 38rpx;
line-height: 38rpx;
padding-right: 10rpx;
}
.recommend-vip {
display: inline-block;
line-height: 38rpx;
background-color: #333333;
color: #f2e4c0;
padding: 0 10rpx;
}
.recommend-sell {
float: right;
font-size: 24rpx;
line-height: 38rpx;
color: #aaabab;
}

View File

@@ -0,0 +1,36 @@
/**
* 手太欠
* 5g星光网-商城
*/
Component({
/**
* 组件的属性列表
*/
properties:{
categories:{
type : Array,
value : []
}
},
/**
* 组件的方法列表
*/
methods: {
// 页面跳转
handeItemTap(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/mall_goods/mall_goods?sort=' + id,
})
},
// 查看更所分类
homeTap() {
wx.navigateTo({
url: '/pages/mall_classify/mall_classify',
})
}
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,11 @@
<!-- 商城分类 -->
<view class="mallNav">
<view class="mallNav-label" wx:for="{{categories}}" wx:key="categories" bindtap="handeItemTap" data-id="{{item.category_id}}">
<image class="mallNav-icon" src="{{ item.cover_url ? item.cover_url :'/static/mall_icon/mallNav_00.png'}}"></image>
<text>{{item.title}}</text>
</view>
<view class="mallNav-label" bindtap=homeTap">
<image class="mallNav-icon" src="/static/mall_icon/mallNav_07.png"></image>
<text>全部</text>
</view>
</view>

View File

@@ -0,0 +1,33 @@
/*
* 手太欠
* 企获客商城模块
*/
/* 商城分类 */
.mallNav {
background-color: white;
border-radius: 20rpx;
margin-top: 30rpx;
}
.mallNav {
overflow: hidden;
padding-top: 40rpx;
}
.mallNav-label {
font-size: 28rpx;
color: #666666;
float: left;
text-align: center;
width: 25%;
margin-bottom: 40rpx;
}
.mallNav-icon {
width: 70rpx;
height: 70rpx;
display: block;
margin: 0 auto 10rpx;
}

View File

@@ -0,0 +1,19 @@
/**
* 手太欠
* 5g星光网-商城
*/
Component({
/**
* 组件的属性列表
*/
properties:{
},
/**
* 组件的方法列表
*/
methods: {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,43 @@
<!-- 视频专区 -->
<view class="video" style="display: none">
<view class="videoTitle">
<view class="videoTitle-name">
<view class="videoTitle-name-color">商品直播间专区</view>
<view class="videoTitle-name-img">
<image src="/static/mall_icon/liveIng_bf.png"></image>LIVE
</view>
</view>
<navigator hover-class="none" url="/pages/mall_video/mall_video" class="videoTitle-more">
查看更多
</navigator>
</view>
<view class="videoList">
<view class="videoList-label">
<view class="videoList-img">
<image class="videoList-cover" src="/static/img/goods_text.png" mode="aspectFill"></image>
<view class="videoList-tips">
<image src="/static/mall_icon/liveIng_icon.png"></image>正在直播
</view>
</view>
<view class="videoList-cont">
<view class="videoList-title">风光雪月跨年季</view>
<view class="videoList-user">
<image class="videoList-head" src="/static/mall_icon/mallDetails_user.png"></image>
<text>张慢慢呀</text>
</view>
</view>
</view>
<view class="videoList-label">
<view class="videoList-img">
<image class="videoList-cover" src="/static/img/goods_text.png" mode="aspectFill"></image>
</view>
<view class="videoList-cont">
<view class="videoList-title">风光雪月跨年季</view>
<view class="videoList-user">
<image class="videoList-head" src="/static/mall_icon/mallDetails_user.png"></image>
<text>张慢慢呀</text>
</view>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,122 @@
/*
* 手太欠
* 企获客商城模块
*/
/* 商城分类 */
.video {
margin-top: 30rpx;
}
.videoTitle {
display: flex;
padding: 0 10rpx 30rpx;
}
.videoTitle-name {
flex: 1;
display: flex;
}
.videoTitle-name-color {
background: linear-gradient(to right, #9756fa, #5079ff);
-webkit-background-clip: text;
color: transparent;
display: inline-block;
font-weight: 600;
margin-right: 20rpx;
}
.videoTitle-name-img {
background-image: linear-gradient(to right, #9756fa, #5079ff);
color: #fff;
font-size: 24rpx;
border-radius: 50rpx;
display: flex;
width: 110rpx;
height: 37rpx;
line-height: 37rpx;
margin-top: 5rpx;
}
.videoTitle-name-img image {
width: 34rpx;
height: 34rpx;
margin: 1rpx 6rpx 0 10rpx;
}
.videoTitle-more {
font-size: 28rpx;
line-height: 40rpx;
color: #999;
}
/* 列表 */
.videoList {
overflow: hidden;
margin: 0 -10rpx;
}
.videoList-label {
width: calc(50% - 20rpx);
margin: 0 10rpx;
float: left;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
.videoList-img {
position: relative;
width: 100%;
padding-top: 80%;
}
.videoList-img .videoList-cover {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.videoList-tips {
position: absolute;
top: 20rpx;
left: 20rpx;
color: #fc6c27;
background-color: #f6f5f1;
border-radius: 40rpx;
font-size: 24rpx;
padding: 0 12rpx;
height: 44rpx;
line-height: 44rpx;
display: flex;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .05);
}
.videoList-tips image {
width: 30rpx;
height: 30rpx;
margin: 8rpx 10rpx 6rpx 0;
}
.videoList-cont {
padding: 20rpx;
box-sizing: border-box;
}
.videoList-user {
display: flex;
line-height: 46rpx;
font-size: 28rpx;
margin-top: 20rpx;
color: #999;
}
.videoList-head {
width: 46rpx;
height: 46rpx;
margin-right: 20rpx;
}