|
|
@@ -14,8 +14,9 @@
|
|
|
</a>
|
|
|
</div>
|
|
|
<div class="icon-style">
|
|
|
- <button class="btn btn-xs btn-danger btn-nav" v-if="!isFocus"><span class="watch">关注</span></button>
|
|
|
- <button class="btn btn-xs btn-default btn-nav" v-if="isFocus" style="width:50px"><span>已关注</span></button>
|
|
|
+ <!--<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="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>
|
|
|
@@ -49,6 +50,19 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!--关注-->
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ size="tiny"
|
|
|
+ >
|
|
|
+ <h3 class="header-text">关注成功!</h3>
|
|
|
+ <div class="focus modal-body">
|
|
|
+ <button type="button" @click="dialogVisible = false" class="btn" style="margin-left:25px;">关 闭</button>
|
|
|
+ <button type="button" @click="dialogVisible = false" class="focus-btn btn btn btn-info" style="margin-left:35px;">
|
|
|
+ <a href="http://www.usoftmall.com/user#/browsingHistory" target="_blank">查看我的店铺关注</a>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -59,23 +73,35 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
isFocus: false,
|
|
|
- isOpen: false
|
|
|
+ isOpen: false,
|
|
|
+ dialogVisible: false
|
|
|
}
|
|
|
},
|
|
|
+ components: {
|
|
|
+ SearchBox
|
|
|
+ },
|
|
|
computed: {
|
|
|
storeInfo () {
|
|
|
return this.$store.state.shop.storeInfo.store.data
|
|
|
}
|
|
|
},
|
|
|
- components: {
|
|
|
- SearchBox
|
|
|
+ mounted () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.loadFocusList()
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
+ loadFocusList () {
|
|
|
+ this.$store.dispatch('shop/StoreFocusList', {id: this.storeInfo.id})
|
|
|
+ },
|
|
|
closeDropDown () {
|
|
|
this.isOpen = false
|
|
|
},
|
|
|
openDropDown () {
|
|
|
this.isOpen = true
|
|
|
+ },
|
|
|
+ focus (id, name) {
|
|
|
+ this.$store.dispatch('shop/StoreFocus', {storeName: name, storeid: id})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -84,6 +110,18 @@ export default {
|
|
|
body{
|
|
|
font-family: "Microsoft Yahei", "微软雅黑";
|
|
|
}
|
|
|
+ .header-text {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #008B00;
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+ .el-dialog__body{
|
|
|
+ padding: 20px !important;
|
|
|
+ }
|
|
|
+ .focus button.focus-btn a{
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
#nav_fragment {
|
|
|
margin-bottom: 20px;
|
|
|
}
|