Commit a8151f4a by 施宇

111

parent 7ede2bdb
...@@ -67,9 +67,9 @@ App({ ...@@ -67,9 +67,9 @@ App({
success(res) { success(res) {
if(res.data){ if(res.data){
// wx.switchTab({ wx.switchTab({
// url: '/pages/tab/home/home' url: '/pages/tab/home/home'
// }); });
} }
} }
...@@ -81,9 +81,9 @@ App({ ...@@ -81,9 +81,9 @@ App({
success(res) { success(res) {
if (res.authSetting['scope.userInfo']) { if (res.authSetting['scope.userInfo']) {
// 已经授权 // 已经授权
// wx.switchTab({ wx.switchTab({
// url: '/pages/tab/home/home' url: '/pages/tab/home/home'
// }) })
} }
} }
}) })
......
...@@ -254,6 +254,9 @@ image { ...@@ -254,6 +254,9 @@ image {
background-color: #0d84d1; background-color: #0d84d1;
box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3); box-shadow: 0px 6px 10px 0px rgba(97, 160, 242, 0.3);
} }
.btn-com-disable{
background-color: #DAE1E7;
}
/**询报价列表**/ /**询报价列表**/
/**字体**/ /**字体**/
@import 'res/fonts/iconfont.wxss' @import 'res/fonts/iconfont.wxss'
...@@ -7,14 +7,14 @@ Component({ ...@@ -7,14 +7,14 @@ Component({
styleIsolation: 'apply-shared' styleIsolation: 'apply-shared'
}, },
properties: { properties: {
priceList:{ priceList: {
type:Array//数据 type: Array//数据
}, },
priceType:{ priceType: {
type:Number//展示类型 type: Number//展示类型
}, },
xb:{ xb: {
type:Number // 询报价类型 1询价 2报价 type: Number // 询报价类型 1询价 2报价
} }
}, },
...@@ -29,11 +29,47 @@ Component({ ...@@ -29,11 +29,47 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
emitevent:function(e){ emitevent: function (e) {
let token = wx.getStorageSync('access_token');
let inquiryItemsId = e.currentTarget.dataset.inquiryitemsid; let inquiryItemsId = e.currentTarget.dataset.inquiryitemsid;
this.triggerEvent('emitevent', {inquiryItemsId: inquiryItemsId}) let offerId = e.currentTarget.dataset.offerid;
let xb = e.currentTarget.dataset.xb;
let type = e.currentTarget.dataset.type;//1代表询价 2代表报价 3代表商品
let priceType = e.currentTarget.dataset.pricetype;
if (token) {
if (priceType == 1) {
if (type == 1) {
wx.navigateTo({
url: "/pages/list/xj/index?inquiryItemsId=" + inquiryItemsId
})
} else if (type == 2) {
wx.navigateTo({
url: "/pages/list/bj/index?inquiryItemsId=" + inquiryItemsId + '&offerId=' + offerId
})
}
} else if (priceType == 2){
} else if (priceType == 3) {
if (type == 1) {
wx.navigateTo({
url: "/pages/list/bj/index?inquiryItemsId=" + inquiryItemsId
})
} else if (type == 2) {
wx.navigateTo({
url: "/pages/list/bj/index?inquiryItemsId=" + inquiryItemsId + '&offerId=' + offerId
})
}
}
} else {
wx.showToast({
title: '请先登入',
icon: 'none',
duration: 2000
});
}
}, },
previewImage:function(e){ previewImage: function (e) {
let img = e.currentTarget.dataset.image; let img = e.currentTarget.dataset.image;
wx.previewImage({ wx.previewImage({
urls: [img] urls: [img]
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<wxs module="dateUtil" src="../../utils/timeUtil.wxs"></wxs> <wxs module="dateUtil" src="../../utils/timeUtil.wxs"></wxs>
<!-- 询报价展示 --> <!-- 询报价展示 -->
<block wx:if="{{priceType==1}}"> <block wx:if="{{priceType==1}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent"> <view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent" data-inquiryitemsid="{{item['inquiry_items_id']}}" data-offerid="{{item['offer_id']}} " data-type="{{xb}}" data-pricetype="1">
<view class="item-header px-hr-bottom row verCenter bothSide nowrap"> <view class="item-header px-hr-bottom row verCenter bothSide nowrap">
<view class="row verCenter"> <view class="row verCenter">
<text class="mark xun" wx:if="{{xb==1}}">询</text> <text class="mark xun" wx:if="{{xb==1}}">询</text>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</block> </block>
<!-- 搜索页面询报价展示 --> <!-- 搜索页面询报价展示 -->
<block wx:if="{{priceType==3}}"> <block wx:if="{{priceType==3}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent" data-inquiryitemsid="{{item['inquiry_items_id']}}"> <view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent" data-inquiryitemsid="{{item['inquiry_items_id']}}" data-offerid="{{item['offer_id']}} " data-type="{{xb}}" data-pricetype="3">
<view class="item-header px-hr-bottom row verCenter bothSide nowrap"> <view class="item-header px-hr-bottom row verCenter bothSide nowrap">
<view class="row verCenter"> <view class="row verCenter">
<text class="mark xun" wx:if="{{xb==1}}">询价</text> <text class="mark xun" wx:if="{{xb==1}}">询价</text>
...@@ -94,24 +94,31 @@ ...@@ -94,24 +94,31 @@
<view class="item-header px-hr-bottom row verCenter bothSide nowrap"> <view class="item-header px-hr-bottom row verCenter bothSide nowrap">
<view class="row verCenter"> <view class="row verCenter">
<text class="mark bao">报价</text> <text class="mark bao">报价</text>
<text class="company ellipsis">{{item.company}}</text> <text class="company ellipsis">{{item.company_name||'--'}}</text>
</view> </view>
<text class="time">{{item.time}}</text> <text class="time">{{dateUtil.dateFormat(item.add_time*1000)}}</text>
</view> </view>
<view class="item-middle row verCenter bothSide item-middle2 nowrap"> <view class="item-middle row verCenter bothSide item-middle2 nowrap">
<text class="name ellipsis">{{item.name}}</text> <text class="name ellipsis">{{item.goods_name||'--'}}</text>
<text class="price">¥{{item.price}}</text> <text class="price">
<block wx:if="{{item.currency == 1}}">
¥{{item.price}}
</block>
<block wx:else>
${{item.price}}
</block>
</text>
</view> </view>
<view class="item-middle row verCenter nowrap"> <view class="item-middle row verCenter nowrap">
<text class="brand ellipsis"><text>品牌:</text>{{item.brand}}</text> <text class="brand ellipsis"><text>品牌:</text>{{item.brand_name}}</text>
<text class="num"><text>封装:</text>{{item.fz}}</text> <text class="num"><text>封装:</text>{{item.encap}}</text>
</view> </view>
<view class="item-middle row verCenter nowrap"> <view class="item-middle row verCenter nowrap">
<text class="brand ellipsis bold"><text class="nobold">数量:</text>{{item.num}}PCS</text> <text class="brand ellipsis bold"><text class="nobold">数量:</text>{{item.number}}PCS</text>
<text class="num"><text>货期:</text>{{item.hq}}</text> <text class="num"><text>货期:</text>{{item.delivery_time}}</text>
</view> </view>
<view class="item-footer row nowrap"> <view class="item-footer row nowrap">
<text class="address ellipsis">备注:{{item.desc}}</text> <text class="address ellipsis">备注:{{item.remark||'--'}}</text>
</view> </view>
</view> </view>
</block> </block>
......
...@@ -9,14 +9,17 @@ Page({ ...@@ -9,14 +9,17 @@ Page({
data: { data: {
priceList: null, priceList: null,
topInfo: null, topInfo: null,
total: 0
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let inquiryItemsId = options.inquiryItemsId; let inquiryItemsId = options.inquiryItemsId || '';
this.getTopInfo(inquiryItemsId) let offerId = options.offerId || '';
this.getTopInfo(inquiryItemsId);
this.getList(inquiryItemsId, offerId)
}, },
getTopInfo: function (id) { getTopInfo: function (id) {
let me = this; let me = this;
...@@ -30,10 +33,42 @@ Page({ ...@@ -30,10 +33,42 @@ Page({
topInfo: null topInfo: null
}) })
} }
}, true) }, false)
}, },
getList:function(){ getList: function (inquiryItemsId, offerId) {
let me = this;
let token = wx.getStorageSync('access_token');
let params = { token: token };
if (offerId) {
params["offer_id/eq"] = offerId;
} else {
params["inquiry_items_id/eq"] = inquiryItemsId;
}
getData(apis.offerinfo, 'get', params, function (res) {
if (res.errcode == 0) {
if (res.total == 0) {
me.setData({
priceList: [],
total: 0
})
} else {
let arr = res.data[0].items || [];
for (let i = 0; i < arr.length;i++){
arr[i].company_name = res.data[0].company_name||''
}
me.setData({
priceList: arr,
total: arr.length,
})
}
} else {
me.setData({
total: 0,
priceList: [],
})
}
}, true)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -84,8 +119,17 @@ Page({ ...@@ -84,8 +119,17 @@ Page({
}, },
goBj: function () { goBj: function () {
wx.navigateTo({ if (this.data.total == 3) {
url: "/pages/form/bj/index", wx.showToast({
}) title: '报价次数为0',
icon: 'none',
duration: 2000
});
} else {
wx.navigateTo({
url: "/pages/form/bj/index",
})
}
} }
}) })
\ No newline at end of file
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<view class="price row"> <view class="price row">
<text class="t-com">接受价:</text> <text class="t-com">接受价:</text>
<text class="c-com {{(!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0')?'':'bold red'}}"> <text class="c-com {{(!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0')?'':'bold red'}}">
<block wx:if="{{!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0'}}">未回复</block> <block wx:if="{{!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0'}}"></block>
<block wx:else> <block wx:else>
<block wx:if="{{topInfo.currency == 1}}">¥{{topInfo.price}}</block><block wx:else>${{topInfo.price}} <block wx:if="{{topInfo.currency == 1}}">¥{{topInfo.price}}</block><block wx:else>${{topInfo.price}}
</block> </block>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</view> </view>
<view class="bj-data"> <view class="bj-data">
<view class="xb-com-t row bothSide verCenter px-hr-bottom "> <view class="xb-com-t row bothSide verCenter px-hr-bottom ">
<text class="mybj bold beforeLine">我的报价</text> <text class="mybj bold beforeLine">我的报价 {{total}}</text>
<!-- <view class="sdbj"> <!-- <view class="sdbj">
已收到 已收到
<text class="num">5</text> 条报价 <text class="num">5</text> 条报价
...@@ -65,12 +65,26 @@ ...@@ -65,12 +65,26 @@
</view> </view>
<view class="bj-list"> <view class="bj-list">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata"> <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> </view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="4"></priceItem> <priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="4"></priceItem>
</view> </view>
</view> </view>
</view> </view>
<view class="bj-btn-view" wx:if="{{priceList}}">
<view class="btn-com btn-com-b bj-btn" bindtap="goBj">继续报价,剩余1次</view> <view class="btn-com bj-btn {{total!=3?'btn-com-b':'btn-com-disable'}}" bindtap="goBj">
<block wx:if="{{total == 3}}">
剩余0次
</block>
<block wx:else>
<block wx:if="{{total == 0}}">
我要报价,剩余3次
</block>
<block wx:else>
继续报价,剩余{{3-total}}次
</block>
</block>
</view>
</view>
</view> </view>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
min-height: 100%; min-height: 100%;
position: relative; position: relative;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 234rpx; padding-bottom: 128rpx;
} }
.bj-title { .bj-title {
...@@ -15,8 +15,11 @@ ...@@ -15,8 +15,11 @@
min-height:130rpx; min-height:130rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.bj-list .nodata .h3{
padding-top:100rpx;
}
.x-info{ .x-info{
min-height: 496rpx; min-height: 400rpx;
} }
.bj-title .icon { .bj-title .icon {
font-size: 40rpx; font-size: 40rpx;
...@@ -57,10 +60,11 @@ ...@@ -57,10 +60,11 @@
.sdbj .num { .sdbj .num {
color: #61a0f2; color: #61a0f2;
} }
.bj-btn-view{
.bj-btn { position: fixed;
position: absolute; bottom:0;
bottom: 68rpx;
left: 0; left: 0;
right: 0; right: 0;
padding-bottom:30rpx;
background-color: #fff;
} }
...@@ -141,12 +141,5 @@ Page({ ...@@ -141,12 +141,5 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: "/pages/form/xj/index" url: "/pages/form/xj/index"
}) })
},
emitevent: function (e) {
let inquiryItemsId = e.detail.inquiryItemsId
wx.navigateTo({
url: "/pages/list/bj/index?inquiryItemsId="+inquiryItemsId,
})
} }
}) })
\ No newline at end of file
...@@ -23,6 +23,6 @@ ...@@ -23,6 +23,6 @@
<text>快速发布询价</text> <text>快速发布询价</text>
</view> </view>
</view> </view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="3" xb="1" bindemitevent="emitevent"></priceItem> <priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="3" xb="1" ></priceItem>
</view> </view>
</view> </view>
// pages/list/xj/index.js // pages/list/xj/index.js
let arr = [ import { getData } from '../../../utils/util.js';
{ import { apis } from '../../../utils/api.js';
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({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
priceList: undefined, priceList: null,
topInfo: null,
limit: 10,//每页的条数
p: 1,//当前页面
total: 0,
id: ""
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let seft = this; this.setData({
id: options.inquiryItemsId || ''
wx.showLoading({
title: '加载中',
}) })
this.getTopInfo();
this.getBjData();
},
setTimeout(() => { getTopInfo: function () {
wx.hideLoading() let me = this;
seft.setData({ priceList: arr }) let token = wx.getStorageSync('access_token');
}, 2000) getData(apis.inquiryInfo, 'get', { "inquiry_items_id/eq": me.data.id, token: token }, function (res) {
if (res.errcode == 0) {
me.setData({
topInfo: res.inquiry_list[me.data.id]
})
} else if (res.errcode == 105001) {
me.setData({
topInfo: null
})
}
}, false)
},
getBjData: function () {
let me = this;
let token = wx.getStorageSync('access_token');
getData(apis.inquiryMyOffer, 'get', { "inquiry_items_id/eq": me.data.id, offset: me.data.limit, p: me.data.p, token: token }, function (res) {
if (res.errcode === 0) {
let newArr = [];
if (me.data.p > 1) {
newArr = me.data.priceList;
}
newArr = newArr.concat(res.data);
me.setData({
priceList: newArr,
total: res.total,
});
} else {
if (me.data.p == 1) {
me.setData({
priceList: []
})
}
}
}, true)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
...@@ -85,7 +102,21 @@ Page({ ...@@ -85,7 +102,21 @@ Page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
let allPage = Math.ceil(this.data.total / this.data.limit);
let p = this.data.p;
if (p == allPage) {
wx.showToast({
title: '数据到底啦',
icon: 'none',
duration: 2000
});
return
} else {
this.setData({
p: p + 1
});
this.getBjData();
}
}, },
/** /**
...@@ -93,10 +124,5 @@ Page({ ...@@ -93,10 +124,5 @@ Page({
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
},
emitevent:function(){
wx.navigateTo({
url: "/pages/detail/xj/index",
})
} }
}) })
\ No newline at end of file
<!--pages/list/xj/index.wxml--> <!--pages/list/xj/index.wxml-->
<wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs>
<view class="xj-view"> <view class="xj-view">
<view class="xj-title"></view> <view class="xj-title"></view>
<view class="xb-com-content"> <view class="xb-com-content">
<view class="title row bothSide verCenter nowrap px-hr-bottom"> <view class="b-info">
<text class="name bold ellipsis">STM32F407ZGT6STM32F407ZGT6STM32F407ZGT6</text> <view wx:if="{{topInfo}}">
<text class="time ">05-10 10:15</text> <view class="title row bothSide verCenter nowrap px-hr-bottom">
</view> <text class="name bold ellipsis">{{topInfo.goods_name||'--'}}</text>
<view class="desc row"> <text class="time ">{{dateUtil.dateFormat(topInfo.add_time*1000)}}</text>
<view class="left">
<view class="brand row">
<text class="t-com">品牌:</text>
<text class="c-com">Texas Instruments</text>
</view>
<view class="fz row">
<text class="t-com">封装:</text>
<text class="c-com">LQFP-64</text>
</view>
<view class="hq row">
<text class="t-com">货期:</text>
<text class="c-com">现货</text>
</view>
<view class="num row">
<text class="t-com">数量:</text>
<text class="c-com bold">100,000 PCS</text>
</view>
<view class="price row">
<text class="t-com">接受价:</text>
<text class="c-com">无</text>
</view> </view>
<view class="bz row"> <view class="desc row">
<text class="t-com">备注:</text> <view class="left">
<text class="c-com">有货的请尽快回复,比较急着要货</text> <view class="brand row">
<text class="t-com">品牌:</text>
<text class="c-com">{{topInfo.brand_name}}</text>
</view>
<view class="fz row">
<text class="t-com">封装:</text>
<text class="c-com">{{topInfo.encap}}</text>
</view>
<view class="hq row">
<text class="t-com">货期:</text>
<text class="c-com">{{topInfo.delivery_time}}</text>
</view>
<view class="num row">
<text class="t-com">数量:</text>
<text class="c-com bold">{{topInfo.number}} PCS</text>
</view>
<view class="price row">
<text class="t-com">接受价:</text>
<text class="c-com {{(!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0')?'':'bold red'}}">
<block wx:if="{{!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0'}}">无</block>
<block wx:else>
<block wx:if="{{topInfo.currency == 1}}">¥{{topInfo.price}}</block><block wx:else>${{topInfo.price}}
</block>
</block>
</text>
</view>
<view class="bz row">
<text class="t-com">备注:</text>
<text class="c-com">{{topInfo.remark||'--'}}</text>
</view>
</view>
<cover-image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/iclogo.png'}}"></cover-image>
</view> </view>
</view> </view>
<cover-image class="right" src="/res/images/imgs/iclogo.png"></cover-image>
</view> </view>
</view> </view>
<view class="bj-data"> <view class="bj-data">
<view class="xb-com-t row bothSide verCenter px-hr-bottom "> <view class="xb-com-t row bothSide verCenter px-hr-bottom ">
<text class="num bold beforeLine">收到的报价 <text>2</text></text> <text class="num bold beforeLine">收到的报价 <text>{{total}}</text></text>
<view class="jgpx"> <view class="jgpx">
<text class="icon iconfont iconiconxiantiaoshouji10"></text> <text class="icon iconfont iconiconxiantiaoshouji10"></text>
<text>价格排序</text> <text>价格排序</text>
...@@ -46,9 +57,10 @@ ...@@ -46,9 +57,10 @@
</view> </view>
<view class="bj-list"> <view class="bj-list">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata"> <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> </view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="3" xb="2" bindemitevent="emitevent"></priceItem> <priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="3" xb="2"></priceItem>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
right: 0; right: 0;
top: 0; top: 0;
} }
.b-info{
min-height: 400rpx;
}
.bj-data .num { .bj-data .num {
color: #515559; color: #515559;
font-size: 28rpx; font-size: 28rpx;
......
...@@ -139,10 +139,5 @@ Page({ ...@@ -139,10 +139,5 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: "/pages/form/good/index", url: "/pages/form/good/index",
}) })
},
emitevent: function () {
wx.navigateTo({
url: "/pages/detail/good/index",
})
} }
}) })
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<text>新增商品</text> <text>新增商品</text>
</view> </view>
</view> </view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="5" bindemitevent="emitevent"></priceItem> <priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="5"></priceItem>
</view> </view>
<view class="good-btn-div" wx:if="{{priceList&&priceList.length!==0}}"> <view class="good-btn-div" wx:if="{{priceList&&priceList.length!==0}}">
......
...@@ -148,10 +148,5 @@ Page({ ...@@ -148,10 +148,5 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: "/pages/list/qd/index" url: "/pages/list/qd/index"
}) })
},
emitevent:function(){
wx.navigateTo({
url: "/pages/list/bj/index",
})
} }
}) })
\ No newline at end of file
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</view> </view>
<view class="price-content"> <view class="price-content">
<view wx:if="{{priceList&&priceList.length==0}}">暂无数据</view> <view wx:if="{{priceList&&priceList.length==0}}">暂无数据</view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="1" bindemitevent="emitevent"></priceItem> <priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="1" ></priceItem>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -149,16 +149,5 @@ Page({ ...@@ -149,16 +149,5 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: "/pages/form/xj/index" url: "/pages/form/xj/index"
}) })
},
emitevent:function(){
if(this.data.xb == 1){
wx.navigateTo({
url: "/pages/list/xj/index",
})
}else{
wx.navigateTo({
url: "/pages/list/bj/index",
})
}
} }
}) })
\ No newline at end of file
...@@ -19,6 +19,6 @@ ...@@ -19,6 +19,6 @@
<text>快速发布询价</text> <text>快速发布询价</text>
</view> </view>
</view> </view>
<priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="1" xb="{{xb}}" bindemitevent="emitevent"></priceItem> <priceItem price-list="{{priceList}}" wx:if="{{priceList&&priceList.length!==0}}" price-type="1" xb="{{xb}}" ></priceItem>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 1, "current": 2,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -58,10 +58,17 @@ ...@@ -58,10 +58,17 @@
"scene": null "scene": null
}, },
{ {
"id": -1, "id": 1,
"name": "pages/list/bj/index", "name": "pages/list/bj/index",
"pathName": "pages/list/bj/index", "pathName": "pages/list/bj/index",
"query": "inquiryItemsId=156403573054791", "query": "inquiryItemsId=156386385200578",
"scene": null
},
{
"id": 2,
"name": "pages/list/xj/index",
"pathName": "pages/list/xj/index",
"query": "inquiryItemsId=156327106368454",
"scene": null "scene": null
} }
] ]
......
...@@ -62,7 +62,9 @@ const getData = (url, type, param, callBack, loading, isheader) => { ...@@ -62,7 +62,9 @@ const getData = (url, type, param, callBack, loading, isheader) => {
wx.hideNavigationBarLoading(); wx.hideNavigationBarLoading();
wx.hideLoading(); if (loading) {
wx.hideLoading();
}
}, },
fail: (err) => { fail: (err) => {
...@@ -73,7 +75,10 @@ const getData = (url, type, param, callBack, loading, isheader) => { ...@@ -73,7 +75,10 @@ const getData = (url, type, param, callBack, loading, isheader) => {
wx.hideNavigationBarLoading(); wx.hideNavigationBarLoading();
wx.hideLoading();
if (loading) {
wx.hideLoading();
}
} }
}) })
......
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