hwq 4 năm trước cách đây
mục cha
commit
cc47f9f5bb
4 tập tin đã thay đổi với 13 bổ sung12 xóa
  1. 3 3
      api/index.js
  2. 2 2
      api/info.js
  3. 7 6
      pages/applic/cause.vue
  4. 1 1
      pages/applic/info.vue

+ 3 - 3
api/index.js

@@ -11,9 +11,9 @@ export function loadIndexs(data) {
 }
 
 // 获取科普文章列表
-export function getArticList(data,id) {
+export function getArticList(data) {
 	return request({
-		url: '/api/article/list/' + id,
+		url: '/api/article/lst',
 		method: 'get',
 		data
 	});
@@ -66,7 +66,7 @@ export function getNumber(data) {
 // 志愿者报名
 export function add_volunteers(data) {
 	return request({
-		url: '/api/add_registration',
+		url: '/api/volunteer/apply',
 		method: 'post',
 		data
 	});

+ 2 - 2
api/info.js

@@ -19,9 +19,9 @@ export function articledel(data) {
 }
 
 // 文章详情
-export function details(data,id) {
+export function details(data) {
 	return request({
-		url: '/api/article/details/'+id,
+		url: '/api/article/view',
 		method: 'get',
 		data
 	});

+ 7 - 6
pages/applic/cause.vue

@@ -5,7 +5,7 @@
 		</view>
 		<view class="list-box" v-for="(item,index) in science" :key='index' @click="navTo('/pages/applic/info?id='+item.id)">
 			<view class="box-left">
-				<image :src="item.image_input[0]" mode="" class="left-img"></image>
+				<image :src="item.image" mode="" class="left-img"></image>
 			</view>
 			<view class="box-right">
 				<view class="right-top word1_ellipsis">
@@ -54,11 +54,12 @@
 				obj.loadingType = 'loading'
 				getArticList({
 					paga: obj.page,
-					limit: obj.limit
-				},2).then(({ data }) => {
-					console.log(data);
-					obj.science = obj.science.concat(data.list);
-					if(obj.limit == data.list.length) {
+					limit: obj.limit,
+					ifyid: 1
+				}).then(({ data }) => {
+					obj.science = obj.science.concat(data);
+					console.log(obj.science,1236);
+					if(obj.limit == data.length) {
 						obj.loadingType = 'more'
 					}else {
 						obj.loadingType = 'noMore'

+ 1 - 1
pages/applic/info.vue

@@ -29,7 +29,7 @@
 		methods:{
 			loadData(){
 				let obj = this;
-			details({},obj.id).then(function(e) {
+			details({id: obj.id}).then(function(e) {
 				obj.list = e.data;
 				if(obj.list.content != null){
 					obj.description = obj.list.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");