xhj 2 gadi atpakaļ
vecāks
revīzija
773a228ded

+ 1 - 4
card/cardList/cardList.vue

@@ -267,9 +267,6 @@
 				let queryParams = {
 					page: this.page,
 					limit: this.limit,
-					orderType:96,
-					isAllUser:1,
-					isOffline:1
 				}
 				if (this.searchVal) {
 					queryParams.search = this.searchVal
@@ -288,7 +285,7 @@
 				if (this.stateIndex != -1) {
 					queryParams.state = this.stateList[this.stateIndex].value;
 				}
-				req.getRequest('/api/order/vipList', queryParams, data => {
+				req.getRequest('/api/visiting/card/info', queryParams, data => {
 					data = [1,2]
 					if (data != null && data.length == this.limit) {
 						this.isLoad = true;

+ 40 - 1
card/create/create.css

@@ -20,4 +20,43 @@ page{background: #f9f9f9;padding-bottom: 130rpx;}
 .picker .rico{position: absolute;right: 0;top: 50%;transform: translateY(-50%);}
 .placeholder{color: #ccc;}
 .bot{position: fixed;left: 0;right: 0;bottom: 0;background: #fff;padding: 25rpx 32rpx;z-index: 50;}
-.btn{height: 80rpx;background: #DB2A2A;border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;line-height: 80rpx;}
+.btn{height: 80rpx;background: var(--main);border-radius: 40rpx;font-size: 30rpx;color: #fff;text-align: center;line-height: 80rpx;}
+
+
+.upload-box{
+	width: 200rpx;
+	height: 200rpx;
+	background: #F8F8F8;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+	justify-content: center;
+	flex-direction: column;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	text-align: center;
+	color: #A1A1A1;
+}
+.upload-box image{
+	width: 51rpx;
+	height: 44rpx;
+	margin-bottom: 19rpx;
+}
+.upload-box-image{
+	position: relative;
+}
+.upload-box-image .upload-image{
+	width: 200rpx;
+	height: 200rpx;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+}
+.upload-close{
+	position: absolute;
+	width: 28rpx;
+	height: 28rpx;
+	top: -14rpx;
+	right: -14rpx;
+}
+.upload-group .upload-box , .upload-group .upload-box-image {
+	margin-right: 13rpx;
+	margin-bottom: 13rpx;
+}

+ 171 - 15
card/create/create.vue

@@ -14,11 +14,21 @@
 			</view>
 			
 			<view class="li ddflex">
+				<view class="label">工号</view>
+				<input v-model="jobNumber" placeholder="请输入工号" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			
+			<view class="li ddflex">
 				<view class="label">个人简介</view>
 				<input v-if="!brief" @tap="jumpUrl('/card/editDesc/editDesc')" :disabled="true"  maxlength="11" type="number" placeholder="请作简单自我介绍" placeholder-class="placeholder" class="ipt flex" />
 				<view class="fflex" v-else style="color: #47C776;" @tap="jumpUrl('/card/editDesc/editDesc')">已完善</view>
 				<image src="../../static/images/rico.png" class="rico"></image>
 			</view>
+			
+			<view class="li ddflex">
+				<view class="label">执业证书</view>
+				<input v-model="realName" placeholder="请输入执业证书编号" placeholder-class="placeholder" class="ipt flex" />
+			</view>
 		</view>
 		
 		<view class="form">
@@ -29,12 +39,52 @@
 				<view class="tong ddflex" @click="intWechatNumber"><image src="../static/images/wxth.png"></image>微信同号</view>
 			</view>
 			<view class="li ddflex">
+				<view class="label">微信号</view>
+				<input v-model="wechat" placeholder="请填写微信号" placeholder-class="placeholder" class="ipt flex" />
+			</view>
+			<!-- <view class="li ddflex">
 				<view class="label">邮箱</view>
 				<input v-model="email" placeholder="请填写邮箱地址" placeholder-class="placeholder" class="ipt flex" />
+			</view> -->
+			<view class="li dflex">
+				<view class="label">微信二维码</view>
+				<view v-if="!wechatCode" class="upload-box ddflex" @tap="uploadWechat()">
+					<image src="../static/images/pic.png"></image>
+					<view>点击上传</view>
+				</view>
+				<view v-else class="upload-box-image ddflex" @tap="uploadWechat()">
+					<image class="upload-image" :src="wechatCode"></image>
+					<image class="upload-close" src="../../static/pages/images/close3.png" @click.stop="wechatCode=''"></image>
+				</view>
 			</view>
-			<view class="li ddflex">
-				<view class="label">微信号</view>
-				<input v-model="wechat" placeholder="请填写微信号" placeholder-class="placeholder" class="ipt flex" />
+		</view>
+		
+		<view class="form">
+			<view class="li dflex">
+				<view class="label">所获荣誉</view>
+				<view class="ddflex upload-group flex">
+					<view class="upload-box-image ddflex" v-for="item,index in honorImgUrls" @click="uploadHonor('change',index)">
+						<image class="upload-image" :src="item"></image>
+						<image class="upload-close" src="../../static/pages/images/close3.png" @click.stop="deleteHonor(index)"></image>
+					</view>
+					<view class="upload-box ddflex" @tap="uploadHonor()" v-if="honorImgUrls.length<9">
+						<image src="../static/images/pic.png"></image>
+						<view>点击上传</view>
+					</view>
+				</view>
+			</view>
+			<view class="li dflex">
+				<view class="label">个人风采</view>
+				<view class="ddflex upload-group flex">
+					<view class="upload-box-image ddflex" v-for="item,index in styleImgUrls" @click="uploadStyle('change',index)">
+						<image class="upload-image" :src="item"></image>
+						<image class="upload-close" src="../../static/pages/images/close3.png" @click.stop="deleteStyle(index)"></image>
+					</view>
+					<view class="upload-box ddflex" @tap="uploadStyle()" v-if="styleImgUrls.length<9">
+						<image src="../static/images/pic.png"></image>
+						<view>点击上传</view>
+					</view>
+				</view>
 			</view>
 		</view>
 
@@ -48,12 +98,11 @@
 				<view class="label">职位</view>
 				<input v-model="job" placeholder="请填写职位" placeholder-class="placeholder" class="ipt flex" />
 			</view>
-			<view class="li ddflex" @click="jumpUrl('/card/industry/industry?isPoistion=true')">
+			<!-- <view class="li ddflex" @click="jumpUrl('/card/industry/industry?isPoistion=true')">
 				<view class="label">行业</view>
-				<!-- <input v-model="position" placeholder="请填写职位" placeholder-class="placeholder" class="ipt flex" /> -->
 				<view :class="'flex' + (industryName ? '' :' placeholder')">{{industryName ? industryName : '请填写行业'}}</view>
 				<image src="../../static/images/rico.png" class="rico"></image>
-			</view>
+			</view> -->
 			<view class="li ddflex">
 				<view class="label">所在地区</view>
 				<view :class="['item flex', city ? 'active' : '']">
@@ -98,7 +147,9 @@ export default {
 			avatar: '',
 			realName: '',
 			phone: '',
+			jobNumber:'',
 			wechat: '',
+			wechatCode:'',
 			email: '',
 			companyName: '',
 			job:'',//职业
@@ -111,6 +162,10 @@ export default {
 			brief:'',//简介
 			address:'',//详细地址
 			
+			honorImgUrls:[],//荣誉
+			
+			styleImgUrls:[],//风采
+			
 			city: '',
 			areaCode: '',
 			morCity: [],
@@ -138,19 +193,21 @@ export default {
 		},
 		// 用户名片信息
 		getUserCard(){
-			req.getRequest('/api/v3/visiting/card/userInfo', {}, res => {
+			req.getRequest('/api/visiting/card/userInfo', {}, res => {
 				console.log('getUserCard',res)
 				this.userCard = res
 				if(!res){
-					this.getCompanyData()
+					// this.getCompanyData()
 					this.getUserInfo()
 				}else{
 					this.id = res.id
 					this.avatar = res.avatar;
 					this.realName = res.realName;
+					this.jobNumber = res.jobNumber;
 					this.brief = res.brief;
 					this.phone = res.phone;
 					this.wechat = res.wechat;
+					this.wechatCode = res.wechatCode;
 					this.email = res.email;
 					this.companyName = res.companyName;
 					this.industryName = res.industryName;
@@ -192,7 +249,7 @@ export default {
 					var promise = Promise.all(
 						tempFilePaths.map(tempFilePath => {
 							return new Promise(function(resolve, reject) {
-								req.uploadFile('/api/upload', tempFilePath, res => {
+								req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
 									that.avatar = res.src;
 								});
 							});
@@ -208,6 +265,104 @@ export default {
 				}
 			});
 		},
+		uploadWechat() {
+			let that = this;
+			uni.chooseImage({
+				count: 1,
+				sizeType: ['original', 'compressed'],
+				sourceType: ['album', 'camera'],
+				success: function({ tempFilePaths }) {
+					var promise = Promise.all(
+						tempFilePaths.map(tempFilePath => {
+							return new Promise(function(resolve, reject) {
+								req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
+									that.wechatCode = res.src;
+								});
+							});
+						})
+					);
+					promise
+						.then(function(results) {
+							console.log(results);
+						})
+						.catch(function(err) {
+							console.log(err);
+						});
+				}
+			});
+		},
+		
+		uploadHonor(type,index){
+			let that = this;
+			uni.chooseImage({
+				count: type=='change'?1:(9-that.honorImgUrls.length),
+				sizeType: ['original', 'compressed'],
+				sourceType: ['album', 'camera'],
+				success: function({ tempFilePaths }) {
+					var promise = Promise.all(
+						tempFilePaths.map(tempFilePath => {
+							return new Promise(function(resolve, reject) {
+								req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
+									if(type=='change'){
+										that.honorImgUrls[index] = res.src
+										that.honorImgUrls = JSON.parse(JSON.stringify(that.honorImgUrls))
+									}else{
+										that.honorImgUrls = that.honorImgUrls.concat(res.src)
+									}
+								});
+							});
+						})
+					);
+					promise
+						.then(function(results) {
+							console.log(results);
+						})
+						.catch(function(err) {
+							console.log(err);
+						});
+				}
+			});
+		},
+		deleteHonor(index){
+			this.honorImgUrls.splice(index,1)
+		},
+		
+		// 个人风采
+		uploadStyle(type,index){
+			let that = this;
+			uni.chooseImage({
+				count: type=='change'?1:(9-that.styleImgUrls.length),
+				sizeType: ['original', 'compressed'],
+				sourceType: ['album', 'camera'],
+				success: function({ tempFilePaths }) {
+					var promise = Promise.all(
+						tempFilePaths.map(tempFilePath => {
+							return new Promise(function(resolve, reject) {
+								req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
+									if(type=='change'){
+										that.styleImgUrls[index] = res.src
+										that.styleImgUrls = JSON.parse(JSON.stringify(that.styleImgUrls))
+									}else{
+										that.styleImgUrls = that.styleImgUrls.concat(res.src)
+									}
+								});
+							});
+						})
+					);
+					promise
+						.then(function(results) {
+							console.log(results);
+						})
+						.catch(function(err) {
+							console.log(err);
+						});
+				}
+			});
+		},
+		deleteStyle(index){
+			this.styleImgUrls.splice(index,1)
+		},
+		
 		intMessage(e){
 			this.nums = e.detail.value.length
 		},
@@ -234,13 +389,13 @@ export default {
 			let that = this;
 			if (!this.avatar) return req.msg('请上传头像');
 			if (!this.realName) return req.msg('请填写你的真实姓名');
+			if (!this.jobNumber) return req.msg('请填写你的工号');
 			if (!this.brief) return req.msg('请填写个人简介');
 			if (!this.phone) return req.msg('请填写手机号');
 			if (!this.wechat) return req.msg('请填写微信号');
-			if (!this.email) return req.msg('请填写邮箱地址');
+			if (!this.wechatCode) return req.msg('请上传微信二维码');
 			if (!this.companyName) return req.msg('请填写公司名称');
 			if (!this.job) return req.msg('请填写职位')
-			if (!this.industryName) return req.msg('请填写行业');
 			if (!this.areaCode) return req.msg('请选择所在地区');
 			if (!this.address) return req.msg('请填写详细地址');
 			var dataP = {};
@@ -249,24 +404,25 @@ export default {
 			dataP.brief = this.brief;
 			dataP.phone = this.phone;
 			dataP.wechat = this.wechat;
-			dataP.email = this.email;
+			dataP.wechatCode = this.wechatCode;
 			dataP.companyName = this.companyName;
 			dataP.job = this.job;
-			dataP.industryName = this.industryName;
-			dataP.tradeId = this.tradeId;
 			dataP.areaCode = {
 				id:this.areaCode,
 				name :this.city
 			};
 			dataP.areaCode = JSON.stringify(dataP.areaCode)
 			dataP.address = this.address;
+			dataP.jobNumber = this.jobNumber;
+			dataP.honorImg = this.honorImgUrls.join(',');
+			dataP.styleImg = this.styleImgUrls.join(',');
 			var url = '';
 			if (this.id) {
 				dataP.id = this.id;
 			} 
 
 			req.postRequest(
-				'/api/v3/visiting/card/saveOrUpdate',
+				'/api/visiting/card/saveOrUpdate',
 				dataP,
 				json => {
 					if (that.id) {

+ 1 - 1
card/editDesc/editDesc.css

@@ -4,4 +4,4 @@
 .textarea {height: 500rpx;padding: 30rpx 0;width: 100%;font-size: 32rpx;color: #666;}
 .brief {font-size: 28rpx;color: #999;margin: 25rpx 0 0;}
 .brief text {color: #FF4211;}
-.btn {width: 638rpx;height: 94rpx;background: #DB2A2A;border-radius: 47rpx;font-size: 36rpx;color: #fff;text-align: center;line-height: 94rpx;margin: 0 auto; margin-top: 30rpx; }
+.btn {width: 638rpx;height: 94rpx;background: var(--main);border-radius: 47rpx;font-size: 36rpx;color: #fff;text-align: center;line-height: 94rpx;margin: 0 auto; margin-top: 30rpx; }

+ 14 - 0
card/index/index.css

@@ -574,4 +574,18 @@ page {
 	width: 28rpx;
 	height: 28rpx;
 	margin-right: 10rpx;
+}
+
+.ry-image{
+	width: 220rpx;
+	height: 293rpx;
+	margin-right: 20rpx;
+	display: inline-block;
+}
+.ry-image:last-child{
+	margin-right: 0;
+}
+.ry-image image{
+	width: 100%;
+	height: 100%;
 }

+ 56 - 12
card/index/index.vue

@@ -166,16 +166,6 @@
 				</view>
 			</view>
 		</view>
-		<view class="box brief">
-			<view class="tit ddflex">
-				<view class="flex ddflex">
-					<image src="../static/images/jj_ico.png"></image>
-					<view>个人简介</view>
-				</view>
-				<!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
-			</view>
-			<view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : '一句话介绍自己'"></rich-text></view>
-		</view>
 		<view class="box" v-if="!cardId">
 			<view class="tit ddflex">
 				<image src="../static/images/sj_ico.png"></image>
@@ -198,7 +188,57 @@
 				</view>
 			</view>
 		</view>
-		<view class="box videos">
+		<view class="box brief">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/jj_ico.png"></image>
+					<view>所获荣誉</view>
+				</view>
+			</view>
+			<view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
+				<scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
+					<view class=" ry-image" v-for="item in 9">
+						<image src="/static/images/lj_img.png"></image>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+		<view class="box brief">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/jj_ico.png"></image>
+					<view>个人风采</view>
+				</view>
+			</view>
+			<view class="contacts" style="height: 300rpx;margin-top: 20rpx;">
+				<scroll-view scroll-x="true" class="contact" style="height: 300rpx;">
+					<view class=" ry-image" v-for="item in 9">
+						<image src="/static/images/lj_img.png"></image>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+		<view class="box brief">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/jj_ico.png"></image>
+					<view>个人简介</view>
+				</view>
+				<!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
+			</view>
+			<view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : '一句话介绍自己'"></rich-text></view>
+		</view>
+		<view class="box brief">
+			<view class="tit ddflex">
+				<view class="flex ddflex">
+					<image src="../static/images/jj_ico.png"></image>
+					<view>公司简介</view>
+				</view>
+				<!-- <image v-if="!cardId" src="../static/images/bj_ico.png" class="edit" @tap="jumpUrl('/card/editDesc/editDesc?id=' + cardInfo.id)"></image> -->
+			</view>
+			<view class="bri"><rich-text :nodes="cardInfo.brief ? cardInfo.brief : '一句话介绍自己'"></rich-text></view>
+		</view>
+		<!-- <view class="box videos">
 			<view class="tit ddflex">
 				<view class="flex ddflex">
 					<image src="../static/images/sp_ico.png"></image>
@@ -215,7 +255,9 @@
 				</view>
 			</view>
 		</view>
-		<view class="also" v-if="cardId" @click="jumpUrl('/card/create/create')">我也要创建电子名片</view>
+		<view class="also" v-if="cardId" @click="jumpUrl('/card/create/create')">我也要创建电子名片</view> -->
+		
+		<serviceContact></serviceContact>
 	</view>
 </template>
 <script>
@@ -223,6 +265,7 @@
 	const req = require('../../utils/request.js');
 	const api = require('../../utils/api.js');
 	import VODUpload from '@/utils/aliyun-upload-sdk-1.0.1.min.js'
+	import serviceContact from '@/components/service-contact/index.vue'
 	export default {
 		data() {
 			return {
@@ -243,6 +286,7 @@
 				fileName: '', //视频名称
 			};
 		},
+		components:{ serviceContact },
 		onLoad(options) {
 			this.options = options
 			this.cardId = options.cardId;

BIN
card/static/images/pic.png