|
|
@@ -15,8 +15,8 @@
|
|
|
</div>
|
|
|
<div class="icon-style">
|
|
|
<!--<button class="btn btn-xs btn-danger btn-nav" v-if="!isFocus"><span class="watch">关注</span></button>-->
|
|
|
- <div v-if="!isFocus"></div><el-button type="text" @click="dialogVisible = true,focus(storeInfo.id, storeInfo.storeName)" class="btn btn-xs btn-danger btn-nav"><span class="watch">关注</span></el-button>
|
|
|
- <div v-if="isFocus" ><button class="btn btn-xs btn-default btn-nav" style="width:50px"><span>已关注</span></button></div>
|
|
|
+ <span v-if="!isFocus"><el-button type="text" @click="dialogVisible = true,focus(storeInfo.id, storeInfo.storeName)" class="btn btn-xs btn-danger btn-nav"><span class="watch">关注</span></el-button></span>
|
|
|
+ <span v-if="isFocus" ><button class="btn btn-xs btn-default btn-nav" style="width:50px"><span>已关注</span></button></span>
|
|
|
<span v-if="storeInfo.type == 'ORIGINAL_FACTORY'"> <img src="/images/store/icon/icon-factory.png"/></span>
|
|
|
<span v-else-if="storeInfo.type == 'AGENCY'"> <img src="/images/store/icon/icon-agent.png"/></span>
|
|
|
<span v-else-if="storeInfo.type == 'DISTRIBUTION'"> <img src="/images/store/icon/icon-distribution.png"/></span>
|
|
|
@@ -72,7 +72,6 @@ export default {
|
|
|
name: 'store-header',
|
|
|
data () {
|
|
|
return {
|
|
|
- isFocus: false,
|
|
|
isOpen: false,
|
|
|
dialogVisible: false
|
|
|
}
|
|
|
@@ -83,6 +82,10 @@ export default {
|
|
|
computed: {
|
|
|
storeInfo () {
|
|
|
return this.$store.state.shop.storeInfo.store.data
|
|
|
+ },
|
|
|
+ isFocus () {
|
|
|
+ const foucusList = this.$store.state.shop.storeInfo.focusList.data
|
|
|
+ return foucusList === 'true'
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
@@ -102,6 +105,7 @@ export default {
|
|
|
},
|
|
|
focus (id, name) {
|
|
|
this.$store.dispatch('shop/StoreFocus', {storeName: name, storeid: id})
|
|
|
+ this.isFocus = true
|
|
|
}
|
|
|
}
|
|
|
}
|