浏览代码

no message

zpj 2 年之前
父节点
当前提交
bd957e4159

+ 11 - 0
api/alumni.js

@@ -0,0 +1,11 @@
+import {request} from '../service/ajax.js'
+
+const newsUrl = '/api/alumni/'
+// 帖子列表
+export const getAlumniList = (data) => request(newsUrl + 'list', 'post', { ...data },false)
+// 用户点赞或者取消点赞帖子
+export const setAlumniLike = (data) => request(newsUrl + 'like', 'post', { ...data },false)
+
+
+// 获取评论列表
+export const getRemarkList = (data) => request(newsUrl + 'remark_list', 'post', { ...data },false)

+ 11 - 1
api/common.js

@@ -1,6 +1,8 @@
 import {request} from '../service/ajax.js'
 
 const commonUrl = '/api/common/'
+// 获取阿里云sts
+export const getSts = (data) => request(commonUrl + 'sts', 'post', { ...data })
 // 获取协议
 export const getAgreement = (data) => request(commonUrl + 'agreement', 'post', { ...data })
 // 获取学校
@@ -11,4 +13,12 @@ export const getNotice = (data) => request(commonUrl + 'notice', 'post', { ...da
 export const getBanner = (data) => request(commonUrl + 'banner', 'post', { ...data })
 
 // 发送验证码
-export const getCode = (data) => request(commonUrl + 'send', 'post', { ...data })
+export const getCode = (data) => request(commonUrl + 'send', 'post', { ...data })
+
+
+// 意见反馈
+export const setFeedback = (data) => request('/api/system/' + 'feedback', 'post', { ...data })
+// 商务合作
+export const setCooperation = (data) => request('/api/system/' + 'cooperation', 'post', { ...data })
+// 骑手申请
+export const setRiderApply = (data) => request('/api/system/' + 'riderApply', 'post', { ...data })

+ 3 - 0
common/css/common.css

@@ -246,6 +246,9 @@ image {
 .fc-FF7F00{
 	color: #FF7F00;
 }
+.fc-FD5C02{
+	color: #FD5C02;
+}
 .fc-ED301D{
 	color: #ED301D;
 }

+ 8 - 2
components/en-from/en-radio/en-radio.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="box">
     <view class="input-box">
-      <view class="input-box-left" :style="{'letter-spacing':labelWidth}">
+      <view class="input-box-left" :style="{'fontSize':textSize + 'rpx'}">
         {{ label }}
       </view>
       <view class="input-box-right">
@@ -10,7 +10,7 @@
               <radio  :id="name+index" :value="radioItem.id"  />
               <text  class="iconfont icon-ok" v-if="inputValue===radioItem.id">&#xe608;</text>
               <text  class="iconfont" v-else> &#xead9;</text>
-              {{radioItem.name}}
+              <text :style="{'fontSize':textSize + 'rpx'}">{{radioItem.name}}</text>
             </label>
           </radio-group>
       </view>
@@ -22,6 +22,10 @@
 export default {
   name: 'en-radio',
   props: {
+	textSize:{
+		type: Number,
+		default: 32
+	},
     type: {
       type: String,
       default: 'text'
@@ -128,6 +132,8 @@ export default {
           display: flex;
           flex-wrap: wrap;
           .radio-item{
+			display: flex;
+			align-items: center;
             margin: 6rpx 20rpx 0 6rpx;
             .iconfont{
               padding-right: 6rpx;

+ 12 - 1
pages-address/select-school.vue

@@ -81,11 +81,19 @@
 			let school_id = uni.getStorageSync('school_id');
 			let operate_id = uni.getStorageSync('operate_id');
 			let school_name = uni.getStorageSync('school_name');
+			let circleSchoolId = uni.getStorageSync('circleSchoolId');
+			let circleSchoolName = uni.getStorageSync('circleSchoolName');
+			
 			if(!school_id||!operate_id){
 				this.leftShow = false;
 			}else{
 				this.leftShow = true;
-				this.schoolData.school_name = school_name;
+				if(this.type == 1){
+					this.schoolData.school_name = school_name;
+				}else{
+					this.schoolData.school_name = circleSchoolId?circleSchoolName:school_name;
+				}
+				
 			}
 			this.list = [];
 			this.fromData.page = 1;
@@ -125,6 +133,9 @@
 						})
 					}else{
 						// 跳转校友圈
+						uni.reLaunch({
+							url:'/pages-school/school-circle'
+						})
 					}
 				}else{
 					uni.switchTab({

+ 6 - 2
pages-buy/save-order.vue

@@ -12,12 +12,12 @@
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">手机号</view>
 					<input v-model="fromData.phone" type="number" placeholder="请输入手机号">
-					<view class="fs-28 fc-41ABF5 code-box" @click="getCode()">{{codeText}}{{isCode?'s':''}}</view>
+					
 				</view>
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">验证码</view>
 					<input v-model="fromData.code" type="number" placeholder="请输入验证码">
-					
+					<view class="fs-28 fc-41ABF5 code-box" @click="getCode()">{{codeText}}{{isCode?'s':''}}</view>
 				</view>
 				<view class="box-input align-items-center box-border-box p-b-20 mb-20">
 					<view class="fs-28 fw-600 w158">联系地址</view>
@@ -101,6 +101,10 @@
 		},
 		methods:{
 			getCode(){
+				if(!this.fromData.phone){
+					return tools.error('请输入手机号')
+				}
+				
 				if (this.isCode) {
 					return
 				}

+ 32 - 29
pages-my/cooperate.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="flex-common-css iPhone-bottom">
+	<view class="flex-common-css iPhone-bottom box-border-box">
 		<Nav title="商务合作" titleColor="#333" bgckgroundBox='#fff'></Nav>
 		<scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
 			<view class="content-box box-border-box">
@@ -8,36 +8,20 @@
 						请描述你想合作的想法
 					</view>
 					<view class="textarea-box">
-						<textarea placeholder-style="color:#ccc" auto-height maxlength='100' placeholder="请输入" />
-					</view>
-					<view class="up-img-box align-items-center flex-wrap-wrap">
-						<view class="up-img" v-for="(itme, index) in formData.imgList" :key="index">
-							<image class="img" src="../static/img/my/bg.png" mode=""></image>
-							<uni-icons @click="deleteImg(index)" class="delete-icons" color="#000" type="clear"
-								size="20"></uni-icons>
-						</view>
-						<view
-							class="add-img-box flex-direction flex-justify-center align-items-center bgc-F6F6F6 bgc-F6F6F6">
-							<image class="add-img" src="@/static/img/my/sc.png" mode=""></image>
-							<view class="fs-24 fc-9">
-								上传照片
-							</view>
-							<view class="fs-24 fc-9">
-								(最多3张)
-							</view>
-						</view>
+						<textarea v-model="formData.content" placeholder-style="color:#ccc" auto-height maxlength='100' placeholder="请在这里输入您的想法" />
 					</view>
 				</view>
 				<view class="bgc-f b-rad-20 box-sizing-border phone-box">
 					<view class="fs-32 fc-3 mb-20 fw-600">
 						联系方式
 					</view>
-					<input class="uni-input" focus placeholder="请输入手机号(必填)" type="number" />
+					<input v-model="formData.name" class="uni-input mb-20" focus placeholder="请输入姓名" type="text" />
+					<input v-model="formData.phone" class="uni-input" focus placeholder="请输入手机号" type="number" />
 				</view>
 			</view>
 		</scroll-view>
-		<view class="bot-box bgc-f">
-			<view class="bot-but fc-f fs-32 text-align-center b-rad-200" :class="formType?'bgc-4FB3EF':'bgc-B3DDFB'">
+		<view class="bot-box bgc-f" @click="save()">
+			<view class="bot-but fc-f fs-32 text-align-center b-rad-200 bgc-4FB3EF">
 				提交合作
 			</view>
 		</view>
@@ -45,22 +29,41 @@
 </template>
 
 <script>
+	import {setCooperation} from '@/api/common.js'
+	import tools from '@/service/tools';
 	export default {
 		components: {},
 		data() {
 			return {
 				formData: {
-					rate: '',
-					imgList: []
+					phone:'',
+					content: '',
+					name: '',
 				},
-				formType: false
+				isAJAX:false,
 			};
 		},
-		onLoad(data) {},
-		mounted() {},
 		methods: {
-			scrolltolower() {
-				console.log('触底');
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				setCooperation(this.formData).then((res)=>{
+					if(res.code === 1){
+						this.isAJAX = false;
+						tools.success('提交成功');
+						setTimeout(()=>{
+							uni.reLaunch({
+								url:'/pages/me/index'
+							})
+						},1500)
+						
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg);
+					}
+				})
 			},
 		},
 	}

+ 63 - 19
pages-my/feedback.vue

@@ -1,23 +1,22 @@
 <template>
-	<view class="flex-common-css iPhone-bottom">
+	<view class="flex-common-css iPhone-bottom box-border-box">
 		<Nav title="问题反馈" titleColor="#333" bgckgroundBox='#fff'></Nav>
-		<scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
+		<scroll-view :scroll-y="true" class="scroll-view-css">
 			<view class="content-box box-border-box">
 				<view class="bgc-f p-24 b-rad-20 mb-20 box-sizing-border">
 					<view class="fs-32 fw-600 fc-3 mb-20">
 						请描述你的建议和想法,我们会不断优化改进
 					</view>
 					<view class="textarea-box">
-						<textarea placeholder-style="color:#ccc" auto-height maxlength='100' placeholder="还有更多建议和想法?快告诉我们吧~" />
+						<textarea v-model="formData.content" placeholder-style="color:#ccc" auto-height maxlength='100' placeholder="还有更多建议和想法?快告诉我们吧~" />
 					</view>
 					<view class="up-img-box align-items-center flex-wrap-wrap">
-						<view class="up-img" v-for="(itme, index) in formData.imgList" :key="index">
-							<image class="img" src="../static/img/my/bg.png" mode=""></image>
-							<uni-icons @click="deleteImg(index)" class="delete-icons" color="#000" type="clear"
+						<view class="up-img" v-for="(itme, i) in formData.image" :key="i">
+							<image class="img" :src="itme" mode="aspectFill"></image>
+							<uni-icons @click="deleteImg(i)" class="delete-icons" color="#000" type="clear"
 								size="20"></uni-icons>
 						</view>
-						<view
-							class="add-img-box flex-direction flex-justify-center align-items-center bgc-F6F6F6 bgc-F6F6F6">
+						<view @click="upImg()" class="add-img-box flex-direction flex-justify-center align-items-center bgc-F6F6F6 bgc-F6F6F6">
 							<image class="add-img" src="@/static/img/my/sc.png" mode=""></image>
 							<view class="fs-24 fc-9">
 								上传照片
@@ -32,12 +31,12 @@
 					<view class="fs-32 fc-3 mb-20 fw-600">
 						联系方式
 					</view>
-					<input class="uni-input" focus placeholder="请输入手机号(选填)" type="number" />
+					<input v-model="formData.phone"  class="uni-input" focus placeholder="请输入手机号(选填)" type="number" />
 				</view>
 			</view>
 		</scroll-view>
-		<view class="bot-box bgc-f">
-			<view class="bot-but fc-f fs-32 text-align-center b-rad-200" :class="formType?'bgc-4FB3EF':'bgc-B3DDFB'">
+		<view class="bot-box bgc-f" @click="save()">
+			<view class="bot-but fc-f fs-32 text-align-center b-rad-200 bgc-4FB3EF">
 				提交反馈
 			</view>
 		</view>
@@ -45,22 +44,67 @@
 </template>
 
 <script>
+	import {upLoadingFileOss,} from "@/service/upLoadingFile.js"
+	import {setFeedback} from '@/api/common.js'
+	import tools from '@/service/tools';
 	export default {
 		components: {},
 		data() {
 			return {
 				formData: {
-					rate: '',
-					imgList: []
+					phone:'',
+					content: '',
+					image: [],
 				},
-				formType: false
+				isAJAX:false,
 			};
 		},
-		onLoad(data) {},
-		mounted() {},
 		methods: {
-			scrolltolower() {
-				console.log('触底');
+			deleteImg(index) {
+				this.formData.image.splice(index, 1)
+			},
+			
+			upImg() {
+				uni.chooseImage({
+					count: 3,
+					sizeType: ["compressed", "camera"],
+					sourceType: ["album", "camera"],
+					success: (res) => {
+						res.tempFiles.forEach((file) => {
+							this.uploadingFile(file);
+						})
+					}
+				})
+			},
+			uploadingFile(file) {
+				upLoadingFileOss(file.path).then((res) => {
+					if (res) {
+						this.formData.image.push(res)
+					} else {
+						tools.error('图片上传失败')
+					}
+				})
+			},
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				setFeedback(this.formData).then((res)=>{
+					if(res.code === 1){
+						this.isAJAX = false;
+						tools.success('提交成功');
+						setTimeout(()=>{
+							uni.reLaunch({
+								url:'/pages/me/index'
+							})
+						},1500)
+						
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg);
+					}
+				})
 			},
 		},
 	}
@@ -79,7 +123,7 @@
 	.up-img {
 		width: 152rpx;
 		height: 152rpx;
-		margin: 0 0 10rpx 0;
+		margin: 0 10rpx 10rpx 0;
 		position: relative;
 
 		.img {

+ 119 - 7
pages-my/rider-recruit.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="flex-common-css">
+	<view class="flex-common-css iPhone-bottom box-border-box">
 		<Nav title="骑手招聘" titleColor="#333" bgckgroundBox='#fff'></Nav>
 		<scroll-view :scroll-y="true" class="scroll-view-css content-box">
 			<image class="zp-bg" src="@/static/img/my/zp.png" mode=""></image>
@@ -9,29 +9,141 @@
 				<view class="title-box fs-36 fc-3 fw-b text-align-center mb-24">
 					校园实习生申请表
 				</view>
-				<view class="bgc-f b-rad-20">
+				<view class="bgc-f b-rad-20 card-box box-border-box p-24">
+					<EnRadio label='性别' :radioData='radioData' v-model="fromData.sex"></EnRadio>
 					
+					<view class="box-input align-items-center box-border-box p-b-20">
+						<view class="fs-32 fw-400 w158">手机号</view>
+						<input v-model="fromData.phone" type="number" placeholder="请输入手机号">
+						
+					</view>
+					<view class="box-input align-items-center box-border-box p-b-20">
+						<view class="fs-32 fw-400 w158">验证码</view>
+						<input v-model="fromData.code" type="number" placeholder="请输入验证码">
+						<view class="fs-28 fc-41ABF5 code-box" @click="getCode()">{{codeText}}{{isCode?'s':''}}</view>
+					</view>
 				</view>
+				
+				
 			</view>
 		</scroll-view>
+		
+		<view class="bot-box bgc-f" @click="save()">
+			<view class="bot-but fc-f fs-32 text-align-center b-rad-200 bgc-4FB3EF">
+				提交
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
+	import EnRadio from '@/components/en-from/en-radio/en-radio.vue';
+	import {getCode,setRiderApply} from '@/api/common.js';
+	import tools from "@/service/tools";
 	export default {
-		components: {},
+		components: {EnRadio,},
 		data() {
-			return {};
+			return {
+				isCode:false,
+				isAJAX:false,
+				codeText:'获取验证码',
+				fromData:{
+					sex:'',
+					phone:'',
+					school_id:'',
+					code:'',
+				},
+				radioData:[{name:"男",id:1},{name:"女",id:2},],
+			};
 		},
-		onLoad(data) {},
-		mounted() {},
+		
 		methods: {
-			
+			getCode(){
+				if(!this.fromData.phone){
+					return tools.error('请输入手机号')
+				}
+				if (this.isCode) {
+					return
+				}
+				this.isCode = true;
+				getCode({phone:this.fromData.phone,send_type:'rider_apply'}).then((res)=>{
+					if(res.code === 1){
+						this.codeText = 60;
+						let timer = setInterval(() => {
+						  this.codeText -= 1;
+						  if (this.codeText <= 0) {
+						    clearInterval(timer);
+							this.isCode = false;
+							this.codeText = '获取验证码'
+						  }
+						}, 1000);
+					}else{
+						this.isCode = false;
+						tools.error('获取验证码失败,请稍后重试')
+					}
+				})
+			},
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				
+				this.fromData.school_id = uni.getStorageSync('school_id');
+				setRiderApply(this.fromData).then((res)=>{
+					if(res.code === 1){
+						this.isAJAX = false;
+						tools.success('提交成功');
+						setTimeout(()=>{
+							uni.reLaunch({
+								url:'/pages/me/index'
+							})
+						},1500)
+						
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg);
+					}
+				})
+			},
 		},
 	}
 </script>
 
 <style lang="scss" scoped>
+	.bot-box {
+		width: 100%;
+		padding: 12rpx 32rpx;
+		box-sizing: border-box;
+	
+		.bot-but {
+			width: 100%;
+			height: 92rpx;
+			line-height: 92rpx;
+		}
+	}
+	.card-box{
+		width: 100%;
+		min-height: 200rpx;
+	}
+	.box-input{
+		padding-top: 34rpx;
+		padding-bottom: 34rpx;
+		border-bottom: 2rpx solid #F0F0F0;
+		position: relative;
+		.w158{
+			width: 210rpx;
+		}
+		input{
+			font-size: 32rpx;
+		}
+		.code-box{
+			position: absolute;
+			right: 0;
+			top: 34rpx;
+		}
+	}
+	
 .content-box{
 	position: relative;
 }

+ 39 - 7
pages-my/set-user-name.vue

@@ -3,11 +3,11 @@
 		<Nav title="昵称" titleColor="#333" bgckgroundBox='#fff'></Nav>
 		<scroll-view :scroll-y="true" class="scroll-view-css">
 			<view class="content-box box-border-box">
-				<input class="uni-input mb-16" focus placeholder="请输入昵称" maxlength="50" />
+				<input v-model="fromData.nickname" class="uni-input mb-16" focus placeholder="请输入昵称" maxlength="20" />
 				<view class="fs-24 fc-9 mb-80">
 					昵称由中文、英文、数字、组合
 				</view>
-				<view class="but fs-32 fc-f fw-600 b-rad-200 bgc-41ABF5 text-align-center">
+				<view class="but fs-32 fc-f fw-600 b-rad-200 bgc-41ABF5 text-align-center" @click="save()">
 					保存
 				</view>
 			</view>
@@ -16,14 +16,46 @@
 </template>
 
 <script>
+	import {userInfo,userUpdate} from '@/api/member.js';
+	import tools from '@/service/tools';
 	export default {
-		components: {},
 		data() {
-			return {};
+			return {
+				fromData:{
+					nickname:'',
+					head_img:'',
+					sex:'',
+				},
+				isAJAX:false,
+			};
+		},
+		onShow() {
+			this.getUserInfo();
+		},
+		methods: {
+			getUserInfo(){
+				userInfo().then((res)=>{
+					if(res.code === 1){
+						this.fromData = res.data;
+					}
+				})
+			},
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				userUpdate(this.fromData).then((res)=>{
+					if(res.code === 1){
+						this.isAJAX = false;
+						tools.success(res.msg)
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg)
+					}
+				})
+			},
 		},
-		onLoad(data) {},
-		mounted() {},
-		methods: {},
 	}
 </script>
 

+ 60 - 12
pages-my/set-user-phone.vue

@@ -11,20 +11,20 @@
 				</view>
 				<view class="phone-box mb-22">
 					<image class="icons" src="@/static/img/my/yzm-icons.png" mode=""></image>
-					<input class="uni-input b-rad-200" focus placeholder="请输入手机号" />
+					<input v-model="formData.phone" type="number" class="uni-input b-rad-200" focus placeholder="请输入手机号" />
 				</view>
 				<view class="flex-justify-space mb-80">
 					<view class="phone-box mr-24 common-view-css">
 						<image class="icons" src="@/static/img/my/yzm-icons.png" mode=""></image>
-						<input class="uni-input b-rad-200" focus placeholder="请输入验证码" />
+						<input v-model="formData.code" type="number" class="uni-input b-rad-200" focus placeholder="请输入验证码" />
 					</view>
-					<view class="get-code-box">
+					<view class="get-code-box" @click="getCode()">
 						<view class="get-but fc-57CAFF fs-32 text-align-center b-rad-200">
-							获取验证码
+							{{codeText}}
 						</view>
 					</view>
 				</view>
-				<view class="but fs-32 fc-f fw-600 b-rad-200 text-align-center" :class="butType?'bgc-41ABF5':'bgc-BCEAFF'">
+				<view class="but fs-32 fc-f fw-600 b-rad-200 text-align-center bgc-41ABF5" @click="save()">
 					确认
 				</view>
 			</view>
@@ -33,6 +33,9 @@
 </template>
 
 <script>
+	import {userPhone} from '@/api/member.js';
+	import {getCode} from '@/api/common.js';
+	import tools from '@/service/tools';
 	export default {
 		components: {},
 		data() {
@@ -41,15 +44,60 @@
 					phone: '',
 					code: ''
 				},
-				butType: false
+				isAJAX:false,
+				isCode:false,
+				codeText:'获取验证码',
 			};
 		},
-		watch: {
-		},
-		onLoad(data) {},
-		mounted() {},
-		methods: {
-
+		methods:{
+			getCode(){
+				if(!this.formData.phone){
+					return tools.error('请输入手机号')
+				}
+				if (this.isCode) {
+					return
+				}
+				this.isCode = true;
+				getCode({phone:this.formData.phone,send_type:'update_phone'}).then((res)=>{
+					if(res.code === 1){
+						this.codeText = 60;
+						let timer = setInterval(() => {
+						  this.codeText -= 1;
+						  if (this.codeText <= 0) {
+						    clearInterval(timer);
+							this.isCode = false;
+							this.codeText = '获取验证码'
+						  }
+						}, 1000);
+					}else{
+						this.isCode = false;
+						tools.error('获取验证码失败,请稍后重试')
+					}
+				})
+				
+			},
+			
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				userPhone(this.formData).then((res)=>{
+					if(res.code === 1){
+						this.isAJAX = false;
+						tools.success('修改成功');
+						setTimeout(()=>{
+							uni.reLaunch({
+								url:'/pages-my/user-info'
+							})
+						},1500)
+						
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg);
+					}
+				})
+			},
 		},
 	}
 </script>

+ 48 - 11
pages-my/set-user-sex.vue

@@ -4,15 +4,15 @@
 		<scroll-view :scroll-y="true" class="scroll-view-css">
 			<view class="content-box">
 				<view class="list-box box-border-box mb-80 bgc-f">
-					<view class="item-box flex-justify-space" v-for="(item,index) in sexList" :key="index" @click="setSex(index)">
+					<view class="item-box flex-justify-space" v-for="(item,index) in sexList" :key="index" @click="setSex(item.id)">
 						<view class="fs-32 fc-3">
-							{{item}}
+							{{item.name}}
 						</view>
-						<uni-icons v-show="sexId == index" color="#57CAFF" type="checkbox-filled" size="25"></uni-icons>
+						<uni-icons v-show="fromData.sex == item.id" color="#57CAFF" type="checkbox-filled" size="25"></uni-icons>
 					</view>
 				</view>
-				<view class="but-box box-border-box">
-					<view class="but fs-32 fc-f fw-600 b-rad-200 bgc-41ABF5 text-align-center">
+				<view class="but-box box-border-box" @click="save()">
+					<view class="but fs-32 fc-f fw-600 b-rad-200 bgc-41ABF5 text-align-center" >
 						保存
 					</view>
 				</view>
@@ -22,18 +22,55 @@
 </template>
 
 <script>
+	import {userInfo,userUpdate} from '@/api/member.js';
+	import tools from '@/service/tools';
 	export default {
 		data() {
 			return {
-				sexList:['保密','男','女'],
-				sexId: 0
+				sexList:[
+						{name:'保密',id:0},
+						{name:'男',id:1},
+						{name:'女',id:2},
+				],
+				fromData:{
+					nickname:'',
+					head_img:'',
+					sex:'',
+				},
+				isAJAX:false,
 			};
 		},
-		
+		onShow() {
+			this.getUserInfo();
+		},
 		methods: {
-			setSex(index) {
-				this.sexId = index
-			}
+			getUserInfo(){
+				userInfo().then((res)=>{
+					if(res.code === 1){
+						this.fromData = res.data;
+					}
+				})
+			},
+			setSex(id) {
+				if(this.fromData.sex != id){
+					this.fromData.sex = id
+				}
+			},
+			save(){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				userUpdate(this.fromData).then((res)=>{
+					if(res.code === 1){
+						this.isAJAX = false;
+						tools.success(res.msg)
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg)
+					}
+				})
+			},
 		},
 	}
 </script>

+ 17 - 0
pages-school/add-circle.vue

@@ -27,6 +27,23 @@
 	import EnUpload from '@/components/en-from/en-upload/en-upload.vue';
 	export default {
 		components:{EnUpload},
+		data(){
+			return{
+				fromData:{
+					news_id:'',
+					content:'',
+					image:[],
+					school_id:'',
+					topic_id:'',
+				},
+			}
+		},
+		onLoad(e) {
+			
+		},
+		methods:{
+			
+		}
 	}
 </script>
 

+ 187 - 66
pages-school/school-circle.vue

@@ -1,10 +1,17 @@
 <template>
 	<view class="school-circle iPhone-bottom flex-common-css box-border-box ">
 		<image class="circle-add" src="@/static/img/school/add.png" mode="" @click="openPop()"></image>
-		
-		
+
 		<view class="bg-box"></view>
-		<Nav title='圈子' bgckgroundBox='transparent'></Nav>
+		
+		<Nav :leftShow='false' :customNav='true' bgckgroundBox='transparent'>
+			<template>
+				<view slot="custom" class="align-items-center">
+					<uni-icons type="left" size="20" @click="toBack()"></uni-icons>
+					<view class="w-390 text-overflow-ellipsis-one fs-36 fw-400">{{schoolData.school_name}}</view>
+				</view>
+			</template>
+		</Nav>
 		
 		<view class="ts-box mt-24 align-items-center box-border-box plr-12 mb-20">
 			<image src="@/static/img/school/ts.png" mode=""></image>
@@ -12,55 +19,58 @@
 		</view>
 		
 		<view class="nav-box display-flex box-border-box mb-20">
-			<view class="nav-item view-nowrap" :class="id == i?'h130':''" v-for="(item,i) in 10" :key="i">
-				<image class="nav-icon" src="@/static/img/school/icon.png" mode=""></image>
-				<view class="fs-24 plr-24 " :class="id==i?'fw-600 fc-41ABF5':''">全部帖子</view>
-				<image v-if="id == i" class="nav-bg" src="@/static/img/school/bg.png" mode=""></image>
+			<view class="nav-item view-nowrap" @click="selectTopicId(item.id)"
+			:class="fromData.topic_id == item.id?'h130':''" v-for="(item,i) in classList" :key="i">
+				<image v-if="item.id == 0" class="nav-icon" src="@/static/img/school/icon.png" mode=""></image>
+				<image v-else class="nav-icon" :src="item.image" mode=""></image>
+				<view class="fs-24 plr-24 " :class="fromData.topic_id==item.id?'fw-600 fc-41ABF5':''">{{item.name}}</view>
+				<image v-if="fromData.topic_id == item.id" class="nav-bg" src="@/static/img/school/bg.png" mode=""></image>
 			</view>
 		</view>
 		
 		<view class="flex-justify-space type-box mb-24">
 			<view class="display-flex">
-				<view class="box-1" :class="id == 0?'box-s':''">最新</view>
-				<view class="box-1">最热</view>
-				<view class="box-1">评论最多</view>
+				<view @click="selectOrderBuy(1)" class="box-1" :class="fromData.orderBy == 1?'box-s':''">最新</view>
+				<view @click="selectOrderBuy(2)" class="box-1" :class="fromData.orderBy == 2?'box-s':''">最热</view>
+				<view @click="selectOrderBuy(3)" class="box-1" :class="fromData.orderBy == 3?'box-s':''">评论最多</view>
 			</view>
-			<view class="box-2 fs-24 fc-41ABF5">逛其他学校</view>
+			<view class="box-2 fs-24 fc-41ABF5" @click="toSelectSchool()">逛其他学校</view>
+		</view>
+		
+		<view v-if="list.length === 0" class="scroll-view-css">
+			<EnBlank :customSrc='true'>
+				<template v-slot:blankImg>
+					<image class="black-custom-img" src="@/static/img/common/no-order.png" mode=""></image>
+				</template>
+			</EnBlank>
 		</view>
 		
-		<scroll-view scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
-			<view class="card-box box-border-box p-24 bgc-f flex-justify-space" v-for="(item,i) in 5" :key="i" @click.stop="toDet()">
-				<image class="card-head" src="@/static/img/my/lqzx-bg.png" mode="scaleToFill"></image>
+		<scroll-view v-else scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
+			<view class="card-box box-border-box p-24 bgc-f flex-justify-space" v-for="(item,i) in list" :key="i" @click.stop="toDet()">
+				<image class="card-head" :src="item.head_img" mode="scaleToFill"></image>
 				<view class="flex-1">
 					<view class="card-1 flex-justify-space mb-16">
 						<view class="">
-							<view class="w-400 fs-28 fw-600 mb-8">恒生科技和半导体恒生科技和半导体恒生科技和半导体恒生科技和半导体</view>
-							<view class="fs-24 fc-9">1小时前</view>
+							<view class="w-400 fs-28 fw-600 mb-8">{{item.nickname}}</view>
+							<view class="fs-24 fc-9">{{item.created_date}}</view>
 						</view>
 						<view class="">
 							<image class="dian-img" src="@/static/img/school/dian.png" mode=""></image>
 							<view class="align-items-center">
 								<image class="hot-img" src="@/static/img/school/hot.png" mode=""></image>
-								<view class="fs-26 fw-400 fc-9">125</view>
+								<view class="fs-26 fw-400 fc-9">{{item.heat}}</view>
 							</view>
 						</view>
 					</view>
 					<view class="card-2 fs-30 fw-400 mb-16">
-						欢迎打脸,科技类型很顽强,不是刚刚说11吧,换着领涨,这个季节玩什么光伏储白酒,普
+						{{item.content}}
 					</view>
 					<view class="card-3 flex-wrap-wrap mb-32">
-						<image class="card-3-img" src="@/static/img/my/lqzx-bg.png" v-for="(item,i) in 9" mode="scaleToFill"></image>
+						<image class="card-3-img" :src="item" v-for="(item,i) in item.image" mode="scaleToFill"></image>
 					</view>
 					<view class="card-4 flex-wrap-wrap mb-40">
-						<view class="">重庆工商职业学校</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
-						<view class="">买卖闲置</view>
+						<view class="">{{item.school_name}}</view>
+						<view class="">{{item.topic_name}}</view>
 					</view>
 					
 					<view class="card-5 flex-justify-space">
@@ -68,13 +78,13 @@
 							<image src="@/static/img/school/fx.png" mode=""></image>
 							<view class="fs-24 fc-9">分享</view>
 						</view>
-						<view class="align-items-center" @click.stop="handUp()">
-							<uni-icons type="hand-up" size="22" color="#999"></uni-icons>
-							<view class="fs-24 fc-9">12</view>
+						<view class="align-items-center" @click.stop="handUp(item)">
+							<uni-icons type="hand-up" size="22" :color="item.is_like==1?'#FD5C02':'#999'"></uni-icons>
+							<view class="fs-24 " :class="item.is_like==1?'fc-FD5C02':'fc-9'">{{item.like}}</view>
 						</view>
-						<view class="align-items-center" @click.stop="openMsg()">
+						<view class="align-items-center" @click.stop="openMsg(item)">
 							<image src="@/static/img/school/info.png" mode=""></image>
-							<view class="fs-24 fc-9">6</view>
+							<view class="fs-24 fc-9">{{item.remark}}</view>
 						</view>
 					</view>
 				</view>
@@ -87,10 +97,10 @@
 				<view class="head-pop flex-justify-space align-items-center mb-24">
 					<uni-icons @click.stop="closePop()" type="closeempty" size="24"></uni-icons>
 					<view class="fs-36 fc-0 fw-600">选发布类型</view>
-					<view class="fs-28 fw-600 fc-41ABF5" @click.stop="add">确定</view>
+					<view class="fs-28 fw-600 fc-41ABF5" @click.stop="add()">确定</view>
 				</view>
 				<view class="scroll-view-css">
-					<view class="item-box fs-32 " :class="id==i?'fc-41ABF5 bgc-D5EDFB':'bgc-F3F4F6'" v-for="(item,i) in 10" :key="i">分享交流</view>
+					<view class="item-box fs-32 " :class="id==i?'fc-41ABF5 bgc-D5EDFB':'bgc-F3F4F6'" v-for="(item,i) in classListPop" :key="i">{{item.name}}</view>
 				</view>
 			</view>
 		</uni-popup>
@@ -98,6 +108,7 @@
 		
 		<uni-popup ref="popmsg" type="bottom">
 			<view class="pop-box pop-msg box-border-box p-24">
+				<!-- 输入框 -->
 				<view class="pop-input" v-if="isShowIpnut">
 					<view class="head-pop flex-justify-space align-items-center mb-24 box-border-box p-24">
 						<uni-icons @click.stop="closeInput()" type="closeempty" size="24"></uni-icons>
@@ -109,9 +120,6 @@
 							<view class="fs-34 fw-600 mb-20">评论</view>
 							<textarea class=" fs-24" placeholder='友善评论,文明发言'></textarea>
 						</view>
-						<view class="">
-							<EnUpload></EnUpload>
-						</view>
 					</view>
 				</view>
 				
@@ -121,28 +129,25 @@
 					<uni-icons @click.stop="closeMsg()" type="closeempty" size="24"></uni-icons>
 				</view>
 				<view class="scroll-view-css box-border-box plr-24">
-					<view class="list-box flex-justify-space" v-for="(item,i) in 10" :key="i"> 
-						<image class="list-box-img" src="@/static/img/my/bg.png" mode="scaleToFill"></image>
+					<view class="list-box flex-justify-space" v-for="(item,i) in remarkData.list" :key="i"> 
+						<image class="list-box-img" :src="item.head_img" mode="scaleToFill"></image>
 						<view class="flex-1">
 							<view class=" flex-justify-space">
 								<view class="p-b-20 b-b-F9F9F9 mr-20">
 									<view class="fs-28 fw-400 fc-9 mb-8">
-										最佳损友最佳损友 <span class='only-box text-align-center fs-24 fc-41ABF5 ml-10'>作者</span>
+										{{item.nickname}} <span v-if="is_author == 1" class='only-box text-align-center fs-24 fc-41ABF5 ml-10'>作者</span>
 									</view>
 									<view class="fs-30 fw-400 mb-8" @click.stop="openInput()">
-										回关一下啊,这么近这么近这么近这么近这么近这么近
-									</view>
-									<view class="flex-wrap-wrap mb-8">
-										<image class="msg-img" v-for="(item,i) in 4" :key="i" src="@/static/img/my/bg.png" mode="scaleToFill"></image>
+										{{item.content}}
 									</view>
-									<view class="fs-24 fw-400 fc-9 mb-8">2021-04-17 15:53</view>	
+									<view class="fs-24 fw-400 fc-9 mb-8">{{item.created_date}}</view>	
 								</view>
 								<view class="display-flex">
-									<uni-icons type="hand-up" size="20" color="#999"></uni-icons>
-									<view class="fs-24 fw-400 fc-9 mt-5">11</view>
+									<uni-icons type="hand-up" size="20" :color="item.is_like==1?'#FD5C02':'#999'"></uni-icons>
+									<view class="fs-24 fw-400 mt-5" :class="item.is_like==1?'fc-FD5C02':'fc-9'">{{item.like}}</view>
 								</view>
 							</view>
-							<view class="list-box flex-justify-space" v-for="(info,index) in 5" :key="index">
+							<view class="list-box flex-justify-space" v-for="(info,index) in 1" :key="index">
 								<image class="list-box-img" src="@/static/img/my/bg.png" mode="scaleToFill"></image>
 								<view class="flex-1">
 									<view class=" flex-justify-space">
@@ -153,9 +158,6 @@
 											<view class="fs-30 fw-400 mb-8"  @click.stop="openInput()">
 												回关一下啊,这么近这么近这么近这么近这么近这么近
 											</view>
-											<view class="flex-wrap-wrap mb-8">
-												<image class="msg-img-1 msg-img" v-for="(item,i) in 4" :key="i" src="@/static/img/my/bg.png" mode="scaleToFill"></image>
-											</view>
 											<view class="fs-24 fw-400 fc-9 mb-8">2021-04-17 15:53</view>	
 										</view>
 										<view class="display-flex">
@@ -175,25 +177,145 @@
 </template>
 
 <script>
-	import EnUpload from '@/components/en-from/en-upload/en-upload.vue';
+	import EnBlank from "@/components/en-utils/en-blank/en-blank";
+	import {getAlumniList,setAlumniLike,getRemarkList} from '@/api/alumni.js';
+	import {getTopic} from '@/api/category.js';
+	import tools from '@/service/tools';
+	
 	export default {
-		components:{EnUpload},
+		components:{EnBlank},
 		data(){
 			return{
 				id:0,
 				isShowIpnut:false,
+				
+				classList:[],
+				classListPop:[],
+				
+				total:0,
+				list:[],
+				fromData:{
+					topic_id:0,
+					orderBy:1,//1最新 2最热 3最多评论
+					school_id:'',
+					page:1,
+				},
+				isAJAX:false,
+				
+				remarkData:{
+					total:0,
+					list:[],
+					page:1,
+				},
+				
+				schoolData:{
+					school_name:'',
+				},
 			}
 		},
-		onLoad() {
+		onShow(){
+			let circleSchoolId = uni.getStorageSync('circleSchoolId');
+			let schoolName = uni.getStorageSync('school_name');
+			let circleSchoolName = uni.getStorageSync('circleSchoolName');
+			this.schoolData.school_name = circleSchoolId?circleSchoolName:schoolName;
 			
+			this.classList = [];
+			this.getTopic();
+			
+			this.list = [];
+			this.fromData.page = 1;
+			this.getList();
 		},
 		methods:{
+			toBack(){
+				tools.leftClick()
+			},
+			toSelectSchool(){
+				uni.navigateTo({
+					url:'/pages-address/select-school?type=2'
+				})
+			},
+			getTopic(){
+				getTopic().then((res)=>{
+					if(res.code === 1){
+						this.classListPop = JSON.parse(JSON.stringify(res.data));
+						this.classList = res.data;
+						this.classList.unshift({name:'全部贴子',id:0});
+					}
+				})
+			},
+			
+			selectOrderBuy(type){
+				if(this.fromData.orderBy != type){
+					this.fromData.orderBy = type;
+					this.list = [];
+					this.fromData.page = 1;
+					this.getList();
+				}
+			},
+			selectTopicId(id){
+				if(this.fromData.topic_id != id){
+					this.fromData.topic_id = id;
+					this.list = [];
+					this.fromData.page = 1;
+					this.getList();
+				}
+			},
+			
+			getList(){
+				this.fromData.school_id = uni.getStorageSync('school_id');
+				getAlumniList(this.fromData).then((res)=>{
+					if(res.code === 1){
+						this.list = [...this.list,...res.data.items];
+						this.total = res.data.total;
+					}
+				})
+			},
+			
 			scrolltolower(){
-				console.log('触底');
+				if(this.list.length < this.total){
+					this.fromData.page += 1;
+					this.getList();
+				}
 			},
-			handUp(){
-				
+			
+			
+			handUp(item){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				let is_like = item.is_like == 1?0:1;
+				setAlumniLike({news_id:item.news_id,is_like:is_like}).then((res)=>{
+					if(res.code === 1){
+						item.is_like = is_like;
+						this.isAJAX = false;
+						tools.success(res.msg);
+					}else{
+						this.isAJAX = false;
+						tools.error(res.msg);
+					}
+				})
+			},
+			openMsg(item){
+				if(this.isAJAX){
+					return
+				}
+				this.isAJAX = true;
+				getRemarkList({news_id:item.news_id,remark_id:0,page:this.remarkData.page}).then((res)=>{
+					if(res.code === 1){
+						this.remarkData.list = [...this.remarkData.list,...res.data.items];
+						this.remarkData.total = res.data.total;
+						this.remarkData.list.forEach((v)=>{
+							v.isOpne = false;
+						})
+						this.$refs.popmsg.open();
+					}
+				})
 			},
+			
+			
+			
 			toDet(){
 				uni.navigateTo({
 					url:"/pages-school/circle-info"
@@ -205,17 +327,13 @@
 			closePop(){
 				this.$refs.popup.close();
 			},
-			add(){
+			add(item){
 				uni.navigateTo({
-					url:"/pages-school/add-circle"
+					url:"/pages-school/add-circle?topic_id=" + this.fromData.topic_id + '&news_id=' + item.news_id
 				})
 			},
-			save(){
-				this.isShowIpnut = false;
-			},
-			openMsg(){
-				this.$refs.popmsg.open();
-			},
+			
+			
 			closeMsg(){
 				this.$refs.popmsg.close();
 			},
@@ -225,6 +343,9 @@
 			closeInput(){
 				this.isShowIpnut = false;
 			},
+			save(){
+				this.isShowIpnut = false;
+			},
 		},
 	}
 </script>

+ 2 - 1
pages-takeout/confirm-mod/time.vue

@@ -107,12 +107,13 @@
 			overflow-y: scroll;
 		}
 		.item-box{
-			width: 1005;
+			width: 100%;
 			height: 104rpx;
 			line-height: 104rpx;
 			font-size: 28rpx;
 			font-weight: 400;
 			text-align: center;
+			
 		}
 	}
 </style>

+ 2 - 2
pages/index/index.vue

@@ -5,7 +5,7 @@
 		<view class="">
 			<Nav :leftShow='false' :customNav='true' :bgckgroundBox='bgckgroundBox'>
 				<template>
-					<view slot="custom" class="align-items-center" @click="toScroll()">
+					<view slot="custom" class="align-items-center" @click="toSelectSchool()">
 						<uni-icons type="location-filled" size="20"></uni-icons>
 						<view class="fs-32 w-220 fw-600 ml-10 text-overflow-ellipsis-one">{{schoolData.school_name||''}}</view>
 						<image class="nav-icon ml-10" src="@/static/img/index/index-right.png" mode="aspectFit"></image>
@@ -329,7 +329,7 @@
 					tools.error('暂未开放')
 				}
 			},
-			toScroll(){
+			toSelectSchool(){
 				uni.navigateTo({
 					url:'/pages-address/select-school'
 				})

+ 25 - 4
pages/me/index.vue

@@ -82,7 +82,9 @@
 						</view>
 					</view>
 					
-					<view class="item-box align-items-center flex-justify-space mb-64" @click="goToUrl(7)">
+					<view class="item-box align-items-center flex-justify-space mb-64">
+						<button class="item-box-button" open-type="contact" :bindcontact="handleContact"></button>
+						
 						<view class="item-left align-items-center">
 							<image class="item-img" src="@/static/img/my/lxkf.png" mode=""></image>
 							<view class="fs-32 fc-3">
@@ -170,6 +172,10 @@
 		},
 		
 		methods: {
+			handleContact(e){
+				console.log(e);
+			},
+			
 			getUserInfo(){
 				userInfo().then((res)=>{
 					if(res.code === 1){
@@ -217,9 +223,7 @@
 					uni.navigateTo({
 						url: '/pages-my/info-centre'
 					})
-				} else if (type == 7) {
-					// 联系客服
-				} else if (type == 8) {
+				}else if (type == 8) {
 					// 商务合作
 					uni.navigateTo({
 						url: '/pages-my/cooperate'
@@ -251,6 +255,23 @@
 </script>
 
 <style lang="scss" scoped>
+	.item-box{
+		position: relative;
+		.item-box-button{
+			position: absolute;
+			width: 100%;
+			height: 54rpx;
+			top: 0;
+			left: 0;
+			z-index: 100;
+			background-color: transparent;
+			border: none !important;
+		}
+		button::after{
+			border: none !important;
+		}
+	}
+	
 	.my-box {}
 
 	.bg-box {

+ 1 - 1
service/upLoadingFile.js

@@ -33,7 +33,7 @@ export const upLoadingFileOss = async function (file) {
 			AccessKeySecret: ossData.AccessKeySecret,
 			SecurityToken: ossData.SecurityToken,
 			AccessKeyId: ossData.AccessKeyId,
-			bucket: "jhnewshop",
+			bucket: "sjz-school",
 			area: "oss-cn-chengdu",
 		}, function (res) {
 			resolve(res);