Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
336d0b04
authored
Aug 14, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
3ab0f858
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
20 deletions
app.js
components/priceItem/priceItem.wxml
pages/tab/home/home.js
utils/util.js
app.js
View file @
336d0b04
...
...
@@ -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'
...
...
components/priceItem/priceItem.wxml
View file @
336d0b04
...
...
@@ -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>
...
...
pages/tab/home/home.js
View file @
336d0b04
...
...
@@ -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
)
{
...
...
utils/util.js
View file @
336d0b04
...
...
@@ -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
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment