|
|
@@ -6,17 +6,28 @@
|
|
|
<p v-text="userInfo.data.userName"></p>
|
|
|
<p v-text="enterpriseInfo.enName"></p>
|
|
|
</div>
|
|
|
- <span @click="onclick()">{{listName}}<i class="iconfont icon-arrow-down"></i></span>
|
|
|
- <ul class="supdown" v-if="down">
|
|
|
- <li @click="onDown('1')" v-show="!isDevice || !isShop">全部收藏</li>
|
|
|
- <li @click="onDown('-1')" v-show="isDevice || !isShop">店铺关注</li>
|
|
|
- <li @click="onDown('0')" v-show="!isDevice || isShop">器件收藏</li>
|
|
|
- </ul>
|
|
|
+ <a>切换至卖家中心</a>
|
|
|
</div>
|
|
|
- <div class="collect-list-type" v-if="focusPage.totalElements > 0 && isShop">
|
|
|
- <p>店铺</p>
|
|
|
+ <ul class="switch-list">
|
|
|
+ <li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'">我的求购</li>
|
|
|
+ <li :class="{active: activeType == 'comp'}" @click="activeType = 'comp'">器件收藏</li>
|
|
|
+ <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
|
|
|
+ </ul>
|
|
|
+ <div class="seek" v-if="activeType == 'seek'">
|
|
|
+ <ul class="seek-type">
|
|
|
+ <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>待报价</div></li>
|
|
|
+ <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
|
|
|
+ <li :class="{active: seekType == 'accept'}" @click="switchSeek('accept')"><div>已采纳</div></li>
|
|
|
+ </ul>
|
|
|
+ <div class="search-content">
|
|
|
+ <input type="text" placeholder="请输入您要查找的型号或品牌">
|
|
|
+ <span>
|
|
|
+ <i class="iconfont icon-sousuo"></i>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <seek-list></seek-list>
|
|
|
</div>
|
|
|
- <div class="shop-list" v-if="isShop" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
|
|
|
+ <div class="shop-list" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
|
|
|
<h3>{{item.storeName}}</h3>
|
|
|
<div class="list-item">
|
|
|
<div class="item-img">
|
|
|
@@ -31,10 +42,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="collect-list-type" v-if="collectSave.totalElements > 0 && isDevice">
|
|
|
- <p>器件</p>
|
|
|
- </div>
|
|
|
- <div class="detail-brand" v-for="(item, index) in collectSave.content" v-if="isDevice" @click="goComponentDetail(item.componentinfo.uuid)">
|
|
|
+ <div class="detail-brand" v-for="(item, index) in collectSave.content" v-if="activeType == 'comp'" @click="goComponentDetail(item.componentinfo.uuid)">
|
|
|
<a>
|
|
|
<div class="brand-item">
|
|
|
<p>型号:<span>{{item.componentinfo.code}}</span></p>
|
|
|
@@ -44,7 +52,7 @@
|
|
|
</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
- <div class="none-state" v-if="(collectSave.totalElements == 0 && !isShop) || (focusPage.totalElements == 0 && !isDevice) || (collectSave.totalElements == 0 && focusPage.totalElements == 0)">
|
|
|
+ <div class="none-state" v-if="(collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0)">
|
|
|
<img src="/images/mobile/@2x/empty-collect.png">
|
|
|
<p v-text="getRemindText()"></p>
|
|
|
<nuxt-link to="/">返回首页</nuxt-link>
|
|
|
@@ -66,57 +74,35 @@
|
|
|
|
|
|
<script>
|
|
|
import RemindBox from '~components/mobile/common/RemindBox.vue'
|
|
|
+ import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
|
|
|
export default {
|
|
|
layout: 'mobile',
|
|
|
data () {
|
|
|
return {
|
|
|
userName: '',
|
|
|
- down: false,
|
|
|
count: '',
|
|
|
page: '',
|
|
|
type: '',
|
|
|
- listName: '全部收藏',
|
|
|
- isShop: true,
|
|
|
- isDevice: true,
|
|
|
+ activeType: 'seek',
|
|
|
collectResult: '取消成功',
|
|
|
timeoutCount: 0,
|
|
|
showStoreInfo: false,
|
|
|
- storeInfo: {}
|
|
|
+ storeInfo: {},
|
|
|
+ seekType: 'wait'
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
- RemindBox
|
|
|
+ RemindBox,
|
|
|
+ SeekList
|
|
|
},
|
|
|
fetch ({ store }) {
|
|
|
return Promise.all([
|
|
|
store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
|
|
|
- store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 })
|
|
|
+ store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
|
|
|
+ store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : store.state.option.user.data.userUU})
|
|
|
])
|
|
|
},
|
|
|
methods: {
|
|
|
- onclick () {
|
|
|
- this.down = !this.down
|
|
|
- },
|
|
|
- onDown (type) {
|
|
|
- if (type === '-1') {
|
|
|
- this.listName = '店铺关注'
|
|
|
- this.isShop = true
|
|
|
- this.isDevice = false
|
|
|
- this.down = false
|
|
|
- }
|
|
|
- if (type === '0') {
|
|
|
- this.listName = '器件收藏'
|
|
|
- this.isDevice = true
|
|
|
- this.isShop = false
|
|
|
- this.down = false
|
|
|
- }
|
|
|
- if (type === '1') {
|
|
|
- this.listName = '全部收藏'
|
|
|
- this.isDevice = true
|
|
|
- this.isShop = true
|
|
|
- this.down = false
|
|
|
- }
|
|
|
- },
|
|
|
cancelFocus: function (type, item, event) {
|
|
|
event.stopPropagation()
|
|
|
if (type === 'store') {
|
|
|
@@ -154,12 +140,10 @@
|
|
|
this.$router.push('/mobile/brand/componentDetail/' + uuid)
|
|
|
},
|
|
|
getRemindText: function () {
|
|
|
- if (this.isDevice && !this.isShop) {
|
|
|
+ if (this.activeType === 'comp') {
|
|
|
return '抱歉,暂无器件收藏'
|
|
|
- } else if (!this.isDevice && this.isShop) {
|
|
|
+ } else if (this.activeType === 'store') {
|
|
|
return '抱歉,暂无店铺关注'
|
|
|
- } else {
|
|
|
- return '抱歉,暂无收藏记录'
|
|
|
}
|
|
|
},
|
|
|
selectStoreInfo: function (store, event) {
|
|
|
@@ -169,6 +153,16 @@
|
|
|
},
|
|
|
checkInfo: function (str) {
|
|
|
return str && str.trim() !== ''
|
|
|
+ },
|
|
|
+ switchSeek: function (type) {
|
|
|
+ this.seekType = type
|
|
|
+ if (type === 'wait') {
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null})
|
|
|
+ } else if (type === 'done') {
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done'})
|
|
|
+ } else {
|
|
|
+ this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, _state: 'done'})
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -204,8 +198,6 @@
|
|
|
<style scoped lang="scss">
|
|
|
.user-content{
|
|
|
margin-bottom: .98rem;
|
|
|
- background: #dfe2e4;
|
|
|
-
|
|
|
.none-state{
|
|
|
text-align: center;
|
|
|
padding:1.5rem 0;
|
|
|
@@ -239,24 +231,6 @@
|
|
|
background:#fff;
|
|
|
width:100%;
|
|
|
position:relative;
|
|
|
- border-bottom: .1rem solid #dfe2e4;
|
|
|
- .supdown{
|
|
|
- position:absolute;
|
|
|
- top:.8rem;
|
|
|
- right:.3rem;
|
|
|
- z-index:10;
|
|
|
- width:1.7rem;
|
|
|
- background:#616264;
|
|
|
- border-radius:.1rem;
|
|
|
- li{
|
|
|
- font-size: .28rem;
|
|
|
- color:#ffffff;
|
|
|
- height: .32rem;
|
|
|
- line-height: .32rem;
|
|
|
- margin: .4rem 0;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
img{
|
|
|
display: inline-block;
|
|
|
width:1.25rem;
|
|
|
@@ -284,11 +258,15 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- span{
|
|
|
- font-size:.28rem;
|
|
|
- color:#53a0f7;
|
|
|
- position: relative;
|
|
|
- bottom: .3rem;
|
|
|
+ > a {
|
|
|
+ font-size: .24rem;
|
|
|
+ position: absolute;
|
|
|
+ top: .45rem;
|
|
|
+ right: .1rem;
|
|
|
+ color: #3f84f6;
|
|
|
+ border: .01rem solid #3f84f6;
|
|
|
+ border-radius: .2rem;
|
|
|
+ padding: .06rem .12rem;
|
|
|
}
|
|
|
}
|
|
|
.shop-list {
|
|
|
@@ -414,5 +392,60 @@
|
|
|
border-bottom: .06rem solid #418bf6;
|
|
|
}
|
|
|
}
|
|
|
+ ul.switch-list {
|
|
|
+ li {
|
|
|
+ display: inline-block;
|
|
|
+ width: 2.5rem;
|
|
|
+ height: .63rem;
|
|
|
+ line-height: .63rem;
|
|
|
+ text-align: center;
|
|
|
+ font-size: .28rem;
|
|
|
+ color: #666;
|
|
|
+ background: #fff;
|
|
|
+ border: .01rem solid #b4b4b4;
|
|
|
+ &.active {
|
|
|
+ background: #0067e7;
|
|
|
+ border: .01rem solid #0067e7;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ &:first-child {
|
|
|
+ border-left: none;
|
|
|
+ }
|
|
|
+ &:last-child {
|
|
|
+ border-right: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .seek {
|
|
|
+ ul.seek-type {
|
|
|
+ margin-top: .06rem;
|
|
|
+ li {
|
|
|
+ font-size: .28rem;
|
|
|
+ color: #666;
|
|
|
+ display: inline-block;
|
|
|
+ width: 2.5rem;
|
|
|
+ text-align: center;
|
|
|
+ div {
|
|
|
+ width: 2rem;
|
|
|
+ border-bottom: .04rem solid #c1c4c9;
|
|
|
+ margin: 0 auto;
|
|
|
+ height: .6rem;
|
|
|
+ line-height: .6rem;
|
|
|
+ }
|
|
|
+ &.active {
|
|
|
+ color: #3f84f6;
|
|
|
+ div {
|
|
|
+ border-color: #3f84f6;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .search-content {
|
|
|
+ text-align: center;
|
|
|
+ input {
|
|
|
+ margin: .25rem 0 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|