shish 2 years ago
parent
commit
8ea0167ef4

+ 3 - 3
ghsApp/src/admin/book/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="app-content">
         <view class="book_banner">
-            <image v-if="showBanner" class="slide" :src="`${constant.imgUrl}/book/banner1.png`" mode="aspectFit"></image>           
+            <image v-if="showBanner" class="slide" :src="`${constant.imgUrl}/book/banner1.png?v=1`" mode="aspectFit"></image>           
         </view>
         <view class="book_content">
             <view v-for="(item, index) in book" :key="index" class="item">
@@ -16,7 +16,7 @@
 <script>
 import { getBookList} from "@/api/book";
 export default {
-	name: "book-index",
+	name: "index",
 	components: {
 	},
 	mixins: [],
@@ -28,7 +28,7 @@ export default {
 	},
   	onShareAppMessage(res) {
 		return {
-			title: '销花宝教学视频',
+			title: '销花宝教学视频(城市)',
 			desc: "图文视频教学,带您快速上手",
 			imageUrl: `${this.$constant.imgUrl}/logo5.png`,
 			path: "admin/book/index",

+ 99 - 0
ghsApp/src/admin/book/jdIndex.vue

@@ -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>

+ 15 - 8
ghsApp/src/admin/home/me.vue

@@ -71,16 +71,9 @@
         <view class="module-com content_box user-open_bx">
           <view class="input-line-wrap">
 
-            <!-- #ifdef APP-PLUS -->
-            <tui-list-cell @click="pageTo({ url: '/admin/book/index' })" class="line-cell" :hover="false" :arrow="true">
-              <view class="tui-title" style="color:green;font-weight:bold;">教学视频</view>
-            </tui-list-cell>
-            <!-- #endif -->
-            <!-- #ifdef MP-WEIXIN -->
-            <tui-list-cell @click="pageTo({ url: '/admin/book/index'})" class="line-cell" :hover="false" :arrow="true">
+            <tui-list-cell @click="getVideo()" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title" style="color:green;font-weight:bold;">教学视频</view>
             </tui-list-cell>
-            <!-- #endif -->
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/changeShop' })" class="line-cell" :hover="false" :arrow="true" v-if="getLoginInfo.lookAllShop && getLoginInfo.lookAllShop == 1" >
               <view class="tui-title">商家列表</view>
@@ -240,6 +233,20 @@ export default {
     // #endif
   },
   methods: {
+    getVideo(){
+			const that = this;
+			uni.showActionSheet({
+				itemList: ['城市批发', '基地和昆明批发'],
+				success: e => {
+          if(e.tapIndex == 0){
+            that.$util.pageTo({ url: '/admin/book/index' })
+          }
+          if(e.tapIndex == 1){
+            that.$util.pageTo({ url: '/admin/book/jdIndex' })
+          }
+				}
+			})
+    },
     goAdmin(){
       this.$util.pageTo({ url: '/admin/staff/admin'})
     },

+ 4 - 0
ghsApp/src/api/book/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getJdBookList = data => {
+	return https.get('/book/jd-list', data)
+}
+
 export const getBookList = data => {
 	return https.get('/book/list', data)
 }

+ 2 - 1
ghsApp/src/pages.json

@@ -446,7 +446,8 @@
 		{
 			"root": "admin/book",
 			"pages": [
-				{"path": "index","style": {"navigationBarTitleText": "使用教程"}},
+				{"path": "index","style": {"navigationBarTitleText": "城市批发教程"}},
+				{"path": "jdIndex","style": {"navigationBarTitleText": "基地和昆明批发教程"}},
 				{"path": "detail","style": {"navigationBarTitleText": ""}}
 			]
 		},