|
|
@@ -0,0 +1,99 @@
|
|
|
+<template>
|
|
|
+ <view class="app-content">
|
|
|
+ <view class="book_banner">
|
|
|
+ <image v-if="showBanner" class="slide" :src="`${constant.imgUrl}/book/banner5.png`" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="book_content">
|
|
|
+ <view v-for="(item, index) in book" :key="index" class="item">
|
|
|
+ <view class="category"><image class="icon" :src="`${constant.imgUrl}${item.icon}`"></image><text>{{item.class}}</text></view>
|
|
|
+ <view v-for="(it, idx) in item.list" :key="idx" class="book-item">
|
|
|
+ <view @click="goDetail(it)">{{it.title}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { getJdBookList} from "@/api/book";
|
|
|
+export default {
|
|
|
+ name: "jdIndex",
|
|
|
+ components: {
|
|
|
+ },
|
|
|
+ mixins: [],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ book:[],
|
|
|
+ showBanner:true
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onShareAppMessage(res) {
|
|
|
+ return {
|
|
|
+ title: '销花宝教学视频(基地)',
|
|
|
+ desc: "图文视频教学,带您快速上手",
|
|
|
+ imageUrl: `${this.$constant.imgUrl}/logo5.png`,
|
|
|
+ path: "admin/book/jdIndex",
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(){
|
|
|
+ let that = this
|
|
|
+ getJdBookList().then(res => {
|
|
|
+ that.book = res.data.list
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+
|
|
|
+ },
|
|
|
+ goDetail(item){
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ this.$util.pageTo({url: '/admin/book/detail',query:{id:item.id}})
|
|
|
+ // #endif
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ this.$util.pageTo({url: '/admin/book/detail',query:{id:item.id}})
|
|
|
+ // #endif
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content{
|
|
|
+ .book_banner{
|
|
|
+ width:750upx;
|
|
|
+ height:524upx;
|
|
|
+ .slide{
|
|
|
+ width:750upx;
|
|
|
+ height:524upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .book_content{
|
|
|
+ margin-top:20upx;
|
|
|
+ padding-top:10upx;
|
|
|
+ padding-bottom:30upx;
|
|
|
+ background: white;
|
|
|
+ .item{
|
|
|
+ padding-bottom:30upx;
|
|
|
+ padding-left:20upx;
|
|
|
+ .category{
|
|
|
+ font-weight: bold;
|
|
|
+ font-size:34upx;
|
|
|
+ margin-bottom:10upx;
|
|
|
+ .icon{
|
|
|
+ width:35upx;
|
|
|
+ height:35upx;
|
|
|
+ display: inline-block;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-right:10upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .book-item{
|
|
|
+ line-height: 64upx;
|
|
|
+ color:#008000;
|
|
|
+ font-size:32upx;
|
|
|
+ display:list-item;
|
|
|
+ list-style-type:disc;
|
|
|
+ margin-left:80upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|