he2802 4 gadi atpakaļ
vecāks
revīzija
8b8f249796
4 mainītis faili ar 266 papildinājumiem un 20 dzēšanām
  1. 10 0
      pages.json
  2. 48 15
      pages/course/index.vue
  3. 35 5
      pages/shopping/shoppingCart.vue
  4. 173 0
      pages2/bank/detail.vue

+ 10 - 0
pages.json

@@ -204,6 +204,16 @@
 						"bounce": "none"
 					}
 				}
+			},
+			{
+				"path": "bank/detail",
+				"style": {
+					"navigationBarTitleText": "题库详情",
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
 			}
 		],
 		"plugins": {

+ 48 - 15
pages/course/index.vue

@@ -17,7 +17,7 @@
 					<view style="width: 160px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
 				</view>
 				<u-line color="#D6D6DB" />
-				<view class="menuSel">
+				<view class="menuSel" v-show="current==0">
 					<scroll-view class="r_sliper" scroll-x="true" >
 						<view v-for="(item,index) in array" :key="index" style="margin-right: 20rpx;display:inline-block">
 							<view :class="menuIndex==index?'r_t1':'r_t2'" @click="cMenu(index)">
@@ -26,22 +26,51 @@
 						</view>
 					</scroll-view>
 				</view>
+				<view class="menuSel" v-show="current==1">
+					<scroll-view class="r_sliper" scroll-x="true" >
+						<view v-for="(item,index) in array" :key="index" style="margin-right: 20rpx;display:inline-block">
+							<view :class="menuIndex1==index?'r_t1':'r_t2'" @click="cMenu1(index)">
+								{{item}}
+							</view>
+						</view>
+					</scroll-view>
+				</view>
 			</view>
-			<view class="listBox">
-				<navigator url="/pages2/course/detail" v-for="(item,index) in array" :key="index" >
-					<view class="itemBox">
-						<image src="/static/login_bg.jpg" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
-						<view style="display: flex;margin-top: 13rpx;">
-							<view class="yearTag">2020</view>
-							<view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
+			<view v-show="current==0">
+				<view class="listBox">
+					<navigator url="/pages2/course/detail" v-for="(item,index) in array" :key="index" >
+						<view class="itemBox">
+							<image src="/static/login_bg.jpg" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
+							<view style="display: flex;margin-top: 13rpx;">
+								<view class="yearTag">2020</view>
+								<view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
+							</view>
+							<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
+								<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
+								共 <text class="blackFont">6</text> 科 <text class="blackFont">120</text> 节  <text class="blackFont">60</text> 学时</view>
+								<view class="priceTag">¥ 999.00</view>
+							</view>
 						</view>
-						<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
-							<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
-							共 <text class="blackFont">6</text> 科 <text class="blackFont">120</text> 节  <text class="blackFont">60</text> 学时</view>
-							<view class="priceTag">¥ 999.00</view>
+					</navigator>
+				</view>
+			</view>
+			<view v-show="current==1">
+				<view class="listBox">
+					<navigator url="/pages2/bank/detail" v-for="(item,index) in array" :key="index" >
+						<view class="itemBox">
+							<image src="/static/login_bg.jpg" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
+							<view style="display: flex;margin-top: 13rpx;">
+								<view class="yearTag">2020</view>
+								<view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
+							</view>
+							<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
+								<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
+								共 <text class="blackFont">6</text> 张卷 <text class="blackFont">120</text>道题  </view>
+								<view class="priceTag">¥ 999.00</view>
+							</view>
 						</view>
-					</view>
-				</navigator>
+					</navigator>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -66,7 +95,8 @@ export default {
 			],
 			array:['全部','建设工程施工管理','机电全科','机电工程管理与实','机电全科','全科'],
 			current:0,
-			menuIndex:0
+			menuIndex:0,
+			menuIndex1:0
 		};
 	},
 	onPullDownRefresh(){
@@ -83,6 +113,9 @@ export default {
 		cMenu(index){
 			this.menuIndex = index;
 		},
+		cMenu1(index){
+			this.menuIndex1 = index;
+		},
 		change(index){
 			this.current = index;
 		}

+ 35 - 5
pages/shopping/shoppingCart.vue

@@ -6,11 +6,12 @@
 			</view>
 		</u-navbar>
 		<view style="padding: 30rpx;padding-bottom: 98rpx;">
+			<uni-swipe-action>
 			 <u-checkbox-group
 			            v-model="checkboxValue1"
 			            placement="column"
 			            @change="checkboxChange">
-			<view v-for="(item,index) in list" :key="index" >
+			<uni-swipe-action-item :autoClose="false" @change="swipeChange($event, item)" :show="item.show" v-for="(item,index) in list" :key="index" >
 				<view class="item">
 					<view>
 						<view style="display: flex;justify-content: space-between;padding-bottom: 15rpx;">
@@ -40,8 +41,15 @@
 						</view>
 					</view>
 				</view>
-			</view>
+				<template v-slot:right>
+					<view class="operate" @click="delItem(item)">
+						<view ><text>删除</text></view>
+						
+					</view>
+				</template>
+			</uni-swipe-action-item>
 			</u-checkbox-group>
+			</uni-swipe-action>
 		</view>
 		<view class="bottomBox">
 			<view>
@@ -152,17 +160,20 @@
 				list: [{
 					name: 'apple',
 					checked: false,
-					disabled: false
+					disabled: false,
+					show: false
 				},
 				{
 					name: 'banner',
 					checked: false,
-					disabled: false
+					disabled: false,
+					show: false
 				},
 				{
 					name: 'orange',
 					checked: false,
-					disabled: false
+					disabled: false,
+					show: false
 				}
 				],
 				list1:[
@@ -219,6 +230,12 @@
 			}
 		},
 		methods: {
+			delItem(option) {
+				console.log(option)
+			},
+			swipeChange(e, item) {
+				item.show = e;
+			},
 			goBuy(){
 				this.$navTo.togo('/pages2/order/confirm_pay');
 			},
@@ -254,6 +271,19 @@
 	}
 </style>
 <style scoped>
+	.operate{
+		background-color: #FF3B30;
+		color: #FFFFFF;
+		border-top-right-radius: 16rpx;
+		border-bottom-right-radius: 16rpx;
+		margin-bottom: 20rpx;
+		display: flex;
+		align-items:center;
+		justify-content:center;
+		padding: 0 20rpx;
+		
+		
+	}
 	.picker-item {
 	        height: 50px;
 	        align-items: center;

+ 173 - 0
pages2/bank/detail.vue

@@ -0,0 +1,173 @@
+<template>
+	<view>
+		<view style="background-color: #FFFFFF;">
+			<view >
+				<image src="/static/login_bg.jpg" style="height: 461rpx;width: 100%;"></image>
+				<view style="padding:20rpx">
+					<view style="display: flex;margin-top: 13rpx;">
+						<view class="yearTag">2020</view>
+						<view class="titleTag">2020年二建建筑工程管理与实务(实务专题班)</view>
+					</view>
+					<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
+						<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
+						共 <text class="blackFont">6</text> 科 <text class="blackFont">120</text> 节  <text class="blackFont">60</text> 学时</view>
+						
+					</view>
+				</view>
+			</view>
+			<u-line color="#D6D6DB" />
+			<view>
+				<view style="width: 160px;margin: 0 auto;"><u-tabs :list="list" item-width="150" font-size="24" bar-width="110" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
+			</view>
+			<u-line color="#D6D6DB" />
+		</view>
+		<view style="padding: 20rpx;">
+			<view class="content">
+				10月18日起,每周一20:00上直播课,课程持续到
+				10月30日止。
+			</view>
+		</view>
+		<view class="bottomBox">
+			<view class="priceTag">¥ 999.00</view>
+			<view style="display: flex;color: #FFFFFF;align-items: center;">
+				<view class="btn1" @click="addCart">加购物车</view>
+				<view class="btn2" @click="buy">立即购买</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+export default {
+	data() {
+		return {
+			list: [
+				{
+					name: '详情'
+				},
+				{
+					name: '大纲'
+				}
+			],
+			current:0
+		};
+	},
+	onUnload() {
+		
+	},
+	computed: { ...mapGetters(['userInfo']) },
+	onLoad(option) {
+
+	},
+	onShow() {
+		
+	},
+	methods: {
+		buy(){
+			this.$navTo.togo('/pages2/order/confirm_list');
+		},
+		addCart(){
+			uni.showToast({
+			    title: '添加成功',
+			    duration: 1000
+			});
+			
+		},
+		open(item){
+			item.showChildren = !item.showChildren
+		},
+		change(index){
+			this.current = index;
+		}
+	}
+};
+</script>
+<style >
+	page{
+		background-color: #EAEEF1;
+	}
+</style>
+<style scope>
+	.content{
+		background-color: #FFFFFF;
+
+	}
+	.btn2{
+		width: 200rpx;
+		height: 64rpx;
+		background: linear-gradient(0deg, #FFB102, #FD644F);
+		box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
+		border-radius: 32rpx;
+		line-height: 64rpx;
+		text-align: center;
+	}
+	.btn1{
+		width: 200rpx;
+		height: 64rpx;
+		background: linear-gradient(0deg, #015EEA, #00C0FA);
+		border-radius: 32rpx;
+		line-height: 64rpx;
+		text-align: center;
+		margin-right: 20rpx;
+	}
+	.bottomBox{
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		left: 0;
+		height:98rpx ;
+		background-color: #FFFFFF;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30rpx;
+	}
+	.blackFont{
+		color: #333333;
+		margin: 0 4rpx;
+	}
+	.wk_icon{
+		width: 24rpx;
+		height: 24rpx;
+		margin-right: 12rpx;
+	}
+	.noteTag{
+		ont-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+		align-items: center;
+	}
+	.priceTag{
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FF2D55;
+	}
+	.titleTag{
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #333333;
+		margin-left: 8rpx;
+	}
+	.yearTag{
+		width: 80rpx;
+		height: 32rpx;
+		background: #EBF5FF;
+		border: 2rpx solid #007AFF;
+		border-radius: 16rpx;
+		font-size: 24rpx;
+		color: #007AFF;
+		text-align: center;
+		line-height: 32rpx;
+	}
+	.itemBox{
+		background: #FFFFFF;
+		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+		border-radius: 24rpx;
+		width: 100%;
+		padding: 20rpx;
+		margin-bottom: 20rpx;
+	}
+</style>