Commit 827fe639 by 施宇

21321

parent e3938d3a
{ {
"pages": [ "pages": [
"pages/detail/xj/index",
"pages/tab/price/price", "pages/tab/price/price",
"pages/tab/home/home", "pages/tab/home/home",
"pages/tab/message/message", "pages/tab/message/message",
......
/**app.wxss**/ /**app.wxss**/
page { page {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
...@@ -59,5 +60,16 @@ image { ...@@ -59,5 +60,16 @@ image {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.fb_btn {
height: 98rpx;
background-color: #0d84d1;
color: #fff;
line-height: 98rpx;
text-align: center;
font-size: 32rpx;
border-radius: 8rpx;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
}
/**字体**/ /**字体**/
@import 'res/fonts/iconfont.wxss' @import 'res/fonts/iconfont.wxss'
...@@ -8,10 +8,13 @@ Component({ ...@@ -8,10 +8,13 @@ Component({
}, },
properties: { properties: {
priceList:{ priceList:{
type:Array type:Array//数据
}, },
priceType:{ priceType:{
type:Number type:Number//展示类型
},
xb:{
type:Number // 询报价类型 1询价 2报价
} }
}, },
......
<!--components/priceItem/priceItem.wxml--> <!--components/priceItem/priceItem.wxml-->
<block> <block>
<!-- 首页的数据展示 --> <!-- 询报价展示 -->
<block wx:if="{{priceType==1}}"> <block wx:if="{{priceType==1}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this"> <view class="price-item" wx:for="{{priceList}}" wx:key="*this">
<view class="item-header px-hr-bottom row verCenter bothSide"> <view class="item-header px-hr-bottom row verCenter bothSide">
<view class="row verCenter"> <view class="row verCenter">
<text class="mark bao" wx:if="{{item.type==1}}">报</text> <text class="mark xun" wx:if="{{xb==1}}">询</text>
<text class="mark xun" wx:else>询</text> <text class="mark bao" wx:else>报</text>
<text class="name ellipsis">{{item.name}}</text> <text class="name ellipsis">{{item.name}}</text>
</view> </view>
<text class="price">¥{{item.price}}</text> <block wx:if="{{xb==1}}">
<text class="num-bj" wx:if="{{item.count}}">{{item.count}}个报价</text>
<text class="no-bj" wx:else>等待报价</text>
</block>
<text class="price" wx:else >¥{{item.price}}</text>
</view> </view>
<view class="item-middle row verCenter"> <view class="item-middle row verCenter">
<text class="brand ellipsis"><text>品牌:</text>{{item.brand}}</text> <text class="brand ellipsis"><text>品牌:</text>{{item.brand}}</text>
......
// pages/detail/xj/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarBackgroundColor": "#0D84D1",
"navigationBarTextStyle": "white",
"backgroundColor": "#0d84d1",
"navigationBarTitleText": ""
}
\ No newline at end of file
<!--pages/detail/xj/index.wxml-->
<text>pages/detail/xj/index.wxml</text>
/* pages/detail/xj/index.wxss */
\ No newline at end of file
...@@ -63,18 +63,6 @@ ...@@ -63,18 +63,6 @@
margin-left: -34rpx; margin-left: -34rpx;
border-radius: 30rpx; border-radius: 30rpx;
} }
.fb_btn {
height: 98rpx;
background-color: #0d84d1;
color: #fff;
line-height: 98rpx;
text-align: center;
font-size: 32rpx;
border-radius: 8rpx;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
}
.fast_fb { .fast_fb {
position: absolute; position: absolute;
bottom: 68rpx; bottom: 68rpx;
......
// pages/tab/price/price.js // pages/tab/price/price.js
let arr = [
{
name: "STM32F407ZGT6",
price: "100.012",
brand: "Texas InstrumentsTexas",
num: "100,000",
desc: "深圳地区原装现货深圳地区原装现货",
time: "05-10 10:15"
},
{
name: "STM32F407ZGT6",
price: "100.012",
brand: "Texas InstrumentsTexas",
num: "100,000",
desc: "深圳地区原装现货深圳地区原装现货",
time: "05-10 10:15"
},
{
name: "STM32F407ZGT6",
price: "100.012",
brand: "Texas InstrumentsTexas",
num: "100,000",
desc: "深圳地区原装现货深圳地区原装现货",
time: "05-10 10:15"
}
]
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
tabIndex:1 tabIndex:1,
xb:1,
priceList: undefined,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let seft = this;
wx.showLoading({
title: '加载中',
})
setTimeout(() => {
wx.hideLoading()
seft.setData({ priceList: arr })
}, 2000)
}, },
/** /**
...@@ -71,14 +111,14 @@ Page({ ...@@ -71,14 +111,14 @@ Page({
if (i == 1) { if (i == 1) {
this.setData({ this.setData({
tabIndex: i, tabIndex: i,
// priceList: arr, priceList: arr,
// type: 2 xb: 1
}); });
} else { } else {
this.setData({ this.setData({
tabIndex: i, tabIndex: i,
// priceList: arr1, priceList: [],
// type: 3 xb:2
}); });
} }
......
{ {
"usingComponents": {}, "usingComponents": {
"priceItem": "/components/priceItem/priceItem"
},
"navigationBarTitleText": "询报价" "navigationBarTitleText": "询报价"
} }
\ No newline at end of file
...@@ -10,4 +10,15 @@ ...@@ -10,4 +10,15 @@
<text class="active-bg"></text> <text class="active-bg"></text>
</view> </view>
</view> </view>
<view class="price-content">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata">
<cover-image src="/res/images/imgs/noxb.png" class="img"></cover-image>
<view class="h3">暂无询报价信息</view>
<view class="p">您还可以发布询价。</view>
<view class="fb_btn">
<text>快速发布询价</text>
</view>
</view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="1" xb="{{xb}}"></priceItem>
</view>
</view> </view>
\ No newline at end of file
/* pages/tab/price/price.wxss */ /* pages/tab/price/price.wxss */
.searchresult-tab { .searchresult-tab {
height: 88rpx; height: 88rpx;
line-height: 88rpx; line-height: 88rpx;
...@@ -19,34 +20,16 @@ ...@@ -19,34 +20,16 @@
.searchresult-tab view.active .active-bg { .searchresult-tab view.active .active-bg {
position: absolute; position: absolute;
display: inline-block; display: block;
width: 68rpx; width: 68rpx;
height: 25rpx; height: 25rpx;
background-color: rgba(13, 132, 209, 0.1); background-color: rgba(13, 132, 209, 0.1);
bottom: 15rpx; bottom: 15rpx;
left: 50%; left: 50%;
margin-left: -34rpx; transform: translateX(-50%);
border-radius: 30rpx; border-radius: 30rpx;
} }
.fb_btn {
height: 98rpx;
background-color: #0d84d1;
color: #fff;
line-height: 98rpx;
text-align: center;
font-size: 32rpx;
border-radius: 8rpx;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
}
.fast_fb {
position: absolute;
bottom: 68rpx;
left: 55rpx;
right: 55rpx;
}
.nodata { .nodata {
text-align: center; text-align: center;
} }
...@@ -68,23 +51,6 @@ ...@@ -68,23 +51,6 @@
color: #8a9299; color: #8a9299;
margin-top: 14rpx; margin-top: 14rpx;
} }
.nodata .fb_btn {
.nodata_fb { margin:40rpx 55rpx 0
margin: 40rpx 55rpx;
}
.concat_custom {
position: absolute;
bottom: 68rpx;
left: 0;
right: 0;
text-align: center;
color:#61A0F2;
font-size: 28rpx;
}
.concat_custom .icon{
font-size: 40rpx;
margin-right:16rpx;
vertical-align: sub;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment