Commit 5e0f3af4 by 施宇

1111

parent f3a77362
......@@ -14,7 +14,8 @@
"pages/search/result/index",
"pages/form/xj/index",
"pages/detail/good/index",
"pages/detail/xj/index"
"pages/detail/xj/index",
"pages/list/qd/index"
],
"window": {
"backgroundTextStyle": "light",
......
// pages/list/qd/index.js
let arr = [
{
name: "STM32F407ZGT6",
price: "100.012",
brand: "Texas InstrumentsTexas",
num: "100,000",
desc: "深圳地区原装现货深圳地区原装现货",
time: "05-10 10:15",
company: "朗新科技股份有限公司",
},
{
name: "STM32F407ZGT6",
price: "100.012",
brand: "Texas InstrumentsTexas",
num: "100,000",
desc: "深圳地区原装现货深圳地区原装现货",
time: "05-10 10:15",
company: "朗新科技股份有限公司",
},
{
name: "STM32F407ZGT6",
price: "100.012",
brand: "Texas InstrumentsTexas",
num: "100,000",
desc: "深圳地区原装现货深圳地区原装现货",
time: "05-10 10:15",
company: "朗新科技股份有限公司",
}
]
Page({
/**
* 页面的初始数据
*/
data: {
tabIndex: 1,
priceList: undefined,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let seft = this;
wx.showLoading({
title: '加载中',
})
setTimeout(() => {
wx.hideLoading()
seft.setData({ priceList: arr })
}, 2000)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
switchTab: function (e) {
let i = e.currentTarget.dataset.index;
if (i == this.data.tabIndex) {
return
} else {
if (i == 1) {
this.setData({
tabIndex: i,
priceList: arr,
});
} else {
this.setData({
tabIndex: i,
priceList: [],
});
}
}
},
toXj: function () {
wx.navigateTo({
url: "/pages/form/xj/index"
})
},
emitevent: function () {
wx.navigateTo({
url: "/pages/list/bj/index",
})
}
})
\ No newline at end of file
{
"usingComponents": {
"priceItem": "/components/priceItem/priceItem"
},
"navigationBarTitleText": "抢单专区"
}
\ No newline at end of file
<!--pages/list/qd/index.wxml-->
<view class="qd-view">
<view class="switch-tab-com row">
<view bindtap="switchTab" class="{{tabIndex == 1&&'active'}}" data-index="1">
<text>最新询价</text>
<text class="active-bg"></text>
</view>
<view bindtap="switchTab" class="{{tabIndex == 2&&'active'}}" data-index="2">
<text>今日</text>
<text class="active-bg"></text>
</view>
<view bindtap="switchTab" class="{{tabIndex == 3&&'active'}}" data-index="3">
<text>0回复询价</text>
<text class="active-bg"></text>
</view>
</view>
<view class="qd-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 bold">暂无询报价信息</view>
<view class="p">您还可以发布询价。</view>
<view class="fb_btn btn-com btn-com-b" bindtap="toXj">
<text>快速发布询价</text>
</view>
</view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="3" xb="1" bindemitevent="emitevent"></priceItem>
</view>
</view>
/* pages/list/qd/index.wxss */
.nodata .p {
margin-top: 14rpx;
}
.nodata .fb_btn {
margin-top:40rpx
}
......@@ -144,6 +144,11 @@ Page({
url: "/pages/form/good/index",
})
},
toQd: function () {
wx.navigateTo({
url: "/pages/list/qd/index"
})
},
emitevent:function(){
wx.navigateTo({
url: "/pages/list/bj/index",
......
......@@ -10,7 +10,7 @@
<cover-image src="/res/images/icons/home-s-1.png" class="img"></cover-image>
<text class="text">发布询价</text>
</view>
<view class="function-item column verCenter">
<view class="function-item column verCenter" bindtap="toQd">
<cover-image src="/res/images/icons/home-s-2.png" class="img"></cover-image>
<text class="text">抢单专区</text>
</view>
......
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