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

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

@@ -14,6 +14,7 @@ import order from "./interfaces/order"
import company from "./interfaces/company" import company from "./interfaces/company"
import home from "./interfaces/home" import home from "./interfaces/home"
import ticket from "./interfaces/ticket" import ticket from "./interfaces/ticket"
import address from "./interfaces/address"
export default{ export default{
publics, publics,
@@ -26,5 +27,6 @@ export default{
order, order,
company, company,
home, home,
ticket ticket,
address
} }

View File

@@ -0,0 +1,24 @@
/**
* 手太欠
* 5g获客星光网 - 我的地址
*/
import {req} from "../request"
const create = data => req({url: "user/addresses/create", data: data}) //获取省市区层级信息
const index = () => req({url: "user/addresses"}) //我的地址列表
const info = (address_id) => req({url: "user/addresses/" + address_id}) //地址列表-详情
const add = data => req({url: "user/addresses", method: "POST", data: data}) //新增-地址列表
const revise = (address_id, data) => req({url: "user/addresses/" + address_id, method: "PUT", data: data}) //修改-地址列表
const del = (address_id) => req({url: "user/addresses/" + address_id, method: "DELETE"}) //地址列表-删除
const def = (address_id) => req({url: "user/addresses/" + address_id + "/default", method: "POST"}) //地址列表-默认
export default({
create,
index,
info,
add,
revise,
del,
def
})

View File

@@ -4,6 +4,60 @@
*/ */
import {req} from "../request" import {req} from "../request"
const index = () => req({url: "shop/index"}) //商城首页
const pushData = data => req({url: "goods/push", data: data}) //商城为您推荐
const first = () => req({url: "shop/category/first"}) //商城分类-左侧
const second = data => req({url: "shop/category/second", data: data}) //商城分类-右侧
const hotData = data => req({url: "goods/hot", data: data}) //优惠热卖更多
const freeData = data => req({url: "goods/free", data: data}) //免费券专区更多
const hotkey = data => req({url: "shop/hotkey", data: data}) //热门关键字
const lists = data => req({url: "goods/lists", data: data}) //全部商品列表
const details = (goods_id) => req({url: "goods/" + goods_id + '/show'}) //商品详情
const grant = data => req({url: "coupons/grant", method: "POST", data: data}) //优惠券领取
const jionCar = data => req({url: "carts/jion", method: "POST", data: data}) //加入购物车
const carKist = () => req({url: "carts/index"}) //购物车列表
const carRemove= data => req({url: "carts/remove", method: "POST", data: data}) //购物车移除商品
const carClear = () => req({url: "carts/clear", method: "POST"}) //清空购物车
const increment= (id) => req({url: "carts/" + id + "/increment", method: "POST"}) //购物车增加数量
const decrement= (id) => req({url: "carts/" + id + "/decrement", method: "POST"}) //购物车减少数量
const coupon = data => req({url: "coupons", data: data}) //店铺优惠券列表
const coupons = data => req({url: "user/coupons", data: data}) //我的优惠券
const couponDetails = (user_coupon_id) => req({url: "user/coupons/" + user_coupon_id}) //我的优惠券详情
const couponsGoods = data => req({url: "user/coupons/goods", data: data}) //可领取的商品
const orderSystem = data => req({url: "orders/goods/create", data: data}) //商品确认订单
const orderBuy = data => req({url: "orders/goods/buy", method: "POST", data: data}) //商品确认提交
const cartSystem = data => req({url: "orders/carts/create",data: data}) //购物车确认订单
const cartBuy = data => req({url: "orders/carts/buy", method: "POST", data: data}) //购物车确认订单
const wechat = data => req({url: "payments/wechat", method: "POST", data: data}) //购物车确认订单
export default({ export default({
index,
pushData,
first,
second,
hotData,
freeData,
hotkey,
lists,
details,
grant,
jionCar,
carKist,
carRemove,
carClear,
increment,
decrement,
coupon,
coupons,
couponDetails,
couponsGoods,
orderSystem,
orderBuy,
cartSystem,
cartBuy,
wechat
}) })

View File

@@ -1,9 +1,16 @@
/**
/* * 手太欠
* 订单 * 5g获客星光网 - 商城首页
*/ */
import {req} from "../request" import {req} from "../request"
const index = () => req({url: "orders"}) //登录
const cancel = (orderId) => req({url: "orders/cancel/" + orderId}) //取消订单
const orders = (orderId) => req({url: "orders/" + orderId}) //订单-详情
export default({ export default({
index,
}) cancel,
orders
})

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;
}

View File

@@ -1,66 +1,90 @@
// pages/mall/index.js /**
Page({ * 手太欠
* 5g获客星光网 - 商城
*/
const data = require("../../data/demo")
Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
banners : [], //banner图
categories : [], //分类
freeCoupon : [], //免费劵商品列表
hotSale : [], //优惠热爱列表
pushList : [], //推荐商品列表
page : {}, //分页信息
lodingStats : false //加载状态
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad(){
// 获取商城首页数据
this.indexInfo();
// 获取为您推荐
this.pushInfo();
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 商城首页数据
*/ */
onReady: function () { indexInfo () {
wx.$api.mall.index().then(res=>{
this.setData({
banners : res.banners,
categories : res.categories,
freeCoupon : res.free_coupon,
hotSale : res.hot_sale
})
})
}, },
/** /**
* 生命周期函数--监听页面显示 * 为您推荐
*/ */
onShow: function () { pushInfo(page) {
wx.$api.mall.pushData({
}, page : page,
pagesize: 15
/** }).then(res=>{
* 生命周期函数--监听页面隐藏 let listArr = this.data.pushList,
*/ newData = []
onHide: function () { if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
}, this.setData({
pushList : newData,
/** page : res.page,
* 生命周期函数--监听页面卸载 lodingStats : false
*/ })
onUnload: function () { wx.stopPullDownRefresh()
})
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh() {
// 获取为您推荐
this.pushInfo();
}, },
/** /**
* 页面上拉触底事件的处理函数 * 上拉加载
*/ */
onReachBottom: function () { onReachBottom(){
this.setData({
}, lodingStats: true
})
/** let pageNumber = this.data.page.current
* 用户点击右上角分享 if(this.data.page.has_more){
*/ pageNumber++
onShareAppMessage: function () { // 获取为您推荐
this.pushInfo(pageNumber);
}
} }
}) })

View File

@@ -1,3 +1,11 @@
{ {
"usingComponents": {} "usingComponents": {
"mallIndex_nav" : "/components/mallIndex_nav/mallIndex_nav",
"mallIndex_coupon" : "/components/mallIndex_coupon/mallIndex_coupon",
"mallIndex_hot" : "/components/mallIndex_hot/mallIndex_hot",
"mallIndex_list" : "/components/mallIndex_list/mallIndex_list",
"mallIndex_video" : "/components/mallIndex_video/mallIndex_video"
},
"navigationBarTitleText": "商城",
"enablePullDownRefresh" : true
} }

View File

@@ -1,2 +1,41 @@
<!--pages/mall/index.wxml--> <!-- 企获客商城 -->
<text>pages/mall/index.wxml</text> <view class="mallBox">
<view class="mallCont">
<!-- 搜索 -->
<navigator hover-class="none" url="/pages/mall_search/mall_search" class="mallCont-search">
<image class="mallCont-search-icon" src="/static/mall_icon/mall_search.png"></image>
搜索商品
</navigator>
<!-- 轮播图 -->
<view class="banner">
<swiper class="banner-swiper" indicator-dots autoplay circular interval="3500" indicator-color="#ebebeb"
indicator-active-color="#fff">
<swiper-item wx:for="{{banners}}" wx:key="banners">
<image class="banner-img" src="{{item.cover}}" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<!-- 商城分类 -->
<mallIndex_nav categories="{{categories}}"></mallIndex_nav>
<!-- 免费券专区 -->
<block wx:if="{{freeCoupon.length > 0}}">
<mallIndex_coupon freeCoupon="{{freeCoupon}}"></mallIndex_coupon>
</block>
<!-- 优惠热卖 -->
<block wx:if="{{hotSale.length > 0}}">
<mallIndex_hot hotSale="{{hotSale}}"></mallIndex_hot>
</block>
<!-- 视频专区 -->
<mallIndex_video hotSale="{{videoArea}}"></mallIndex_video>
<!-- 为你推荐 -->
<block wx:if="{{pushList.length > 0}}">
<mallIndex_list push-list="{{pushList}}" loding-stats="{{lodingStats}}" has-more="{{page.has_more}}"></mallIndex_list>
</block>
</view>
</view>

View File

@@ -1 +1,75 @@
/* pages/mall/index.wxss */ /*
* 手太欠
* 企获客商城模块
*/
page {
background-color: #f3f3f3;
}
/* 商城红色背景 */
.mallBox {
position: relative;
}
.mallBox::after {
position: absolute;
content: '';
background-color: #ea4e2f;
border-radius: 0 0 10% 10%;
width: 100%;
height: 38vh;
top: 0;
left: 0;
z-index: 0;
}
.mallCont {
position: absolute;
left: 30rpx;
top: 30rpx;
right: 30rpx;
z-index: 1;
}
/* 商城搜索 */
.mallCont-search {
background-color: white;
border-radius: 100rpx;
padding: 18rpx 30rpx;
box-sizing: border-box;
display: flex;
color: #999999;
}
.mallCont-search-icon {
width: 44rpx;
height: 44rpx;
margin-right: 30rpx;
}
/* 轮播图 */
.banner {
position: relative;
padding-top: 38%;
width: 100%;
background: white;
border-radius: 10rpx;
overflow: hidden;
margin: 30rpx 0;
}
.banner-swiper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.banner-img {
width: 100%;
height: 100%;
vertical-align: top;
}

View File

