瀏覽代碼

fix 购物车

he2802 3 年之前
父節點
當前提交
3b4f0aee13
共有 5 個文件被更改,包括 45 次插入6 次删除
  1. 10 0
      common/httpList/course.js
  2. 9 5
      pages2/bank/detail.vue
  3. 1 0
      pages2/bank/questionBankExplain.vue
  4. 5 0
      pages2/course/detail.vue
  5. 20 1
      pages2/wd/class.vue

+ 10 - 0
common/httpList/course.js

@@ -30,6 +30,16 @@ export default {
 			data: data
 		})
 	},
+	appBeforeAddress(data) {
+		return myRequest({
+			url: '/app/before/address',
+			method: 'get',
+			data: data
+		})
+	},
+	
+	
+
 	reMenuList(data) {
 		return myRequest({
 			url: '/course/menuList',

+ 9 - 5
pages2/bank/detail.vue

@@ -24,7 +24,7 @@
 			<u-line color="#D6D6DB" />
 		</view>
 		<view class="intro" v-if="current == 0">
-			<view class="content">
+			<view class="content" style="padding:10rpx;">
 				<rich-text :nodes="goodsData.mobileDetailHtml"></rich-text>
 			</view>
 		</view>
@@ -43,8 +43,10 @@
 						<template v-if="item1.showList">
 							<view v-for="(item2,index2) in item1.list" :key="index2" >
 								<view class="section" @click="changeItem" :data-index1="index1" :data-index2="index2" :data-id="item2.chapterExamId" :data-type="item1.type">
-									<u-icon  v-if="!item2.showList" name="arrow-up"></u-icon>
-									<u-icon  v-if="item2.showList" name="arrow-down"></u-icon>
+									<image src="/static/icon/down1.png" class="icon_up" v-if="item2.showList"></image>
+									<image src="/static/icon/up1.png" class="icon_up" v-if="!item2.showList"></image>
+									<!-- <u-icon  v-if="!item2.showList" name="arrow-up"></u-icon>
+									<u-icon  v-if="item2.showList" name="arrow-down"></u-icon> -->
 									<text style="margin-left:34rpx;">{{ item2.name }}</text>
 								</view>
 								<view  v-if="item2.showList">
@@ -64,8 +66,10 @@
 					
 					<template v-if="item1.type ==2">
 						<view class="section" :data-index1="index1" :data-id="item1.majorId" @click="changeItem" :data-type="item1.type">
-							<u-icon  v-if="!item1.showList" name="arrow-up"></u-icon>
-							<u-icon  v-if="item1.showList" name="arrow-down"></u-icon>
+							<image src="/static/icon/down1.png" class="icon_up" v-if="item1.showList"></image>
+							<image src="/static/icon/up1.png" class="icon_up" v-if="!item1.showList"></image>
+							<!-- <u-icon  v-if="!item1.showList" name="arrow-up"></u-icon>
+							<u-icon  v-if="item1.showList" name="arrow-down"></u-icon> -->
 							<text style="margin-left:34rpx;">{{ item1.name }}</text>
 						</view>
 						<view v-if="item1.showList" >

+ 1 - 0
pages2/bank/questionBankExplain.vue

@@ -666,6 +666,7 @@ export default {
 			let number = 0;
 			let allScore = 0;
 			let passScore = 0;
+			let doQuestionNum = 0;
 			let doWrongQuestionIds = []; //错题和未做题id(客观题)
 			let doQuestionIds = []; //做过的题目id
 			let rightQuestionIds = []; //做对的题目id

+ 5 - 0
pages2/course/detail.vue

@@ -40,8 +40,13 @@
 			
 		</view>
 		<view style="padding: 20rpx;position: relative;top: 680rpx;" v-show="current==0">
+<<<<<<< HEAD
 			<view class="content">
 				<view v-html="detail.mobileDetailHtml" style="width: 100%;overflow: hidden;"></view>
+=======
+			<view class="content" style="padding: 10rpx;">
+				<view v-html="detail.mobileDetailHtml" style="width: 100%;"></view>
+>>>>>>> 50b8991b1bbfc147f6098874fb80946439feb3c1
 			</view>
 		</view>
 		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;top: 680rpx;" v-show="current==1">

+ 20 - 1
pages2/wd/class.vue

@@ -39,7 +39,7 @@
 					<view style="width: 60%;">
 						<text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">{{ item.beforeName }}</text>
 					</view>
-					<view><u-button type="primary" size="mini" >进入刷题</u-button></view>
+					<view><u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId)">进入刷题</u-button></view>
 				</view>
 			</view>
 		</navigator>
@@ -70,6 +70,25 @@ export default {
 		}
 	},
 	methods: {
+		appBeforeAddress(goodsId) {
+			this.$api.appBeforeAddress({
+				goodsId
+			}).then(res => {
+				if(res.data.code == 200) {
+					uni.navigateToMiniProgram({
+					  appId: res.data.data.url,
+					  success(res) {
+					    // 打开成功
+					  }
+					})
+				} else {
+					uni.showToast({
+						title: res.data.msg,
+						icon: 'none',
+					})
+				}
+			})
+		},
 		courseGoodsList() {
 			let self = this;
 			this.$api.courseGoodsList(this.param).then(res => {