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 || []; var _hmt = _hmt || [];
(function() { (function() {
var hm = document.createElement('script'); 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]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();

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

@ -2,7 +2,7 @@
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between"> <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> </div>
</el-card> </el-card>
<div class="inner"> <div class="inner">
@ -329,6 +329,12 @@ export default {
this.id = id this.id = id
this.getData() 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> </script>

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

Loading…
Cancel
Save