shish před 10 měsíci
rodič
revize
3527acd739

+ 249 - 0
hdApp/src/admin/book/detail.vue

@@ -0,0 +1,249 @@
+<template>
+	<view class="app-content">
+		<view class="content-wrapper">
+			<template v-for="(item, index) in bookList">
+				<!-- 主标题 -->
+				<block v-if="item.style == 'title'">
+					<view :key="index" class="page-title">{{item.value}}</view>
+				</block>
+
+				<!-- 信息文本 -->
+				<block v-if="item.style == 'info'">
+					<view :key="index" class="text-content">{{item.value}}</view>
+				</block>
+
+				<block v-if="item.style == 'blankLine'">
+					<view :key="index" class="blank-line-content">{{item.value}}</view>
+				</block>
+
+				<!-- 小标题 -->
+				<block v-if="item.style == 'smallTitle'">
+					<view :key="index" class="section-title">{{item.value}}</view>
+				</block>
+
+				<!-- 小标题 -->
+				<block v-if="item.style == 'miniTitle'">
+					<view :key="index" class="mini-title">{{item.value}}</view>
+				</block>
+
+				<!-- 视频 -->
+				<block v-if="item.style == 'video'">
+					<view :key="index" class="video-block">
+						<video 
+							:id="`myVideo${index}`" 
+							:src="item.value" 
+							show-mute-btn="true"
+							object-fit="contain"
+							class="video-content">
+						</video>
+					</view>
+				</block>
+
+				<!-- 图片 -->
+				<block v-if="item.style == 'image'">
+					<view :key="index" class="image-block">
+						<image 
+							:src="`${constant.imgUrl}${item.value}`" 
+							mode="widthFix"
+							@click="previewImage(`${constant.imgUrl}${item.value}`)"
+							class="image-content">
+						</image>
+					</view>
+				</block>
+
+				<!-- 按钮 -->
+				<block v-if="item.style == 'button'">
+					<view :key="index" class="button-block">
+						<button @click="goTo(item)" class="link-button">{{item.value}}</button>
+					</view>
+				</block>
+			</template>
+
+			<!-- 底部返回按钮 -->
+			<view class="back-block">
+				<button class="admin-button-com big blue" @click="goBack()">返回列表</button>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { getBookDetail} from "@/api/book";
+import { mapGetters } from "vuex"
+export default {
+	name: "book-what",
+	components: {
+	},
+	mixins: [],
+	data() {
+		return {
+			bookList:[],
+			pageTitle:''
+		};
+	},
+	onLoad() {
+		let that = this
+		getBookDetail({id:this.option.id}).then(res => {
+			that.bookList = res.data.list
+			that.bookList.forEach((item) => {
+		    if(item.style == 'title'){
+					this.pageTitle = item.value
+					uni.setNavigationBarTitle({title: item.value})
+		    }
+		  })
+			
+		});
+	},
+  	onShareAppMessage(res) {
+		return {
+			title: this.pageTitle,
+			desc: "",
+			imageUrl: "",
+			path: "admin/book/detail?id="+this.option.id,
+		}
+	},
+	methods: {
+		init(){
+
+		},
+		goBack(){
+			// #ifdef MP-WEIXIN
+			uni.navigateBack()
+			// #endif
+			// #ifdef APP-PLUS
+			uni.navigateBack()
+			// #endif
+		},
+		goTo(item){
+			this.$util.pageTo({ url: item.page})
+		},
+		playVide(index){
+			this.videoContext = uni.createVideoContext('myVideo'+index,this)
+			this.videoContext.play()
+		},
+		previewImage(url) {
+			uni.previewImage({
+				urls: [url],
+				current: url
+			});
+		}
+	},
+};
+</script>
+<style lang="scss" scoped>
+.app-content {
+	min-height: 100vh;
+	background: #fff;
+	padding-bottom: 140upx;
+
+	.content-wrapper {
+		padding: 0 30upx;
+		
+		// 主标题
+		.page-title {
+			font-size: 44upx;
+			font-weight: bold;
+			color: #333;
+			padding: 40upx 0 20upx;
+			position: relative;
+			
+			&::after {
+				content: '';
+				display: block;
+				width: 60upx;
+				height: 6upx;
+				background: #3498db;
+				margin-top: 16upx;
+			}
+		}
+
+		// 文本内容
+		.text-content {
+			font-size: 32upx;
+			color: #666;
+			line-height: 1.8;
+			margin: 20upx 0 30upx;
+			text-align: justify;
+		}
+		.blank-line-content{
+			height: 20upx;
+			background: white;
+		}
+		// 小标题
+		.section-title {
+			font-size: 36upx;
+			font-weight: bold;
+			color: #333;
+			margin: 40upx 0 20upx;
+		}
+
+		.mini-title {
+			font-size: 32upx;
+			font-weight: bold;
+			color: #333;
+			margin: 20upx 0 30upx;
+		}
+
+		// 视频区块
+		.video-block {
+			margin: 20upx 0;
+			background: #000;
+			
+			.video-content {
+				width: 700upx;
+				height: 1100upx;
+				margin: 0 auto;
+				display: block;
+			}
+		}
+
+		// 图片区块
+		.image-block {
+			margin: 20upx 0;
+			
+			.image-content {
+				width: 100%;
+				display: block;
+				transition: opacity 0.3s;
+
+				&:active {
+					opacity: 0.8;
+				}
+			}
+		}
+
+		// 按钮区块
+		.button-block {
+			margin: 30upx 0;
+			text-align: center;
+
+			.link-button {
+				display: inline-block;
+				background: #3498db;
+				color: #fff;
+				font-size: 32upx;
+				padding: 20upx 40upx;
+				border-radius: 4upx;
+				border: none;
+				transition: background-color 0.3s;
+
+				&:active {
+					background: #2980b9;
+				}
+			}
+		}
+
+		// 返回按钮区块
+		.back-block {
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			right: 0;
+			padding: 30upx;
+			background: rgba(255,255,255,0.98);
+			text-align: center;
+			border-top: 1upx solid #eee;
+			z-index: 99;
+		}
+	}
+}
+</style>