@@ -0,0 +1,100 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
addressType : '', //类型 selectAddress为选择地址
addressArr : [], //收货地址列表
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
console.log(options)
this.setData({
addressType : options.type
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow () {
// 获取地址列表
this.addressInfo();
},
/**
* 地址列表
*/
addressInfo () {
wx.$api.address.index().then(res=>{
this.setData({
addressArr : res
})
})
},
/**
* 删除地址
*/
addressRemove(e){
let id = e.target.dataset.id,
index = e.target.dataset.index,
list = this.data.addressArr
list.splice(index,1)
wx.showModal({
title : '提示',
content : '是否删除地址',
success : res=> {
if (res.confirm) {
wx.showLoading({
title: '删除中',
})
wx.$api.address.del(id).then(res=>{
this.setData({
addressArr: list
})
wx.hideLoading()
})
}
}
})
},
/**
* 设为默认地址
*/
addressDefault(e){
let id = e.currentTarget.dataset.id
wx.$api.address.def(id).then(res=>{
// 获取地址列表
this.addressInfo();
})
},
/**
* 选择地址
*/
selectAddress(e){
let atAdds = this.data.addressArr[e.currentTarget.dataset.index]
let pages = getCurrentPages(),
prepage = pages[pages.length-2]
prepage.setData({
addressDel: atAdds
})
wx.navigateBack()
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "我的地址"
}

View File

@@ -0,0 +1,46 @@
<!-- 我的地址 -->
<view class="address" wx:if="{{addressArr}}">
<view class="uni-border-down address-list" wx:for="{{addressArr}}" wx:key="addressArr" wx:for-index="addressIndex">
<view class="address-name">
{{item.name}}<text>{{item.mobile}}</text>
<view class="address-state" wx:if="{{item.default == true}}"><text class="active">默认</text></view>
<!-- <text>学校</text> -->
</view>
<view class="address-cont">
<view class="address-site">
<view class="address-text">{{item.full_address}}</view>
<block wx:if="{{!item.default}}">
<view class="address-default" bindtap="addressDefault" data-index="{{addressIndex}}"
data-id="{{item.address_id}}">
<image src="/static/mall_icon/select.png"></image>设为默认地址
</view>
</block>
<block wx:else>
<view class="address-default">
<image src="/static/mall_icon/select_avtive.png"></image>默认地址
</view>
</block>
</view>
<view class="address-tool" wx:if="{{addressType == 'selectAddress'}}">
<view class="address-tool-btn" bindtap="selectAddress" data-index="{{addressIndex}}">选择地址</view>
</view>
<view class="address-tool" wx:else>
<navigator hover-class="none" url="/pages/mall_address_form/mall_address_form?type=Compile&id={{item.address_id}}&default={{item.default}}">
<image src="/static/mall_icon/mallAddress_modify.png"></image>
</navigator>
<image bindtap="addressRemove" data-index="{{addressIndex}}" data-id="{{item.address_id}}" src="/static/mall_icon/mallAddress_del.png"></image>
</view>
</view>
</view>
</view>
<view class="pack-center pages-hint" wx:else>
<image src="/static/img/null_icon.png"></image>
<view>还未添加收货地址</view>
</view>
<view class="address-footer">
<navigator url="/pages/mall_address_form/mall_address_form?type=Add">添加地址</navigator>
</view>

View File

@@ -0,0 +1,124 @@
/*
* 手太欠
* 企获客商城模块
*/
page {
background-color: #f7f7f7;
}
.address{
border-bottom: 130rpx solid transparent;
}
/* 地址列表 */
.address-list {
background: #fff;
padding: 30rpx;
box-sizing: border-box;
overflow: hidden;
}
.address-name {
display: flex;
}
.address-name>text{
padding-left: 40rpx;
}
.address-state {
margin-left: 20rpx;
}
.address-state text {
font-size: 24rpx;
height: 40rpx;
line-height: 40rpx;
border-radius: 50rpx;
padding: 0 10rpx;
background-color: #c3c3c3;
color: #fff;
display: inline-block;
transform:scale(0.85);
}
.address-state text.active {
background-color: #ea4e2f;
}
.address-text {
color: #666666;
font-size: 28rpx;
margin: 20rpx 0;
}
.address-default{
height: 46rpx;
line-height: 44rpx;
border-radius: 6rpx;
font-size: 28rpx;
color:#666666;
}
.address-default image {
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
vertical-align: -6rpx;
}
.address-cont {
display: flex;
}
.address-site {
width: calc(100% - 180rpx)
}
.address-tool {
display: flex;
width: 172rpx;
margin-top: 48rpx;
}
.address-tool image {
width: 36rpx;
height: 36rpx;
margin-left: 50rpx;
}
.address-tool-btn{
margin-left: 30rpx;
border:solid 1rpx #747788;
height: 56rpx;
line-height: 54rpx;
padding: 0 20rpx;
font-size: 24rpx;
}
/* footer */
.address-footer{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding-left: 30rpx;
padding-right: 30rpx;
background: white;
border-top: 2rpx solid #eeeeee;
z-index: 9;
height: 130rpx;
}
.address-footer navigator{
width: 100%;
line-height: 90rpx;
height: 90rpx;
margin: 20rpx 0;
text-align: center;
background: #224bf6;
font-size: 30rpx;
color: white;
border-radius: 60rpx;
}

View File

@@ -0,0 +1,234 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
id : '', //列表id
stateType : '', //类型 Add为添加地址 compile为编辑地址
saveArr : [], //省级列表
saveIndex : 0, //省级index
saveId : 0, //省级id
cityArr : [], //城市列表
cityIndex : 0, //城市index
cityId : 0, //城市id
regiArr : [], //区域列表
regiIndex : 0, //区域index
regiId : 0, //区域id
defaultVal : '', //是否为默认地址
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
this.setData({
stateType : options.type,
id : options.id
})
if (options.type == 'Add') {
wx.setNavigationBarTitle({
title: '添加收货地址'
})
// 获取省级信息列表
this.getProvince()
} else if (options.type == 'Compile') {
wx.setNavigationBarTitle({
title: '编辑收货地址'
})
// 获取地址编辑信息
this.getUserAddress(options.id)
}
},
/**
* 地址编辑信息
*/
getUserAddress(id){
wx.$api.address.info(id).then(res=>{
this.setData({
name : res.name,
mobile : res.mobile,
address : res.address,
defaultVal : res.default
})
let cityArr = [
res.province,
res.city,
res.district
]
this.getProvince(cityArr)
})
},
/**
* 省级信息列表
*/
getProvince(city) {
wx.$api.address.create().then(res=>{
let saveArr = res,
saveIndex = this.data.saveIndex
this.setData({
saveArr : saveArr,
saveId : saveArr[saveIndex].id,
})
if(city){
// 获取市级列表
this.citylist(city[0].id, city)
this.setData({
saveIndex: res.findIndex(val => val.id == city[0].id),
saveId : city[0].id
})
}else{
// 获取市级列表
this.citylist(saveArr[saveIndex].id)
}
})
},
/**
* 省份选择-筛选
*/
areasChange(e) {
let save = this.data.saveArr,
index = e.detail.value,
atsave = save[index].id
if (index != this.data.saveIndex) {
this.setData({
saveIndex : index,
saveId : atsave
})
// 获取市级列表
this.citylist(atsave)
}
},
/**
* 市级列表
*/
citylist(id, city) {
wx.$api.address.create({parent_id: id}).then(res=>{
let cityArr = res
this.setData({
cityArr : cityArr,
cityId : cityArr[0].id,
cityIndex : 0
})
if(city){
// 获取区域列表
this.regilist(city[1].id, city)
this.setData({
cityIndex: res.findIndex(val => val.id == city[1].id),
cityId : city[1].id
})
}else{
// 获取区域列表
this.regilist(cityArr[0].id)
}
})
},
/**
* 城市选择-筛选
*/
city(e) {
let city = this.data.cityArr,
index = e.detail.value,
atcity = city[index].id
if (index != this.data.saveIndex) {
this.setData({
cityIndex: index,
cityId : atcity
})
// 获取市级列表
this.regilist(atcity)
}
},
/**
* 区域列表
*/
regilist(id, city) {
wx.$api.address.create({parent_id: id}).then(res=>{
this.setData({
regiArr : res,
regiId : res[0].id,
regiIndex : 0
})
if(city){
this.setData({
regiIndex: res.findIndex(val => val.id == city[2].id),
regiId : city[2].id
})
}
})
},
/**
* 区域选择-筛选
*/
regi(e) {
let newIndex = e.detail.value
this.setData({
regiIndex : newIndex,
regiId : this.data.regiArr[newIndex].id
})
},
/**
* 保存信息
*/
siteform(e) {
if(this.data.stateType == 'Compile') {
// 编辑地址
wx.$api.address.revise(this.data.id,{
name : e.detail.value.name,
mobile : e.detail.value.mobile,
province_id : this.data.saveId,
city_id : this.data.cityId,
district_id : this.data.regiId,
address : e.detail.value.address,
is_default : this.data.defaultVal
}).then(res=>{
wx.navigateBack()
})
}else if(this.data.stateType == 'Add') {
// 创建地址
wx.$api.address.add({
name : e.detail.value.name,
mobile : e.detail.value.mobile,
province_id : this.data.saveId,
city_id : this.data.cityId,
district_id : this.data.regiId,
address : e.detail.value.address,
is_default : this.data.defaultVal
}).then(res=>{
wx.navigateBack()
})
}
},
/**
* 设为默认地址
*/
addressDefault(e) {
let val = e.detail.value
this.setData({
defaultVal: val
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : ""
}

View File

@@ -0,0 +1,77 @@
<form bindsubmit="siteform" class="site-form">
<view class="uni-border-down site-input">
<label>
<image src="/static/mall_icon/mallAddress_00.png"></image>收货人:
</label>
<input placeholder="请输入收货人姓名" name="name" value="{{name}}"></input>
</view>
<view class="uni-border-down site-input">
<label>
<image src="/static/mall_icon/mallAddress_01.png"></image>手机号:
</label>
<input placeholder="请输入手机号码" name="mobile" type="number" value="{{mobile}}"></input>
</view>
<view class="uni-border-down site-input">
<label>
<image src="/static/mall_icon/mallAddress_02.png"></image>所在省份:
</label>
<picker bindchange="areasChange" value="{{saveIndex}}" range="{{saveArr}}" range-key="name" name="province_id">
<view class="picker">
{{saveArr[saveIndex].name}}
</view>
<image src="/static/mall_icon/mall_arrow.png"></image>
</picker>
</view>
<view class="uni-border-down site-input">
<label>
<image src="/static/mall_icon/mallAddress_02.png"></image>所在城市:
</label>
<picker bindchange="city" value="{{cityIndex}}" range="{{cityArr}}" range-key="name" class="conneColor"
name="city_id">
<view class="picker">
{{cityArr[cityIndex].name}}
</view>
<image src="/static/mall_icon/mall_arrow.png"></image>
</picker>
</view>
<view class="uni-border-down site-input">
<label>
<image src="/static/mall_icon/mallAddress_02.png"></image>所在区域:
</label>
<picker bindchange="regi" value="{{regiIndex}}" range="{{regiArr}}" range-key="name" class="conneColor"
name="district_id">
<view class="picker">
{{regiArr[regiIndex].name}}
</view>
<image src="/static/mall_icon/mall_arrow.png"></image>
</picker>
</view>
<view class="uni-border-down site-input">
<label>
<image src="/static/mall_icon/mallAddress_03.png"></image>详细地址:
</label>
<input placeholder="请输入详细地址" name="address" value="{{address}}"></input>
</view>
<view class="site-input site-switch" wx:if="{{defaultVal}}">
<label>默认地址</label>
<switch class="site-switch" style='zoom:.6;' bindchange="addressDefault" color="#ea4e2f" checked />
</view>
<view class="site-input site-switch" wx:else>
<label>设置默认地址</label>
<switch class="site-switch" style='zoom:.6;' bindchange="addressDefault" color="#ea4e2f" />
</view>
<!-- <view class="siteTag">
<view class="siteTag-title">标签</view>
<view class="siteTag-label">
<text class="active">家</text>
<text>公司</text>
<text>学校</text>
</view>
</view> -->
<view class="address-footer">
<button form-type="submit" size="mini">确定</button>
</view>
</form>

View File

@@ -0,0 +1,181 @@
/**
* 手太欠
* 物业小程序
*/
.site-form {
background: white;
display: block;
}
.site-input{
padding: 0 30rpx 0 200rpx;
position: relative;
line-height: 100rpx;
min-height: 100rpx;
}
.site-input label{
width: 220rpx;
position: absolute;
left: 30rpx;
top: 0;
display: flex;
}
.site-input image {
width: 28rpx;
height: 28rpx;
position: absolute;
right: 20rpx;
top: calc(50% - 14rpx);
}
.site-input input,
.site-input picker{
padding-left: 60rpx;
height: 100rpx;
}
.site-switch switch {
position: absolute;
right: 20rpx;
top: 0;
}
.site-input::before{
position: absolute;
bottom: 0;
left: 30rpx;
right: 0;
height: 1rpx;
content: "";
background: #e4e6f2;
}
.site-input:last-child::before{
display: none;
}
.tui-picker-detail{
width: 33%;
}
.siteTag {
display: flex;
margin: 50rpx 30rpx;
}
.siteTag-title {
margin-right: 20rpx;
}
.siteTag-label {
display: flex;
}
.siteTag-label text {
display: inline-block;
background-color: #eeeeee;
border-radius: 50rpx;
font-size: 26rpx;
padding: 6rpx 25rpx;
margin-left: 30rpx;
}
.siteTag-label text.active {
background-color: #224bf6;
color: #fff;
}
/* footer */
.address-footer{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding-left: 30rpx;
padding-right: 30rpx;
background: white;
border-top: 2rpx solid #eeeeee;
z-index: 9;
height: 130rpx;
}
.address-footer button[size="mini"]{
width: 100%;
line-height: 90rpx;
height: 90rpx;
margin: 20rpx 0;
text-align: center;
background: #224bf6;
font-size: 30rpx;
color: white;
border-radius: 60rpx;
}
/* pickerView */
.pickerView-back{
background: rgba(0, 0, 0, .3);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
}
.pickerView-back.active{
display: block;
}
.pickerView-layer{
position: fixed;
bottom: -571rpx;
left: 0;
width: 100%;
background: white;
transition: all .3s;
}
.pickerView-layer.active{
bottom: 0;
}
.pickerView-btn{
line-height: 90rpx;
font-size: 30rpx;
padding: 0 30rpx;
display: flex;
justify-content:space-between;
}
.pickerView{
height: 480rpx;
padding: 0 10rpx;
}
.pickerView-name{
line-height: 80rpx;
padding: 0 20rpx;
text-align: center;
}
.pickerView-mask{
border-top: solid 1rpx #e4e6f2;
}
.pickerView-indicator{
height: 80rpx;
}
.pickerView-determine{
color: #3ec28e;
}
.pickerView-cancel{
color: #747788;
}

View File

@@ -0,0 +1,23 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
commentArr: [], //商品评价列表
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
},
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "评价列表"
}

View File

@@ -0,0 +1,39 @@
<!-- 商品评价 -->
<view class="assessTag">
<text class="active">全部</text>
<text>最新</text>
<text>图片视频</text>
</view>
<!-- wx:for="{{commentArr}}" wx:key="commentArr" wx:for-index="goodsIndex" -->
<view class="uni-border-down assessList">
<view class="assessList-top">
<!-- {{item.user.avatar ? item.user.avatar : '/static/img/default_cover.png'} -->
<image class="assessList-img" src="/static/mall_icon/mallDetails_user.png" mode="aspectFill"></image>
<view class="assessList-cont">
<view class="assessList-name">张慢慢呀</view>
<view class="assessList-time">2020-12-04</view>
</view>
</view>
<!-- wx:if="{{item.content != ''}}" -->
<view class="assessList-text">
真的是太棒了,很满意的一次购物,真好,很喜欢
</view>
<!-- <block wx:if="{{item.cover != ''}}"></block> -->
<scroll-view class="assessList-float" scroll-x>
<!-- wx:for="{{item.cover}}" wx:key="items" wx:for-item="items" -->
<view class="assessList-picture">
<image src="/static/img/goods_text.png" mode="aspectFill" bindtap="clickImg" data-img="{{items}}"
data-index="{{goodsIndex}}"></image>
</view>
</scroll-view>
</view>
<!-- <view class="pagesLoding" wx:if="{{lodingStats}}">
<block wx:if="{{pages.has_more}}">
<image class="pagesLoding-icon" src="/static/img/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block wx:else>
没有更多了~
</block>
</view> -->

View File

@@ -0,0 +1,101 @@
/*
* 手太欠
* 企获客商城
*/
page {
background-color: #f7f7f7;
}
/* 评价标签 */
.assessTag {
background-color: white;
white-space: nowrap;
margin-bottom: 20rpx;
padding: 20rpx;
}
.assessTag text {
display: inline-block;
font-size: 28rpx;
background-color: #e6e8f0;
line-height: 60rpx;
padding: 0 30rpx;
border-radius: 40rpx;
margin: 15rpx;
}
.assessTag text.active {
background-color: #56669a;
color: #fff;
}
/* 评价列表 */
.assessList {
padding: 20rpx;
box-sizing: border-box;
background: #fff;
margin-bottom: 20rpx;
}
.assessList:last-child::after {
display: none;
}
.assessList-top {
display: flex;
line-height: 80rpx;
margin: 30rpx 0 20rpx;
}
.assessList-cont {
display: flex;
flex: 1;
width: calc(100% - 100rpx);
}
.assessList-img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.assessList-name {
flex: 1;
font-weight: 600;
}
.assessList-time {
color: #999;
font-size: 26rpx;
}
.assessList-text {
font-size: 26rpx;
line-height: 40rpx;
}
.assessList-float {
width: 100%;
white-space: nowrap;
margin: 20rpx 0 0;
}
.assessList-picture {
width: 150rpx;
display: inline-block;
height: 150rpx;
position: relative;
margin-right: 20rpx;
border-radius: 4rpx;
overflow: hidden;
}
.assessList-picture image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}

View File

@@ -0,0 +1,41 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
num : 4,//后端给的分数,显示相应的星星
one_2 : 0,
two_2 : 5
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
},
//情况二:用户给评分
in_xin(e){
var in_xin = e.currentTarget.dataset.in;
var one_2;
if (in_xin === 'use_sc2'){
one_2 = Number(e.currentTarget.id);
} else {
one_2 = Number(e.currentTarget.id) + this.data.one_2;
}
this.setData({
one_2: one_2,
two_2: 5 - one_2
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "商品评价"
}

View File

@@ -0,0 +1,54 @@
<!-- 评价表单 -->
<view class="goods">
<image class="goodsImg" src="/static/img/goods_text.png" mode="aspectFill"></image>
<view class="goodsCont">
<view class="nowrap goodsCont-name">
商品名称哦
</view>
<view class="goodsCont-star">
<view class="goodsCont-star-icon">
<block wx:for="{{one_2}}" wx:key="index">
<image catchtap='in_xin' id='{{index+1}}' data-in='use_sc2'
src='/static/mall_icon/mallStar_avtive.png'>
</image>
</block>
<block wx:for="{{two_2}}" wx:key="index">
<image catchtap='in_xin' id='{{index+1}}' data-in='use_sc' src='/static/mall_icon/mallStar.png'>
</image>
</block>
</view>
<view class="goodsCont-star-number">{{one_2}}星</view>
</view>
</view>
</view>
<form bindsubmit="siteform" class="site-form">
<!-- 评价内容 -->
<view class="texTarea">
<textarea bindblur="bindTextAreaBlur" maxlength="50" auto-focus placeholder="感觉怎么样,跟大家分享一下吧。~~" value="{{remarks}}" name="remarks" />
<text>50字以内</text>
</view>
<!-- 图片上传 -->
<view class="papers">
<view class="papers-title">添加图片9张</view>
<view class="issue-info-img">
<view class="issue-info-img-itme issue-info-img-tag" wx:for="{{paths}}" wx:key="imgs">
<image class="form-img" mode="aspectFill" src="{{item}}"></image>
<text class="issue-info-img-remove" data-index="{{index}}" bindtap="removeImg">×</text>
</view>
<!-- wx:if="{{imgs.length < 9}}" -->
<view class="issue-info-img-itme">
<view class="issue-info-img-add" bindtap="formUploadFile">
<image src="/static/mall_icon/adddefault-bg.png" mode="widthFix"></image>
<view>添加图片</view>
</view>
</view>
</view>
</view>
<!-- 提交 -->
<view class="site-btn">
<button form-type="submit" size="mini">发表评价</button>
</view>
</form>

View File

@@ -0,0 +1,173 @@
/*
* 手太欠
* 企获客商城
*/
page {
background-color: #f7f7f7;
}
/* 评星 */
.goods {
margin: 20rpx 0;
background-color: white;
padding: 30rpx;
box-sizing: border-box;
position: relative;
}
.goodsImg {
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
}
.goodsCont {
position: absolute;
top: 40rpx;
left: 200rpx;
right: 30rpx;
width: calc(100% - 230rpx);
}
.goodsCont-name {
font-size: 34rpx;
margin-bottom: 20rpx;
}
.goodsCont-star {
display: flex;
}
.goodsCont-star-icon image {
height: 50rpx;
width: 50rpx;
display: inline-block
}
.goodsCont-star-number {
margin-left: 20rpx;
line-height: 50rpx;
}
/* 多图上传图片 */
.papers {
background: #fff;
padding: 30rpx;
box-sizing: border-box;
margin: 20rpx 0;
}
.papers-title {
font-weight: 600;
font-size: 30rpx;
}
.issue-info-img {
padding: 20rpx 0;
display: flex;
flex-wrap: wrap;
margin: 0 -10rpx;
}
.issue-info-img-itme {
width: calc(33.33% - 20rpx);
padding-top: calc(33.33% - 20rpx);
box-sizing: border-box;
position: relative;
margin: 10rpx;
}
.issue-info-img-itme>image {
width: 100%;
height: calc(100% - 20rpx);
height: -webkit-calc(100% - 20rpx);
position: absolute;
top: 10rpx;
left: 0;
}
.issue-info-img-remove {
position: absolute;
z-index: 5;
top: -5rpx;
right: -6rpx;
height: 36rpx;
width: 36rpx;
text-align: center;
line-height: 34rpx;
background: #ec202c;
color: white;
font-size: 28rpx;
font-weight: bold;
border-radius: 50%;
}
.issue-info-img-add {
position: absolute;
top: 10rpx;
bottom: 10rpx;
width: 100%;
left: 0;
text-align: center;
background: #f3f4f8;
color: #8d8d8d;
font-size: 24rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-pack: center;
}
.issue-info-img-add image {
width: 48rpx;
vertical-align: bottom;
margin-bottom: 15rpx;
margin-top: 15rpx;
}
.issue-info-img-hint {
line-height: 60rpx;
color: #666;
font-size: 26rpx;
padding: 0 30rpx 15rpx 30rpx;
}
/* 评论 */
.texTarea {
background: #fff;
padding: 30rpx;
box-sizing: border-box;
margin: 20rpx 0;
font-size: 28rpx;
width: 100%;
height: 200rpx;
}
.texTarea texTarea {
width: 100%;
height: 120rpx;
}
.texTarea text {
text-align: right;
display: block;
font-size: 24rpx;
color: #999;
}
.site-btn {
width: calc(100% - 40rpx);
margin: 30rpx 20rpx;
}
.site-btn button[size="mini"]{
width: 100%;
background: #224bf6;
height: 94rpx;
line-height: 94rpx;
border-radius: 50rpx;
font-size: 30rpx;
color: white;
padding: 0;
}

View File

@@ -0,0 +1,230 @@
/*
* 手太欠
* 星光网-商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
carArr : [], //购物车列表
allCheckbox : false, //全选
bagNumber : 0, //合计多少件商品
allPrice : '0.00', //合计金额
number : 0,
total : '0', //价格
cartId : 0, //购物车id
paramsCart : [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// 获取购物车列表
this.carInfo();
},
/**
* 购物车列表
*/
carInfo() {
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
wx.$api.mall.carKist().then(res => {
console.log(res)
this.setData({
carArr: res.lists
})
})
},
/**
* 单选
*/
checkbox(e){
let goodsIndex = e.currentTarget.dataset.goods,
goodsList = this.data.carArr,
checkbox = goodsList[goodsIndex].is_check,
sellerLength = 0
goodsList[goodsIndex].is_check = !checkbox
for(let i of goodsList){
if(i.is_check){
sellerLength++
if(sellerLength == goodsList.length){
this.setData({
allCheckbox: true
})
}
}else{
if(this.data.allCheckbox){
this.setData({
allCheckbox: false
})
}
}
}
this.setData({
carArr : goodsList
})
// 获取计算价格
this.totalPrice()
},
/**
* 全选
*/
allCheckbox(){
let bagList = this.data.carArr,
allCheckbox = this.data.allCheckbox
allCheckbox = !allCheckbox
for(let i of bagList){
i.is_check = allCheckbox
}
this.setData({
paramsCart : params,
allCheckbox : allCheckbox,
carArr : bagList
})
console.log(this.data.paramsCart)
// 获取计算价格
this.totalPrice()
},
/**
* 商品数量加减
*/
goodsNumber(e){
let goodsId = e.currentTarget.dataset.id,
goodsIndex = e.currentTarget.dataset.goods,
goodsNew = this.data.carArr,
goodsNumber = goodsNew[goodsIndex].number
if (e.currentTarget.dataset.type == 'plus'){
wx.$api.mall.increment(goodsId).then(res => {
goodsNew[goodsIndex].number = res.number
goodsNew[goodsIndex].total = res.total
this.setData({
carArr : goodsNew
})
// 获取计算价格
this.totalPrice()
})
}else{
if (goodsNumber > 1){
wx.$api.mall.decrement(goodsId).then(res => {
goodsNew[goodsIndex].number = res.number
goodsNew[goodsIndex].total = res.total
this.setData({
carArr : goodsNew
})
// 获取计算价格
this.totalPrice()
})
}else{
wx.showToast({
title : '商品数量不能小于1',
icon : 'none'
})
}
}
},
/**
* 计算价格
*/
totalPrice() {
let bagNumber = 0,
allPrice = 0,
goodsList = this.data.carArr
for (let i of goodsList){
if(i.is_check){
bagNumber = bagNumber + i.number
allPrice = allPrice + i.total
}
}
this.setData({
bagNumber : bagNumber,
allPrice : allPrice
})
},
/**
* 菜单
*/
actionSheet(e){
let goodIndex = e.currentTarget.dataset.goods,
goodRowid = e.currentTarget.dataset.rowid,
goodsList = this.data.carArr,
allCheckbox = this.data.allCheckbox
wx.showActionSheet({
itemList: ['删除'],
success : res=>{
if(res.tapIndex == 0){
wx.$api.mall.carRemove({ids: goodRowid}).then(res=>{
goodsList.splice([goodIndex],1)
if (goodsList.length == 0){
allCheckbox = false
}
this.setData({
allCheckbox : allCheckbox,
carArr : goodsList
})
// 获取计算价格
this.totalPrice()
})
}
}
})
},
/**
* 结算
*/
bagOrder() {
let arrCart = this.data.carArr,
params = new Array
for (var i of arrCart){
params.push(i.id)
}
let listData = params.join(",")
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
wx.navigateTo({
url: '/pages/mall_order_submit/mall_order_submit?cart_ids=' + listData + '&type=arrCart'
})
},
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "购物车"
}

View File

@@ -0,0 +1,54 @@
<!-- 内容 -->
<view class="bag-content">
<view class="bag-content-mall" wx:if="{{carArr.length > 0}}">
<view class="ce-white ce-radius bag-content-mall-goods" wx:for="{{carArr}}" wx:key="carArr"
wx:for-index="goodsIndex">
<view class="checkbox">
<checkbox checked="{{item.is_check}}" data-goods="{{goodsIndex}}" data-rowid="{{item.rowid}}"
bindtap="checkbox"></checkbox>
</view>
<image class="mall-good-cover" src="{{item.goods.cover}}" mode="aspectFill"></image>
<view class="mall-good-content">
<view class="mall-good-title nowrap">{{item.goods.title}}</view>
<view class="mall-good-value nowrap"><text wx:for="{{item.attr}}" wx:key="attr"
wx:for-item="attrItem">{{attrItem}}</text></view>
<view class="mall-good-price nowrap">
¥{{item.prices.amount}}
<view class="mall-good-number">
<view class="mall-good-number-btn" data-goods="{{goodsIndex}}" data-id="{{item.id}}"
bindtap="goodsNumber" data-type="remove">-</view>
<input class="mall-good-number-input" data-goods="{{goodsIndex}}" value="{{item.number}}"
type="number" bindblur="goodsNumberInput" disabled></input>
<view class="mall-good-number-btn" data-goods="{{goodsIndex}}" data-id="{{item.id}}"
bindtap="goodsNumber" data-type="plus">+</view>
</view>
</view>
</view>
<view class="mall-good-more" bindtap="actionSheet" data-goods="{{goodsIndex}}" data-rowid="{{item.id}}">
<image src="/static/mall_icon/bag_more_icon.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="cart-hint" wx:else>
<image class="cart-hint-img" src="/static/img/car_icon.png"></image>
<view>购物车空空如也,快去首页购物吧~</view>
<navigator class="cart-hint-click" hover-class="none" url="/pages/index/index" open-type="switchTab">
去购物
</navigator>
</view>
</view>
<!-- 结算 -->
<view class="bag-footer" wx:if="{{carArr.length > 0}}">
<view class="bag-footer-select">
<view class="checkbox allCheckbox">
<checkbox checked="{{allCheckbox}}" bindtap="allCheckbox"></checkbox>
</view>
全选
</view>
<view class="bag-footer-right">
<view class="bag-footer-price">合计:<text>¥{{allPrice}}</text></view>
<button class="bag-footer-btn" size="mini" bindtap="bagOrder" disabled="{{bagOrderLoading}}"
loading="{{bagOrderLoading}}">结算({{bagNumber}})</button>
</view>
</view>

View File

@@ -0,0 +1,258 @@
page {
background-color: #f7f7f7;
}
/* 内容区域 */
.bag-content {
margin: 20rpx;
}
.bag-content-mall {
padding-bottom: 20rpx;
}
.bag-content-mall-name {
line-height: 80rpx;
padding: 0 30rpx;
border-bottom: solid 1rpx #e5e7f3;
}
.bag-content-mall-goods {
position: relative;
padding: 30rpx 20rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.mall-good-cover {
width: 148rpx;
height: 148rpx;
background: #f5f6fa;
vertical-align: top;
}
.mall-good-content {
position: absolute;
top: 30rpx;
left: 268rpx;
right: 80rpx;
}
.mall-good-value {
color: #747788;
font-size: 26rpx;
line-height: 48rpx;
}
.mall-good-value text {
padding-right: 10rpx;
}
.mall-good-title {
line-height: 40rpx;
}
.mall-good-price {
color: #eb532a;
padding-top: 14rpx;
height: 50rpx;
line-height: 50rpx;
font-weight: bold;
padding-right: 200rpx;
position: relative;
}
.mall-good-number {
display: flex;
position: absolute;
right: 0;
top: 10rpx;
width: 180rpx;
font-weight: normal;
text-align: center;
height: 50rpx;
border: 2rpx solid #d6d6d6;
overflow: hidden;
border-radius: 10rpx;
}
.mall-good-number-btn {
width: 50rpx;
}
.mall-good-number-input {
flex: 1;
margin: 0 6rpx;
height: 50rpx;
line-height: 50rpx;
border-left: 2rpx solid #d6d6d6;
border-right: 2rpx solid #d6d6d6;
}
.mall-good-number-input,
.mall-good-number-btn {
background: #fff;
color: #464854;
}
.mall-good-more {
height: 148rpx;
line-height: 148rpx;
width: 36rpx;
position: absolute;
top: 20rpx;
right: 0;
padding: 0 20rpx;
}
.mall-good-more image {
width: 100%;
vertical-align: middle;
}
/* checkbox */
.checkbox {
height: 40rpx;
width: 40rpx;
line-height: 40rpx;
display: inline-block;
padding-top: 54rpx;
padding-right: 30rpx;
}
.checkbox.sellerCheckbox,
.checkbox.allCheckbox {
padding-top: 0;
}
.checkbox.allCheckbox {
padding-right: 10rpx;
}
.checkbox checkbox {
vertical-align: top;
margin-top: -2rpx;
}
.checkbox checkbox .wx-checkbox-input {
background: white;
border-radius: 50%;
border: solid 3rpx #464854;
height: 34rpx;
width: 34rpx;
}
.checkbox checkbox .wx-checkbox-input.wx-checkbox-input-checked {
background: #224bf6;
border-color: #224bf6;
}
.checkbox checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
color: white;
line-height: 34rpx;
text-align: center;
width: 34rpx;
height: 34rpx;
font-size: 32rpx;
}
/* footer */
.bag-footer {
border-bottom: solid 1rpx #e5e7f3;
border-top: solid 1rpx #e5e7f3;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 0 20rpx;
height: 100rpx;
box-sizing: border-box;
display: flex;
}
.bag-footer,
.bag-header {
background: white;
z-index: 9;
}
.bag-footer-price {
font-size: 32rpx;
line-height: 100rpx;
margin-right: 40rpx;
}
.bag-footer-price text {
color: #eb532a;
padding-left: 10rpx;
font-weight: 600;
}
.bag-footer-rests {
color: #747788;
font-size: 26rpx;
}
.bag-footer-btn[size="mini"] {
width: 200rpx;
height: 76rpx;
line-height: 76rpx;
padding: 0;
border-radius: 40rpx;
background: #eb532a;
color: white;
font-size: 32rpx;
margin-top: 13rpx;
font-weight: normal;
}
.bag-footer-btn::after {
border: none;
}
.bag-footer-select {
position: absolute;
left: 20rpx;
top: 0;
line-height: 100rpx;
}
.bag-footer-right {
display: flex;
position: absolute;
right: 20rpx;
top: 0;
height: 100rpx;
}
/* 购物车为空 */
.cart-hint {
background: #fff;
padding: 40rpx 0;
text-align: center;
color: #767676;
font-size: 26rpx;
}
.cart-hint-img {
width: 240rpx;
height: 240rpx;
border-radius: 50%;
}
.cart-hint-click {
width: 200rpx;
height: 70rpx;
line-height: 70rpx;
text-align: center;
border-radius: 80rpx;
border: 2rpx solid #fe4b51;
color: #fe4b51;
margin: 40rpx auto 0;
}

View File

@@ -0,0 +1,85 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
stairIndex : 0, //左侧下标默认
firstList : [], //左侧数据列表
stairTitle : '', //右侧分类标题名
categoryId : 0, //右侧传参id
secondList : [], //右侧数据列表
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
// 获取商城左侧数据
this.mallFirst();
},
/**
* 商城左侧数据
*/
mallFirst () {
wx.$api.mall.first().then(res=>{
this.setData({
firstList : res,
categoryId : res[0].category_id,
stairTitle : res[0].title
})
// 获取商城右侧数据
this.mallSecond();
})
},
/**
* 商城右侧数据
*/
mallSecond () {
wx.$api.mall.second({
category_id : this.data.categoryId
}).then(res=>{
this.setData({
secondList : res
})
})
},
/**
* 更新左侧分类
*/
stairNav(e){
let categoryid = e.currentTarget.dataset.id,
index = e.currentTarget.dataset.index,
firstNew = this.data.firstList
if(this.data.categoryId != categoryid){
this.setData({
stairTitle: firstNew[index].title,
categoryId: categoryid
})
// 获取商城右侧数据
this.mallSecond();
}
},
/**
* 页面跳转
*/
jumpUrl(e){
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/mall_goods/mall_goods?sort=' + id,
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText": "商品分类"
}

