浏览代码

feat: 把购物车tab缓存题库tab

xuqiaoying 2 年之前
父节点
当前提交
f21ffaaac8

+ 15 - 4
pages.json

@@ -50,9 +50,9 @@
 			}
 		},
 		{
-			"path": "pages/shopping/shoppingCart",
+			"path": "pages/questionBank/index",
 			"style": {
-				"navigationBarTitleText": "购物车",
+				"navigationBarTitleText": "题库",
 				"navigationStyle": "custom", // 隐藏系统导航栏
 				"app-plus": {
 					"titleNView": false, //禁用原生导航栏 
@@ -845,6 +845,17 @@
 					"bounce": "none"
 				}
 			}
+		},
+		{
+			"path": "shopping/shoppingCart",
+			"style": {
+				"navigationBarTitleText": "购物车",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
 		}
     ]
 			
@@ -1069,10 +1080,10 @@
 				"text": "学习"
 			},
 			{
-				"pagePath": "pages/shopping/shoppingCart",
+				"pagePath": "pages/questionBank/index",
 				"iconPath": "static/nav3.png",
 				"selectedIconPath": "static/nav3_on.png",
-				"text": "购物车"
+				"text": "题库"
 			},
 			{
 				"pagePath": "pages/wd/index",

+ 0 - 1
pages/course/index.vue

@@ -241,7 +241,6 @@ export default {
 				pId:0,
 			},
 			current: 1,
-            tabbarlist: this.$store.state.tabLists
 		};
 	},
 	onPullDownRefresh(){

+ 0 - 1
pages/index/index.vue

@@ -286,7 +286,6 @@ export default {
 			isLogin:false,
 			isOld:false,
 			current: 0,
-            // tabbarlist: this.$store.state.tabLists,
 			showOfficial: false,
 			// opacity: 1,
 			isFollow: null, //是否关注过,不是1就是没关注

+ 9 - 0
pages/questionBank/index.vue

@@ -0,0 +1,9 @@
+<template>
+    <view class="questionBank">
+        <u-navbar :is-back="false" title="题库" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
+			<view class="slot-wrap">
+				<image  src="/static/logo2.png" style="width: 178rpx;height: 31rpx;margin-left: 30rpx;"></image>
+			</view>
+		</u-navbar>
+    </view>
+</template>

+ 0 - 1
pages/wd/index.vue

@@ -152,7 +152,6 @@ export default {
 			total1:0,
 			total2:0,
 			current: 4,
-            tabbarlist: this.$store.state.tabLists
 		};
 	},
 	onLoad(option) {

+ 2 - 2
pages2/bank/detail.vue

@@ -469,8 +469,8 @@ export default {
 			}
 		},
 		toShopcar() {
-			uni.switchTab({
-			    url: '/pages/shopping/shoppingCart'
+			uni.navigateTo({
+			    url: '/pages4/shopping/shoppingCart'
 			})
 		},
 		getIsBuy() {

+ 2 - 2
pages2/order/confirm_pay.vue

@@ -238,8 +238,8 @@ export default {
 			} else {
 				if(this.fromCart) {
 					
-					uni.switchTab({
-						url:'/pages/shopping/shoppingCart'
+					uni.navigateTo({
+						url:'/pages4/shopping/shoppingCart'
 					})
 				} else {
 					

+ 2 - 2
pages3/course/detail.vue

@@ -699,8 +699,8 @@ export default {
 			this.current = index;
 		},
 		toShopcar() {
-			uni.switchTab({
-			    url: '/pages/shopping/shoppingCart'
+			uni.navigateTo({
+			    url: '/pages4/shopping/shoppingCart'
 			})
 		},
 		getIsBuy() {

+ 1 - 2
pages3/live/detail.vue

@@ -562,8 +562,7 @@
       <div class="content">
           <view class="title">学员须知</view>
           <scroll-view scroll-y="true">
-            <view class="text">
-              {{ goodsData.buyNote || '' }}
+            <view class="text" v-html="goodsData.buyNote && goodsData.buyNote.replace(/\n|\r\n/g, '<br>')">
             </view>
           </scroll-view>
           <view class="had_read" :class="{'gray': CountTo >= 0}" @click="noticeConfirm()">

+ 1 - 2
pages3/polyv/detail.vue

@@ -545,8 +545,7 @@
       <div class="content">
           <view class="title">学员须知</view>
           <scroll-view scroll-y="true">
-            <view class="text">
-              {{ goodsData.buyNote || '' }}
+            <view class="text" v-html="goodsData.buyNote && goodsData.buyNote.replace(/\n|\r\n/g, '<br>')">
             </view>
           </scroll-view>
           <view class="had_read" :class="{'gray': CountTo >= 0}" @click="noticeConfirm()">

+ 0 - 1
pages/shopping/shoppingCart.vue → pages4/shopping/shoppingCart.vue

@@ -189,7 +189,6 @@ export default {
 			cAreaIndex: 0,
 			examIndex: 0,
 			current: 3,
-            tabbarlist: this.$store.state.tabLists
 		};
 	},
 	computed: { ...mapGetters(['userInfo','hideBuyState']) },

+ 1 - 33
store/index.js

@@ -27,38 +27,6 @@ const store = new Vuex.Store({
 		tabNums: 0, // '我的'右上角的数字
 		sysTime:0, //系统时间
 		scene: 0, //进入小程序的场景值
-		tabLists: [{
-			iconPath: "/static/nav1.png",
-			selectedIconPath: "/static/nav1_on.png",
-			text: '首页',
-			pagePath: "/pages/index/index"
-		},
-		{
-			iconPath: "/static/nav2.png",
-			selectedIconPath: "/static/nav2_on.png",
-			text: '选课',
-			pagePath: "/pages/course/index"
-		},
-		{
-			iconPath: "/static/nav6.png",
-			selectedIconPath: "/static/nav6_on.png",
-			text: '学习',
-			midButton: true,
-			pagePath: "/pages/learn/index"
-		},
-		{
-			iconPath: "/static/nav3.png",
-			selectedIconPath: "/static/nav3_on.png",
-			text: '购物车',
-			pagePath: "/pages/shopping/shoppingCart"
-		},
-		{
-			iconPath: "/static/nav5.png",
-			selectedIconPath: "/static/nav5_on.png",
-			text: '我的',
-			count: 0,
-			pagePath: "/pages/wd/index"
-		}]
 	},
 	getters: {
 		sysTime: state => {
@@ -129,7 +97,7 @@ const store = new Vuex.Store({
 			state.sysTime = time;
 		},
 		tabNum(state, nums) {
-			state.tabLists[4].count = nums
+			// state.tabLists[4].count = nums
 			// if (nums) {
 			// 	uni.setTabBarBadge({
 			// 		index: 4,