+ 147 - 0
hdApp/src/admin/book/index.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="app-content">
+		<view class="book-banner">
+			<image v-if="showBanner" class="slide" :src="`${constant.imgUrl}/book/banner9.png`" mode="aspectFit"></image>
+		</view>
+		<view class="book-content">
+			<view v-for="(item, index) in book" :key="index" class="book-section">
+				<view class="category">
+					<image class="icon" :src="`${constant.imgUrl}${item.icon}`"></image>
+					<text class="category-text">{{item.class}}</text>
+				</view>
+				<view class="book-list">
+					<view v-for="(it, idx) in item.list" 
+						:key="idx" 
+						class="book-item"
+						@click="goDetail(it)">
+						<text :class="[it.style == 'red' ? 'red-title' : 'book-title']">{{it.title}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { getBookList} from "@/api/book";
+export default {
+	name: "index",
+	components: {},
+	mixins: [],
+	data() {
+		return {
+			book: [],
+			showBanner: true
+		};
+	},
+	onShareAppMessage(res) {
+		return {
+			title: '销花宝教学视频(城市)',
+			desc: "图文视频教学,带您快速上手",
+			imageUrl: `${this.$constant.imgUrl}/logo5.png`,
+			path: "admin/book/index",
+		}
+	},
+	onLoad() {
+		let that = this
+		getBookList().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 {
+	min-height: 100vh;
+	background-color: #f5f6fa;
+	
+	.book-banner {
+		width: 750upx;
+		height: 524upx;
+		box-shadow: 0 4upx 12upx rgba(0,0,0,0.1);
+		
+		.slide {
+			width: 750upx;
+			height: 524upx;
+			transition: opacity 0.3s ease;
+		}
+	}
+	
+	.book-content {
+		padding: 20upx 16upx;
+		
+		.book-section {
+			background: white;
+			border-radius: 16upx;
+			padding: 24upx 16upx;
+			margin-bottom: 24upx;
+			box-shadow: 0 2upx 8upx rgba(0,0,0,0.05);
+			
+			.category {
+				display: flex;
+				align-items: center;
+				padding-bottom: 20upx;
+				border-bottom: 2upx solid #f0f0f0;
+				margin-bottom: 16upx;
+				
+				.icon {
+					width: 40upx;
+					height: 40upx;
+					margin-right: 16upx;
+				}
+				
+				.category-text {
+					font-size: 36upx;
+					font-weight: 600;
+					color: #333;
+				}
+			}
+			
+			.book-list {
+				.book-item {
+					position: relative;
+					padding: 24upx 20upx;
+					margin: 12upx 0;
+					border-radius: 8upx;
+					background: #f8f9fb;
+					.book-title {
+						font-size: 32upx;
+						color: #2c3e50;
+						line-height: 1.4;
+					}
+					.red-title{
+						font-size: 32upx;
+						line-height: 1.4;
+						font-weight: bold;
+						color: #f00;
+					}
+					&::before {
+						content: '';
+						display: inline-block;
+						width: 8upx;
+						height: 8upx;
+						background: #008000;
+						border-radius: 50%;
+						margin-right: 16upx;
+						vertical-align: middle;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 8 - 15
hdApp/src/admin/goods/add.vue

@@ -67,7 +67,7 @@
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">库存</view>
           <view class="btn-group">
-            <button class="admin-button-com middle" :class="[form.stockSet === '0' ? '' : 'default']" @click="setstockSet('0')">够</button>
+            <button class="admin-button-com middle" :class="[form.stockSet === '0' ? '' : 'default']" @click="setstockSet('0')">够</button>
             <button class="admin-button-com middle" :class="[form.stockSet === '1' ? '' : 'default']" @click="setstockSet('1')">自定义</button>
           </view>
         </tui-list-cell>
@@ -101,7 +101,7 @@
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">运费</view>
+          <view class="tui-title">运费</view>
           <view class="btn-group">
             <button class="admin-button-com middle" :class="[form.freightType === '0' ? '' : 'default']" @click="freightChange({detail:{value:'0'}})">不包运费</button>
             <button class="admin-button-com middle" :class="[form.freightType === '1' ? '' : 'default']" @click="freightChange({detail:{value:'1'}})">包运费</button>
@@ -109,30 +109,23 @@
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">商城上</view>
+          <view class="tui-title">配送类型</view>
           <view class="btn-group">
-            <button class="admin-button-com middle" :class="[form.status === 1 ? '' : 'default']" @click="statusChange({detail:{value:'1'}})">展示</button>
-            <button class="admin-button-com middle" :class="[form.status === 0 ? '' : 'default']" @click="statusChange({detail:{value:'0'}})">隐藏</button>
+            <button class="admin-button-com middle" :class="[form.needSend === '0' ? '' : 'default']" @click="needSendChange('0')">支持送上门</button>
+            <button class="admin-button-com middle" :class="[form.needSend === '1' ? '' : 'default']" @click="needSendChange('1')">只能到店取</button>
           </view>
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">配送类型</view>
+          <view class="tui-title">商城上</view>
           <view class="btn-group">
-            <button class="admin-button-com middle" :class="[form.needSend === '0' ? '' : 'default']" @click="needSendChange('0')">支持送上门</button>
-            <button class="admin-button-com middle" :class="[form.needSend === '1' ? '' : 'default']" @click="needSendChange('1')">只能到店取</button>
+            <button class="admin-button-com middle" :class="[form.status === 1 ? '' : 'default']" @click="statusChange({detail:{value:'1'}})">展示</button>
+            <button class="admin-button-com middle" :class="[form.status === 0 ? '' : 'default']" @click="statusChange({detail:{value:'0'}})">隐藏</button>
           </view>
         </tui-list-cell>
 
       </view>
 
-      <!-- <view class="module-com input-line-wrap summary-wrap">
-        <view class="module-tit">商品简介</view>
-        <view class="module-det" style="padding-bottom: 20upx">
-          <textarea v-model="form.briefContent" class="goods-summary" placeholder-class="phcolor" placeholder="请输入内容" />
-        </view>
-      </view> -->
-
       <view class="app-footer">
         <button class="admin-button-com middle default" @click="goBack" :disabled="loading">取消</button>
         <button class="admin-button-com middle blue" formType="submit" :disabled="loading">{{ loading ? '保存中...' : '保存' }}</button>

+ 8 - 8
hdApp/src/admin/goods/detail.vue

@@ -77,7 +77,7 @@
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">库存</view>
           <view class="btn-group">
-            <button class="admin-button-com middle" :class="[form.stockSet === '0' ? '' : 'default']" @click="setstockSet('0')">够</button>
+            <button class="admin-button-com middle" :class="[form.stockSet === '0' ? '' : 'default']" @click="setstockSet('0')">够</button>
             <button class="admin-button-com middle" :class="[form.stockSet === '1' ? '' : 'default']" @click="setstockSet('1')">自定义</button>
           </view>
         </tui-list-cell>
@@ -111,7 +111,7 @@
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">运费</view>
+          <view class="tui-title">运费</view>
           <view class="btn-group">
             <button class="admin-button-com middle" :class="[form.freightType === '0' ? '' : 'default']" @click="freightChange({detail:{value:'0'}})">不包运费</button>
             <button class="admin-button-com middle" :class="[form.freightType === '1' ? '' : 'default']" @click="freightChange({detail:{value:'1'}})">包运费</button>
@@ -119,18 +119,18 @@
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">商城上</view>
+          <view class="tui-title">配送类型</view>
           <view class="btn-group">
-            <button class="admin-button-com middle" :class="[form.status === '1' ? '' : 'default']" @click="statusChange({detail:{value:'1'}})">显示</button>
-            <button class="admin-button-com middle" :class="[form.status === '0' ? '' : 'default']" @click="statusChange({detail:{value:'0'}})">隐藏</button>
+            <button class="admin-button-com middle" :class="[form.needSend === '0' ? '' : 'default']" @click="needSendChange('0')">支持送上门</button>
+            <button class="admin-button-com middle" :class="[form.needSend === '1' ? '' : 'default']" @click="needSendChange('1')">只能到店取</button>
           </view>
         </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">配送类型</view>
+          <view class="tui-title">商城上</view>
           <view class="btn-group">
-            <button class="admin-button-com middle" :class="[form.needSend === '0' ? '' : 'default']" @click="needSendChange('0')">支持送上门</button>
-            <button class="admin-button-com middle" :class="[form.needSend === '1' ? '' : 'default']" @click="needSendChange('1')">只能到店取</button>
+            <button class="admin-button-com middle" :class="[form.status === '1' ? '' : 'default']" @click="statusChange({detail:{value:'1'}})">显示</button>
+            <button class="admin-button-com middle" :class="[form.status === '0' ? '' : 'default']" @click="statusChange({detail:{value:'0'}})">隐藏</button>
           </view>
         </tui-list-cell>
 

+ 12 - 17
hdApp/src/admin/goods/list.vue

@@ -40,12 +40,12 @@
 			<view class="search-bar">
 				<app-search-module v-model="searchText" placeholder="输入名称" @input="searchFn" />
 			</view>
-			<view style="padding-left:10upx;" class="button-group">
-        <button class="admin-button-com middle blue filter-btn" style="margin-right:8upx;" @click.stop="openFilterPanel">
+			<view style="padding-left:10upx; display:flex; flex-wrap:nowrap;" class="button-group">
+        <button class="admin-button-com middle blue filter-btn" style="margin-right:10upx; width:150upx;" @click.stop="openFilterPanel">
           筛选
           <text v-if="hasActiveFilters" class="filter-dot"></text>
         </button>
-        <button class="admin-button-com middle blue" @click="addGoods()">新增</button>
+        <button class="admin-button-com middle blue" style="width:150upx;" @click="addGoods()">新增</button>
 			</view>
 		</view>
     <view class="app-middle">
@@ -424,12 +424,16 @@ export default {
     justify-content: center;
   }
   
-  .tab-icon {
+    .tab-icon {
     font-size: 40upx;
     margin-bottom: 8upx;
     display: block;
   }
   
+  &.active .tab-icon {
+    filter: brightness(1.2);
+  }
+  
   .tab-text {
     font-size: 30upx;
     color: #666;
@@ -437,25 +441,16 @@ export default {
   }
   
   &.active {
-    background-color: #bde8d1;
+    background-color: #09C567;
     transform: translateY(-2upx);
     
     .tab-text {
-      color: #09C567;
+      color: #ffffff;
       font-weight: 700;
       font-size: 32upx;
     }
     
-    &:before {
-      content: '';
-      position: absolute;
-      bottom: 0;
-      left: 0;
-      right: 0;
-      height: 4upx;
-      background: linear-gradient(to right, #09C567, #52c41a);
-      border-radius: 0 0 8upx 8upx;
-    }
+    /* 底边框已移除 */
   }
   
   &:active {
@@ -641,7 +636,7 @@ page {
     right: 5upx;
     width: 12upx;
     height: 12upx;
-    background-color: #ff4757;
+    background-color: white;
     border-radius: 50%;
   }
 }

+ 8 - 0
hdApp/src/admin/home/me.vue

@@ -64,6 +64,10 @@
               <view class="tui-title">充值记录</view>
             </tui-list-cell> -->
 
+            <tui-list-cell @click="getMyVideo()" class="line-cell" :hover="false" :arrow="true">
+              <view class="tui-title" style="color:green;">视频教程</view>
+            </tui-list-cell>
+
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/cashSet' })" class="line-cell" :hover="false" :arrow="true" >
               <view class="tui-title">提现账号</view>
             </tui-list-cell>
@@ -174,6 +178,10 @@ export default {
     // #endif
   },
   methods: {
+    getMyVideo(){
+			const that = this;
+      that.$util.pageTo({ url: '/admin/book/index' })
+    },
     goAdmin(){
       this.$util.pageTo({ url: '/admin/staff/admin'})
     },

+ 103 - 0
hdApp/src/api/book/index.js

@@ -0,0 +1,103 @@
+import https from '@/plugins/luch-request_0.0.7/request'
+
+export const batchGoOnFn = data => {
+    return https.post('/book-item-custom/batch-go-on', data)
+}
+
+export const goOffFn = data => {
+    return https.get('/book-item-custom/go-off', data)
+}
+
+export const goOnFn = data => {
+    return https.get('/book-item-custom/go-on', data)
+}
+
+export const toBoxFn = data => {
+    return https.get('/book-item-custom/to-box', data)
+}
+
+export const cancelBoxFn = data => {
+    return https.get('/book-item-custom/cancel-box', data)
+}
+
+export const getCombineFn = data => {
+    return https.get('/book-io/get-combine', data)
+}
+
+export const getIoList = data => {
+    return https.get('/book-io/get-io-list', data)
+}
+
+export const getGlobalBookChangeList = data => {
+    return https.get('/book-change-global/list', data)
+}
+
+export const getGlobalBookOnChangeList = data => {
+    return https.get('/book-on-change-global/list', data)
+}
+
+export const getGlobalBookRoadChangeList = data => {
+    return https.get('/book-road-change-global/list', data)
+}
+
+export const getGlobalBookCgChangeList = data => {
+    return https.get('/book-cg-change-global/list', data)
+}
+
+export const getCustomBookChangeList = data => {
+    return https.get('/book-custom-change/list', data)
+}
+export const getCustomBookOnChangeList = data => {
+    return https.get('/book-custom-on-change/list', data)
+}
+export const getCustomBookRoadChangeList = data => {
+    return https.get('/book-custom-road-change/list', data)
+}
+export const getCustomBookCgChangeList = data => {
+    return https.get('/book-custom-cg-change/list', data)
+}
+
+export const getBookChangeList = data => {
+    return https.get('/book-change/list', data)
+}
+export const getBookOnChangeList = data => {
+    return https.get('/book-on-change/list', data)
+}
+export const getBookCgChangeList = data => {
+    return https.get('/book-cg-change/list', data)
+}
+export const getBookRoadChangeList = data => {
+    return https.get('/book-road-change/list', data)
+}
+
+export const getBookItemCustomDetail = data => {
+    return https.get('/book-item-ghs/list', data)
+}
+
+export const getBookItemCustomList = data => {
+    return https.get('/book-item-custom/list', data)
+}
+
+export const getBookCustomList = data => {
+    return https.get('/book-custom/list', data)
+}
+
+export const getJdBookList = data => {
+    return https.get('/book/jd-list', data)
+}
+
+export const getBookList = data => {
+    return https.get('/book/list', data)
+}
+
+export const getBookDetail = data => {
+    return https.get('/book/detail', data)
+}
+
+export const closeBook = data => {
+    return https.get('/book/close-book', data)
+}
+
+export const changeBook = data => {
+    return https.get('/book/change-book', data)
+}

+ 7 - 0
hdApp/src/pages.json

@@ -216,6 +216,13 @@
 				{ "path": "selectCouponList", "style": { "navigationBarTitleText": "优惠券" } }
 			]
 		},
+		{
+			"root": "admin/book",
+			"pages": [
+				{"path": "index","style": {"navigationBarTitleText": "视频教程"}},
+				{"path": "detail","style": {"navigationBarTitleText": ""}}
+			]
+		},
 		{
 			"root": "admin/ad",
 			"pages": [