View File

@@ -0,0 +1,21 @@
<!-- 商品分类 -->
<scroll-view class="stair-nav" scroll-y>
<view class="nowrap stair-nav-li {{categoryId == item.category_id ? 'active' : ''}}" bindtap="stairNav" wx:for="{{firstList}}" wx:key="firstList" data-index="{{index}}" data-id="{{item.category_id}}">
{{item.title}}
</view>
</scroll-view>
<scroll-view class="level-content" scroll-y>
<view class="levelList-title">{{stairTitle}}</view>
<view class="level-nav" wx:if="{{secondList.length > 0}}">
<view class="level-nav-li" wx:for="{{secondList}}" wx:key="secondList" data-id="{{item.category_id}}" bindtap="jumpUrl">
<view class="level-nav-cover">
<image src="{{item.cover_url}}" mode="aspectFill"></image>
</view>
<view class="level-nav-title">{{item.title}}</view>
</view>
</view>
<!-- <view class="level-tips" wx:else>
暂无分类数据
</view> -->
</scroll-view>

View File

@@ -0,0 +1,82 @@
/*
* 手太欠
* 企获客商城模块
*/
/* 一级分类 */
.stair-nav{
position: fixed;
top: 0;
left: 0;
background: #f7f7f7;
height: 100vh;
width: 200rpx;
text-align: center;
z-index: 9;
padding-top: 20rpx;
box-sizing: border-box;
}
.stair-nav-li{
line-height: 100rpx;
}
/* 二级分类 */
.level-content{
position: fixed;
top: 0;
left: 0;
margin-left: 200rpx;
width: calc(100vw - 200rpx);
width: -webkit-calc(100vw - 200rpx);
height: 100vh;
padding: 10rpx;
background: white;
box-sizing: border-box;
}
.levelList-title {
color: #2c2c2c;
padding: 20rpx;
font-weight: 600;
}
.level-nav{
display: flex;
flex-wrap:wrap;
}
.level-nav-li{
width: 33.333%;
text-align: center;
padding: 10rpx;
box-sizing: border-box;
}
.stair-nav-li.active {
background-color: #fff;
}
.level-nav-cover{
width: 100%;
padding-top: 100%;
position: relative;
border-radius: 10rpx;
overflow: hidden;
}
.level-nav-cover image {
position: absolute;
border-radius: 4rpx;
width: 60%;
height: 60%;
left: 20%;
top: 20%;
}
.level-nav-title{
font-size: 28rpx;
color: #464854;
}

View File

