|
|
@@ -35,7 +35,7 @@
|
|
|
<div><span class="public">地址:</span><span v-text="storeInfo.enterprise.address || '-'"></span></div>
|
|
|
<div><span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel || '-'"></span></div>
|
|
|
<div><span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax || '-'"></span></div>
|
|
|
- <div><span class="public">官网地址:</span><a :href=storeInfo.enterprise.enUrl target="_blank">{{storeInfo.enterprise.enUrl || '-'}}</a></div>
|
|
|
+ <div><span class="public">官网地址:</span><a @click="goTarget(storeInfo.enterprise.enUrl)">{{storeInfo.enterprise.enUrl || '-'}}</a></div>
|
|
|
<div v-if="storeInfo.enterprise.enPhone && storeInfo.enterprise.enPhone.length > 0"><span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone">136********</span></div>
|
|
|
<div v-if="storeInfo.enterprise.enWeixin && storeInfo.enterprise.enWeixin.length > 0"><span class="public">微信:</span><span v-text="storeInfo.enterprise.enWeixin">好名字更容易让人记住你</span></div>
|
|
|
<div v-if="storeInfo.enterprise.enQQ && storeInfo.enterprise.enQQ.length > 0"><span class="public">Q Q:</span><span v-text="storeInfo.enterprise.enQQ">123456789</span></div>
|
|
|
@@ -82,52 +82,49 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-
|
|
|
-function isPdf (path) {
|
|
|
- // 根据path文件名来判断文件是否是PDF文件
|
|
|
- if (path) {
|
|
|
- let str = path.slice(path.lastIndexOf('.')).toLowerCase()
|
|
|
- if (str === '.pdf') {
|
|
|
- return true
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export default {
|
|
|
- name: 'base-info',
|
|
|
- data () {
|
|
|
- return {
|
|
|
- imgUrl: '',
|
|
|
- isShow: false
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- storeInfo () {
|
|
|
- return this.$store.state.shop.storeInfo.store.data
|
|
|
+ import {startWith, judgeIsPdf} from '~utils/baseUtils'
|
|
|
+ export default {
|
|
|
+ name: 'base-info',
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ imgUrl: '',
|
|
|
+ isShow: false
|
|
|
+ }
|
|
|
},
|
|
|
- qualifications () {
|
|
|
- let storeInfo = this.$store.state.shop.storeInfo.store.data
|
|
|
- let qualifications = JSON.parse(JSON.stringify(storeInfo.qualifications))
|
|
|
- qualifications = qualifications.filter(qualification => {
|
|
|
- return qualification && qualification.type === 'APTITUDE'
|
|
|
- })
|
|
|
- for (let i = 0; i < qualifications.length; i++) {
|
|
|
- qualifications[i].isPdf = isPdf(qualifications[i].resourceUrl)
|
|
|
+ computed: {
|
|
|
+ storeInfo () {
|
|
|
+ return this.$store.state.shop.storeInfo.store.data
|
|
|
+ },
|
|
|
+ qualifications () {
|
|
|
+ let storeInfo = this.$store.state.shop.storeInfo.store.data
|
|
|
+ let qualifications = JSON.parse(JSON.stringify(storeInfo.qualifications))
|
|
|
+ qualifications = qualifications.filter(qualification => {
|
|
|
+ return qualification && qualification.type === 'APTITUDE'
|
|
|
+ })
|
|
|
+ for (let i = 0; i < qualifications.length; i++) {
|
|
|
+ qualifications[i].isPdf = judgeIsPdf(qualifications[i].resourceUrl)
|
|
|
+ }
|
|
|
+ return qualifications || []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showImg (imgUrl) {
|
|
|
+ this.imgUrl = imgUrl
|
|
|
+ this.isShow = true
|
|
|
+ },
|
|
|
+ goTarget: function (url) {
|
|
|
+ if (url) {
|
|
|
+ if (startWith(url, 'http://') || startWith(url, 'https://')) {
|
|
|
+ window.open(url)
|
|
|
+ } else {
|
|
|
+ window.open(`http://${url}`)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('地址错误')
|
|
|
+ }
|
|
|
}
|
|
|
- return qualifications || []
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- showImg (imgUrl) {
|
|
|
- this.imgUrl = imgUrl
|
|
|
- this.isShow = true
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
#introduction-fragment .intro-title h3 {
|