Tang 4 år sedan
förälder
incheckning
e65e4b1017
5 ändrade filer med 41 tillägg och 24 borttagningar
  1. 8 0
      common/httpList/note.js
  2. 1 3
      common/request.js
  3. 20 7
      pages2/course/keynote.vue
  4. 1 1
      pages2/course/read.vue
  5. 11 13
      pages2/wd/info.vue

+ 8 - 0
common/httpList/note.js

@@ -17,4 +17,12 @@ export default {
 			noToken: true
 		})
 	},
+	noteRecommendList(data) {
+		return myRequest({
+			url: '/app/common/exam/note/recommendList',
+			method: 'get',
+			data: data,
+			noToken:true
+		})
+	},
 }

+ 1 - 3
common/request.js

@@ -1,7 +1,5 @@
-const BASE_URL = 'http://192.168.0.222:8088'
-
-// const BASE_URL = 'http://127.0.0.1:8088' //
 
+const BASE_URL = 'http://192.168.0.222:8088'   //
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1

+ 20 - 7
pages2/course/keynote.vue

@@ -77,10 +77,10 @@
 					</u-col>
 				</u-row>
 				<view style="margin: 10rpx;">
-					<view class="tj_box" v-for="(item,index) in list" :key="index">
-						<image src="/static/banner.png"   style="width: 320rpx;height: 160rpx;"></image>
-						<view style="font-size: 24rpx;color: #666666;d">
-							2020年二级建造师继续教...
+					<view class="tj_box" v-for="(item,index) in recommendList" :key="index" @click="jumpDetail(item)">
+						<image :src="$method.splitImgHost(item.coverUrl)"   style="width: 320rpx;height: 160rpx;"></image>
+						<view style="font-size: 24rpx;color: #666666;text-align: left;">
+							{{item.name}}
 						</view>
 						<view>
 							<u-row >
@@ -95,7 +95,7 @@
 										活动价 
 									</text>
 									<text style="color: #E91313;font-size: 24rpx;font-weight: bold;">
-										¥499
+										¥{{item.price}}
 									</text>
 								</u-col>
 							</u-row>
@@ -136,16 +136,23 @@
 				current: 0,
 				id:0,
 				detail:{},
-				teacherList:[]
+				teacherList:[],
+				recommendList:[]
 			}
 		},
 		onLoad(option) {
 			this.id = option.id
 			this.getDetail()
+			this.noteRecommendList({fileId:this.id})
 		},
 		onShow(){
 		},
 		methods: {
+			jumpDetail(item) {
+				this.$navTo.togo('/pages2/course/keynote', {
+					id:item.fileId
+				});
+			},
 			getDetail(){
 				let self = this
 				this.$api.noteInfo(this.id).then(res => {
@@ -155,7 +162,6 @@
 							 teacherIds : self.detail.teacherIds
 						 }
 						 self.getTeacherList(param);
-						
 					} 
 				})
 			},
@@ -166,6 +172,13 @@
 					
 				})
 			},
+			noteRecommendList(param){
+				let self = this
+				this.$api.noteRecommendList(param).then(res => {
+					self.recommendList = res.data.data
+					
+				})
+			},
 			change(index) {
 				this.current = index;
 			},

+ 1 - 1
pages2/course/read.vue

@@ -10,7 +10,7 @@
 	export default {
 		data() {
 			return {
-				webUrl : 'http://192.168.0.222:8080/img/test.pdf'
+				webUrl : 'https://file-dev.xyyxt.net/oss/images/20210602/2021_6_2_1763607338.pdf'
 			}
 		},
 		onLoad(option) {

+ 11 - 13
pages2/wd/info.vue

@@ -7,7 +7,7 @@
 				个人职业成长定制服务!
 			</view>
 			<view style="display: flex;align-items: center;">
-				<view class="btn" v-if="form.certified === 0" style="margin-right: 5rpx;" @click="certification">认证</view> 
+				<view class="btn" v-if="form.certified === 0" style="margin-right: 5rpx;" @click="certification">认证</view>
 				<view class="btn">编辑</view>
 			</view>
 		</view>
@@ -62,12 +62,10 @@
 					>
 						<template v-slot:addBtn>
 							<image :src="form.oneInchPhotos ? $method.splitImgHost('/' + form.oneInchPhotos) : '/static/info_1.png'" style="width: 120rpx; height: 169rpx;"></image>
-
-							<image src="/static/info_1.png" style="width: 120rpx; height: 169rpx;"></image>
 						</template>
 					</u-upload>
 				</u-form-item>
-				<u-form-item label="身份证人像面" :label-width="auto" label-position="top">
+				<!-- <u-form-item label="身份证人像面" :label-width="auto" label-position="top">
 					<u-upload
 						:auto-upload="false"
 						custom-btn="true"
@@ -100,7 +98,7 @@
 							<image src="/static/info_3.png" style="width: 120rpx; height: 82rpx;"></image>
 						</template>
 					</u-upload>
-				</u-form-item>
+				</u-form-item> -->
 			</u-form>
 		</view>
 		<u-button type="success" @click="resultForm">提交</u-button>
@@ -161,7 +159,9 @@ export default {
 						// 可以单个或者同时写两个触发验证方式
 						trigger: 'blur'
 					}
-				]
+				],
+				width: 0,
+				height: 0
 			}
 		};
 	},
@@ -173,9 +173,6 @@ export default {
 		Verify.init();
 		this.getUserInfos();
 	},
-	mounted() {
-		console.log(this.$method.splitImgHost('/' + this.form.oneInchPhotos));
-	},
 	methods: {
 		getUserInfos() {
 			this.$api.getInfo().then(res => {
@@ -204,7 +201,7 @@ export default {
 				},
 				success: result => {
 					setTimeout(() => {
-						self.getUserInfos()
+						self.getUserInfos();
 					}, 500);
 				},
 				fail: err => {
@@ -221,7 +218,7 @@ export default {
 		async submitForm() {
 			var self = this;
 			if (this.fileList.length > 0) {
-				const waitUpload = await this.uploadFile(this.fileList, 0);
+				const waitUpload = await self.uploadFile(this.fileList[0].url, 0);
 			}
 			var data = {
 				userId: this.form.userId,
@@ -258,11 +255,12 @@ export default {
 					imageStatus: int
 				};
 				this.$api.aliyunpolicy(data).then(res => {
+					console.log(res);
 					var ossToken = res.data.data.resultContent;
 					uni.uploadFile({
 						url: ossToken.host,
 						name: 'file',
-						filePath: options[0].file.path,
+						filePath: options,
 						fileType: 'image',
 						header: {
 							AuthorizationToken: 'WX ' + self.$store.state.token
@@ -273,7 +271,7 @@ export default {
 							policy: ossToken.policy,
 							Signature: ossToken.signature,
 							callback: ossToken.callback,
-							success_action_status: 200,
+							success_action_status: 200
 						},
 						success: result => {
 							if (result.statusCode === 200) {