作者 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>
... ...
... ... @@ -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,10 +15,6 @@
</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>
... ... @@ -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,10 +140,10 @@
</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>
... ... @@ -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,10 +212,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>
... ... @@ -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>
... ... @@ -197,10 +281,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>
... ... @@ -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}}件商品
... ... @@ -220,6 +326,8 @@
</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>
... ...
... ... @@ -12,7 +12,7 @@ page {
width: 100%;
min-height: 100%;
padding-top: 88rpx;
box-sizing: border-box
box-sizing: border-box;
}
.slide_nav {
... ... @@ -26,7 +26,7 @@ page {
-webkit-align-items: center;
position: fixed;
left: 0;
top: 0
top: 0;
}
.nav_item {
... ... @@ -77,8 +77,7 @@ page {
.two_item {
margin-top: 20rpx;
/* padding: 36rpx 24rpx 0 30rpx; */
/* box-sizing: border-box; */
/* padding: 36rpx 24rpx 0 30rpx; *//* box-sizing: border-box; */
background: #fff;
border-radius: 8rpx;
}
... ... @@ -92,7 +91,7 @@ page {
font-weight: 400;
color: rgba(19, 26, 46, 1);
padding: 0 24rpx 0 30rpx;
box-sizing: border-box
box-sizing: border-box;
}
.mask_one {
... ... @@ -100,7 +99,7 @@ page {
box-sizing: border-box;
display: flex;
display: -webkit-flex;
margin-bottom:0rpx;
margin-bottom: 0rpx;
}
.mask_img {
... ... @@ -164,9 +163,9 @@ page {
color: rgba(242, 0, 0, 1);
}
.padding{
.padding {
padding: 0 24rpx 0 30rpx;
box-sizing: border-box
box-sizing: border-box;
}
.mask_two {
... ... @@ -181,6 +180,8 @@ page {
font-family: PingFang SC;
font-weight: 400;
color: rgba(19, 26, 46, 1);
padding: 0 30rpx;
box-sizing: border-box;
}
.no_border {
... ... @@ -188,14 +189,19 @@ page {
}
.score {
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
box-sizing: border-box;
}
.red_score, .small_red_score {
... ... @@ -241,6 +247,7 @@ page {
}
/*待支付结束*/
.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; */
}
... ...
... ... @@ -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,9 +189,11 @@ page {
}
.real_goods_bottom {
padding: 16rpx 16rpx 28rpx 16rpx;
padding: 16rpx 16rpx 28rpx 31rpx;
box-sizing: border-box;
background: #fff;
}
.goods_title {
... ... @@ -209,3 +254,9 @@ page {
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;
... ...