@@ -0,0 +1,292 @@
/*
* 手太欠
* 星光网-商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
goosId : '', //商品id
storyData : '', //商品详情
content : '', //商品详情介绍
storeCoupons: [], //全场优惠券
coupons : [], //商品优惠券
couponShow : false, //优惠券弹出状态
specsShow : false, //规格弹出状态
goodsNumber : '1', //input商品数量
changeSku : [], //规格选择
shareShow : false, //分享弹出
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
goosId: options.id
})
},
onShow() {
// 获取商品详情
this.storyInfo();
},
/**
* 商品详情
*/
storyInfo() {
wx.$api.mall.details(this.data.goosId).then(res => {
console.log(res)
this.setData({
storyData : res,
storeCoupons: res.store_coupons, //全场优惠券数组
coupons : res.coupons, //商品优惠券数组
skus : res.skus, //规格数据
changeSku : res.skus.default_attr, //规格默认
prices : res.skus.prices, //规格所有组合
content : res.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
})
})
},
/**
* 优惠券弹出
*/
couponTap() {
this.setData({
couponShow: !this.data.couponShow
})
},
/**
* 优惠券关闭
*/
couponHide() {
this.setData({
couponShow: !this.data.couponShow
})
},
/**
* 规格弹出
*/
specsTap() {
this.setData({
specsShow: !this.data.specsShow
})
},
/**
* 规格关闭
*/
specsHide() {
this.setData({
specsShow: !this.data.specsShow
})
},
/**
* 规格选择
*/
selectSku(e) {
let name = e.currentTarget.dataset.name, //规格名称
attr = e.currentTarget.dataset.attr, //规格标题
changeSku = this.data.changeSku, //规格默认
prices = this.data.prices //规格所有组合
changeSku.attr[name] = attr;
for (let attr_id in prices) {
let i = true;
for (let name in changeSku.attr) {
if (prices[attr_id][name] != changeSku.attr[name]) {
i = false;
break;
}
}
if (i) {
changeSku.sku_id = attr_id;
changeSku.prices = prices[attr_id];
break;
}
}
this.setData({
changeSku: changeSku
})
},
/**
* 优惠券领取
*/
drawTap(e) {
let id = e.currentTarget.dataset.id
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
wx.$api.mall.grant({
coupon_id: id
}).then(res => {
wx.showToast({
title: res,
// title: '恭喜你抢到了',
icon: 'none'
})
})
},
/**
* 产品数量
*/
goodsNumber(e){
let type = e.currentTarget.dataset.type,
atNumber = this.data.goodsNumber
if(type == "plus"){
if(atNumber < this.data.changeSku.prices.stock){
atNumber++
}else{
wx.showToast({
title: "商品数量不足",
icon : "none"
})
}
}else if(type == "remove"){
if(atNumber > 1){
atNumber--
}else{
wx.showToast({
title: "商品数量不能小于1",
icon : "none"
})
}
}
this.setData({
goodsNumber: atNumber
})
},
/**
* 输入产品数量
*/
goodsNumberInput(e){
let value = e.detail.value,
atNumber = this.data.goodsNumber
if(value > 1){
if(value <= this.data.changeSku.prices.stock){
atNumber = value
}else{
atNumber = this.data.changeSku.prices.stock
wx.showToast({
title: "商品数量不足",
icon : "none"
})
}
}else{
wx.showToast({
title: "商品数量不能小于1",
icon : "none"
})
}
this.setData({
goodsNumber: atNumber
})
},
/**
* 加入购物车
*/
addBag(){
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
wx.$api.mall.jionCar({
sku_id : this.data.changeSku.sku_id,
goods_id: this.data.goosId,
number : this.data.goodsNumber
}).then(res => {
this.setData({
specsShow: !this.data.specsShow
})
})
},
/**
* 结算
*/
buy() {
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
if(this.data.changeSku.prices.stock != '') {
if(this.data.changeSku.prices.stock < this.data.goodsNumber) {
wx.showToast({
title : '抱歉,库存不足',
icon : 'none'
})
} else {
wx.navigateTo({
url: '/pages/mall_order_submit/mall_order_submit?skuId=' + this.data.changeSku.sku_id + '&qty=' + this.data.goodsNumber
})
this.setData({
specsShow: false
})
}
}
},
/**
* 分享
*/
shareLay(e) {
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
this.setData({
shareShow: !this.data.shareShow
})
},
/**
* 分享-关闭
*/
shareLayEnd(e) {
this.setData({
shareShow: false
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
this.setData({
shareShow: false
})
},
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "商品详情"
}

View File

@@ -0,0 +1,274 @@
<!-- 轮播 -->
<view class="banner">
<swiper class="swiperCont" indicator-dots='true' indicator-color='rgba(255,255,255,.5)'
indicator-active-color='#fff' autoplay='true'>
<swiper-item wx:for="{{storyData.pictures}}" wx:key="pictures">
<image class="swiperImg" src="{{item}}" mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<!-- 商品 -->
<view class="goods">
<view class="goodsShare" bindtap="shareLay">
<image src="/static/mall_icon/goodsShare_icon.png"></image>分享
</view>
<view class="goods-price">
<view class="goods-price-prime"><text>¥</text>{{changeSku.prices.price}}</view>
<view class="goods-price-cost">¥{{changeSku.prices.cast}}</view>
</view>
<view class="recommend-tips">
<view class="recommend-mark">
<text class="recommend-vip">vip</text>
¥{{changeSku.prices.vip}}
</view>
</view>
<view class="goods-title">
<view class="goods-title-name">{{storyData.title}}</view>
<view class="nowrap-multi goods-title-text">{{storyData.description}}</view>
</view>
<view class="goodsMember">
<view class="goodsMember-name">
<image class="goods-tips-gold" src="/static/mall_icon/mallDetails_member_grey.png"></image>开通会员,尊享会员价
</view>
<view class="goodsMember-btn">立即开通<image class="goods-tips-arrow" src="/static/mall_icon/mall_arrow.png">
</image>
</view>
</view>
<view class="goods-tips">
<image class="goods-tips-gold" src="/static/mall_icon/mallDetails_gold.png"></image>
分享奖 <text>¥{{changeSku.prices.bonus1}}</text>
</view>
<view class="specs" bindtap="specsTap">
<view class="specsName">
<view class="specsTitle">规格:</view>
<view class="specsGive" wx:for="{{changeSku.attr}}" wx:key="attr">
<!-- <text class="specsGive-name">{{index}} -</text> -->
{{item}}<text>/</text>
</view>
</view>
</view>
<view class="specs">
<view class="specsName">
<view class="specsTitle">邮费:</view>
包邮
</view>
<view class="specsText">已售:<text>{{storyData.sell_number}}</text></view>
</view>
</view>
<!-- 优惠券 -->
<view class="coupon">
<view class="specs" bindtap="couponTap">
<view class="specsName">
<view class="specsTitle">优惠:</view>
<view class="couponTips">
领取优惠券
</view>
</view>
<image class="specsName-arrow" src="/static/mall_icon/mall_arrow.png"></image>
</view>
</view>
<!-- 企业名称 -->
<view class="coupon">
<view class="specs">
<view class="specsName">
<image class="specsName-company" src="/static/mall_icon/mallDetails_company.png"></image>
<view class="specsTitle">企业名称A</view>
</view>
<view class="specsUser">
<image class="specsUser-img" src="/static/mall_icon/mallDetails_user.png"></image>
<view class="specsUser-text">
<text>用户A</text>
<view class="specsUser-member">
<image src="/static/mall_icon/mallDetails_member.png"></image>会员
</view>
</view>
</view>
</view>
</view>
<!-- 用户评价 -->
<view class="assess">
<view class="assess-title">
<view class="assess-title-name">用户评价<text>(100)</text></view>
<navigator hover-class="none" url="/pages/mall_assess/mall_assess" class="assess-title-more">
<image src="/static/mall_icon/mall_arrow.png"></image>
</navigator>
</view>
<scroll-view class="assess-list" scroll-x>
<view class="assess-label">
<view class="assess-cont">
<view class="assess-user">
<image class="assess-user-head" src="/static/mall_icon/mallDetails_user.png"></image>
<view class="nowrap">看看**看看看看</view>
</view>
<view class="nowrap-multi assess-user-text">产品好好,真棒产品好好,真棒产品好好,真棒</view>
</view>
<image class="assess-img" src="/static/img/goods_text.png"></image>
</view>
<view class="assess-label">
<view class="assess-cont">
<view class="assess-user">
<image class="assess-user-head" src="/static/mall_icon/mallDetails_user.png"></image>
<view class="nowrap">看看**看看看看</view>
</view>
<view class="nowrap-multi assess-user-text">产品好好,真棒产品好好,真棒产品好好,真棒</view>
</view>
<image class="assess-img" src="/static/img/goods_text.png"></image>
</view>
</scroll-view>
</view>
<!-- 商品详情 -->
<view class="details">
<view class="details-title">商品详情</view>
<rich-text nodes="{{content}}"></rich-text>
<view class="details-footer {{statusBarHeight > 30 ? 'iphoneX':''}}">已经到底拉,在往上逛一逛吧</view>
</view>
<!-- 底部菜单栏 -->
<view class="footer">
<view class="footer-img">
<navigator class="footer-img-tool">
<image src="/static/mall_icon/mallDetails_service.png"></image>
客服
</navigator>
<navigator hover-class="none" url="/pages/mall_cart/mall_cart" class="footer-img-tool">
<image src="/static/mall_icon/mallDetails_car.png"></image>
购物车
<text>1</text>
</navigator>
</view>
<view class="footer-btn" bindtap="specsTap">
<view class="footer-btn-car">加入购物车</view>
<view class="footer-btn-buy">立即购买</view>
</view>
</view>
<!-- 优惠券弹出层 -->
<view class="couponBack {{couponShow ? 'active':''}}" bindtap="couponHide"></view>
<view class="couponEject {{couponShow ? 'active':''}}">
<image bindtap="couponHide" class="couponClose" src="/static/mall_icon/mall_close.png"></image>
<view class="couponEject-title">优惠</view>
<view class="couponEject-list">
<view class="couponEject-list-title">
全场优惠券
</view>
<view class="couponEject-list-label" wx:for="{{storeCoupons}}" wx:key="storeCoupons">
<view class="couponEject-list-line"></view>
<view class="couponEject-list-tips {{item.type_text == '代金券' ? 'couponEject-list-tips-yellow': ''}}">
{{item.type_text}}</view>
<image class="couponEject-list-back"
src="{{item.type_text == '代金券' ? '/static/mall_icon/mallCoupon_back_yellow.png' : '/static/mall_icon/mallCoupon_back.png'}}">
</image>
<view class="couponEject-list-cont">
<view class="couponEject-list-left">
<view class="couponEject-list-price">
<block wx:if="{{item.type_text == '代金券'}}"><text>¥</text>{{item.price}}</block>
<block wx:else>免费</block>
</view>
<view class="couponEject-list-name">{{item.title}}<text>无门槛免费使用</text></view>
</view>
<view wx:if="{{!item.isHave}}" class="couponEject-list-btn {{item.type_text == '代金券' ? 'couponEject-list-yellow' : ''}}" bindtap="drawTap" data-id="{{item.id}}">
立即领取
</view>
<view wx:else class="couponEject-list-btn {{item.type_text == '代金券' ? 'couponEject-list-yellow' : ''}}">
已领取
</view>
</view>
</view>
</view>
<view class="couponEject-list">
<view class="couponEject-list-title">
商品优惠券
</view>
<view class="couponDraw-list-label" wx:for="{{coupons}}" wx:key="coupons">
<view class="couponDraw-list-tips">{{item.type_text}}</view>
<view class="couponDraw-list-price">
<view class="couponDraw-list-part">
<block wx:if="{{item.type_text == '代金券'}}"><text>¥</text>{{item.price}}</block>
<block wx:else>免费</block>
</view>
</view>
<view class="couponDraw-list-text">
<view class="couponDraw-list-name">{{item.title}}<text>{{item.type_text == '免费券' ? '免费券' : item.full}}</text></view>
<view class="couponDraw-list-btn" bindtap="drawTap" data-id="{{item.id}}">立即领取</view>
<view class="couponDraw-list-time">{{item.start_at}} - {{item.end_at}}</view>
</view>
</view>
</view>
</view>
<!-- 规格选择弹出 -->
<view class="specsBack {{specsShow ? 'active':''}}" bindtap="specsHide"></view>
<view class="specsEject {{specsShow ? 'active':''}}">
<image bindtap="specsHide" class="couponClose" src="/static/mall_icon/mall_close.png"></image>
<view class="specsEject-cont">
<view class="specsEject-goods">
<image class="specsEject-goods-img" src="/static/img/goods_text.png" mode="aspectFill"></image>
<view class="specsEject-goods-text">
<view class="specsEject-goods-price">¥{{changeSku.prices.price}}</view>
<view class="specsEject-goods-norms">
<text class="specsEject-goods-tips">已选:</text>
<view class="nowrap jectGive">
<!-- {{index}} - -->
<text wx:for="{{changeSku.attr}}" wx:key="attr">"{{item}}"</text>
</view>
</view>
<view class="specsEject-goods-stock"><text
class="specsEject-goods-tips">剩余:</text>{{changeSku.prices.stock}}件</view>
</view>
</view>
<view class="specsEject-label" wx:for="{{skus.attrs}}" wx:for-index="name" wx:for-item="attr" wx:key="attrs">
<view class="specsEject-label-title">{{name}}</view>
<view class="specsEject-label-opt">
<block wx:for="{{attr}}" wx:key="attr">
<text class="{{changeSku.attr[name] == item ? 'active':''}}" data-name="{{name}}"
data-attr="{{item}}" bindtap="selectSku">{{item}}</text>
</block>
</view>
</view>
<view class="specsEject-label">
<view class="specsEject-label-title">数量:</view>
<view class="specsEject-number">
<view class="specsEject-number-btn" bindtap="goodsNumber" data-type="remove">-</view>
<input class="specsEject-number-input" value="{{goodsNumber}}" type="number"
bindblur="goodsNumberInput"></input>
<view class="specsEject-number-btn" bindtap="goodsNumber" data-type="plus">+</view>
</view>
</view>
</view>
<view class="specsEject-footer">
<view class="footer-btn-car" bindtap="addBag">加入购物车</view>
<view class="footer-btn-buy" bindtap="buy">立即购买</view>
<!-- <navigator hover-class="none" url="/pages/mall_order_submit/mall_order_submit" class="specsEject-footer-btn">
立即购买</navigator> -->
</view>
</view>
<!-- 分享弹出 -->
<view class="share-back {{shareShow ? 'active':''}}" bindtap="shareLayEnd"></view>
<view class="share-layer {{shareShow ? 'active':''}}">
<view class="share-title">
<text>分享</text>
<image class="share-close" src="/static/mall_icon/close_icon.png" mode="aspectFill" bindtap="shareLayEnd"></image>
</view>
<view class="share-cont">
<button class="share-list share-list-after" hover-class="none" open-type="share">
<view class="share-list-img">
<image src="/static/mall_icon/share_wx.png" mode="aspectFill"></image>
</view>
<view class="share-list-text">微信好友</view>
</button>
<button class="share-list" hover-class="none" bindtap="canvasCode">
<view class="share-list-img">
<image src="/static/mall_icon/share_pyq.png" mode="aspectFill"></image>
</view>
<view class="share-list-text">海报分享</view>
</button>
</view>
<view class="share-tips">好物推荐,和大家一起分享你发现的好物</view>
</view>

View File

@@ -0,0 +1,946 @@
/*
* 手太欠
* 企获客商城模块
*/
page {
background-color: #f7f7f7;
}
/* 商品轮播 */
.banner {
overflow: hidden;
position: relative;
padding-top: 100%;
}
.swiperCont,
.swiperImg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* 商品名称 */
.goods {
padding: 30rpx;
box-sizing: border-box;
background-color: white;
position: relative;
}
.goodsShare {
position: absolute;
right: 0;
top: 50rpx;
background-color: #fa8442;
color: #fff;
display: flex;
font-size: 26rpx;
border-radius: 30rpx 0 0 30rpx;
line-height: 52rpx;
height: 52rpx;
padding: 0 12rpx 0 18rpx;
box-sizing: border-box;
}
.goodsShare image {
width: 28rpx;
height: 28rpx;
margin: 12rpx 10rpx 0 0;
}
.goods-price {
display: flex;
color: #ea4e2f;
}
.goods-price-prime {
font-size: 36rpx;
}
.goods-price-cost {
font-size: 26rpx;
color: #999;
text-decoration: line-through;
margin: 10rpx 0 0 30rpx;
}
.recommend-tips {
margin: 20rpx 0 30rpx;
}
.recommend-mark {
background-color: #f2e4c0;
border-radius: 6rpx;
display: inline-block;
font-size: 26rpx;
overflow: hidden;
height: 45rpx;
line-height: 45rpx;
padding-right: 20rpx;
}
.recommend-vip {
display: inline-block;
line-height: 45rpx;
background-color: #333333;
color: #f2e4c0;
padding: 0 20rpx;
}
.goods-title-name {
font-size: 36rpx;
margin-bottom: 20rpx;
}
.goods-title-text {
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
}
.goodsMember,
.goods-tips {
margin: 30rpx 0 20rpx;
border-radius: 10rpx;
line-height: 78rpx;
display: flex;
font-size: 26rpx;
}
.goodsMember {
background-color: #fbf7ec;
padding-right: 20rpx;
box-sizing: border-box;
}
.goodsMember-name {
display: flex;
flex: 1;
}
.goodsMember-btn {
display: flex;
}
.goods-tips-arrow {
width: 24rpx;
height: 24rpx;
margin: 28rpx 0 0 10rpx;
}
.goods-tips {
background-color: #f7f7f7;
border: 2rpx #f2f2f2 dotted;
}
.goods-tips text {
color: #ea4e2f;
padding-left: 20rpx;
}
.goods-tips-gold {
width: 34rpx;
height: 34rpx;
margin: 22rpx 20rpx;
}
.specs {
display: flex;
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
}
.specsName {
flex: 1;
display: flex;
}
.specsName text {
color: #a9a9a9;
padding: 0 10rpx;
}
.specsGive:last-child text {
display: none;
}
.specsTitle,
.specsText {
color: #000;
padding-right: 20rpx;
}
.specs,
.specsText text {
color: #666;
}
.specsGive {
font-size: 28rpx;
/* margin-right: 30rpx; */
line-height: 84rpx;
}
/* 优惠券 */
.coupon {
background-color: white;
padding: 10rpx 30rpx;
box-sizing: border-box;
margin: 20rpx 0;
}
.specsName-arrow {
width: 30rpx;
height: 30rpx;
margin-top: 25rpx;
}
.couponTips {
position: relative;
border: 2rpx dotted #ea4e2f;
color: #ea4e2f;
border-radius: 10rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 26rpx;
padding: 0 10rpx;
margin-top: 12rpx;
}
/* 企业名称 */
.specsName-company {
width: 36rpx;
height: 36rpx;
margin: 22rpx 20rpx 22rpx 0;
}
.specsUser,
.specsUser-text {
display: flex;
}
.specsUser-img {
width: 54rpx;
height: 54rpx;
margin: 13rpx 10rpx 0 0;
}
.specsUser-member {
border: 2rpx solid #ab8553;
color: #ab8553;
border-radius: 50rpx;
height: 44rpx;
line-height: 44rpx;
font-size: 26rpx;
display: flex;
margin: 16rpx 0 16rpx 10rpx;
padding: 0 10rpx;
}
.specsUser-member image {
width: 30rpx;
height: 30rpx;
margin: 7rpx 7rpx 7rpx 0;
}
/* 评价列表 */
.assess {
background-color: white;
}
.assess-title {
padding: 30rpx;
box-sizing: border-box;
display: flex;
}
.assess-title-name {
flex: 1;
font-size: 30rpx;
}
.assess-title-name text {
color: #999;
padding-left: 10rpx;
}
.assess-title-more image {
width: 30rpx;
height: 30rpx;
}
.assess-list {
white-space: nowrap;
}
.assess-label {
width: 500rpx;
height: 200rpx;
border-radius: 10rpx;
display: inline-block;
position: relative;
border: 2rpx solid #e7e7e7;
overflow: hidden;
margin: 0 0 20rpx 30rpx;
}
.assess-label:last-child {
margin-right: 30rpx;
}
.assess-img {
width: 200rpx;
height: 200rpx;
position: absolute;
right: 0;
top: 0;
}
.assess-cont {
position: absolute;
left: 0;
top: 0;
width: calc(100% - 200rpx);
font-size: 26rpx;
padding: 20rpx;
box-sizing: border-box;
}
.assess-user {
display: flex;
line-height: 60rpx;
margin-bottom: 25rpx;
}
.assess-user-head {
width: 60rpx;
height: 60rpx;
margin-right: 10rpx;
}
.assess-user-text {
padding: 0 10rpx;
box-sizing: border-box;
line-height: 40rpx;
white-space: initial;
}
/* 商品详情 */
.details {
background-color: white;
margin: 30rpx 0;
padding: 30rpx;
box-sizing: border-box;
}
.details-title {
margin-bottom: 20rpx;
font-weight: 600;
}
.details-footer {
border-bottom: solid 130rpx transparent;
line-height: 40rpx;
text-align: center;
font-size: 24rpx;
color: #747788;
padding-top: 20rpx;
margin-bottom: 20rpx;
}
/* 底部菜单栏 */
.footer {
background: #fff;
height: 100rpx;
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
width: 100%;
display: flex;
box-shadow: 0 -3rpx 3rpx 0 rgba(0, 0, 0, 0.05);
}
.footer-img,
.specsEject-footer-img {
width: 300rpx;
text-align: center;
font-size: 26rpx;
color: #575757;
display: flex;
margin-right: 20rpx;
}
.footer-img-tool {
width: 140rpx;
position: relative;
}
.footer-img-tool:first-child::after {
position: absolute;
content: '';
right: 0;
top: 15rpx;
background-color: #f1f1f1;
width: 2rpx;
height: calc(100% - 30rpx);
}
.footer-img-tool text {
font-size: 24rpx;
background-color: #fff;
border: #ff7020 2rpx solid;
color: #ff7020;
border-radius: 50%;
position: absolute;
display: inline-block;
top: 5rpx;
right: 25rpx;
width: 30rpx;
height: 30rpx;
transform: scale(0.8);
}
.footer-img image {
width: 48rpx;
height: 48rpx;
display: block;
margin: 10rpx auto 0;
}
.footer-btn{
width: calc(100% - 240rpx);
display: flex;
}
.footer-btn view,
.specsEject-footer view {
color: #fff;
height: 100%;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
width: 50%;
}
view.footer-btn-car {
background-color: #f8c232;
}
view.footer-btn-buy {
background-color: #f97b35;
}
/* 优惠券弹出层 */
.couponBack,
.specsBack {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .5);
z-index: 100;
display: none;
}
.couponBack.active,
.specsBack.active {
display: block;
}
.couponEject,
.specsEject {
position: fixed;
width: 100%;
bottom: -100%;
left: 0;
border-radius: 30rpx 30rpx 0 0;
background-color: white;
z-index: 101;
transition: .2s;
}
.couponEject.active,
.specsEject.active {
bottom: 0;
}
.couponClose {
width: 40rpx;
height: 40rpx;
position: absolute;
top: 30rpx;
right: 30rpx;
z-index: 103;
}
.couponEject-title {
text-align: center;
width: 100%;
padding: 30rpx 0 10rpx;
font-weight: 600;
}
.couponEject-list {
padding: 20rpx 30rpx;
box-sizing: border-box;
}
.couponEject-list-label {
position: relative;
width: 100%;
padding-top: 32%;
margin-bottom: 20rpx;
}
.couponEject-list-label::after,
.couponEject-list-label::before,
.couponDraw-list-label::after,
.couponDraw-list-label::before {
position: absolute;
content: '';
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: white;
z-index: 111;
}
.couponEject-list-label::after {
top: -15rpx;
right: 160rpx;
}
.couponEject-list-label::before {
bottom: -15rpx;
right: 160rpx;
}
.couponEject-list-title {
margin-bottom: 30rpx;
}
.couponEject-list-back {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 20rpx;
}
.couponEject-list-tips,
.couponDraw-list-tips {
position: absolute;
top: 0;
left: 0;
background-color: #c0d3fc;
color: #2151f5;
z-index: 102;
font-size: 26rpx;
border-radius: 10rpx 0 10rpx 0;
padding: 6rpx 20rpx;
}
.couponEject-list-cont {
z-index: 102;
position: absolute;
top: calc(50% - 45rpx);
left: 0;
right: 0;
color: #fff;
display: flex;
height: 90rpx;
}
.couponEject-list-left {
width: calc(100% - 200rpx);
display: flex;
margin-right: 40rpx;
}
.couponEject-list-price {
font-size: 50rpx;
position: relative;
width: 45%;
text-align: center;
font-weight: 600;
line-height: 90rpx;
}
.couponEject-list-price::after {
position: absolute;
content: '';
right: 0;
top: 0;
width: 2rpx;
height: 100%;
background-color: rgba(255, 255, 255, .5);
}
.couponEject-list-price text,
.couponDraw-list-part text {
font-size: 28rpx;
font-weight: normal;
}
.couponEject-list-name {
text-align: center;
width: 55%;
}
.couponEject-list-name text {
font-size: 26rpx;
display: block;
margin-top: 10rpx;
}
.couponEject-list-btn {
width: 140rpx;
color: #2d6bf6;
background-color: #fff;
border-radius: 50rpx;
text-align: center;
height: 56rpx;
line-height: 56rpx;
font-size: 28rpx;
box-shadow: 0 0 10rpx rgba(0, 50, 61, .2);
margin-top: 20rpx;
}
.couponEject-list-line {
position: absolute;
width: 0;
height: 100%;
content: '';
border: 2rpx dotted #fff;
right: 175rpx;
top: 0;
z-index: 102;
}
.couponEject-list-tips-yellow {
background-color: #fae5c2;
color: #bf7b06;
}
.couponEject-list-yellow {
color: #b67c18;
}
/* 已领取的优惠券 */
.couponDraw-list-label {
position: relative;
width: 100%;
padding-top: 32%;
border: 2rpx solid #eeeeee;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.couponDraw-list-label::after {
top: -15rpx;
left: calc(40% - 15rpx);
}
.couponDraw-list-label::before {
bottom: -15rpx;
left: calc(40% - 15rpx);
}
.couponDraw-list-tips {
background-color: #fae5c2;
color: #9b6404;
}
.couponDraw-list-price {
width: 40%;
background-color: #eea931;
color: #fff;
position: absolute;
height: 100%;
left: 0;
top: 0;
border-radius: 10rpx 0 0 10rpx;
text-align: center;
}
.couponDraw-list-part {
position: absolute;
width: 100%;
height: 70rpx;
top: calc(50% - 35rpx);
z-index: 102;
text-align: center;
font-size: 50rpx;
font-weight: 600;
}
.couponDraw-list-text {
position: absolute;
right: 0;
top: 0;
width: 60%;
padding: 10rpx 20rpx;
box-sizing: border-box;
}
.couponDraw-list-name text {
color: #999;
display: block;
font-size: 26rpx;
margin: 10rpx 0 5rpx;
}
.couponDraw-list-btn {
color: #b67c18;
border: 2rpx solid #b67c18;
border-radius: 50rpx;
display: inline-block;
font-size: 26rpx;
padding: 4rpx 30rpx;
float: right;
margin-bottom: 20rpx;
}
.couponDraw-list-time {
font-size: 26rpx;
color: #999;
clear: both;
}
/* 规格弹出 */
.specsEject-cont {
width: 100%;
padding: 30rpx;
box-sizing: border-box;
}
.specsEject-goods {
position: relative;
}
.specsEject-goods-img {
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
}
.specsEject-goods-text {
width: calc(100% - 160rpx);
left: 160rpx;
top: 0;
position: absolute;
}
.specsEject-goods-price {
color: #eb532a;
font-size: 34rpx;
}
.specsEject-goods-norms {
display: flex;
}
.specsEject-goods-norms,
.specsEject-goods-stock {
font-size: 26rpx;
margin-top: 10rpx;
}
.specsEject-goods-tips {
color: #999;
width: 80rpx;
}
.jectGive {
width: calc(100% - 80rpx);
}
.jectGive text {
padding-right: 10rpx;
}
.specsEject-label {
margin: 20rpx 0;
flex-wrap: wrap;
}
.specsEject-label-title {
margin-bottom: 20rpx;
}
.specsEject-label-opt {
margin: 0 -20rpx;
}
.specsEject-label-opt text {
font-size: 26rpx;
border: 2rpx solid #dedede;
border-radius: 50rpx;
margin: 10rpx;
padding: 10rpx 40rpx;
display: inline-block;
}
.specsEject-label-opt text.active {
border-color: #eb532a;
color: #eb532a;
}
.specsEject-number {
display: flex;
border: 2rpx solid #dddddd;
border-radius: 10rpx;
overflow: hidden;
width: 270rpx;
height: 64rpx;
line-height: 64rpx;
}
.specsEject-number-btn,
.specsEject-number-input {
width: 90rpx;
height: 100%;
text-align: center;
display: inline-block;
}
.specsEject-number-input {
position: relative;
}
.specsEject-number-input::after,
.specsEject-number-input::before {
position: absolute;
content: '';
top: 0;
width: 2rpx;
height: 100%;
background-color: #dddddd;
}
.specsEject-number-input::after {
left: 0;
}
.specsEject-number-input::before {
right: 0;
}
.specsEject-footer {
display: flex;
}
/* 分享弹出 */
.share-back {
position: fixed;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
z-index: 99;
left: 0;
top: 0;
display: none;
}
.share-back.active {
display: block;
}
.share-layer {
position: fixed;
bottom: -100%;
left: 0;
width: 100%;
background: white;
z-index: 100;
transition: all 0.2s;
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
}
.share-layer.active {
bottom: 0;
}
.share-title {
display: flex;
padding: 20rpx;
background: #f7f7f7;
margin-bottom: 20rpx;
}
.share-title text {
flex: 1;
}
.share-close {
width: 46rpx;
height: 46rpx;
}
.share-cont {
display: flex;
}
.share-list {
text-align: center;
flex: 2;
background: #fff;
}
.share-list-img {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
padding: 8rpx;
margin: 20rpx auto;
}
.share-list-img image {
width: 100%;
height: 100%;
}
.share-list-text {
font-size: 28rpx;
color: #6b6b6b;
font-weight: normal;
}
.share-tips {
background: #f7f7f7;
border-radius: 30rpx;
display: inline-flex;
padding: 8rpx 20rpx;
font-size: 26rpx;
margin: 40rpx 10rpx 30rpx 20rpx;
}
.share-list-after {
position: relative;
}
.share-list-after::after {
position: absolute;
content: '';
right: 0;
top: 25%;
height: 60%;
bottom: 15%;
background: #e9e9e9;
width: 2rpx;
}

View File

@@ -0,0 +1,182 @@
/**
* 手太欠
* 5g获客星光网 - 商城
*/
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
type : '', //列表类型 hotCut为优惠特卖 couponCut为免费券专区
title : '请输入查找的关键字', //搜索关键字标题
sortId : '', //行业分类id
dataArr : [], //列表数据
page : {}, //分页信息
lodingStats : false, //加载状态
ordertype : '', //排序类型 price为价格 sell为销量
orderasc : '', //排序方式 asc为正序 desc为倒序
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
this.setData({
type : options.type,
title : options.title,
sortId : options.sort
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow () {
// 拉取商品列表数据
this.goosInfo();
},
/**
* 商品列表数据
*/
goosInfo(page) {
let title = this.data.title,
orderasc = this.data.orderasc,
ordertype = this.data.ordertype
if(this.data.type == 'hotCut') {
wx.$api.mall.hotData({
title : title || '',
category_id : this.data.sortId || '',
orderasc : orderasc,
ordertype : ordertype,
page : page || '',
}).then(res=>{
let listArr = this.data.dataArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.setData({
dataArr : newData,
page : res.page,
lodingStats : false
})
wx.stopPullDownRefresh()
})
} else if(this.data.type == 'couponCut') {
wx.$api.mall.freeData({
title : title || '',
category_id : this.data.sortId || '',
orderasc : orderasc,
ordertype : ordertype,
page : page || '',
}).then(res=>{
let listArr = this.data.dataArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.setData({
dataArr : newData,
page : res.page,
lodingStats : false
})
wx.stopPullDownRefresh()
})
} else {
wx.$api.mall.lists({
title : title || '',
category_id : this.data.sortId || '',
orderasc : orderasc,
ordertype : ordertype,
page : page || '',
}).then(res=>{
let listArr = this.data.dataArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data)
this.setData({
dataArr : newData,
page : res.page,
lodingStats : false
})
wx.stopPullDownRefresh()
})
}
},
/**
* 销量排序
*/
orderTap (e) {
let type = e.currentTarget.dataset.type
this.setData({
ordertype : type,
})
if (this.data.orderasc == 'asc') {
this.setData({
orderasc : 'desc',
})
} else {
this.setData({
orderasc : 'asc',
})
}
// 拉取商品列表数据
this.goosInfo();
},
/**
* 综合推荐
*/
emptyTap() {
this.setData({
orderasc : '',
ordertype : ''
})
// 拉取商品列表数据
this.goosInfo();
},
/**
* 商品本页面搜索
*/
confirmTap(event) {
let searchvalue = event.detail.value
this.setData({
title : searchvalue
})
// 拉取商品列表数据
this.goosInfo();
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
// 拉取商品列表数据
this.goosInfo();
},
/**
* 上拉加载
*/
onReachBottom(){
this.setData({
lodingStats: true
})
let pageNumber = this.data.page.current
if(this.data.page.has_more){
pageNumber++
// 获取为您推荐
this.goosInfo(pageNumber);
}
}
})

View File

@@ -0,0 +1,5 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "商品",
"enablePullDownRefresh" : true
}

View File

