对接手机端
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 415 B |
Binary file not shown.
|
After Width: | Height: | Size: 453 B |
Binary file not shown.
|
After Width: | Height: | Size: 410 B |
@@ -8,12 +8,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<div class="header-right-text" @click="subscribeClick">
|
<div class="header-right-text" @click="subscribeClick">
|
||||||
<img src="~@/assets/icon_link.png" alt="">
|
<img v-if="subscribeFlag == '1'" src="~@/assets/icon_link_document.png" alt="">
|
||||||
<span>{{$t('subscribe')}}</span>
|
<img v-else src="~@/assets/icon_link.png" alt="">
|
||||||
|
<span :class="{'header-right-text-color':subscribeFlag == '1'?true:false}">{{$t('subscribe')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right-text" @click="collectionClick">
|
<div class="header-right-text" @click="collectionClick">
|
||||||
<img src="~@/assets/icon_star.png" alt="">
|
<img v-if="collectFlag == '1'" src="~@/assets/icon_star_document.png" alt="">
|
||||||
<span>{{$t('Collection')}}</span>
|
<img v-else src="~@/assets/icon_star.png" alt="">
|
||||||
|
<span :class="{'header-right-text-color':collectFlag == '1'?true:false}">{{$t('Collection')}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-collapse class="collapse" v-model="activeNames">
|
<van-collapse class="collapse" v-model="activeNames">
|
||||||
@@ -130,6 +132,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
document.title = 'NIO GRP'
|
document.title = 'NIO GRP'
|
||||||
let _this = this
|
let _this = this
|
||||||
|
this.getWdkCollectAndSubscribeInfoByUser()
|
||||||
this.getTitle(function() {
|
this.getTitle(function() {
|
||||||
_this.getInfoById()
|
_this.getInfoById()
|
||||||
})
|
})
|
||||||
@@ -137,6 +140,7 @@
|
|||||||
watch: {
|
watch: {
|
||||||
'$route': function(res) {
|
'$route': function(res) {
|
||||||
let _this = this
|
let _this = this
|
||||||
|
this.getWdkCollectAndSubscribeInfoByUser()
|
||||||
this.getTitle(function() {
|
this.getTitle(function() {
|
||||||
_this.getInfoById()
|
_this.getInfoById()
|
||||||
})
|
})
|
||||||
@@ -146,6 +150,22 @@
|
|||||||
iconClick() {
|
iconClick() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
getWdkCollectAndSubscribeInfoByUser() {
|
||||||
|
getAction('/phone/search/getWdkCollectAndSubscribeInfoByUser', { id: this.$route.query.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
if (res.result.subscribeList && res.result.subscribeList.length > 0) {
|
||||||
|
this.subscribeFlag = '1'
|
||||||
|
} else {
|
||||||
|
this.subscribeFlag = '0'
|
||||||
|
}
|
||||||
|
if (res.result.collectionList && res.result.collectionList.length > 0) {
|
||||||
|
this.collectFlag = '1'
|
||||||
|
} else {
|
||||||
|
this.collectFlag = '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getTitle(callback) {
|
getTitle(callback) {
|
||||||
this.show = true
|
this.show = true
|
||||||
let _id = this.$route.query.id
|
let _id = this.$route.query.id
|
||||||
@@ -179,6 +199,7 @@
|
|||||||
getAction(url, { id: this.$route.query.id }).then((res) => {
|
getAction(url, { id: this.$route.query.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
Toast(this.$t('OperationSuccessful'))
|
Toast(this.$t('OperationSuccessful'))
|
||||||
|
this.getWdkCollectAndSubscribeInfoByUser()
|
||||||
} else {
|
} else {
|
||||||
Toast(this.$t('operationFailed'))
|
Toast(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
@@ -194,6 +215,7 @@
|
|||||||
getAction(url, { id: this.$route.query.id }).then((res) => {
|
getAction(url, { id: this.$route.query.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
Toast(this.$t('OperationSuccessful'))
|
Toast(this.$t('OperationSuccessful'))
|
||||||
|
this.getWdkCollectAndSubscribeInfoByUser()
|
||||||
} else {
|
} else {
|
||||||
Toast(this.$t('operationFailed'))
|
Toast(this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
@@ -504,4 +526,8 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-right-text-color {
|
||||||
|
color: #01A0AC!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user