Commit 336d0b04 by 施宇

111

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