@@ -0,0 +1,74 @@
<!-- 搜索 -->
<form bindsubmit="searchForm" class="mallSearch">
<view class="mallSearch-cont">
<image class="mallSearch-cont-icon" src="/static/mall_icon/mall_search.png">
</image>
<input class="search-navigator" placeholder="输入关键字" value="{{categoryTitle}}" name="search"
confirm-type="search" bindconfirm='confirmTap'></input>
</view>
</form>
<!-- 分类 -->
<view class="mallTag">
<view class="mallTag-one {{ordertype == '' ? 'active':''}}" bindtap="emptyTap">综合推荐</view>
<view class="mallTag-name {{ordertype == 'sell' ? 'active':''}}" data-type="sell" bindtap="orderTap">
销量
<block wx:if="{{ordertype == 'sell'}}">
<image src="/static/mall_icon/price_icon.png" wx:if="{{orderasc == 'asc'}}">
</image>
<image src="/static/mall_icon/price_icon_active.png" wx:else></image>
</block>
</view>
<view class="mallTag-name {{ordertype == 'price' ? 'active':''}}" data-index="{{daindex}}" data-type="price"
bindtap="orderTap">
价格
<block wx:if="{{ordertype == 'price'}}">
<image src="/static/mall_icon/price_icon.png" wx:if="{{orderasc == 'asc'}}">
</image>
<image src="/static/mall_icon/price_icon_active.png" wx:else></image>
</block>
</view>
</view>
<!-- 商品 -->
<view class="recommend-list" wx:if="{{dataArr.length > 0}}">
<view class="recommend-label" wx:for="{{dataArr}}" wx:key="dataArr" 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="{{page.has_more}}">
<image class="pagesLoding-icon" src="/static/img/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block wx:else>
没有更多了~
</block>
</view>
</view>
<!-- 为空 -->
<view class="pack-center pages-hint" wx:else>
<image src="/static/mall_icon/null_icon.png"></image>
<view class="pages-text">暂无内容</view>
</view>

View File

@@ -0,0 +1,155 @@
/**
* 手太欠
* 5g获客星光网 - 商城
*/
page {
background-color: #f7f7f7;
}
/* 商城搜索 */
.mallSearch {
position: fixed;
width: 100%;
top: 0;
left: 0;
height: 120rpx;
box-sizing: border-box;
padding: 20rpx 30rpx;
background-color: #fff;
z-index: 9;
}
.mallSearch-cont {
background-color: #f7f7f7;
border-radius: 100rpx;
padding: 18rpx 30rpx;
box-sizing: border-box;
display: flex;
color: #999999;
height: 80rpx;
width: 100%;
}
.mallSearch-cont-icon {
width: 44rpx;
height: 44rpx;
margin-right: 30rpx;
}
.mallSearch-cont input {
width: calc(100% - 44px);
}
.mallTag {
position: fixed;
left: 0;
top: 110rpx;
width: 100%;
background-color: #fff;
padding: 40rpx;
box-sizing: border-box;
display: flex;
}
.mallTag-one {
width: 200rpx;
}
.mallTag-name {
display: flex;
width: 150rpx;
}
.mallTag-name image {
width: 30rpx;
height: 30rpx;
margin: 7rpx 10rpx;
}
.mallTag-name.active,
.mallTag-one.active {
color: #d32300;
}
/* 商品 */
.recommend-list {
overflow: hidden;
margin: 260rpx 20rpx 30rpx;
}
.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;
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,70 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
stateType : 'ALL', //订单类型
orderArr : [], //订单列表
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
if(wx.getStorageSync("token") == ""){
wx.navigateTo({
url: '/pages/login/login'
})
return
}
// 获取订单列表
this.orderInfo()
},
/**
* 订单列表
*/
orderInfo(){
wx.$api.orders.index().then(res=>{
console.log(res.data)
this.setData({
orderArr : res.data
})
})
},
/**
* 订单支付
*/
orderPay(e){
let orderId = e.currentTarget.dataset.orderid
wx.navigateTo({
url: '/pages/many_pay/many_pay?orderid=' + orderId + "&type=orderPay",
})
},
/**
* 取消订单
*/
orderDelete(e) {
let orderId = e.currentTarget.dataset.orderid
wx.$api.orders.cancel(orderId).then(res=>{
// 获取列表
this.orderInfo()
})
},
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "订单列表"
}

View File

@@ -0,0 +1,50 @@
<!-- 订单tab -->
<view class="order-tab">
<view class="order-tab-item {{stateType == 'ALL' ? 'active':''}}" data-state="ALL" bindtap="orderTab">
全部
</view>
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
待支付
</view>
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
待发货
</view>
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
待收货
</view>
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
已完成
</view>
</view>
<view class="order-content">
<view class="order-list" wx:for="{{orderArr}}" wx:key="orderArr" wx:for-item="goods">
<view class="order-company">
<view class="order-company-name">
<image class="order-logo" src="/static/mall_icon/mallDetails_user.png"></image>
{{goods.orderid}}
<image class="order-arrow" src="/static/mall_icon/mall_arrow.png"></image>
</view>
<view class="order-company-state">
{{goods.state_text}}
</view>
</view>
<view class="order-goods" wx:for="{{goods.items}}" wx:key="items">
<image class="order-goods-img" src="{{item.cover}}" mode="aspectFill"></image>
<view class="order-goods-text">
<view class="nowrap-multi order-goods-name">{{item.title}}</view>
<view class="order-goods-price">
<text>¥{{item.price}}</text>
共{{item.qty}}件
</view>
</view>
</view>
<view class="order-footer">
<view class="order-footer-btn order-footer-btn-back" wx:if="{{goods.canPay == true}}" data-orderid="{{goods.orderid}}"
bindtap="orderPay">立即支付</view>
<view class="order-footer-btn" wx:if="{{goods.canCancel == true}}" data-orderid="{{goods.orderid}}"
bindtap="orderDelete">取消订单</view>
<navigator hover-class="none" url="/pages/mall_order_data/mall_order_data?orderId={{goods.orderid}}" class="order-footer-btn">订单详情</navigator>
</view>
</view>
</view>

View File

@@ -0,0 +1,158 @@
/*
* 手太欠
* 企获客商城
*/
page {
background-color: #eee;
}
/* 订单tab */
.order-tab{
position: fixed;
left: 0;
top: 0;
width: 100%;
display: flex;
height: 80rpx;
line-height: 80rpx;
z-index: 9;
background: white;
}
.order-tab-item{
font-size: 28rpx;
width: 20%;
text-align: center;
border-bottom: solid 2rpx #f7f7f7;
color: #464854;
background: white;
position: relative;
}
.order-tab-item:after {
position: absolute;
content: '';
left: calc(50% - 30rpx);
bottom: 0;
background-color: transparent;
width: 60rpx;
height: 8rpx;
border-radius: 50rpx;
color: #666666;
}
.order-tab-item.active{
color:#000;
font-weight: 600;
}
.order-tab-item.active:after {
background-color: #2151f5;
}
/* 订单列表 */
.order-content{
border-bottom: solid 100rpx transparent;
padding: 80rpx 0 20rpx 0;
}
.order-list {
background-color: white;
margin: 30rpx 0;
}
.order-company {
display: flex;
line-height: 50rpx;
margin-bottom: 20rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
}
.order-company-name {
font-weight: 600;
flex: 1;
display: flex;
}
.order-logo {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
}
.order-arrow {
width: 28rpx;
height: 28rpx;
margin: 10rpx 0 10rpx 20rpx;
}
.order-company-state {
color: #eb532a;
}
.order-goods {
position: relative;
padding: 0 30rpx;
box-sizing: border-box;
}
.order-goods-img {
width: 160rpx;
height: 160rpx;
border-radius: 10rpx;
}
.order-goods-text {
position: absolute;
padding-left: 220rpx;
padding-right: 30rpx;
right: 0;
top: 0;
left: 0;
width: 100%;
box-sizing: border-box;
}
.order-goods-name {
height: 80rpx;
margin-bottom: 30rpx;
}
.order-goods-price {
display: flex;
font-size: 28rpx;
color: #999999;
}
.order-goods-price text {
flex: 1;
display: block;
font-size: 32rpx;
color: #000;
}
.order-footer {
border-top: 2rpx solid #eee;
margin-top: 20rpx;
padding: 30rpx;
overflow: hidden;
}
.order-footer-btn {
margin-left: 20rpx;
height: 60rpx;
line-height: 56rpx;
box-sizing: border-box;
border: solid 1rpx #dddddd;
padding: 0 20rpx;
font-size: 26rpx;
border-radius: 40rpx;
float: right;
}
.order-footer-btn-back {
border-color: #eb532a;
color: #eb532a;
}

View File

@@ -0,0 +1,82 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
logisticsPop: false, //物流弹出框状态
orderData : '', //商品详情
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
console.log(options.orderId)
this.orderData(options.orderId)
},
/**
* 订单详情
*/
orderData(orderId){
wx.$api.orders.orders(orderId).then(res=>{
console.log(res)
this.setData({
orderData: res
})
})
},
/**
* 物流弹出
*/
logisticsShow() {
this.setData({
logisticsPop: !this.data.logisticsPop
})
},
/**
* 物流隐藏
*/
logisticsHide() {
this.setData({
logisticsPop: !this.data.logisticsPop
})
},
orderRun() {
wx.navigateBack({
delta: 1,
})
},
/**
* 订单支付
*/
orderPay(e){
let orderId = e.currentTarget.dataset.orderid
wx.navigateTo({
url: '/pages/many_pay/many_pay?orderid=' + orderId + "&type=orderPay",
})
},
/**
* 取消订单
*/
orderDelete(e) {
let orderId = e.currentTarget.dataset.orderid
wx.$api.orders.cancel(orderId).then(res=>{
wx.redirectTo({
url: '/pages/mall_order/mall_order?stateType=ALL',
})
})
},
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "订单详情"
}

View File

@@ -0,0 +1,134 @@
<!-- 订单详情 -->
<view class="orderData">
<view class="orderBack">
<image src="/static/mall_icon/mallData_00.png"></image>{{orderData.state_text}}
</view>
<view class="orderCont">
<view class="orderSite">
<view class="orderSite-laebl">
<image src="/static/mall_icon/mallAddress_00.png"></image>
<view class="orderSite-laeb-name">{{orderData.express.name}}<text>{{orderData.express.mobile}}</text></view>
</view>
<view class="orderSite-laebl">
<image src="/static/mall_icon/mallAddress_02.png"></image>
<view class="orderSite-laeb-address">{{orderData.express.address}}</view>
</view>
</view>
<view class="orderGoods">
<view class="orderGoods-company">
<image class="orderGoods-logo" src="/static/mall_icon/mallDetails_user.png"></image>
{{orderData.type_text}}
<image class="orderGoods-arrow" src="/static/mall_icon/mall_arrow.png"></image>
</view>
<view class="orderGoods-goods-li" wx:for="{{orderData.items}}" wx:key="items">
<image class="orderGoods-img" src="{{item.cover}}" mode="aspectFill"></image>
<view class="orderGoods-body">
<view class="orderGoods-name">{{item.title}}</view>
<view class="orderGoods-params">{{item.value}}</view>
<view class="orderGoods-params">数量:{{item.qty}}</view>
<view class="orderGoods-price">¥{{item.price}}</view>
</view>
</view>
</view>
<view class="orderLabel">
<view class="order-input">
<label>
<image src="/static/mall_icon/mallAddress_00.png"></image>订单编号:
</label>
<text>{{orderData.orderid}}</text>
</view>
<view class="order-input">
<label>
<image src="/static/mall_icon/mallAddress_02.png"></image>下单时间:
</label>
<text>{{orderData.created_at}}</text>
</view>
<view class="order-input">
<label>
<image src="/static/mall_icon/mallAddress_04.png"></image>支付方式:
</label>
<text>在线支付</text>
</view>
<view class="order-total">
<view class="order-total-li">
<view class="order-total-name">商品总价</view>
¥{{orderData.amount}}
</view>
<view class="order-total-li">
<view class="order-total-name">运费</view>
¥{{orderData.freight}}
</view>
<!-- <view class="order-total-li">
<view class="order-total-name">优惠</view>
-¥10.00
</view> -->
<view class="order-total-li">
<view class="order-total-name">需付款</view>
<view class="coupon-picker-red">
¥{{orderData.amount}}
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 订单工具 -->
<view class="orderFooter">
<view class="orderFooter-btn" wx:if="{{orderData.canCancel == true}}" data-orderid="{{orderData.orderid}}" bindtap="orderDelete">
取消订单
</view>
<view class="orderFooter-btn orderFooter-btn-back" wx:if="{{orderData.canPay == true}}" data-orderid="{{orderData.orderid}}" bindtap="orderPay">
立即支付
</view>
<!-- <navigator class="orderFooter-btn orderFooter-btn-back" url="">申请退货</navigator> -->
<!-- <view class="orderFooter-btn" bindtap="logisticsShow">查看物流</view> -->
<view class="orderFooter-btn" bindtap="orderRun">返回订单</view>
</view>
<!-- 物流 -->
<view class="logistics-back {{logisticsPop ? 'active':''}}" bindtap="logisticsHide"></view>
<view class="logistics-cont {{logisticsPop ? 'active':''}}">
<image class="logistics-close" src="/static/mall_icon/mall_close.png" bindtap="logisticsHide"></image>
<view class="nowrap-multi logistics-title">
<view class="logistics-title-icon"><image src="/static/mall_icon/mallAddress_02.png"></image></view>
收货地址黑龙江省哈尔滨市测试区域测试地址123
</view>
<view class="logistics-list">
<view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view>
<view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view>
<view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】
</view><view class="logistics-label">
您的快件由【青岛】准备发往【上海】111
</view>
</view>
</view>

View File

@@ -0,0 +1,356 @@
/*
* 手太欠
* 企获客商城
*/
page {
background-color: #f1f1f1;
}
.orderData {
border-bottom: solid 110rpx transparent;
}
/* 订单地址 */
.orderCont {
margin-top: -30rpx;
}
.orderSite {
background-color: white;
border-radius: 20rpx;
margin-bottom: 20rpx;
padding: 20rpx 0;
}
.orderSite-laebl {
display: flex;
padding: 10rpx 30rpx;
box-sizing: border-box;
}
.orderSite-laebl image {
width: 34rpx;
height: 34rpx;
margin: 4rpx 20rpx 0 0;
}
.orderSite-laeb-name {
font-weight: 600;
}
.orderSite-laeb-name text {
padding-left: 30rpx;
}
.orderSite-laeb-address {
font-size: 28rpx;
color: #666666;
}
/* 订单商品 */
.orderGoods,
.orderLabel {
background-color: white;
border-radius: 20rpx;
margin: 20rpx 0;
}
.orderGoods {
padding: 30rpx;
box-sizing: border-box;
}
.orderGoods-company {
display: flex;
line-height: 50rpx;
font-weight: 600;
margin-bottom: 40rpx;
}
.orderGoods-logo {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
}
.orderGoods-arrow {
width: 28rpx;
height: 28rpx;
margin: 10rpx 0 10rpx 20rpx;
}
.orderGoods-goods-li {
position: relative;
border-bottom: solid 1rpx #f2f2f2;
min-height: 160rpx;
background: white;
}
.orderGoods-goods-li:last-child {
border-bottom: none;
}
.orderGoods-img {
position: absolute;
top: 0;
left: 0;
height: 200rpx;
width: 200rpx;
border-radius: 10rpx;
background: #f5f6fa;
}
.orderGoods-body {
padding-left: 240rpx;
}
.orderGoods-params {
font-size: 28rpx;
color: #999999;
margin-top: 10rpx;
}
.orderGoods-price {
color: #e92344;
margin-top: 20rpx;
}
/* 订单标签 */
.order-total {
border-top: 2rpx solid #eee;
border-bottom: 2rpx solid #eee;
}
.order-total-li {
padding: 20rpx 30rpx;
display: flex;
position: relative;
}
.order-total-name {
flex: 1;
}
.order-total-li text {
color: #999;
}
.coupon-picker-red {
color: #ea4e2f;
}
.order-input {
padding: 0 30rpx 0 200rpx;
position: relative;
line-height: 80rpx;
min-height: 80rpx;
}
.order-input label {
width: 220rpx;
position: absolute;
left: 30rpx;
top: 0;
display: flex;
color: #666666;
}
.order-input image {
width: 36rpx;
height: 36rpx;
margin: 24rpx 20rpx 0 0;
}
.order-input text {
padding-left: 60rpx;
font-size: 28rpx;
}
/* 订单状态 */
.orderBack {
background-image: linear-gradient(to left, #de3936, #ea6a32);
color: #fff;
text-align: center;
padding: 70rpx 0 100rpx;
font-size: 40rpx;
}
.orderBack image {
width: 40rpx;
height: 40rpx;
vertical-align: middle;
margin-right: 30rpx;
}
/* 底部工具栏 */
.orderFooter {
position: fixed;
bottom: 0;
left: 0;
right: 0;
border-top: solid 1rpx #f2f2f2;
padding-top: 17rpx;
padding-right: 30rpx;
padding-left: 30rpx;
height: 90rpx;
background: white;
display: flex;
flex-wrap: wrap;
flex-direction: row-reverse;
}
.orderFooter-btn {
margin-left: 20rpx;
height: 60rpx;
line-height: 60rpx;
box-sizing: border-box;
border: solid 1rpx #747788;
padding: 0 20rpx;
font-size: 26rpx;
border-radius: 40rpx;
margin-top: 10rpx;
}
.orderFooter-btn-back {
border-color: #eb532a;
color: #eb532a;
}
/* 物流信息 */
.logistics-back {
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, .7);
z-index: 101;
display: none;
}
.logistics-back.active {
display: block;
}
.logistics-cont {
position: fixed;
width: 100%;
background-color: white;
left: 0;
bottom: -100%;
z-index: 102;
border-radius: 20rpx 20rpx 0 0;
padding: 90rpx 30rpx 30rpx;
box-sizing: border-box;
transition: .2s;
height: 40vh;
}
.logistics-cont.active {
bottom: 0;
}
.logistics-close {
position: absolute;
right: 20rpx;
top: 20rpx;
z-index: 103;
width: 45rpx;
height: 45rpx;
}
.logistics-list,
.logistics-title {
position: relative;
padding-left: 80rpx;
padding-right: 20rpx;
}
.logistics-list::before,
.logistics-title::before {
position: absolute;
left: 30rpx;
top: 0;
content: "";
width: 2rpx;
height: 100%;
background: #eeeeee;
z-index: 2;
}
.logistics-list {
height: calc(100% - 80rpx);
overflow-y: scroll;
}
.logistics-title {
font-size: 30rpx;
}
.logistics-label {
position: relative;
padding-top: 20rpx;
padding-bottom: 20rpx;
font-size: 26rpx;
color: #aeaeae;
border-bottom: solid 2rpx #f2f2f2;
}
.logistics-label:nth-child(1) {
color: #000;
font-weight: 600;
font-size: 30rpx;
}
.logistics-label::before {
position: absolute;
left: -58rpx;
top: calc(50% - 7rpx);
content: "";
width: 14rpx;
height: 14rpx;
border: solid 2rpx #fff;
background: #c1c1c1;
z-index: 9;
border-radius: 50%;
}
.logistics-label:nth-child(1)::before {
border: solid 2rpx #dd3835;
background: #dd3835;
}
.logistics-label:nth-child(1)::after {
position: absolute;
left: 0rpx;
top: 0;
content: "";
width: 2rpx;
height: calc(50% - 7rpx);
background: #fff;
z-index: 3;
border-radius: 50%;
}
.logistics-title-icon {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background-color: #dddddd;
position: absolute;
left: 0;
z-index: 102;
top: 0;
}
.logistics-title-icon image {
width: 34rpx;
height: 34rpx;
margin: 13rpx;
}

View File

