master V3.0.0
yujialong 4 months ago
parent 323f1a2398
commit 5c6c5e8ea4
  1. 2
      public/index.html
  2. 1
      src/pages/product/list/index.vue
  3. 8
      src/pages/product/show/index.vue
  4. 22
      src/pages/station/list/index.vue
  5. 4
      src/pages/station/preview/index.vue

@ -10,7 +10,7 @@
var _hmt = _hmt || [];
(function() {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e';
hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();

@ -234,7 +234,6 @@ export default {
this.professionalId = params.professionalId
this.curTab = params.curTab
this.$store.commit('product/setParams', null)
console.log("🚀 ~ mounted ~ this.form:", params)
}
this.carouselHeight = parseInt(window.innerWidth / 3.6) + 'px'

@ -2,7 +2,7 @@
<div class="wrap">
<el-card shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="$router.push('list')" :content="form.mall.productName"></el-page-header>
<el-page-header @back="back" :content="form.mall.productName"></el-page-header>
</div>
</el-card>
<div class="inner">
@ -329,6 +329,12 @@ export default {
this.id = id
this.getData()
},
back () {
const { query } = this.$route
query.active ?
this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || 0}`) :
this.$router.push('list')
},
}
};
</script>

@ -22,7 +22,7 @@
<div class="bottom">
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
<a v-if="!item.isInEffect">续费</a>
<a v-else-if="item.cid">进入实验</a>
<a v-else>进入实验</a>
</div>
</div>
</template>
@ -84,7 +84,7 @@ export default {
classificationName: '最近使用',
},
{
classificationId: '',
classificationId: -1,
classificationName: '全部',
},
...data,
@ -103,28 +103,38 @@ export default {
this.products = page.records
} else {
const { data } = await this.$get(this.api.schoolCourse, {
authority: this.active,
authority: this.active === -1 ? '' : this.active,
goodsName: this.keyword,
})
this.products = data
}
},
// 使
async addRecord (mallId) {
await this.$post(`${this.api.recordRecentUsage}?mallId=${mallId}`)
},
toProduct (item) {
const params = `&keyword=${this.keyword}&active=${this.active}`
const links = item.nonAssociatedLinks
// / cid
if (!item.isInEffect || (!item.cid && !links)) {
this.$router.push(`/product/show?id=${item.mallId}`)
if (!item.isInEffect) {
this.$router.push(`/product/show?id=${item.mallId}${params}`)
} else if (item.isInEffect && !item.cid && !links) {
this.addRecord(item.mallId)
this.$router.push(`/product/show?id=${item.mallId}${params}`)
} else {
//
if (links && links.length) {
if (links.length === 1) {
this.addRecord(item.mallId)
window.open(links[0].url)
} else {
this.addRecord(item.mallId)
this.linkVisible = true
this.links = item.nonAssociatedLinks
}
} else {
this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`)
this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}${params}`)
}
}
},

@ -453,8 +453,8 @@ export default {
this.getStatus()
},
// 使
addRecord () {
this.$post(`${this.api.recordRecentUsage}?mallId=${this.mallId}`).then(res => { }).catch(res => { })
async addRecord () {
await this.$post(`${this.api.recordRecentUsage}?mallId=${this.mallId}`)
},
//
getStatus () {

Loading…
Cancel
Save