作者 lihongjuan

1

... ... @@ -9,7 +9,7 @@
}
.real_goods_item {
width: 50%;
width: 367rpx;
margin-top: 20rpx;
border-radius: 10rpx;
background: #fff;
... ... @@ -21,6 +21,9 @@
align-items: center;
}
.real_goods_item:nth-child(2n){
border-left:16rpx solid #f5f5f5;
}
.real_goods_img {
width: 332rpx;
... ...
... ... @@ -3,7 +3,7 @@
height: 210rpx;
position: fixed;
right: 32rpx;
bottom: 200rpx;
bottom: 100rpx;
}
.item {
... ...
... ... @@ -22,10 +22,14 @@ Component({
methods: {
//查看商品详情
look_detail(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/shop_detail/shop_detail?id=' + id
})
let id = e.currentTarget.dataset.id;
// wx.navigateTo({
// url: '/pages/shop_detail/shop_detail?id=' + id
// })
},
enter(){
console.log(this.data.list)
},
//加减商品数量
num_change(e) {
... ... @@ -90,6 +94,8 @@ Component({
check_num: this.properties.check_num ? this.properties.check_num:0
})
console.log(this.data.list)
},
detached() {
// 在组件实例被从页面节点树移除时执行
... ...
... ... @@ -8,7 +8,8 @@
<view class="info">
<view class="jifen">
<view class="name">积分</view>
<text>{{type == 3 || type == 2?item.price:item.product.price}}</text>
<text wx:if='{{item.product.price2!=null||item.price2!=null}}'>{{type == 3 || type == 2?item.price2:item.product.price2}}</text>
<text wx:else>{{type == 3 || type == 2?item.price:item.product.price}}</text>
<text style="margin-left: 10rpx;color:#ccc;font-size: 28rpx;" wx:if="{{type == 3 || type == 4}}">X{{item.num}}</text>
</view>
<view class="num_box" wx:if="{{type == 1}}">
... ... @@ -17,14 +18,16 @@
<image class="num_btn" src="/images/add.png" data-index="{{index}}" data-type="1" data-num="{{item.num}}" data-id="{{item.id}}" data-product_id="{{item.product_id}}" catchtap="num_change"/>
</view>
</view>
<view class="oldprice" wx:if="{{item.product.price2!=null||item.price2!=null}}">{{item.product.price||item.price}}</view>
</view>
</view>
</view>
<view class="info_box" wx:if="{{type == 3}}">
<view class="f_item">
<view class="shop">
<view class="shop" bindtap="enter">
商品积分
<text>{{item.price*100*item.num/100}}积分</text>
<text wx:if="{{item.price2!=null}}">{{item.price2*100*item.num/100}}积分</text>
<text wx:else>{{item.price*100*item.num/100}}积分</text>
</view>
</view>
</view>
... ...
... ... @@ -156,7 +156,7 @@
padding: 28rpx 0;
box-sizing: border-box;
display: flex;
flex-direction: row-reverse;
flex-direction: row-reverse;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC;
... ... @@ -175,3 +175,10 @@
color: rgba(242, 0, 0, 1);
margin-left: 10rpx;
}
.oldprice {
color: #bdc4ce;
font-size: 24rpx;
text-decoration: line-through;
margin-top:10rpx;
}
... ...
... ... @@ -63,6 +63,11 @@ Page({
}
app.post(url, params).then((res) => {
wx.hideLoading()
// let obj={
// id:'',
// name:'套餐专区'
// }
// res.msg.push(obj)
that.setData({
nav_arr: res.msg
})
... ...
... ... @@ -11,7 +11,7 @@
<scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}">
<view class='center_child'>
<view class='left'>
<view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='click_category' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view>
<view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view>
<view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view>
</view>
... ...
... ... @@ -90,13 +90,23 @@ page {
height: 100%;
background: #fff;
position: fixed;
top: 114rpx
top: 114rpx;
overflow-y: scroll;
}
.leftbox{
display:flex;
flex-direction: column;
justify-content: center;
align-items: center
}
.fake_left{
width: 21.4%;
height: 100%;
background: #fff;
overflow-y: scroll
}
.left_item {
... ... @@ -205,3 +215,9 @@ page {
white-space: nowrap;
margin: 0 auto
}
.leftbox{
display:flex;
flex-direction: column;
justify-content: center;
align-items: center
}
\ No newline at end of file
... ...
... ... @@ -29,7 +29,9 @@ Page({
showtime: false,
status1: '',
status2: '',
title2: ''
title2: '',
scrollTop:'',
pid:''
},
scroll(e) {
... ... @@ -316,7 +318,14 @@ Page({
select_nav(e) {
let index = Number(e.currentTarget.dataset.index)
let id = e.currentTarget.dataset.id
let id = e.currentTarget.dataset.id;
this.setData({
pid:id
})
this.setData({
scrollTop: 0
})
if (index == this.data.nav_index) {
return
} else {
... ... @@ -387,7 +396,7 @@ Page({
class_arr: res.msg,
cid: ''
})
that.good_list('', that.data.c_index)
that.good_list(pid, that.data.c_index)
}
}).catch((er) => {
wx.hideLoading()
... ... @@ -552,11 +561,27 @@ Page({
onPullDownRefresh: function() {
},
loadMore(e){
console.log(e)
let that = this
if (that.data.page_type) {
wx.showToast({
title: '暂无更多数据',
icon: 'none',
duration: 1000
})
return
}
that.setData({
page: that.data.page + 1
})
that.good_list(that.data.pid, that.data.c_index)
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
console.log(43898438493)
let that = this
if (that.data.page_type) {
wx.showToast({
... ...
<scroll-view scroll-y="true" style="height:100%" bindscroll="scroll">
<scroll-view scroll-y="true" style="height:100%" bindscroll="scroll" scroll-top="{{scrollTop}}" bindscrolltolower="loadMore">
<view class='page'>
<view class='top'>
<navigator class='search_box' url="/pages/search/search">
... ...
... ... @@ -399,7 +399,7 @@ image {
box-sizing: border-box;
background: #fff;
border-bottom: 16rpx solid #f5f5f5;
border-top:16rpx solid #f5f5f5;
/* border-top:16rpx solid #f5f5f5; */
margin-top:20rpx;
}
... ...
... ... @@ -51,6 +51,17 @@ Page({
})
}
})
}else{
wx.hideTabBarRedDot({
index: 1,
success: function (red) {
// wx.setTabBarBadge({
// index: 1,
// text: newlist.length.toString(),
// })
}
})
}
... ...
... ... @@ -163,6 +163,46 @@ Page({
},
getmessagelist() {
let that = this
let url = '/information/get_all';
let data = {
page: 1,
pageNum: 10,
}
a.post(url, data, "POST").then((r) => {
// console.log(r)
// that.setData({
// messagelist: that.data.messagelist.concat(r.msg)
// })
let newlist = [];
r.msg.forEach(function (value, index, array) {
console.log(newlist)
if (value.status == 1) {
newlist.push(value)
}
})
console.log('77889944556', newlist)
if (newlist.length != 0) {
wx.showTabBarRedDot({
index: 1,
success: function (red) {
wx.setTabBarBadge({
index: 1,
text: newlist.length.toString(),
})
}
})
}
}).catch((err) => { })
},
/**
* 生命周期函数--监听页面显示
*/
... ... @@ -171,6 +211,7 @@ Page({
t.getnewwuliu()
t.get_shopnum()
t.get_order()
t.getmessagelist()
//获取个人信息 自己写的
// t.getInfoFun()
... ...
... ... @@ -32,6 +32,19 @@ Page({
}).catch((er) => {})
},
// 进入订单详情
//查看订单详情
look_detail(e) {
console.log(6666)
let id=e.currentTarget.dataset.id;
if(id!=null){
wx.navigateTo({
url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id + '&type=' + e.currentTarget.dataset.type,
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ...
... ... @@ -12,7 +12,7 @@
<view class="content" wx:if="{{list.length != 0}}">
<view class="title">积分明细</view>
<view class="item" wx:for="{{list}}" wx:key="index">
<view class="item" wx:for="{{list}}" wx:key="index" bindtap="look_detail" data-id="{{item.order_id}}" data-type="1">
<view class="left">
<image src="{{item.image}}" mode="aspectFill" />
</view>
... ...
... ... @@ -4,6 +4,7 @@ Page({
/**
* 页面的初始数据
*/
data: {
status: 1,
nav: ['待支付', '待发货', '待收货', '已完成', '退换货'],
... ... @@ -12,7 +13,8 @@ Page({
daishouhuoorder: [],
success: [],
tui: [],
cover_type: false
cover_type: false,
totalmoney:""
},
// 展示待支付的去支付弹窗
show_cover(e) {
... ... @@ -22,6 +24,10 @@ Page({
this.setData({
info: daiorder[index]
})
console.log(this.data.info)
this.setData({
totalmoney: Number(this.data.info.total_price)+Number(this.data.info.youfei)
})
}
this.setData({
cover_type: !this.data.cover_type
... ...
... ... @@ -15,11 +15,7 @@
</view>
<view class='img_right'>
<view class='info_titles'>{{zitem.product_name}}</view>
<view class="address">收货地址:</view>
<view class="address">下单时间:</view>
<view class="address">收货人:</view>
<view class="address">收电话:</view>
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{zitem.product_money}}</view>
... ... @@ -30,6 +26,24 @@
</block>
<view class='padding'>
<view class='mask_two'>
<view>收货地址</view>
<view class='score'>{{item.address_area}}{{item.address_address}}</view>
</view>
<view class='mask_two'>
<view>下单时间</view>
<view class='score'>{{item.createtime}}</view>
</view>
<view class='mask_two'>
<view>收货人</view>
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
<view class='mask_two'>
<view>商品积分</view>
<view class='score'>{{item.total_price*100/100}}积分</view>
</view>
... ... @@ -54,20 +68,13 @@
<view class='two'>
<view class='two_item' wx:for="{{daifahuoorder}}" wx:key="index" bindtap="look_detail" data-id="{{item.id}}" data-type="1">
<view class='order_number'>订单编号:{{item.order_odd}}</view>
<block wx:for="{{item.orderitem}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex" >
<block wx:for="{{item.orderitem}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex">
<view class='mask_one'>
<view class='mask_img'>
<image src='{{zitem.product_image}}'></image>
</view>
<view class='img_right'>
<view class='info_titles'>{{zitem.product_name}}</view>
<view class="address">收货地址:{{item.address_area}}{{item.address_address}}</view>
<view class="address">下单时间:{{item.createtime}}</view>
<view class="address">收货人:{{item.address_name}}</view>
<view class="address">收电话:{{item.address_mobile}}</view>
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{zitem.product_money}}</view>
... ... @@ -84,7 +91,34 @@
<text class='small_red_score'>积分</text>
</view>
</view>
<view class='mask_two'>
<view>收货地址</view>
<view class='score'>{{item.address_area}}{{item.address_address}}</view>
</view>
<view class='mask_two'>
<view>下单时间</view>
<view class='score'>{{item.createtime}}</view>
</view>
<view class='mask_two'>
<view>收货人</view>
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
<view class='mask_two'>
<view>商品积分</view>
<view class='score'>{{item.total_price*100/100}}积分</view>
</view>
<view class='mask_two no_border'>
<view>邮费积分</view>
<view class='score'>{{item.youfei}}积分</view>
</view>
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view>
<view style='clear:both;'></view>
</view>
... ... @@ -106,11 +140,11 @@
</view>
<view class='img_right'>
<view class='info_titles'>{{zitem.product_name}}</view>
<view class="address">收货地址:</view>
<!-- <view class="address">收货地址:</view>
<view class="address">下单时间:</view>
<view class="address">收货人:</view>
<view class="address">收电话:</view>
<view class="address">收电话:</view> -->
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{zitem.product_money}}</view>
... ... @@ -120,6 +154,32 @@
</view>
</block>
<view class='mask_two'>
<view>收货地址</view>
<view class='score'>{{item.address_area}}{{item.address_address}}</view>
</view>
<view class='mask_two'>
<view>下单时间</view>
<view class='score'>{{item.createtime}}</view>
</view>
<view class='mask_two'>
<view>收货人</view>
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
<view class='mask_two'>
<view>商品积分</view>
<view class='score'>{{item.total_price*100/100}}积分</view>
</view>
<view class='mask_two no_border'>
<view>邮费积分</view>
<view class='score'>{{item.youfei}}积分</view>
</view>
<view class='mask_two no_border'>
<view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品
<text decode='{{true}}'>&emsp;实付:</text>
... ... @@ -128,6 +188,7 @@
</view>
</view>
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' catchtap="queren" data-d="{{item.order_odd}}">确认收货</view>
<view class='cancel_order' data-d="{{item.order_odd}}" catchtap="look_logistics">物流查询</view>
<view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view>
... ... @@ -151,11 +212,8 @@
</view>
<view class='img_right'>
<view class='info_titles'>{{zitem.product_name}}</view>
<view class="address">收货地址:</view>
<view class="address">下单时间:</view>
<view class="address">收货人:</view>
<view class="address">收电话:</view>
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{zitem.product_money}}</view>
... ... @@ -165,6 +223,32 @@
</view>
</block>
<view class='mask_two'>
<view>收货地址</view>
<view class='score'>{{item.address_area}}{{item.address_address}}</view>
</view>
<view class='mask_two'>
<view>下单时间</view>
<view class='score'>{{item.createtime}}</view>
</view>
<view class='mask_two'>
<view>收货人</view>
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
<view class='mask_two'>
<view>商品积分</view>
<view class='score'>{{item.total_price*100/100}}积分</view>
</view>
<view class='mask_two no_border'>
<view>邮费积分</view>
<view class='score'>{{item.youfei}}积分</view>
</view>
<view class='mask_two no_border'>
<view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品
<text decode='{{true}}'>&emsp;实付:</text>
... ... @@ -175,8 +259,8 @@
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='cancel_order' catchtap="delete_item" data-d="{{item.order_odd}}">删除</view>
<view style='clear:both;'></view>
</view>
... ... @@ -197,11 +281,8 @@
</view>
<view class='img_right'>
<view class='info_titles'>{{zitem.product_name}}</view>
<view class="address">收货地址:</view>
<view class="address">下单时间:</view>
<view class="address">收货人:</view>
<view class="address">收电话:</view>
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{zitem.product_money}}</view>
... ... @@ -210,6 +291,31 @@
</view>
</view>
</block>
<view class='mask_two'>
<view>收货地址</view>
<view class='score'>{{item.address_area}}{{item.address_address}}</view>
</view>
<view class='mask_two'>
<view>下单时间</view>
<view class='score'>{{item.createtime}}</view>
</view>
<view class='mask_two'>
<view>收货人</view>
<view class='score'>{{item.address_name}}</view>
</view>
<view class='mask_two'>
<view>收电话:</view>
<view class='score'>{{item.address_mobile}}</view>
</view>
<view class='mask_two'>
<view>商品积分</view>
<view class='score'>{{item.total_price*100/100}}积分</view>
</view>
<view class='mask_two no_border'>
<view>邮费积分</view>
<view class='score'>{{item.youfei}}积分</view>
</view>
<view class='mask_two no_border'>
<view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品
... ... @@ -219,7 +325,9 @@
</view>
</view>
<view class='btn_box'>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
<view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="jumpReturnFun">查看详情</view>
<view style='clear:both;'></view>
</view>
... ... @@ -233,7 +341,7 @@
<!-- 待支付订单的支付弹窗 -->
<view class="cover_box" wx:if="{{cover_type}}">
<view class="cover_order">
<view class="all_money">{{info.total_price + info.youfei*100/100}}积分</view>
<view class="all_money">{{totalmoney}}积分</view>
<view class="money_item">
<text>商品积分</text>
<text>{{info.total_price}}积分</text>
... ...
page {
width: 100%;
height: 100%;
background: #f9f9f9;
width: 100%;
height: 100%;
background: #f9f9f9;
}
::-webkit-scrollbar {
display: none;
display: none;
}
.page {
width: 100%;
min-height: 100%;
padding-top: 88rpx;
box-sizing: border-box
width: 100%;
min-height: 100%;
padding-top: 88rpx;
box-sizing: border-box;
}
.slide_nav {
width: 100%;
height: 88rpx;
background: #fff;
white-space: nowrap;
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
position: fixed;
left: 0;
top: 0
width: 100%;
height: 88rpx;
background: #fff;
white-space: nowrap;
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
position: fixed;
left: 0;
top: 0;
}
.nav_item {
height: 100%;
width: 20%;
line-height: 88rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(156, 156, 156, 1);
text-align: center;
height: 100%;
width: 20%;
line-height: 88rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(156, 156, 156, 1);
text-align: center;
}
.real_nav {
width: auto;
margin: 0 auto;
width: auto;
margin: 0 auto;
}
.real_nav.active {
color: rgba(61, 154, 248, 1);
position: relative;
color: rgba(61, 154, 248, 1);
position: relative;
}
.real_nav.active::after {
position: absolute;
content: '';
bottom: 0;
width: 70rpx;
left: 50%;
transform: translateX(-50%);
height: 4rpx;
background: rgba(61, 154, 248, 1);
border-radius: 4rpx 4rpx 0 0;
position: absolute;
content: '';
bottom: 0;
width: 70rpx;
left: 50%;
transform: translateX(-50%);
height: 4rpx;
background: rgba(61, 154, 248, 1);
border-radius: 4rpx 4rpx 0 0;
}
/*待支付开始*/
.second {
padding: 10rpx 32rpx 0;
box-sizing: border-box;
padding: 10rpx 32rpx 0;
box-sizing: border-box;
}
.two {
margin-top: 24rpx;
padding-bottom: 30rpx;
box-sizing: border-box;
margin-top: 24rpx;
padding-bottom: 30rpx;
box-sizing: border-box;
}
.two_item {
margin-top: 20rpx;
/* padding: 36rpx 24rpx 0 30rpx; */
/* box-sizing: border-box; */
background: #fff;
border-radius: 8rpx;
margin-top: 20rpx;
/* padding: 36rpx 24rpx 0 30rpx; *//* box-sizing: border-box; */
background: #fff;
border-radius: 8rpx;
}
.order_number {
height: 80rpx;
border-bottom: 1rpx solid #eee;
line-height: 80rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(19, 26, 46, 1);
padding: 0 24rpx 0 30rpx;
box-sizing: border-box
height: 80rpx;
border-bottom: 1rpx solid #eee;
line-height: 80rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(19, 26, 46, 1);
padding: 0 24rpx 0 30rpx;
box-sizing: border-box;
}
.mask_one {
padding: 36rpx 24rpx 0 30rpx;
box-sizing: border-box;
display: flex;
display: -webkit-flex;
margin-bottom:0rpx;
padding: 36rpx 24rpx 0 30rpx;
box-sizing: border-box;
display: flex;
display: -webkit-flex;
margin-bottom: 0rpx;
}
.mask_img {
width: 200rpx;
height: 200rpx;
margin-right: 36rpx;
width: 200rpx;
height: 200rpx;
margin-right: 36rpx;
}
.mask_img image {
width: 100%;
height: 100%;
width: 100%;
height: 100%;
}
.img_right {
width: calc(100% - 232rpx);
width: calc(100% - 232rpx);
}
.info_titles {
width: 100%;
height: 86rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
line-height: 44rpx;
color: rgba(6, 14, 35, 1);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 12rpx;
width: 100%;
height: 86rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
line-height: 44rpx;
color: rgba(6, 14, 35, 1);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 12rpx;
}
.two_ones {
height: 44rpx;
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
height: 44rpx;
display: flex;
display: -webkit-flex;
align-items: center;
-webkit-align-items: center;
}
.scores {
width: 64rpx;
height: 32rpx;
background: rgba(242, 0, 0, 1);
border-radius: 2rpx;
text-align: center;
line-height: 32rpx;
color: #fff;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
margin-right: 20rpx;
width: 64rpx;
height: 32rpx;
background: rgba(242, 0, 0, 1);
border-radius: 2rpx;
text-align: center;
line-height: 32rpx;
color: #fff;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
margin-right: 20rpx;
}
.prices {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
line-height: 44rpx;
color: rgba(242, 0, 0, 1);
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
line-height: 44rpx;
color: rgba(242, 0, 0, 1);
}
.padding{
padding: 0 24rpx 0 30rpx;
box-sizing: border-box
.padding {
padding: 0 24rpx 0 30rpx;
box-sizing: border-box;
}
.mask_two {
height: 96rpx;
line-height: 98rpx;
border-bottom: 1rpx solid #eee;
display: flex;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(19, 26, 46, 1);
height: 96rpx;
line-height: 98rpx;
border-bottom: 1rpx solid #eee;
display: flex;
display: -webkit-flex;
justify-content: space-between;
-webkit-justify-content: space-between;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(19, 26, 46, 1);
padding: 0 30rpx;
box-sizing: border-box;
}
.no_border {
border: 0 none;
border: 0 none;
}
.score {
color: rgba(142, 142, 142, 1);
width: 500rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: rgba(142, 142, 142, 1);
text-align: right
}
.scorea {
width: 100%;
text-align: right;
padding: 0 24rpx 0 30rpx;
box-sizing: border-box
width: 100%;
text-align: right;
padding: 0 24rpx 0 30rpx;
box-sizing: border-box;
}
.red_score, .small_red_score {
color: rgba(242, 0, 0, 1);
font-weight: 600;
font-size: 32rpx;
color: rgba(242, 0, 0, 1);
font-weight: 600;
font-size: 32rpx;
}
.small_red_score {
font-size: 28rpx;
font-weight: 500;
font-size: 28rpx;
font-weight: 500;
}
.btn_box {
/* display: flex;
/* display: flex;
display: -webkit-box;
flex-direction: row-reveres;
-webkit-flex-direction: row-reveres;
justify-content: flex-end; */
padding: 16rpx 24rpx 32rpx 30rpx;
box-sizing: border-box;
padding: 16rpx 24rpx 32rpx 30rpx;
box-sizing: border-box;
}
.go_pay, .cancel_order {
padding: 0 28rpx;
box-sizing: border-box;
height: 48rpx;
border: 1rpx solid rgba(242, 0, 0, 1);
border-radius: 34rpx;
text-align: center;
line-height: 48rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(242, 0, 0, 1);
float: right;
margin-left: 20rpx;
padding: 0 28rpx;
box-sizing: border-box;
height: 48rpx;
border: 1rpx solid rgba(242, 0, 0, 1);
border-radius: 34rpx;
text-align: center;
line-height: 48rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(242, 0, 0, 1);
float: right;
margin-left: 20rpx;
}
.cancel_order {
border: 1px solid rgba(156, 156, 156, 1);
color: rgba(19, 26, 46, 1);
border: 1px solid rgba(156, 156, 156, 1);
color: rgba(19, 26, 46, 1);
}
/*待支付结束*/
.empty {
font-size: 36rpx;
font-family: PingFang SC;
... ... @@ -250,8 +257,6 @@ page {
text-align: center;
}
/*支付成功弹框结束*/
.cover_box {
... ... @@ -263,8 +268,6 @@ page {
top: 0;
}
.cover_order {
width: 100%;
height: 526rpx;
... ... @@ -328,18 +331,16 @@ page {
top: 22rpx;
padding: 10rpx;
}
.shouhuo{
display:flex;
.shouhuo {
display: flex;
justify-content: space-between;
align-items: center
align-items: center;
}
.address{
font-size:26rpx;
color:rgba(19, 26, 46, 1);
margin-bottom:10rpx;
.address {
font-size: 26rpx;
color: rgba(19, 26, 46, 1);
margin-bottom: 10rpx;
/* font-weight: bold; */
}
\ No newline at end of file
}
... ...
... ... @@ -40,6 +40,46 @@ Page({
})
},
getmessagelist() {
let that = this
let url = '/information/get_all';
let data = {
page: 1,
pageNum: 10,
}
app.post(url, data, "POST").then((r) => {
// console.log(r)
// that.setData({
// messagelist: that.data.messagelist.concat(r.msg)
// })
let newlist = [];
r.msg.forEach(function (value, index, array) {
console.log(newlist)
if (value.status == 1) {
newlist.push(value)
}
})
console.log('77889944556', newlist)
if (newlist.length != 0) {
wx.showTabBarRedDot({
index: 1,
success: function (red) {
wx.setTabBarBadge({
index: 1,
text: newlist.length.toString(),
})
}
})
}
}).catch((err) => { })
},
//改变购物车数量
change_num(e) {
let index = Number(e.detail.index)
... ... @@ -199,7 +239,8 @@ submit(){
onShow: function() {
this.get_info()
this.judge()
this.get_shopnum()
this.get_shopnum();
this.getmessagelist()
},
/**
... ...
... ... @@ -65,10 +65,19 @@
</view>
<view class='img_right'>
<view class='info_title'>{{info.name}}</view>
<view wx:if="{{info.price2!=null}}">
<view class='two_ones'>
<view class='scores'>积分</view>
<view class='prices'>{{info.price}}</view>
</view>
<view class="oldprice">{{info.price2}}</view>
</view>
<view class='two_ones' wx:else>
<view class='scores'>积分</view>
<view class='prices'>{{info.price2}}</view>
</view>
</view>
</view>
<view class='mask_two'>
... ...
... ... @@ -39,6 +39,14 @@ Page({
num: num
})
},
// 跳到商品详情页
look_more(e) {
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/shop_detail/shop_detail?id=' + id
})
},
//添加购物车
addshop() {
let that = this
... ...
... ... @@ -4,7 +4,7 @@
<concat/>
<view class='top'>
<image src="{{info.image}}"></image>
<image src="{{info.image}}" mode="widthFix"></image>
<!-- <view class='current_box'>{{current+1}}/{{info.images.length}}</view>
<swiper class='swiper' current='{{current}}' bindchange='getCurrent'>
<swiper-item class='swiper-item' wx:for='{{info.images}}' wx:key='index'>
... ... @@ -24,9 +24,9 @@
</view> -->
</view>
<view class="list">
<view class="listitem flex" bindtap="newdetail" wx:for="{{taocanlist}}" wx:key="no" data-id="{{item.id}}">
<view class="listitem flex" bindtap="look_more" wx:for="{{taocanlist}}" wx:key="no" data-id="{{item.id}}">
<view class="listright">
<image src="{{item.images[0]}}" mode="widthFix "></image>
<image src="{{item.images[0]}}" mode="widthFix"></image>
</view>
<view class="listleft ">
<view class="commontwo ">{{item.name}} <text class="sold">x{{item.sold}}</text></view>
... ...
... ... @@ -24,6 +24,9 @@ page {
height: 750rpx;
position: relative;
background: #fff;
display: flex;
justify-content: center;
align-items: center
}
.current_box {
... ... @@ -534,9 +537,17 @@ page {
/*弹框结束*/
.listright {
width: 218rpx;
height: 156rpx;
font-size: 0;
margin-left: 32rpx;
/* height: 218rpx; */
display: flex;
overflow: hidden;
align-items: center;
justify-content: center;
/* font-size: 0;
margin-left: 32rpx; */
}
.listright image{
width: 100%;
height: 100%;
}
.leftbottom {
... ... @@ -557,7 +568,8 @@ page {
background: #fff;
}
.listleft{
margin-left:10rpx;
width:500rpx;
margin-left:32rpx;
}
.commontwo {
color: #232323;
... ... @@ -573,5 +585,5 @@ page {
}
image{
width:100%;
height:100%;
/* height:100%; */
}
\ No newline at end of file
... ...
... ... @@ -14,6 +14,7 @@ Page({
area: '',
address: '',
cover_type: false,
totalmoney:''
},
//加减商品数量
num_change(e) {
... ... @@ -51,7 +52,7 @@ Page({
let coudan_arr = this.data.coudan_arr
let choudan_money = 0
for (let obj of coudan_arr) {
choudan_money = (obj.price * 100 * obj.num) / 100 + choudan_money
choudan_money = Number((obj.price * 100 * obj.num)) / 100 + Number(choudan_money)
}
this.setData({
choudan_money: choudan_money
... ... @@ -140,8 +141,16 @@ Page({
app.post(url, params).then((res) => {
console.log(res)
that.setData({
info: res.msg
info: res.msg,
totalmoney: Number(res.msg.total) + Number(res.msg.yunfei * 100 / 100)
})
console.log('999',that.data.totalmoney)
// that.info.total = Number(that.data.info.total)
// that.info.yunfei = Number(that.data.info.yunfei);
// that.setData({
// info:that.data.info
// })
})
},
... ...
{
"usingComponents": {}
"usingComponents": {
}
}
\ No newline at end of file
... ...
... ... @@ -87,7 +87,7 @@
<view class="footer">
<view class="submit" catchtap="show_cover">提交</view>
<view class="jifen"> 合计:
<text>{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</text>
<text>{{choudan_money?choudan_money + totalmoney: totalmoney}}积分</text>
</view>
<view class="num">共{{info.totalnum}}件</view>
</view>
... ...
... ... @@ -16,7 +16,7 @@
<view class="searchgood commnonpadding" wx:else>
<view class="searchgooditem flextwo boxsizing" wx:for="{{xianshilist}}" wx:key="">
<view class="gooditemleft">
<image src="{{item.images[0]}}" mode=""></image>
<image src="{{item.images[0]}}" mode="widthFix"></image>
</view>
<view class="gooditemright ">
<view class="goodsouname morehidden">{{item.name}}</view>
... ...
... ... @@ -108,8 +108,15 @@
}
.gooditemleft{
width:200rpx;
height:165rpx;
height:200rpx;
font-size: 0;
margin-right:20rpx;
flex:0 0 auto;
overflow: hidden
}
.gooditemright{
flex:1
}
.commnonpadding{
padding: 0 32rpx;
... ...
... ... @@ -8,7 +8,63 @@ Page({
page:1,
zhuanqulist:[],
activeid: '',
activelist:[]
activelist:[],
c_index:0,
price:false,
sale:false,
order:''
},
// 排序
reorder(e) {
let that = this
that.setData({
activelist:[],
page:1
})
let index = Number(e.currentTarget.dataset.index)
if(index==0){
this.setData({
order:''
})
}
if (index == 1) {
that.setData({
price:!that.data.price
})
if(that.data.price==true){
that.setData({
order:1
})
}else{
that.setData({
order:2
})
}
} else if (index == 2) {
that.setData({
sale:!that.data.sale
})
if(that.data.sale==true){
that.setData({
order:3
})
}else{
that.setData({
order:4
})
}
}
this.setData({
c_index: e.currentTarget.dataset.index,
page: 1,
page_type: false
})
that.getmorelist()
//调用排序接口
// this.good_list(this.data.cid, e.currentTarget.dataset.index)
},
/**
... ... @@ -47,6 +103,7 @@ Page({
activity_id:that.data.activeid,
page: that.data.page,
pageNum: 10,
order:that.data.order,
}
app.post(url, data, "POST").then((r) => {
... ...
<view class='page'>
<view class='select_box'>
<view class='select_item {{c_index == 0?"active":""}}' data-index="0" bindtap='reorder'>默认</view>
<view class='select_item {{c_index == 1?"active":""}}' data-index="1" bindtap='reorder'>价格
<view class='select_img'>
<image src="{{c_index == 1?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
</view>
</view>
<view class='select_item {{c_index == 2?"active":""}}' data-index="2" bindtap='reorder'>销量
<view class='select_img'>
<image src="{{c_index == 2?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
</view>
</view>
</view>
<!-- 商品列表 -->
<view class='real_goods'>
<Model_item list="{{shop_arr}}" />
... ... @@ -38,7 +51,7 @@
<view class="pink_cover" wx:if="{{item.product.sold == 0}}" />
</view>
<view wx:else>
<view wx:else class="goodimgbox">
<view class='real_goods_img'>
<image src='{{item.combo.image}}' mode="aspectFill" />
<image src='/images/mei.png' class="tip" wx:if="{{item.sold == 0}}" />
... ...
... ... @@ -103,12 +103,13 @@ page {
background: #f9f9f9;
display: flex;
flex-wrap: wrap;
/* padding: 8rpx 11rpx 20rpx; */
box-sizing: border-box;
}
.real_goods_item {
width: 50%;
width: 367rpx;
margin-top: 20rpx;
border-radius: 10rpx;
background: #fff;
... ... @@ -120,6 +121,44 @@ page {
align-items: center
}
.real_goods_item:nth-child(2n){
border-left:16rpx solid #f5f5f5;
}
.select_box {
height: 88rpx;
width: 100%;
background: #fff;
padding: 0 98rpx;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
}
.select_item {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
line-height: 40rpx;
color: rgba(156, 156, 156, 1);
position: relative;
}
.select_item.active {
color: rgba(61, 154, 248, 1);
}
.select_item.active::after {
content: '';
width: 100%;
height: 4rpx;
border-radius: 4rpx 4rpx 0 0;
background: rgba(61, 154, 248, 1);
position: absolute;
bottom: -20rpx;
left: 0;
}
.real_goods_img {
width: 332rpx;
... ... @@ -127,8 +166,12 @@ page {
margin-bottom: 16rpx;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
overflow: hidden;
position: relative;
}
.real_goods_img{
margin-left:10rpx;
}
.real_goods_img image {
... ... @@ -146,13 +189,15 @@ page {
}
.real_goods_bottom {
padding: 16rpx 16rpx 28rpx 16rpx;
padding: 16rpx 16rpx 28rpx 31rpx;
box-sizing: border-box;
background: #fff;
}
.goods_title {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
... ... @@ -208,4 +253,10 @@ page {
position: absolute;
left: 0;
top: 0;
}
.goodimgbox{
display:flex;
flex-direction: column;
justify-content: center;
align-items: center
}
\ No newline at end of file
... ...
... ... @@ -89,6 +89,7 @@ page {
width: 100%;
height: 100%;
}
.empty {
font-size: 36rpx;
font-family: PingFang SC;
... ... @@ -97,6 +98,7 @@ page {
margin: 200rpx auto 0;
text-align: center;
}
.real_goods {
width: 750rpx;
margin: 0 auto;
... ... @@ -108,16 +110,20 @@ page {
}
.real_goods_item {
width: 50%;
width: 367rpx;
margin-top: 20rpx;
border-radius: 10rpx;
background: #fff;
overflow: hidden;
position: relative;
display:flex;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center
align-items: center;
}
.real_goods_item:nth-child(2n) {
border-left: 16rpx solid #f5f5f5;
}
.real_goods_img {
... ... @@ -199,7 +205,7 @@ page {
color: rgba(156, 156, 156, 1);
}
.pink_cover{
.pink_cover {
width: 100%;
height: 100%;
background: #ccc;
... ... @@ -207,4 +213,4 @@ page {
position: absolute;
left: 0;
top: 0;
}
\ No newline at end of file
}
... ...