@@ -0,0 +1,198 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
coupons : [], //优惠券列表
couponShow : false, //优惠券弹出状态
goodBuyQty : '', //商品数量
goodBuyId : '', //商品id
addressDel : '', //默认地址
detail : '', //商品详情
allShow : false, //优惠券状态
choiceTitle : '请选择优惠券', //优惠券标题
couponId : 0, //优惠券id
amount : 0, //商品总价格
freight : '0.00', //运费
allAmount : 0, //总共价格
remark : '', //备注信息
lists : [], //购物车列表
typeCart : '', //订单类型 arrCart为购物车订单
cartIds : '', //购物车id
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
console.log(options)
this.setData({
goodBuyQty : options.qty,
goodBuyId : options.skuId,
cartIds : options.cart_ids,
typeCart : options.type
})
// 获取订单信息
this.getBuyNow()
},
/**
* 订单信息
*/
getBuyNow () {
if(this.data.typeCart == 'arrCart') {
wx.$api.mall.cartSystem({
cart_ids : this.data.cartIds
}).then(res=>{
console.log(res)
this.setData({
coupons : res.coupons,
addressDel : res.address,
lists : res.lists,
amount : res.total,
freight : res.freight
})
})
} else {
wx.$api.mall.orderSystem({
goods_sku_id : this.data.goodBuyId,
qty : this.data.goodBuyQty
}).then(res=>{
this.setData({
coupons : res.coupons,
addressDel : res.address,
detail : res.detail,
amount : res.amount,
freight : res.freight
})
})
}
},
/**
* 优惠券弹出
*/
couponTap() {
this.setData({
couponShow : !this.data.couponShow
})
},
/**
* 优惠券关闭
*/
couponHide() {
this.setData({
couponShow : !this.data.couponShow
})
},
/**
* 支付
*/
submitOrder() {
if(this.data.typeCart == 'arrCart') {
wx.$api.mall.cartBuy({
cart_ids : this.data.cartIds,
user_coupon_id: this.data.couponId,
remark : this.data.remark,
address_id : this.data.addressDel.address_id
}).then(res=>{
console.log(res)
})
} else {
wx.$api.mall.orderBuy({
goods_sku_id : this.data.goodBuyId,
qty : this.data.goodBuyQty,
user_coupon_id: this.data.couponId,
remark : this.data.remark,
address_id : this.data.addressDel.address_id
}).then(res=>{
console.log(res.trade_no)
wx.$api.mall.wechat({
trade_no : res.trade_no
}).then(res=>{
console.log(res)
// let payInfo = JSON.parse(res.data)
// wx.requestPayment({
// timeStamp: payInfo.timeStamp,
// nonceStr : payInfo.nonceStr,
// package : payInfo.package,
// paySign : payInfo.paySign,
// signType : payInfo.signType,
// success : res=>{
// if(res.errMsg == "requestPayment:ok"){
// wx.showToast({
// title: '支付成功',
// icon : 'success'
// })
// setTimeout(()=>{
// wx.reLaunch({
// url: '/pages/coupon/coupon?type=couponPublic'
// })
// },2000)
// }
// },
// fail : res=>{
// wx.reLaunch({
// url: '/pages/order/order?stateType=unpay'
// })
// }
// })
})
})
}
},
/**
* 选择使用优惠券
*/
detailLink(e) {
let index = e.currentTarget.dataset.index,
coupons = this.data.coupons,
coupon_id = ''
coupons[index].is_check = !coupons[index].is_check
if(coupons[index].is_check){
coupon_id = coupons[index].user_coupon_id
}else{
coupon_id = 0
}
for(let i in coupons){
if(i!=index){
coupons[i].is_check = false
}
}
console.log(coupon_id)
this.setData({
couponShow : false,
coupons : coupons,
choiceTitle : coupons[index].title,
allShow : !this.data.allShow,
couponId : coupon_id,
allAmount : Number(coupons[index].price)
})
},
/**
* 备注信息
*/
bindTextAreaBlur(e) {
this.setData({
remark : e.detail.value
})
},
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "商城-提交订单"
}

View File

@@ -0,0 +1,108 @@
<!-- 提交订单 -->
<view class="order-content">
<view class="order-address">
<view wx:if="{{addressDel != ''}}" bindtap="addressTap">
<navigator url="/pages/mall_address/mall_address?type=selectAddress" hover-class="none">
<image class="arrows-right" src="/static/mall_icon/mall_arrow.png" mode="widthFix"></image>
<view class="order-address-name">
<text>{{addressDel.name}}</text>{{addressDel.mobile}}
</view>
<view class="order-address-text">{{addressDel.full_address}}</view>
</navigator>
</view>
<navigator class="order-add-address arrows-add" wx:else url="/pages/address/address?type=selectAddress">
添加收货地址
<image class="arrows-add-img" src="/static/mall_icon/mall_arrow.png" mode="widthFix"></image>
</navigator>
<image class="order-address-back" src="/static/mall_icon/address_back.png" mode="widthFix"></image>
</view>
<view class="order-goods" wx:if="{{typeCart == 'arrCart'}}">
<view class="goods-goods-li" wx:for="{{lists}}" wx:key="lists">
<image class="goods-img" src="{{item.goods.cover}}" mode="aspectFill"></image>
<view class="goods-body">
<view class="goods-name">{{item.goods.title}}</view>
<view class="goods-params"><text wx:for="{{item.attr}}" wx:key="attr">{{index}}</text></view>
<view class="goods-price"><text class="goods-qty">¥{{item.total}}</text>×{{item.number}}</view>
</view>
</view>
</view>
<view class="order-goods" wx:else>
<view class="goods-goods-li">
<image class="goods-img" src="{{detail.cover}}" mode="aspectFill"></image>
<view class="goods-body">
<view class="goods-name">{{detail.title}}</view>
<view class="goods-params">{{detail.value}}</view>
<view class="goods-price"><text class="goods-qty">¥{{detail.price}}</text>×{{detail.qty}}</view>
</view>
</view>
</view>
<view class="order-total">
<view class="order-total-li">
<view class="order-total-name">配送方式</view>
<text>快递配送</text>
</view>
<view class="order-total-li">
<view class="order-total-name">运费</view>
<text>{{freight}}元</text>
</view>
<view class="order-total-li">
<view class="order-total-textarea">订单备注:</view>
<textarea name="remark" bindinput="bindTextAreaBlur" placeholder="请输入备注信息..."></textarea>
</view>
</view>
<view class="order-total">
<view class="order-total-li">
<view class="order-total-name">商品总价</view>
¥{{amount}}
</view>
<view class="order-total-li" bindtap="couponTap" wx:if="{{coupons.length > 0}}">
<view class="order-total-name">优惠</view>
<view class="coupon-picker-text {{allShow ? 'coupon-picker-red' : ''}}">
{{coupon_id == 0 ? '请选择优惠券' : choiceTitle}}
</view>
<image class="coupon-picker-icon" src="/static/mall_icon/mall_arrow.png"></image>
</view>
<view class="order-total-li">
<view class="order-total-name">应付总价</view>
¥{{amount - allAmount}}
</view>
</view>
</view>
<view class="order-footer">
<view class="order-footer-total nowrap">
合计:
<text class="order-footer-total-price">¥{{amount - allAmount}}元</text>
</view>
<button class="order-footer-btn" size="mini" bindtap="submitOrder">立即支付</button>
</view>
<!-- 优惠券弹出层 -->
<view class="couponBack {{couponShow ? 'active':''}}" bindtap="couponHide"></view>
<view class="couponEject {{couponShow ? 'active':''}}">
<image bindtap="couponHide" class="couponClose" src="/static/mall_icon/mall_close.png"></image>
<view class="couponEject-title">优惠</view>
<view class="couponEject-list">
<view class="couponEject-list-title">
可使用优惠券
</view>
<view class="couponDraw-list-label couponDraw-list-blue" wx:for="{{coupons}}" wx:key="coupons" wx:for-index="index">
<view class="couponDraw-list-tips">代金劵</view>
<view class="couponDraw-list-price">
<view class="couponDraw-list-part"><text>¥</text>{{item.price}}</view>
</view>
<view class="couponDraw-list-text" bindtap="detailLink" data-index="{{index}}" data-id="{{item.user_coupon_id}}">
<view class="couponDraw-list-name">商品代金券<text>满{{item.full}}元可用</text><text>金额可减{{item.price}}元</text>
</view>
<view class="couponDraw-list-btn">
<image src="{{item.is_check ? '/static/mall_icon/select_avtive.png' : '/static/mall_icon/select.png'}}"></image>
</view>
<view class="couponDraw-list-time">2020.11.01 - 2020.11.10</view>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,459 @@
/*
* 手太欠
* 企获客商城
*/
page {
background-color: #f7f7f7;
}
.order-content {
border-bottom: solid 120rpx transparent;
}
/* 收货地址 */
.order-address {
padding: 30rpx 80rpx 40rpx 30rpx;
position: relative;
background: white;
}
.order-address-back {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
vertical-align: bottom;
}
.order-address-name {
padding-right: 300rpx;
position: relative;
font-size: 33rpx;
padding-bottom: 10rpx;
}
.order-address-name text {
padding-right: 30rpx;
}
.order-address-text {
color: #464854;
font-size: 26rpx;
}
.arrows-right {
position: absolute;
height: 28rpx;
width: 28rpx;
right: 30rpx;
top: calc(50% - 19rpx);
top: -webkit-calc(50% - 19rpx);
}
.order-add-address {
text-align: center;
padding: 30rpx 0;
}
.order-add-address navigator {
display: inline-block;
background: #e92344;
color: white;
line-height: 60rpx;
padding: 0 30rpx;
margin-right: 20rpx;
}
.arrows-add {
text-align: center;
width: 100%;
}
/* 商品信息 */
.order-goods {
border-top: solid 20rpx #f2f2f2;
}
.goods-goods-mall {
padding: 20rpx 30rpx 0 30rpx;
line-height: 50rpx;
}
.goods-goods-mall image {
width: 48rpx;
height: 48rpx;
vertical-align: middle;
margin-right: 15rpx;
margin-bottom: 2rpx;
}
.goods-goods-li {
padding: 20rpx 30rpx;
position: relative;
border-bottom: solid 1rpx #f2f2f2;
min-height: 160rpx;
background: white;
}
.goods-goods-li:last-child {
border-bottom: none;
}
.goods-img {
position: absolute;
top: 20rpx;
left: 30rpx;
height: 160rpx;
width: 160rpx;
background: #f5f6fa;
}
.goods-body {
padding-left: 190rpx;
}
.goods-name {
padding-bottom: 20rpx;
}
.goods-price {
color: gray;
display: flex;
}
.goods-qty {
color: #e92344;
font-size: 32rpx;
flex: 1;
}
.goods-params {
color: gray;
padding-bottom: 20rpx;
font-size: 28rpx;
}
/* 统计信息 */
.order-total {
background: white;
border-top: solid 20rpx #f2f2f2;
}
.order-total-li {
padding: 20rpx 30rpx;
display: flex;
position: relative;
}
.coupon-picker-icon {
position: absolute;
height: 28rpx;
width: 28rpx;
right: 30rpx;
top: calc(50% - 14rpx);
}
.coupon-picker-icon {
position: absolute;
height: 28rpx;
width: 28rpx;
right: 30rpx;
top: calc(50% - 14rpx);
}
.coupon-picker-text {
text-align: right;
color: gray;
padding-right: 40rpx;
}
.coupon-picker-red {
color: #ea4e2f;
}
.order-total-name {
flex: 1;
}
.order-total-li text {
color: #999;
}
.order-total-textarea {
width: 200rpx;
height: 80rpx;
}
.order-total-li textarea {
line-height: 50rpx;
height: 100rpx;
}
/* 底部工具栏 */
.order-footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
border-top: solid 1rpx #f2f2f2;
height: 100rpx;
line-height: 100rpx;
z-index: 99;
background: white;
}
.order-footer-total {
padding-right: calc(30vw + 30rpx);
padding-right: -webkit-calc(30vw + 30rpx);
padding-left: 30rpx;
color: #737787;
font-size: 28rpx;
}
.order-footer-total text {
color: #e92344;
}
.order-footer-total-price {
font-size: 32rpx;
}
.order-footer-btn[size="mini"] {
width: 40vw;
background: #eb532a;
color: white;
border-radius: 0;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
position: absolute;
top: 10rpx;
right: 10rpx;
border-radius: 50rpx;
}
.order-footer-btn:after {
border: none;
}
/* 选择优惠券弹出层 */
.couponBack{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .5);
z-index: 100;
display: none;
}
.couponBack.active{
display: block;
}
.couponEject {
position: fixed;
width: 100%;
bottom: -100%;
left: 0;
border-radius: 30rpx 30rpx 0 0;
background-color: white;
z-index: 101;
transition: .2s;
}
.couponEject.active {
bottom: 0;
}
.couponEject-list {
padding: 30rpx;
box-sizing: border-box;
}
.couponEject-list-title {
margin-bottom: 30rpx;
}
.couponClose {
width: 40rpx;
height: 40rpx;
position: absolute;
top: 30rpx;
right: 30rpx;
z-index: 103;
}
.couponEject-title {
text-align: center;
width: 100%;
padding: 30rpx 0 10rpx;
font-weight: 600;
}
.couponDraw-list-label {
position: relative;
width: 100%;
padding-top: 32%;
border: 2rpx solid #eeeeee;
border-radius: 10rpx;
margin-bottom: 30rpx;
}
.couponDraw-list-label::after,
.couponDraw-list-label::before {
position: absolute;
content: '';
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: white;
z-index: 111;
}
.couponEject-list-label::after {
top: -15rpx;
right: 160rpx;
}
.couponEject-list-label::before {
bottom: -15rpx;
right: 160rpx;
}
.couponDraw-list-label::after {
top: -15rpx;
left: calc(40% - 15rpx);
}
.couponDraw-list-label::before {
bottom: -15rpx;
left: calc(40% - 15rpx);
}
.couponDraw-list-tips {
position: absolute;
top: 0;
left: 0;
z-index: 102;
font-size: 26rpx;
border-radius: 10rpx 0 10rpx 0;
padding: 6rpx 20rpx;
background-color: #fae5c2;
color: #9b6404;
}
.couponDraw-list-price {
width: 40%;
background-color: #eea931;
color: #fff;
position: absolute;
height: 100%;
left: 0;
top: 0;
border-radius: 10rpx 0 0 10rpx;
text-align: center;
}
.couponDraw-list-part {
position: absolute;
width: 100%;
height: 70rpx;
top: calc(50% - 35rpx);
z-index: 102;
text-align: center;
font-size: 50rpx;
font-weight: 600;
}
.couponDraw-list-text {
position: absolute;
right: 0;
top: 0;
width: 60%;
padding: 10rpx 20rpx;
box-sizing: border-box;
background-color: #fff;
height: 100%;
}
.couponDraw-list-name text {
color: #999;
display: block;
font-size: 26rpx;
margin: 10rpx 0 5rpx;
}
.couponDraw-list-btn {
color: #b67c18;
position: absolute;
top: 90rpx;
right: 20rpx;
margin-bottom: 20rpx;
}
.couponDraw-list-btn image {
width: 40rpx;
height: 40rpx;
}
.couponDraw-list-time {
font-size: 26rpx;
color: #999;
clear: both;
position: absolute;
bottom: 20rpx;
}
.couponDraw-list-red .couponDraw-list-price {
background-color: #ee3158;
}
.couponDraw-list-red .couponDraw-list-tips {
background-color: #fac2cd;
color: #94001f;
}
.couponDraw-list-blue .couponDraw-list-price {
background-color: #2d6bf6;
}
.couponDraw-list-blue .couponDraw-list-tips {
background-color: #c0d3fc;
color: #2151f5;
}
.arrows-add-img {
width: 40rpx;
height: 40rpx;
vertical-align: middle;
margin: -8rpx 6rpx 0 0;
}
.addressDef, .seTup {
display: inline-block;
font-size: 24rpx;
border-radius: 6rpx;
margin-top: 10rpx;
color: #e92344;
border: 2rpx solid #e92344;
}
.addressDef {
padding: 0 10rpx;
height: 32rpx;
line-height: 32rpx;
}
.seTup {
padding: 4rpx 10rpx;
}

View File

@@ -0,0 +1,30 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
},
/**
* 订单支付
*/
payment() {
wx.redirectTo({
url: '/pages/mall_order_data/mall_order_data',
})
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "订单支付"
}

View File

@@ -0,0 +1,41 @@
<!-- 支付 -->
<view class="order-content">
<view class="order-title">订单信息</view>
<view class="order-total">
<view class="order-total-li order-total-number">
<view class="order-total-name">订单编号</view>
454fdsf54f5d4f54sdf4d
</view>
<view class="order-total-li">
<view class="order-total-name">商品总价</view>
¥999.00
</view>
<view class="order-total-li">
<view class="order-total-name">运费</view>
-¥999.00
</view>
<view class="order-total-li">
<view class="order-total-name">应付总价</view>
<view class="coupon-picker-red">
¥999.00
</view>
</view>
</view>
<view class="order-title">支付方式</view>
<view class="payContList">
<radio-group bindchange="radioChange">
<view class="payContList-label">
<view class="payContList-label-name">
<image class="payContList-label-img" src="/static/mall_icon/pay_00.png"></image>
<view>微信支付</view>
</view>
<radio class="radio" value="1" checked></radio>
</view>
</radio-group>
</view>
</view>
<view class="address-footer">
<text bindtap="payment">立即支付</text>
</view>

View File

@@ -0,0 +1,116 @@
/*
* 手太欠
* 企获客商城
*/
page {
background-color: #f7f7f7;
}
.order-content {
border-bottom: solid 100rpx transparent;
}
/* 订单支付 */
.order-title {
font-weight: 600;
padding: 30rpx;
}
.order-total {
background: white;
margin-bottom: 30rpx;
border-top: 2rpx solid #eee;
border-bottom: 2rpx solid #eee;
}
.order-total-number {
border-bottom: 2rpx solid #eee;
line-height: 54rpx;
}
.order-total-li {
padding: 20rpx 30rpx;
display: flex;
position: relative;
}
.order-total-name {
flex: 1;
}
.order-total-li text {
color: #999;
}
.coupon-picker-red {
color: #ea4e2f;
}
.order-total-textarea {
width: 200rpx;
height: 80rpx;
}
.order-total-li textarea {
line-height: 50rpx;
height: 100rpx;
}
/* 支付类型 */
.payContList {
border-top: 2rpx solid #eee;
border-bottom: 2rpx solid #eee;
padding: 30rpx;
background: #fff;
}
.payContList-label {
height: 60rpx;
line-height: 60rpx;
display: flex;
}
.payContList-label-name {
flex: 1;
display: flex;
}
.payContList-label-img {
width: 60rpx;
height: 60rpx;
margin-right: 20rpx;
}
/* 支付按钮 */
.address-footer{
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding-left: 30rpx;
padding-right: 30rpx;
background: white;
border-top: 2rpx solid #eeeeee;
z-index: 9;
height: 130rpx;
}
.address-footer text{
display: block;
width: 100%;
line-height: 90rpx;
height: 90rpx;
margin: 20rpx 0;
text-align: center;
background: #eb532a;
font-size: 30rpx;
color: white;
border-radius: 60rpx;
}

View File

