Commit 336d0b04 by 施宇

111

parent 3ab0f858
......@@ -54,9 +54,9 @@ App({
if (this.globalData.auth) {
//是否登录
if (this.globalData.token) {
// wx.switchTab({
// url: '/pages/tab/home/home'
// });
wx.switchTab({
url: '/pages/tab/home/home'
});
} else {
wx.redirectTo({
url: '/pages/person/login/index'
......
......@@ -3,7 +3,7 @@
<block>
<!-- 询报价展示 -->
<block wx:if="{{priceType==1}}">
<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="price-item" wx:for="{{priceList}}" wx:key="{{index}}" 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="row verCenter">
<text class="mark xun" wx:if="{{xb==1}}">询</text>
......@@ -40,7 +40,7 @@
</block>
<!-- 搜索页的商品展示 -->
<block wx:if="{{priceType==2}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="2">
<view class="price-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="2">
<view class="item-header px-hr-bottom row verCenter bothSide nowrap">
<view class="row verCenter">
<text class="mark bao">
......@@ -76,7 +76,7 @@
</block>
<!-- 搜索页面询报价展示 -->
<block wx:if="{{priceType==3}}">
<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="price-item" wx:for="{{priceList}}" wx:key="{{index}}" 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="row verCenter">
<text class="mark xun" wx:if="{{xb==1}}">询价</text>
......@@ -104,7 +104,7 @@
</block>
<!-- 我的报价展示 -->
<block wx:if="{{priceType==4}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent">
<view class="price-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent">
<view class="item-header px-hr-bottom row verCenter bothSide nowrap">
<view class="row verCenter">
<text class="mark bao">报价</text>
......@@ -138,7 +138,7 @@
</block>
<!-- 商品管理 -->
<block wx:if="{{priceType == 5}}" >
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="5">
<view class="price-item" wx:for="{{priceList}}" wx:key="{{index}}" bindtap="emitevent" data-goodid="{{item.goods_id}}" data-pricetype="5">
<view class="item-header row verCenter bothSide nowrap">
<view class="row verCenter">
<text class="name ellipsis good-name">{{item.goods_name}}</text>
......
......@@ -17,7 +17,7 @@ Page({
tabIndex: 1,
xb: 1, //1表示询价 2表示报价
limit: 10, //每页的条数
multiple:0
multiple: 0
},
/**
......@@ -57,11 +57,11 @@ Page({
me.setData({
xjList: newArr
});
if (newArr.length == 1) {
me.setData({
multiple:1
})
multiple: 1
})
} else {
me.setData({
multiple: 2
......@@ -112,7 +112,7 @@ Page({
priceList: []
})
}
}, bool)
}, bool)
}
},
interval: function(usedTime) {
......
......@@ -43,7 +43,11 @@ const getData = (url, type, param, callBack, loading, isheader, istoken) => {
header: header,
method: type,
success: (res) => {
wx.hideNavigationBarLoading();
if (loading) {
wx.hideLoading();
}
//处理token失效的情况
if (res.data.hasOwnProperty('data')) {
if (res.data.err_code == 501 || res.data.errcode == 501) {
......@@ -63,12 +67,6 @@ const getData = (url, type, param, callBack, loading, isheader, istoken) => {
}
}
wx.hideNavigationBarLoading();
if (loading) {
wx.hideLoading();
}
},
fail: (err) => {
......
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