@@ -0,0 +1,59 @@
/**
* 手太欠
* 5g获客星光网 - 商城
*/
Page({
/**
* 页面的初始数据
*/
data: {
hotkey: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad (options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// 获取热门关键字数据
this.hotkeyInfo();
},
/**
* 热门关键字
*/
hotkeyInfo () {
wx.$api.mall.hotkey({}).then(res=>{
console.log(res)
this.setData({
hotkey : res
})
})
},
/**
* 搜索
*/
searchForm(e) {
console.log(e.detail.value.search)
let searchValue = e.detail.value.search
wx.redirectTo({
url: '/pages/mall_goods/mall_goods?title=' + searchValue
})
},
/**
* 返回上一页
*/
goback(){
wx.navigateBack()
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "商品搜索"
}

View File

@@ -0,0 +1,18 @@
<!-- 商品搜索 -->
<!-- search -->
<form class="search" bindsubmit="searchForm">
<view class="search-inputs">
<image class="search-icon" src="/static/mall_icon/mall_search.png"></image>
<input class="search-input" placeholder="搜索商品" name="search" value="{{searchTitle}}" focus></input>
<button class="search-btn" size="mini" form-type="submit">搜索</button>
</view>
<view class="search-cancel" bindtap="goback">取消</view>
</form>
<view class="hot-search">
<view class="hot-search-title">热门搜索</view>
<view class="hot-search-list">
<navigator hover-class="none" url="/pages/mall_goods/mall_goods?title={{index}}" wx:for="{{hotkey}}" wx:key="hotkey">{{index}}</navigator>
</view>
</view>

View File

@@ -0,0 +1,156 @@
/*
* 手太欠
* 企获客商城模块
*/
/* 搜索 */
.search {
height: 100rpx;
position: fixed;
left: 0;
top: 0;
width: 100%;
z-index: 999;
padding: 20rpx;
box-sizing: border-box;
line-height: 80rpx;
}
.search-inputs{
border: #ea4e2f solid 2rpx;
position: absolute;
left: 20rpx;
top: 20rpx;
border-radius: 50rpx;
height: 80rpx;
line-height: 80rpx;
width: calc(100% - 150rpx);
}
.search-input{
height: 80rpx;
line-height: 80rpx;
width: calc(100% - 150rpx);
padding-left: 120rpx;
box-sizing: border-box;
}
.search-icon{
width: 48rpx;
height: 48rpx;
position: absolute;
top: 16rpx;
left: 30rpx;
}
.search-btn[size="mini"]{
font-size: 32rpx;
width: 150rpx;
text-align: center;
color: #3ec28e;
background: transparent;
position: absolute;
top: 0;
right: 0;
height: 80rpx;
line-height: 80rpx;
font-weight: bold;
padding: 0;
}
.search-cancel {
position: absolute;
right: 20rpx;
top: 20rpx;
width: 90rpx;
text-align: right;
font-size: 34rpx;
color: #666666;
}
/* 产品列表 */
.link-products {
flex-wrap: wrap;
padding: 112rpx 15rpx 0 15rpx;
}
.link-product {
background: white;
width: calc(50% - 20rpx);
box-sizing: border-box;
margin: 0 10rpx 20rpx 10rpx;
border-radius: 6rpx;
overflow: hidden;
display: inline-block;
}
.link-product-img {
position: relative;
width: 100%;
padding-top: 100%;
background: #ddd;
}
.link-product-img-src {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.link-product-text {
padding: 15rpx 20rpx;
}
.link-product-picer {
position: relative;
height: 52rpx;
line-height: 52rpx;
padding-right: 72rpx;
color: #f85d6b;
font-weight: bold;
font-size: 32rpx;
}
.link-product-card {
position: absolute;
right: 0;
top: 0;
background: #f85d6b;
width: 28rpx;
height: 28rpx;
padding: 12rpx;
border-radius: 50%;
z-index: 1;
}
.link-product-title {
height: 50rpx;
line-height: 50rpx;
margin-bottom: 15rpx;
}
/* 热门搜索 */
.hot-search {
flex-wrap: wrap;
padding: 140rpx 20rpx 20rpx;
}
.hot-search-title {
margin-bottom: 20rpx;
font-weight: 600;
}
.hot-search-list navigator {
display: inline-block;
background-color: #f7f7f7;
border-radius: 50rpx;
margin: 10rpx;
padding: 0 30rpx;
line-height: 58rpx;
font-size: 26rpx;
}

View File

@@ -0,0 +1,66 @@
// pages/mall_video/mall_video.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "商品直播"
}

View File

@@ -0,0 +1,47 @@
<!-- 商品直播列表 -->
<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">
<view class="videoList-tips-img"><image src="/static/mall_icon/liveIng_icon_white.png"></image></view>
<view class="videoList-tips-text">正在直播</view>
</view>
</view>
<view class="videoList-cont">
<view class="videoList-title">风光雪月跨年季</view>
<view class="videoList-user">
<view class="videoList-head">
<image src="/static/mall_icon/mallDetails_user.png"></image>
<text class="nowrap">张慢慢呀</text>
</view>
<view class="videoList-time">
<image src="/static/mall_icon/liveIng_viedo.png"></image>
<text>开播时间2020-12-22 19:00:00</text>
</view>
</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 class="videoList-tips videoList-tips-end">
<view class="videoList-tips-img"><image src="/static/mall_icon/liveEnd_icon_white.png"></image></view>
<view class="videoList-tips-text">已结束</view>
</view>
</view>
<view class="videoList-cont">
<view class="videoList-title">风光雪月跨年季</view>
<view class="videoList-user">
<view class="videoList-head">
<image src="/static/mall_icon/mallDetails_user.png"></image>
<text class="nowrap">张慢慢呀</text>
</view>
<view class="videoList-time">
<image src="/static/mall_icon/liveIng_viedo.png"></image>
<text>开播时间2020-12-22 19:00:00</text>
</view>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,118 @@
page {
background-color: #f7f7f7;
}
/* 列表 */
.videoList {
overflow: hidden;
margin: 20rpx;
}
.videoList-label {
width: 100%;
background-color: #fff;
overflow: hidden;
margin-bottom: 20rpx;
box-shadow: 0 0 10rpx rgba(0, 0, 0, .05);
}
.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;
font-size: 24rpx;
}
.videoList-tips-img {
position: absolute;
top: 0;
left: 0;
background: #f2a861;
width: 58rpx;
height: 58rpx;
padding: 14rpx;
box-sizing: border-box;
border-radius: 8rpx;
overflow: hidden;
}
.videoList-tips-text {
position: absolute;
left: 56rpx;
top: 5rpx;
height: 48rpx;
line-height: 48rpx;
background-image: linear-gradient(to right, #f5813d, #e9c140);
width: 110rpx;
color: #fff;
border-radius: 0 8rpx 8rpx 0;
opacity: .8;
text-align: center;
}
.videoList-tips-end .videoList-tips-img {
background: #606564;
}
.videoList-tips-end .videoList-tips-text {
background-image: linear-gradient(to right, #25292d, #847f7c);
}
.videoList-tips image {
width: 100%;
height: 100%;
}
.videoList-cont {
padding: 20rpx;
box-sizing: border-box;
}
.videoList-title {
font-size: 34rpx;
}
.videoList-user {
display: flex;
line-height: 50rpx;
font-size: 28rpx;
margin-top: 20rpx;
color: #999;
}
.videoList-head {
flex: 1;
width: 150rpx;
display: flex;
}
.videoList-head text {
display: inline-block;
width: calc(100% - 50rpx);
}
.videoList-time {
width: calc(100% - 150rpx);
display: flex;
}
.videoList-head image,
.videoList-time image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}

121
pages/ticket/goods/goods.js Normal file
View File

@@ -0,0 +1,121 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
user_coupon_id : '', //券id
title : '', //搜索关键字标题
dataArr : [],
page : {}, //分页信息
lodingStats : false, //加载状态
ordertype : '', //排序类型 price为价格 sell为销量
orderasc : '', //排序方式 asc为正序 desc为倒序
total_page : '',
current : '',
nomore :false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
user_coupon_id: options.user_coupon_id,
})
this.goosInfo()
},
goosInfo() {
if (wx.getStorageSync("token") == "") {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
let orderasc = this.data.orderasc,
ordertype = this.data.ordertype
wx.$api.mall.couponsGoods({
user_coupon_id : this.data.user_coupon_id,
title : this.data.title || '',
page : this.data.page || '',
orderasc : orderasc,
ordertype : ordertype,
}).then(res => {
this.setData({
dataArr : res.data,
total_page: res.page.total_page,
current : res.page.current,
})
})
},
confirmTap(event) {
let searchvalue = event.detail.value
this.setData({
title: searchvalue
})
// 拉取商品列表数据
this.goosInfo();
},
/**
* 综合推荐
*/
emptyTap() {
this.setData({
orderasc : '',
ordertype : ''
})
// 拉取商品列表数据
this.goosInfo();
},
/**
* 销量排序
*/
orderTap(e) {
let type = e.currentTarget.dataset.type
this.setData({
ordertype: type,
})
if (this.data.orderasc == 'asc') {
this.setData({
orderasc: 'desc',
})
} else {
this.setData({
orderasc: 'asc',
})
}
// 拉取商品列表数据
this.goosInfo();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
let total_page = this.data.total_page;
let current = parseInt(this.data.current) + 1;
this.setData({
page: current
})
if (current > total_page) {
this.setData({
nomore: true
})
} else {
this.goosInfo();
}
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText": "商品"
}

View File

@@ -0,0 +1,68 @@
<!-- 搜索 -->
<form bindsubmit="searchForm" class="mallSearch">
<view class="mallSearch-cont">
<image class="mallSearch-cont-icon" src="/static/mall_icon/mall_search.png">
</image>
<input class="search-navigator" placeholder="输入关键字" value="{{categoryTitle}}" name="search"
confirm-type="search" bindconfirm='confirmTap'></input>
</view>
</form>
<!-- 分类 -->
<view class="mallTag">
<view class="mallTag-one {{ordertype == '' ? 'active':''}}" bindtap="emptyTap">综合推荐</view>
<view class="mallTag-name {{ordertype == 'sell' ? 'active':''}}" data-type="sell" bindtap="orderTap">
销量
<block wx:if="{{ordertype == 'sell'}}">
<image src="/static/mall_icon/price_icon.png" wx:if="{{orderasc == 'asc'}}">
</image>
<image src="/static/mall_icon/price_icon_active.png" wx:else></image>
</block>
</view>
<view class="mallTag-name {{ordertype == 'price' ? 'active':''}}" data-index="{{daindex}}" data-type="price"
bindtap="orderTap">
价格
<block wx:if="{{ordertype == 'price'}}">
<image src="/static/mall_icon/price_icon.png" wx:if="{{orderasc == 'asc'}}">
</image>
<image src="/static/mall_icon/price_icon_active.png" wx:else></image>
</block>
</view>
</view>
<!-- 商品 -->
<view class="recommend-list" wx:if="{{dataArr.length > 0}}">
<view class="recommend-label" wx:for="{{dataArr}}" wx:key="dataArr" 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>
<!-- 为空 -->
<view class="pack-center pages-hint" wx:else>
<image src="/static/mall_icon/null_icon.png"></image>
<view class="pages-text">暂无内容</view>
</view>
<view class="nomore" wx:if="{{nomore==true}}">没有更多了~</view>

View File

@@ -0,0 +1,165 @@
/**
* 优惠券可用商品
*/
page {
background-color: #f7f7f7;
}
/* 商城搜索 */
.mallSearch {
position: fixed;
width: 100%;
top: 0;
left: 0;
height: 120rpx;
box-sizing: border-box;
padding: 20rpx 30rpx;
background-color: #fff;
z-index: 9;
}
.mallSearch-cont {
background-color: #f7f7f7;
border-radius: 100rpx;
padding: 18rpx 30rpx;
box-sizing: border-box;
display: flex;
color: #999999;
height: 80rpx;
width: 100%;
}
.mallSearch-cont-icon {
width: 44rpx;
height: 44rpx;
margin-right: 30rpx;
}
.mallSearch-cont input {
width: calc(100% - 44px);
}
.mallTag {
position: fixed;
left: 0;
top: 110rpx;
width: 100%;
background-color: #fff;
padding: 40rpx;
box-sizing: border-box;
display: flex;
z-index: 9;
}
.mallTag-one {
width: 200rpx;
}
.mallTag-name {
display: flex;
width: 150rpx;
}
.mallTag-name image {
width: 30rpx;
height: 30rpx;
margin: 7rpx 10rpx;
}
.mallTag-name.active,
.mallTag-one.active {
color: #d32300;
}
/* 商品 */
.recommend-list {
overflow: hidden;
margin: 260rpx 20rpx 30rpx;
}
.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;
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;
}
.nomore {
width: 100%;
height: 60rpx;
line-height: 60rpx;
text-align: center;
color: #999;
margin-bottom: 20rpx;
font-size: 28rpx;
}

View File

@@ -1,25 +1,41 @@
// pages/ticket/index.js /*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
couponList : [],
}, couponMenu : [
{
/** type: 'all',
* 生命周期函数--监听页面加载 text: '全部'
*/ },
onLoad: function (options) { {
type: 1,
}, text: '免费券'
},
/** {
* 生命周期函数--监听页面初次渲染完成 type: 2,
*/ text: '代金券'
onReady: function () { },
{
type: 3,
text: '提货卡'
}
],
currentTab : 0,
type :'',
total_page :'',
current :'',
page :'',
default :'',
nomore : false
}, },
/** /**
@@ -27,40 +43,85 @@ Page({
*/ */
onShow: function () { onShow: function () {
this.couponInfo();
}, },
couponInfo() {
/** wx.$api.mall.coupon({
* 生命周期函数--监听页面隐藏 type: this.data.type || '',
*/ page: this.data.page || ''
onHide: function () { } ).then(res => {
console.log(res)
let newrcoupon = res.data;
this.setData({
couponList: this.data.couponList.concat(newrcoupon), //优惠券数组
total_page:res.page.total_page,
current:res.page.current,
})
if(this.data.couponList.concat(newrcoupon).length==0){
this.setData({
default:true
})
}else{
this.setData({
default:''
})
}
})
}, },
couponChange(e) {
/** let cur = e.target.dataset.current;
* 生命周期函数--监听页面卸载 let type = e.target.dataset.type;
*/ this.setData({
onUnload: function () { currentTab: cur,
type:type,
page:'',
couponList:[],
nomore: false
})
this.couponInfo();
}, },
receive(e) {
/** if (wx.getStorageSync("token") == "") {
* 页面相关事件处理函数--监听用户下拉动作 wx.navigateTo({
*/ url: '/pages/login/login'
onPullDownRefresh: function () { })
return
}
console.log('e', e)
let coupon_id = e.target.dataset.id;
wx.$api.mall.grant({
coupon_id: coupon_id
}).then(res => {
console.log(res)
wx.showToast({
title: res,
icon : 'none'
})
})
},
linkMy(){
wx.navigateTo({
url: '/pages/user_coupon/user_coupon'
})
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
let total_page = this.data.total_page;
}, let current = parseInt(this.data.current) + 1;
this.setData({
/** page: current
* 用户点击右上角分享 })
*/ if(current > total_page){
onShareAppMessage: function () { this.setData({
nomore: true
})
}else{
this.couponInfo();
}
} }
}) })

View File

@@ -1,3 +1,4 @@
{ {
"usingComponents": {} "usingComponents" : {},
"navigationBarTitleText" : "优惠"
} }

View File

@@ -1,2 +1,89 @@
<!--pages/ticket/index.wxml--> <!-- 优惠券 -->
<text>pages/ticket/index.wxml</text> <view class="coupon">
<!-- 轮播图 -->
<view class="banner">
<swiper class="banner-swiper" indicator-dots autoplay circular interval="3500" indicator-color="#ebebeb"
indicator-active-color="#fff">
<swiper-item>
<image class="banner-img"
src="https://www.lvmeimall.com/storage/images/2020/10/30/bc03beedf6f32e22fc3122a03e17edaa.jpg"
mode="aspectFill"></image>
</swiper-item>
</swiper>
</view>
<view class="couponList">
<view class="couponTitle">
<text>优惠券</text>
<view class="couponTitle-more" bindtap="linkMy">
我的卡券<image src="/static/mall_icon/mall_arrow.png"></image>
</view>
</view>
<view class="couponLabel">
<text class="{{currentTab==index?'active':''}}" wx:for="{{couponMenu}}" wx:key="index"
data-current="{{index}}" data-type="{{item.type}}" wx:for-index="index"
bindtap="couponChange">{{item.text}}</text>
</view>
<view class="couponEject">
<view class="coupon-null" wx:if="{{default == true}}">
<image src="/static/mall_icon/coupon-null00.png" mode="widthFix"></image>
<view class="coupon-text">暂无优惠券</view>
</view>
<view wx:else>
<view class="couponEject-list-label" wx:for="{{couponList}}" wx:key="index">
<view wx:if="{{item.type==1}}">
<view class="couponEject-list-line"></view>
<view class="couponEject-list-tips">{{item.type_text}}</view>
<image class="couponEject-list-back" src="/static/mall_icon/mallCoupon_back.png"></image>
<view class="couponEject-list-cont couponEject-list-blue">
<view class="couponEject-list-left">
<view class="couponEject-list-price">
<image class="coupon-icon" src="{{item.cover}}" mode="heightFix"></image>
</view>
<view class="couponEject-list-name">
{{item.title}}<text>{{item.whole}}</text><text>{{item.way}}</text></view>
</view>
<view class="couponEject-list-btn" bindtap="receive" data-id="{{item.coupon_id}}">立即领取
</view>
</view>
</view>
<view wx:elif="{{item.type==2}}">
<view class="couponEject-list-line"></view>
<view class="couponEject-list-tips couponEject-list-tips-yellow">{{item.type_text}}</view>
<image class="couponEject-list-back" src="/static/mall_icon/mallCoupon_back_yellow.png"></image>
<view class="couponEject-list-cont">
<view class="couponEject-list-left">
<view class="couponEject-list-price2"><text class="price-tips">¥</text>{{item.price}}
</view>
<view class="couponEject-list-name">
{{item.title}}<text>{{item.whole}}</text><text>{{item.way}}</text></view>
</view>
<view class="couponEject-list-btn couponEject-list-yellow" bindtap="receive"
data-id="{{item.coupon_id}}">立即领取</view>
</view>
</view>
<view wx:elif="{{item.type==3}}">
<view class="couponEject-list-line"></view>
<view class="couponEject-list-tips couponEject-list-tips-red">{{item.type_text}}</view>
<image class="couponEject-list-back" src="/static/mall_icon/mallCoupon_back_red.png"></image>
<view class="couponEject-list-cont">
<view class="couponEject-list-left">
<view class="couponEject-list-price">
<image class="coupon-icon" src="{{item.cover}}" mode="heightFix"></image>
</view>
<view class="couponEject-list-name">
{{item.title}}<text>{{item.whole}}</text><text>{{item.way}}</text></view>
</view>
<view class="couponEject-list-btn couponEject-list-red" bindtap="receive"
data-id="{{item.coupon_id}}">立即领取</view>
</view>
</view>
</view>
<view class="nomore" wx:if="{{nomore==true}}">没有更多了~</view>
</view>
</view>
</view>
</view>

View File

@@ -1 +1,302 @@
/* pages/ticket/index.wxss */ /*
* 手太欠
* 企获客商城
*/
.coupon {
margin: 0 20rpx;
}
/* 轮播图 */
.banner {
position: relative;
padding-top: 50%;
width: 100%;
background: white;
border-radius: 10rpx;
overflow: hidden;
margin: 30rpx 0;
}
.banner-swiper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.banner-img {
width: 100%;
height: 100%;
vertical-align: top;
}
/* 优惠券列表 */
.couponTitle {
display: flex;
}
.couponTitle text {
flex: 1;
display: block;
font-weight: 600;
}
.couponTitle-more {
display: flex;
color: #666666;
}
.couponTitle-more image {
width: 30rpx;
height: 30rpx;
margin: 6rpx 0 0 10rpx;
}
.couponLabel {
/* white-space: nowrap; */
margin: 20rpx -15rpx;
display: flex;
}
.couponLabel text {
display: inline-block;
flex: auto;
font-size: 28rpx;
background-color: #e6e8f0;
line-height: 60rpx;
padding: 0 30rpx;
border-radius: 40rpx;
width: 90rpx;
margin: 15rpx;
text-align: center;
}
.couponLabel text.active {
background-color: #2151f5;
color: #fff;
}
.couponEject-list-label {
position: relative;
width: 100%;
padding-top: 32%;
margin-bottom: 30rpx;
}
.couponEject-list-label::after,
.couponEject-list-label::before {
position: absolute;
content: '';
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: white;
z-index: 111;
}
.couponEject-list-label::after {
top: -15rpx;
right: 160rpx;
}
.couponEject-list-label::before {
bottom: -15rpx;
right: 160rpx;
}
.couponEject-list-title {
margin-bottom: 30rpx;
}
.couponEject-list-back {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 20rpx;
}
.couponEject-list-tips {
position: absolute;
top: 0;
left: 0;
background-color: #c0d3fc;
color: #2151f5;
z-index: 102;
font-size: 26rpx;
border-radius: 10rpx 0 10rpx 0;
padding: 6rpx 20rpx;
}
.couponEject-list-cont {
z-index: 102;
position: absolute;
top: calc(50% - 70rpx);
left: 0;
right: 0;
color: #fff;
display: flex;
height: 140rpx;
}
.couponEject-list-left {
width: calc(100% - 200rpx);
display: flex;
margin-right: 40rpx;
}
.couponEject-list-price {
position: relative;
width: 45%;
height: 140rpx;
}
.couponEject-list-price2 {
position: relative;
width: 45%;
height: 140rpx;
font-size: 50rpx;
text-align: center;
font-weight: 600;
line-height: 140rpx;
}
.coupon-icon {
height: 120rpx;
margin-top: 10rpx;
margin-left: calc(50% - 60rpx);
width: 120rpx;
}
.couponEject-list-price::after {
position: absolute;
content: '';
right: 0;
top: 20%;
width: 2rpx;
height: 60%;
background-color: rgba(255, 255, 255, .5);
}
.couponEject-list-price2::after {
position: absolute;
content: '';
right: 0;
top: 20%;
width: 2rpx;
height: 60%;
background-color: rgba(255, 255, 255, .5);
}
.couponEject-list-price text {
font-size: 28rpx;
font-weight: normal;
}
.couponEject-list-name {
text-align: center;
width: 55%;
}
.couponEject-list-name text {
font-size: 26rpx;
display: block;
margin-top: 10rpx;
opacity: .7;
}
.couponEject-list-btn {
width: 140rpx;
color: #2d6bf6;
background-color: #fff;
border-radius: 50rpx;
text-align: center;
height: 56rpx;
line-height: 56rpx;
font-size: 28rpx;
box-shadow: 0 0 10rpx rgba(0, 50, 61, .2);
margin-top: 50rpx;
}
.couponEject-list-line {
position: absolute;
width: 0;
height: 100%;
content: '';
border: 2rpx dotted #fff;
right: 175rpx;
top: 0;
z-index: 102;
}
.couponEject-list-blue {
height: 140rpx;
top: calc(50% - 70rpx);
}
.couponEject-list-blue .couponEject-list-price {
line-height: 140rpx;
}
.couponEject-list-blue .couponEject-list-price::after {
height: 60%;
top: 20%;
}
.couponEject-list-blue .couponEject-list-btn {
margin-top: 50rpx;
}
.couponEject-list-tips-red {
background-color: #fac2cd;
color: #ae1635;
}
.couponEject-list-red {
color: #f16d83;
}
.couponEject-list-tips-yellow {
background-color: #fae5c2;
color: #bf7b06;
}
.couponEject-list-yellow {
color: #b67c18;
}
.price-tips {
font-size: 20rpx;
}
.coupon-null {
width: 100%;
padding : 20% 0;
text-align: center;
}
.coupon-null image {
width: 300rpx;
}
.coupon-text {
width: 100%;
text-align: center;
margin-top: 50rpx;
color: #666;
}
.nomore {
width: 100%;
height: 60rpx;
line-height: 60rpx;
text-align: center;
color: #999;
margin-bottom: 20rpx;
font-size: 28rpx;
}

View File

@@ -1,4 +1,4 @@
// pages/user/index.js // pages/user/user.js
Page({ Page({
/** /**

View File

@@ -1,3 +1,6 @@
{ {
"usingComponents": {} "usingComponents" : {},
"navigationBarTitleText" : "个人中心",
"navigationBarBackgroundColor" : "#2e81fc",
"navigationBarTextStyle" : "white"
} }

View File

@@ -1,2 +1,112 @@
<!--pages/user/index.wxml--> <!-- 个人中心 -->
<text>pages/user/index.wxml</text> <view class="userTop">
<view class="userTop-head">
<view class="userTop-name">
艾米家的傻钢^
<text>游客</text>
</view>
<image class="userTop-img" src="/static/img/goods_text.png"></image>
</view>
<view class="userTop-nav">
<view class="userTop-label">
<text>89</text>
钱包
</view>
<view class="userTop-label">
<text>5</text>
关注
</view>
<view class="userTop-label">
<text>125</text>
团队
</view>
</view>
<view class="userTop-vip">
<view class="userTop-text">
<image src="/static/user_iocn/user_crown.png"></image>
升级VIP会员 享会员特权
</view>
<view class="userTop-btn">
<image src="/static/user_iocn/user_vip.png"></image>
立即开通
</view>
</view>
</view>
<view class="userNav">
<navigator hover-class="none" url="/pages/user_coupon/user_coupon" class="userNav-label">
<view class="userNav-label-img">
<image src="/static/user_iocn/userNav_00.png"></image>
</view>
<text>我的卡券</text>
</navigator>
<navigator hover-class="none" url="/pages/mall_order/mall_order" class="userNav-label">
<view class="userNav-label-img">
<image src="/static/user_iocn/userNav_01.png"></image>
</view>
<text>我的订单</text>
</navigator>
<view class="userNav-label">
<view class="userNav-label-img">
<image src="/static/user_iocn/userNav_02.png"></image>
</view>
<text>分享海报</text>
</view>
</view>
<view class="userTool">
<view class="userTool-title">
更多服务
</view>
<view class="userTool-list">
<view class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_00.png"></image>
</view>
<text>活动参与</text>
</view>
<view class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_01.png"></image>
</view>
<text>项目预购</text>
</view>
<navigator hover-class="none" url="/pages/mall_cart/mall_cart" class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_02.png"></image>
<view class="userTool-label-tips">2</view>
</view>
<text>我的购物车</text>
</navigator>
<view class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_03.png"></image>
</view>
<text>客服服务</text>
</view>
<navigator hover-class="none" url="/pages/mall_address/mall_address" class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_04.png"></image>
</view>
<text>收货地址</text>
</navigator>
<view class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_05.png"></image>
</view>
<text>项目关注</text>
</view>
<view class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_06.png"></image>
</view>
<text>区块链证书</text>
</view>
<view class="userTool-label">
<view class="userTool-label-img">
<image src="/static/user_iocn/userTool_07.png"></image>
</view>
<text>设置</text>
</view>
</view>
</view>

View File

@@ -1 +1,219 @@
/* pages/user/index.wxss */ /*
* 手太欠
* 企获客商城模块
*/
page {
background-color: #e9e9e9;
}
/* 个人中心头部 */
.userTop {
background-color: #2e81fc;
padding: 0 30rpx;
box-sizing: border-box;
color: #fff;
}
.userTop-head {
display: flex;
padding: 30rpx;
}
.userTop-name {
flex: 1;
font-size: 40rpx;
font-weight: 600;
margin-top: 20rpx;
}
.userTop-name text {
font-size: 28rpx;
border: 2rpx #fff solid;
border-radius: 20rpx;
padding: 0 20rpx;
line-height: 40rpx;
display: inline-block;
margin-left: 10rpx;
}
.userTop-img {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.userTop-nav {
display: flex;
}
.userTop-label {
flex: 3;
text-align: center;
font-size: 28rpx;
}
.userTop-label text {
display: block;
font-size: 42rpx;
}
.userTop-vip {
background-image: linear-gradient(to left, #1b2653, #354273);
border-radius: 20rpx 20rpx 0 0;
padding: 25rpx;
box-sizing: border-box;
margin-top: 30rpx;
}
.userTop-vip,
.userTop-text,
.userTop-btn {
display: flex;
}
.userTop-text {
flex: 1;
line-height: 60rpx;
font-size: 30rpx;
}
.userTop-text image {
width: 54rpx;
height: 54rpx;
margin-right: 20rpx;
}
.userTop-btn {
background-color: #fedd7c;
color: #313c6d;
border-radius: 50rpx;
height: 60rpx;
line-height: 60rpx;
padding-right: 20rpx;
font-size: 26rpx;
}
.userTop-btn image {
width: 30rpx;
height: 30rpx;
margin: 15rpx 8rpx 15rpx 20rpx;
}
.userNav {
padding: 30rpx 0;
box-sizing: border-box;
border-radius: 30rpx;
background-color: white;
overflow: hidden;
margin: 30rpx 20rpx;
}
.userNav-label {
width: 33.33%;
float: left;
text-align: center;
font-weight: 600;
color: #353535;
font-size: 30rpx;
}
.userNav-label-img {
width: 104rpx;
height: 104rpx;
border-radius: 40rpx;
margin: 0 auto 20rpx;
color: #fff;
padding: 25rpx;
box-sizing: border-box;
}
.userNav-label:nth-child(1) .userNav-label-img {
background-image: linear-gradient(to top, #91d634, #75c470);
}
.userNav-label:nth-child(2) .userNav-label-img {
background-image: linear-gradient(to top, #04d2c1, #3caff1);
}
.userNav-label:nth-child(3) .userNav-label-img {
background-image: linear-gradient(to top, #ff686c, #ff0d76);
}
.userNav-label image {
width: 100%;
height: 100%;
display: block;
}
/* 更多服务 */
.userTool {
background-color: white;
border-radius: 20rpx;
margin: 0 20rpx;
padding: 30rpx 20rpx 0;
box-sizing: border-box;
}
.userTool-title {
position: relative;
padding-left: 30rpx;
font-weight: 600;
margin-bottom: 30rpx;
}
.userTool-title::after {
position: absolute;
content: '';
background-color: #066aff;
left: 0;
top: 15%;
width: 8rpx;
height: 70%;
border-radius: 20rpx;
}
.userTool-list {
overflow: hidden;
padding-top: 20rpx;
font-size: 30rpx;
}
.userTool-label {
width: 25%;
float: left;
text-align: center;
margin-bottom: 50rpx;
}
.userTool-label-img {
position: relative;
width: 94rpx;
height: 94rpx;
margin: 0 auto;
margin-bottom: 15rpx;
}
.userTool-label-img image {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
.userTool-label-tips {
position: absolute;
top: -5rpx;
right: -5rpx;
background-color: #ffffff;
border: 2rpx solid #ff106e;
color: #ff106e;
font-size: 24rpx;
border-radius: 50%;
width: 32rpx;
height: 32rpx;
line-height: 32rpx;
text-align: center;
}

View File

@@ -0,0 +1,164 @@
/*
* 手太欠
* 企获客商城
*/
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
stateType : 'ALL', //卡券分类
couponList : [],
status : 1,
type : '',
statusTab : 0,
currentTab : 0,
statusMenu : [
{
type: 1,
text: '未使用'
},
{
type: 2,
text: '已使用'
},
{
type: 3,
text: '已失效'
}
],
couponMenu : [
{
type: '',
text: '全部'
},
{
type: 1,
text: '免费券'
},
{
type: 2,
text: '代金券'
},
{
type: 3,
text: '提货卡'
}
],
coupontype : '',
couponstatus: '1',
total_page :'',
current :'',
page :'',
default :'',
nomore :false
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.couponInfo()
},
couponInfo() {
if (wx.getStorageSync("token") == "") {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
wx.$api.mall.coupons({
type : this.data.coupontype || '',
status : this.data.couponstatus || '',
page : this.data.page || ''
}).then(res => {
let newrcoupon = res.data;
this.setData({
couponList: this.data.couponList.concat(newrcoupon), //优惠券数组
total_page:res.page.total_page,
current:res.page.current,
})
if(this.data.couponList.concat(newrcoupon).length==0){
this.setData({
default:true
})
}else{
this.setData({
default:''
})
}
})
},
statusChange(e) {
let cur = e.target.dataset.current;
let couponstatus = e.target.dataset.type;
this.setData({
statusTab : cur,
couponstatus:couponstatus,
coupontype :'',
page :'',
couponList :[],
currentTab :0,
nomore :false
})
this.couponInfo()
},
couponChange(e){
let cur = e.target.dataset.current;
let type = e.target.dataset.type;
this.setData({
currentTab : cur,
coupontype :type,
page :'',
couponList :[],
nomore :false
})
this.couponInfo();
},
detailLink(e){
let verification = e.target.dataset.verification;
let itemtype = e.target.dataset.itemtype;
let couponid = e.target.dataset.couponid;
if(itemtype==1){
var type='free'
}else if(itemtype==2){
var type='cash'
}else if(itemtype==3){
var type='rebate'
}
if(verification==2){
wx.navigateTo({
url: '/pages/user_coupon_data/user_coupon_data?user_coupon_id='+couponid+'&type='+type
})
}else if(verification==1){
wx.navigateTo({
url: '/pages/coupon_goods/coupon_goods?user_coupon_id='+couponid
})
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
let total_page = this.data.total_page;
let current = parseInt(this.data.current) + 1;
this.setData({
page: current
})
if(current > total_page){
this.setData({
nomore: true
})
}else{
this.couponInfo();
}
}
})

View File

@@ -0,0 +1,4 @@
{
"usingComponents" : {},
"navigationBarTitleText" : "我的卡券"
}

View File

@@ -0,0 +1,107 @@
<!-- 我的卡券tab -->
<view class="coupon-tab">
<view class="coupon-tab-item {{statusTab==index?'active':''}}" wx:for="{{statusMenu}}" wx:key="index"
data-current="{{index}}" data-type="{{item.type}}" wx:for-index="index" bindtap="statusChange">{{item.text}}
</view>
</view>
<!-- 卡券类型 -->
<view class="couponCut">
<text class="{{currentTab==index?'active':''}}" wx:for="{{couponMenu}}" wx:key="index" data-current="{{index}}"
data-type="{{item.type}}" wx:for-index="index" bindtap="couponChange">{{item.text}}</text>
</view>
<!-- 卡券列表 -->
<view class="couponList">
<view class="coupon-null" wx:if="{{default == true}}">
<image src="/static/mall_icon/coupon-null00.png" mode="widthFix"></image>
<view class="coupon-text">暂无优惠券</view>
</view>
<view wx:else>
<view wx:for="{{couponList}}" wx:key="index">
<view wx:if="{{item.type==1}}">
<view class="couponDraw-list-label couponDraw-list-blue">
<view class="couponDraw-list-tips">免费劵</view>
<view class="couponDraw-list-price">
<image class="coupon-icon" src="{{item.cover}}" mode="heightFix"></image>
</view>
<view class="couponDraw-list-text">
<view class="couponDraw-list-name">
{{item.title}}<text>{{item.whole}}</text><text>{{item.way}}</text></view>
<block wx:if="{{item.status==1}}">
<view class="couponDraw-list-btn" wx:if="{{item.verification_type==1}}" bindtap="detailLink"
data-verification="{{item.verification_type}}" data-couponid="{{item.user_coupon_id}}"
data-itemtype="{{item.type}}">去使用</view>
<view class="couponDraw-list-btn" wx:else bindtap="detailLink"
data-verification="{{item.verification_type}}" data-itemtype="{{item.type}}"
data-couponid="{{item.user_coupon_id}}">查看券码</view>
</block>
<block wx:elif="{{item.status==2}}">
<view class="couponDraw-list-btn loose">已使用</view>
</block>
<block wx:elif="{{item.status==3}}">
<view class="couponDraw-list-btn loose">已失效</view>
</block>
<view class="couponDraw-list-time">{{item.time}}</view>
</view>
</view>
</view>
<view wx:if="{{item.type==2}}">
<view class="couponDraw-list-label">
<view class="couponDraw-list-tips">代金券</view>
<view class="couponDraw-list-price">
<view class="couponDraw-list-part"><text class="price-tips">¥</text>{{item.price}}</view>
</view>
<view class="couponDraw-list-text">
<view class="couponDraw-list-name">
{{item.title}}<text>{{item.whole}}</text><text>{{item.way}}</text></view>
<block wx:if="{{item.status==1}}">
<view class="couponDraw-list-btn" wx:if="{{item.verification_type==1}}" bindtap="detailLink"
data-verification="{{item.verification_type}}" data-couponid="{{item.user_coupon_id}}"
data-itemtype="{{item.type}}">去使用</view>
<view class="couponDraw-list-btn" wx:else bindtap="detailLink"
data-verification="{{item.verification_type}}" data-itemtype="{{item.type}}"
data-couponid="{{item.user_coupon_id}}">查看券码</view>
</block>
<block wx:elif="{{item.status==2}}">
<view class="couponDraw-list-btn loose">已使用</view>
</block>
<block wx:elif="{{item.status==3}}">
<view class="couponDraw-list-btn loose">已失效</view>
</block>
<view class="couponDraw-list-time">{{item.time}}</view>
</view>
</view>
</view>
<view wx:if="{{item.type==3}}">
<view class="couponDraw-list-label couponDraw-list-red">
<view class="couponDraw-list-tips">提货卡</view>
<view class="couponDraw-list-price">
<image class="coupon-icon" src="{{item.cover}}" mode="heightFix"></image>
</view>
<view class="couponDraw-list-text">
<view class="couponDraw-list-name">
{{item.title}}<text>{{item.whole}}</text><text>{{item.way}}</text></view>
<block wx:if="{{item.status==1}}">
<view class="couponDraw-list-btn" wx:if="{{item.verification_type==1}}" bindtap="detailLink"
data-verification="{{item.verification_type}}" data-couponid="{{item.user_coupon_id}}"
data-itemtype="{{item.type}}">去使用</view>
<view class="couponDraw-list-btn" wx:else bindtap="detailLink"
data-verification="{{item.verification_type}}" data-itemtype="{{item.type}}"
data-couponid="{{item.user_coupon_id}}">查看券码</view>
</block>
<block wx:elif="{{item.status==2}}">
<view class="couponDraw-list-btn loose">已使用</view>
</block>
<block wx:elif="{{item.status==3}}">
<view class="couponDraw-list-btn loose">已失效</view>
</block>
<view class="couponDraw-list-time">{{item.time}}</view>
</view>
</view>
</view>
</view>
<view class="nomore" wx:if="{{nomore==true}}">没有更多了~</view>
</view>
</view>

View File

@@ -0,0 +1,270 @@
page {
background-color: #f7f7f7;
}
/* 卡券分类tab */
.coupon-tab,
.couponCut {
position: fixed;
left: 0;
width: 100%;
display: flex;
z-index: 112;
}
.coupon-tab {
top: 0;
height: 80rpx;
line-height: 80rpx;
background: white;
}
.coupon-tab-item {
width: 33.33%;
text-align: center;
border-bottom: solid 2rpx #f7f7f7;
color: #464854;
background: white;
position: relative;
font-size: 30rpx;
}
.coupon-tab-item:after {
position: absolute;
content: '';
left: calc(50% - 30rpx);
bottom: 0;
background-color: transparent;
width: 60rpx;
height: 8rpx;
border-radius: 50rpx;
color: #666666;
}
.coupon-tab-item.active {
color: #2151f5;
font-weight: 600;
}
.coupon-tab-item.active:after {
background-color: #2151f5;
}
/* 卡券类型 */
.couponList {
margin: 220rpx 20rpx 0;
}
.couponCut {
top: 80rpx;
height: 126rpx;
line-height: 66rpx;
padding: 30rpx 40rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
background-color: #f7f7f7;
}
.couponCut text {
flex: 4;
text-align: center;
background-color: white;
color: #666666;
margin: 0 20rpx;
border-radius: 50rpx;
font-size: 28rpx;
}
.couponCut text.active {
background-color: #2151f5;
color: #fff;
}
.couponDraw-list-label {
position: relative;
width: 100%;
padding-top: 32%;
border: 2rpx solid #eeeeee;
border-radius: 10rpx;
margin-bottom: 30rpx;
}
.couponDraw-list-label::after,
.couponDraw-list-label::before {
position: absolute;
content: '';
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #f7f7f7;
z-index: 111;
}
.couponEject-list-label::after {
top: -15rpx;
right: 160rpx;
}
.couponEject-list-label::before {
bottom: -15rpx;
right: 160rpx;
}
.couponDraw-list-label::after {
top: -15rpx;
left: calc(40% - 15rpx);
}
.couponDraw-list-label::before {
bottom: -15rpx;
left: calc(40% - 15rpx);
}
.couponDraw-list-tips {
position: absolute;
top: 0;
left: 0;
z-index: 102;
font-size: 26rpx;
border-radius: 10rpx 0 10rpx 0;
padding: 6rpx 20rpx;
background-color: #fae5c2;
color: #9b6404;
}
.couponDraw-list-price {
width: 40%;
background-color: #eea931;
color: #fff;
position: absolute;
height: 100%;
left: 0;
top: 0;
border-radius: 10rpx 0 0 10rpx;
text-align: center;
}
.couponDraw-list-part {
position: absolute;
width: 100%;
height: 70rpx;
top: calc(50% - 35rpx);
z-index: 102;
text-align: center;
font-size: 50rpx;
font-weight: 600;
}
.couponDraw-list-text {
position: absolute;
right: 0;
top: 0;
width: 60%;
padding: 10rpx 20rpx;
box-sizing: border-box;
background-color: #fff;
height: 100%;
}
.couponDraw-list-name text {
color: #999;
display: block;
font-size: 26rpx;
margin: 10rpx 0 5rpx;
}
.couponDraw-list-btn {
color: #b67c18;
border: 2rpx solid #b67c18;
border-radius: 50rpx;
display: inline-block;
font-size: 26rpx;
padding: 6rpx 20rpx;
position: absolute;
top: 90rpx;
right: 20rpx;
margin-bottom: 20rpx;
min-width: 110rpx;
text-align: center;
}
.couponDraw-list-time {
font-size: 26rpx;
color: #999;
clear: both;
position: absolute;
bottom: 20rpx;
}
.couponDraw-list-red .couponDraw-list-price {
background-color: #ee3158;
}
.couponDraw-list-red .couponDraw-list-btn {
border-color: #ba062b;
color: #b80026;
}
.couponDraw-list-red .couponDraw-list-tips {
background-color: #fac2cd;
color: #94001f;
}
.couponDraw-list-blue .couponDraw-list-price {
background-color: #2d6bf6;
}
.couponDraw-list-blue .couponDraw-list-btn {
border-color: #0f4acf;
color: #003fcc;
}
.couponDraw-list-blue .couponDraw-list-tips {
background-color: #c0d3fc;
color: #2151f5;
}
.coupon-null {
width: 100%;
padding: 20% 0;
text-align: center;
}
.coupon-null image {
width: 300rpx;
}
.coupon-text {
width: 100%;
text-align: center;
margin-top: 50rpx;
color: #666;
}
.coupon-icon {
height: 120rpx;
margin-top: 60rpx;
width: 120rpx;
}
.price-tips {
font-size: 20rpx;
}
.loose {
border-color: #999 !important;
color: #999 !important;
}
.nomore {
width: 100%;
height: 60rpx;
line-height: 60rpx;
text-align: center;
color: #999;
margin-bottom: 20rpx;
font-size: 28rpx;
}

Some files were not shown because too many files have changed in this diff Show More