Explorar o código

名片状态页面和修改预览

xhj %!s(int64=2) %!d(string=hai) anos
pai
achega
24ef5965ff
Modificáronse 89 ficheiros con 3886 adicións e 107 borrados
  1. 157 28
      card/create/create.vue
  2. 14 4
      card/editDesc/editDesc.vue
  3. 818 0
      card/index/index.css
  4. 817 0
      card/index/index.vue
  5. BIN=BIN
      card/static/images/add.png
  6. BIN=BIN
      card/static/images/addFile.png
  7. BIN=BIN
      card/static/images/add_ico1.png
  8. BIN=BIN
      card/static/images/area.png
  9. BIN=BIN
      card/static/images/bg.png
  10. BIN=BIN
      card/static/images/bj_ico.png
  11. BIN=BIN
      card/static/images/car_p_bg.png
  12. BIN=BIN
      card/static/images/card_ico1.png
  13. BIN=BIN
      card/static/images/card_ico2.png
  14. BIN=BIN
      card/static/images/card_ico3.png
  15. BIN=BIN
      card/static/images/card_ico4.png
  16. BIN=BIN
      card/static/images/card_logo_bg.png
  17. BIN=BIN
      card/static/images/change.png
  18. BIN=BIN
      card/static/images/code.png
  19. BIN=BIN
      card/static/images/down.png
  20. BIN=BIN
      card/static/images/dz.png
  21. BIN=BIN
      card/static/images/dz1.png
  22. BIN=BIN
      card/static/images/dz1_h.png
  23. BIN=BIN
      card/static/images/edit.png
  24. BIN=BIN
      card/static/images/edit1.png
  25. BIN=BIN
      card/static/images/empty.png
  26. BIN=BIN
      card/static/images/fx.png
  27. BIN=BIN
      card/static/images/fx_ico.png
  28. BIN=BIN
      card/static/images/grfc.png
  29. BIN=BIN
      card/static/images/grjj.png
  30. BIN=BIN
      card/static/images/gs.png
  31. BIN=BIN
      card/static/images/gsjj.png
  32. BIN=BIN
      card/static/images/hb_ico1.png
  33. BIN=BIN
      card/static/images/hb_ico2.png
  34. BIN=BIN
      card/static/images/hot.png
  35. BIN=BIN
      card/static/images/jj_ico.png
  36. BIN=BIN
      card/static/images/message.png
  37. BIN=BIN
      card/static/images/pf_star.png
  38. BIN=BIN
      card/static/images/pf_star_h.png
  39. BIN=BIN
      card/static/images/phone.png
  40. BIN=BIN
      card/static/images/phone1.png
  41. BIN=BIN
      card/static/images/posterBg.png
  42. BIN=BIN
      card/static/images/remove.png
  43. BIN=BIN
      card/static/images/rm.png
  44. BIN=BIN
      card/static/images/rqico.png
  45. BIN=BIN
      card/static/images/save.png
  46. BIN=BIN
      card/static/images/sc_ico.png
  47. BIN=BIN
      card/static/images/sh.png
  48. BIN=BIN
      card/static/images/share.png
  49. BIN=BIN
      card/static/images/shcg.png
  50. BIN=BIN
      card/static/images/shry.png
  51. BIN=BIN
      card/static/images/shsb.png
  52. BIN=BIN
      card/static/images/sj_ico.png
  53. BIN=BIN
      card/static/images/sp_ico.png
  54. BIN=BIN
      card/static/images/tp_ico.png
  55. BIN=BIN
      card/static/images/upload.png
  56. BIN=BIN
      card/static/images/wdmp.png
  57. BIN=BIN
      card/static/images/wechat.png
  58. BIN=BIN
      card/static/images/wx.png
  59. BIN=BIN
      card/static/images/wxChat.png
  60. BIN=BIN
      card/static/images/yin_l.png
  61. BIN=BIN
      card/static/images/yin_r.png
  62. BIN=BIN
      card/static/images/zan_ico.png
  63. 13 0
      card/success/success.css
  64. 57 0
      card/success/success.vue
  65. 3 2
      main.js
  66. 10 0
      manifest.json
  67. 12 0
      node_modules/.package-lock.json
  68. 21 0
      node_modules/vue-jsonp/LICENSE
  69. 153 0
      node_modules/vue-jsonp/README.md
  70. 73 0
      node_modules/vue-jsonp/dist/index.d.ts
  71. 8 0
      node_modules/vue-jsonp/dist/index.esm.js
  72. 8 0
      node_modules/vue-jsonp/dist/index.js
  73. 20 0
      node_modules/vue-jsonp/dist/utils/index.d.ts
  74. 50 0
      node_modules/vue-jsonp/package.json
  75. 24 0
      package-lock.json
  76. 5 0
      package.json
  77. 10 0
      pages.json
  78. BIN=BIN
      static/images/comment.png
  79. BIN=BIN
      static/images/link.png
  80. BIN=BIN
      static/images/play.png
  81. BIN=BIN
      static/images/share.png
  82. BIN=BIN
      static/images/topic.png
  83. BIN=BIN
      static/images/vip_tag.png
  84. BIN=BIN
      static/pages/images/fw_hui.png
  85. BIN=BIN
      static/pages/images/wx.png
  86. 1238 0
      utils/qqmap-wx-jssdk.js
  87. 91 0
      utils/qqmap.js
  88. 9 5
      utils/request.js
  89. 275 68
      utils/util.js

+ 157 - 28
card/create/create.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view v-if="!loading">
 		<view class="form">
 			<view class="li ddflex">
 				<view class="label">头像</view>
@@ -95,6 +95,12 @@
 				<input v-model="companyName" :disabled="true" placeholder="请填写公司名称" placeholder-class="placeholder" class="ipt flex" />
 			</view>
 			<view class="li ddflex">
+				<view class="label">公司简介</view>
+				<input v-if="!companyIntroduction" @tap="jumpUrl('/card/editDesc/editDesc?isCompanyIntroduction=true')" :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?isCompanyIntroduction=true')">已完善</view>
+				<image src="../../static/images/rico.png" class="rico"></image>
+			</view>
+			<view class="li ddflex">
 				<view class="label">入司时间</view>
 				<picker mode="date" v-model="inDate" :disabled="true" @change="inDateChange">
 					{{inDate?inDate:'请填写公司名称'}}
@@ -112,10 +118,10 @@
 			</view> -->
 			<view class="li ddflex">
 				<view class="label">所在地区</view>
-				<view :class="['item flex', city ? 'active' : '']">
-					<pickerAddress class="picker flex" @change="bindAddressChange">
+				<view :class="['item flex', city ? 'active' : '']" @click="chooseLocation()">
+					<!-- <pickerAddress class="picker flex" @change="bindAddressChange" :disabled="true" @click="chooseLocation()"> -->
 						<view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
-					</pickerAddress>
+					<!-- </pickerAddress> -->
 				</view>
 				<image src="../../static/images/rico.png" class="rico"></image>
 				<!-- <picker class="picker flex">
@@ -137,6 +143,7 @@
 <script>
 const req = require('../../utils/request.js');
 const util = require('../../utils/util.js');
+var QQMapWX = require('../../utils/qqmap.js');
 var app = getApp();
 import pickerAddress from '../../components/wangding-pickerAddress/wangding-pickerAddress.vue';
 export default {
@@ -161,6 +168,7 @@ export default {
 			brief:'',//简介
 			address:'',//详细地址
 			inDate:'',//入司时间
+			companyIntroduction:'',//公司简介
 			
 			honorImgUrls:[],//荣誉
 			
@@ -169,17 +177,22 @@ export default {
 			city: '',
 			areaCode: '',
 			morCity: [],
+			location:{},
+			longitude:'',
+			latitude:'',
 			
 			userCard:null,//用户IP名片
 			employmentInfo:'',
 			saleNo:null,
-			certificateNo:null
+			certificateNo:null,
+			loading:true
 		};
 	},
 	async onLoad(opt) {
-		this.isEdit = opt.isEdit;
+		this.isEdit = opt.isEdit?true:false;
 		this.id = opt.id;
 		this.saleNo = opt.saleNo
+		
 		await req.silenceLogin(opt.saleNo)
 		console.log('getUserCard')
 		this.getUserCard()
@@ -198,7 +211,7 @@ export default {
 		},
 		getEmploymentInfo(){
 			return new Promise((resolve,reject)=>{
-				req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:this.saleNo},res=>{
+				req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:req.getStorage('userInfo').saleNo},res=>{
 					if(res.name){
 						this.employmentInfo = res;
 						this.realName = this.employmentInfo.name;
@@ -219,8 +232,29 @@ export default {
 				console.log('getUserCard',res)
 				this.userCard = res
 				if(!res){
+					this.isEdit = true
 					this.getUserInfo()
 				}else{
+					if(!this.isEdit){
+						if(res.auditState==0){
+							// 待审核
+							uni.redirectTo({
+								url:'/card/success/success?state=0'
+							})
+							return false
+						}else if(res.auditState==1){
+							// 审核成功
+							uni.redirectTo({
+								url:'/card/success/success?state=1'
+							})
+							return false
+						}else if(res.auditState==2){
+							// 审核失败
+							uni.redirectTo({
+								url:'/card/success/success?state=2&&msg='+res.auditFailReason
+							})
+						}
+					}
 					this.id = res.id
 					this.avatar = res.avatar;
 					this.realName = res.realName;
@@ -231,6 +265,7 @@ export default {
 					this.wechatCode = res.wechatCode;
 					this.email = res.email;
 					this.companyName = res.companyName;
+					this.companyIntroduction = res.companyIntroduction
 					this.industryName = res.industryName;
 					this.tradeId = res.tradeId;
 					this.address = res.address;
@@ -238,7 +273,10 @@ export default {
 					this.morCity = [res.areaCode.substring(0,2)+'0000',res.areaCode.substring(0,4)+'00',res.areaCode]
 					this.city = res.areaCodeName
 					this.areaCode = this.morCity[2];
+					this.latitude = res.latitude
+					this.longitude = res.longitude
 				}
+				this.loading = false
 				this.getEmploymentInfo()
 			});
 		},
@@ -389,6 +427,51 @@ export default {
 			this.city = data.data[0] + data.data[1] + data.data[2];
 			this.areaCode = data.ids[2];
 		},
+		chooseLocation() {
+			var tha = this;
+			uni.chooseLocation({
+				success: function(res) {
+					if (res.name) {
+						tha.address = res.name;
+						tha.reverseGeocoder(res);
+						console.log('地址数据》》》:', res);
+					}
+				}
+			});
+		},
+		reverseGeocoder(location) {
+			// #ifdef H5
+				location = location.latitude + ',' + location.longitude
+				let url = 'https://apis.map.qq.com/ws/geocoder/v1/?address=';
+				this.$jsonp(url, {
+					key: req.public.mapLBSKEY,
+					location: location,
+					output: 'jsonp'
+				}).then(data => {
+					console.log('解析后的地址地址数据:', data);
+					data = data.result
+					this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
+					this.areaCode = data.ad_info.adcode;
+					this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
+					this.longitude = data.ad_info.location.lng
+					this.latitude = data.ad_info.location.lat
+				}).catch(err => {
+					console.log(err);
+				});
+			// #endif
+			// #ifndef H5
+				QQMapWX.initMap();
+				QQMapWX.reverseGeocoder(location, data => {
+					console.log('解析后的地址地址数据:', data);
+					
+					this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
+					this.areaCode = data.ad_info.adcode;
+					this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
+					this.longitude = data.ad_info.location.lng
+					this.latitude = data.ad_info.location.lat
+				});
+			//#endif
+		},
 		inDateChange(e){
 			console.log(e.detail.value)
 			this.inDate = e.detail.value
@@ -406,6 +489,7 @@ export default {
 			if (!this.wechat) return req.msg('请填写微信号');
 			if (!this.wechatCode) return req.msg('请上传微信二维码');
 			if (!this.companyName) return req.msg('请填写公司名称');
+			if (!this.companyIntroduction) return req.msg('请填写公司简介');
 			if (!this.job) return req.msg('请填写职位')
 			if (!this.areaCode) return req.msg('请选择所在地区');
 			if (!this.address) return req.msg('请填写详细地址');
@@ -418,6 +502,7 @@ export default {
 			dataP.wechat = this.wechat;
 			dataP.wechatCode = this.wechatCode;
 			dataP.companyName = this.companyName;
+			dataP.companyIntroduction = this.companyIntroduction;
 			dataP.job = this.employmentInfo.actrank;
 			dataP.inDate = this.inDate;
 			// dataP.areaCode = {
@@ -427,34 +512,78 @@ export default {
 			dataP.areaCode = this.areaCode
 			dataP.areaCodeName = this.city
 			dataP.address = this.address;
+			dataP.longitude = this.longitude;
+			dataP.latitude = this.latitude;
 			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/visiting/card/saveOrUpdate',
-				dataP,
-				json => {
-					if (that.id) {
-						req.msg('保存成功');
-						setTimeout(function() {
-							uni.navigateBack({
-								delta: 1
-							});
-						}, 1500);
-					} else {
-						req.msg('名片创建成功');
-						setTimeout(function() {
-							that.jumpUrl('/card/index/index');
-						}, 1500);
+				uni.showModal({
+					title:'提示',
+					content:'重新提交将会重新审核信息,确定提交?',
+					success: (con) => {
+						if(con.confirm){
+							req.postRequest(
+								'/api/visiting/card/saveOrUpdate',
+								dataP,
+								json => {
+									if (that.id) {
+										uni.reLaunch({
+											url:'/card/success/success'
+										})
+										// req.msg('修改成功');
+										// setTimeout(function() {
+										// 	uni.navigateBack({
+										// 		delta: 1
+										// 	});
+										// }, 1500);
+									} else {
+										uni.reLaunch({
+											url:'/card/success/success'
+										})
+										// req.msg('名片创建成功');
+										// setTimeout(function() {
+										// 	that.jumpUrl('/card/index/index');
+										// }, 1500);
+									}
+								},
+								true
+							);
+						}
 					}
-				},
-				true
-			);
+				})
+			} else{
+				req.postRequest(
+					'/api/visiting/card/saveOrUpdate',
+					dataP,
+					json => {
+						if (that.id) {
+							uni.reLaunch({
+								url:'/card/success/success'
+							})
+							// req.msg('修改成功');
+							// setTimeout(function() {
+							// 	uni.navigateBack({
+							// 		delta: 1
+							// 	});
+							// }, 1500);
+						} else {
+							uni.reLaunch({
+								url:'/card/success/success'
+							})
+							// req.msg('名片创建成功');
+							// setTimeout(function() {
+							// 	that.jumpUrl('/card/index/index');
+							// }, 1500);
+						}
+					},
+					true
+				);
+			}
+
+			
 		}
 	}
 };

+ 14 - 4
card/editDesc/editDesc.vue

@@ -3,7 +3,7 @@
 		<editor
 			@ready="onEditorReady"
 			id="editor"
-			placeholder="输入个人简介内容"
+			:placeholder="isCompanyIntroduction?'输入公司简介内容':'输入个人简介内容'"
 			placeholder-class="placeholder"
 			class="textarea"
 			@input="descInput"
@@ -22,7 +22,8 @@ export default {
 		return {
 			id: '',
 			brief: '',
-			isReadOnly: true
+			isReadOnly: true,
+			isCompanyIntroduction:false
 		};
 	},
 
@@ -30,7 +31,12 @@ export default {
 		this.id = opt.id;
 		let pages = getCurrentPages();
 		let prevPage = pages[pages.length - 2];
-		this.brief = prevPage.$vm.brief;
+		if(opt.isCompanyIntroduction){
+			this.isCompanyIntroduction = true
+			this.brief = prevPage.$vm.companyIntroduction;
+		}else{
+			this.brief = prevPage.$vm.brief;
+		}
 	},
 
 	methods: {
@@ -62,7 +68,11 @@ export default {
 		save() {
 			let pages = getCurrentPages(); //获取所有页面栈实例列表
 			let prevPage = pages[pages.length - 2]; //上一页页面实例
-			prevPage.$vm.brief = this.brief;
+			if(this.isCompanyIntroduction){
+				prevPage.$vm.companyIntroduction = this.brief;
+			}else{
+				prevPage.$vm.brief = this.brief;
+			}
 			uni.navigateBack({
 				//uni.navigateTo跳转的返回,默认1为返回上一级
 				delta: 1

+ 818 - 0
card/index/index.css

@@ -0,0 +1,818 @@
+/* index.css */
+page {
+	background: #f2f2f2;
+}
+
+.top-fixed {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	z-index: 50;
+}
+
+.bgcolor {
+	background: var(--main);
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	transition: .3s all ease;
+	opacity: 0;
+}
+
+.opacity {
+	opacity: 1;
+}
+
+.top-fixed-c {
+	position: relative;
+}
+
+.back {
+	position: absolute;
+	top: 50%;
+	transform: translateY(-50%);
+	left: 0;
+	padding-left: 30rpx;
+	padding-right: 30rpx;
+}
+
+.back image {
+	width: 17rpx;
+	height: 31rpx;
+}
+
+.top-title {
+	font-size: 34rpx;
+	color: #333;
+	font-weight: 500;
+	text-align: center;
+}
+
+.top-black {
+	color: #000;
+}
+
+.bg {
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	height: 540rpx;
+	background: linear-gradient(180deg, var(--main) 0%, #fff 100%);
+}
+
+.bg image {
+	width: 100%;
+	height: 100%;
+}
+
+.photo {
+	width: 690rpx;
+	height: 500rpx;
+	position: relative;
+}
+
+.poster {
+	width: 100%;
+	height: 100%;
+	border-radius: 20rpx 20rpx 0 0;
+}
+
+.change-option{
+	position: absolute;
+	right: 30rpx;
+	bottom: -40rpx;
+}
+.change {
+	font-size: 24rpx;
+	color: #fff;
+	border-radius: 100%;
+	background-color: #4891EF;
+	width: 80rpx;
+	height: 80rpx;
+	margin-right: 30rpx;
+}
+.change:last-child{
+	margin-right: 0;
+}
+
+.change image {
+	width: 32rpx;
+	height: 25rpx;
+	margin:auto;
+}
+
+.upload {
+	width: 100%;
+	height: 100%;
+	flex-direction: column;
+	justify-content: center;
+	font-size: 26rpx;
+	color: var(--main);
+}
+
+.upload image {
+	width: 27rpx;
+	height: 27rpx;
+	margin: 0 auto 20rpx;
+}
+
+.infos {
+	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 43%, #FFFFFF 100%);
+	overflow: hidden;
+	margin-bottom: 30rpx;
+}
+
+.infos-border {
+	width: 683rpx;
+	box-shadow: 0rpx 4rpx 24rpx 1rpx rgba(0, 0, 0, 0.1);
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	margin: 32rpx 32rpx 0;
+	overflow: hidden;
+	padding-bottom: 30rpx;
+}
+
+.info {
+	background: #fff;
+	padding: 40rpx;
+}
+
+.company {
+	font-size: 28rpx;
+	color: #666;
+	font-weight: 400;
+	line-height: 40rpx;
+	margin-top: 13rpx;
+}
+.company image{
+	width: 23rpx;
+	height: 28rpx;
+	margin-right:9rpx ;
+}
+.name {
+	font-size: 48rpx;
+	color: #333;
+	font-weight: bold;
+	margin-top: 30rpx;
+	line-height: 53rpx;
+}
+
+.job {
+	font-size: 20rpx;
+	color: #FFFFFF;
+	margin-left: 12rpx;
+	font-weight: 400;
+	padding: 4rpx 10rpx;
+	line-height: 32rpx;
+	background: linear-gradient(80deg, #7EBFF1 0%, #458EEE 100%);
+	border-radius: 5rpx 5rpx 5rpx 5rpx;
+	opacity: 1;
+}
+
+.industry {
+	display: inline-block;
+	margin-top: 6rpx;
+	font-size: 20rpx;
+	color: #4C8EF1;
+	padding: 0 12rpx;
+	height: 36rpx;
+	line-height: 36rpx;
+	border-radius: 5rpx 5rpx 5rpx 5rpx;
+	opacity: 1;
+	border: 1rpx solid #4C8EF1;
+}
+
+.guanzhu {
+	width: 125rpx;
+	height: 50rpx;
+	line-height: 50rpx;
+	border-radius: 50rpx 50rpx 50rpx 50rpx;
+	opacity: 1;
+	border: 2rpx solid #999999;
+	font-size: 22rpx;
+	font-weight: 400;
+	color: #333333;
+	text-align: center;
+	margin-top: 30rpx;
+}
+
+.logo {
+	width: 128rpx;
+	height: 128rpx;
+	border: 1rpx solid #D9D9D9;
+	border-radius: 50%;
+}
+
+.logo image {
+	width: 100%;
+	height: 100%;
+	border-radius: 50%;
+}
+
+.zhan {
+	justify-content: center;
+	font-size: 24rpx;
+	color: #999;
+	padding: 30rpx 0;
+}
+
+.bico {
+	width: 23rpx;
+	height: 14rpx;
+	margin-left: 15rpx;
+	transition: all .3s ease;
+}
+
+.zhan-romate .bico {
+	transform: rotate(180deg);
+}
+
+.share {
+	width: 541rpx;
+	height: 94rpx;
+	background: #DB2A2A;
+	border-radius: 47rpx;
+	font-size: 36rpx;
+	color: #fff;
+	text-align: center;
+	line-height: 94rpx;
+}
+
+.opt {
+	justify-content: space-around;
+}
+
+.opt .li {
+	font-size: 26rpx;
+	color: #333;
+}
+
+.opt .li image {
+	width: 43rpx;
+	height: 41rpx;
+	margin: 0 auto 10rpx;
+}
+
+.datas {
+	padding: 28rpx 32rpx;
+}
+
+.users {
+	padding-left: 10rpx;
+	font-size: 24rpx;
+	color: #999;
+}
+
+.users image {
+	width: 50rpx;
+	height: 50rpx;
+	border-radius: 50%;
+	margin-left: -10rpx;
+}
+
+.users view {
+	margin-left: 15rpx;
+}
+
+.zan,
+.renqi {
+	font-size: 22rpx;
+	color: #5F5F5F;
+}
+
+.renqi {
+	margin-left: 50rpx;
+}
+
+.zan image {
+	width: 30rpx;
+	height: 32rpx;
+	margin-right: 10rpx;
+}
+
+.renqi image {
+	width: 25rpx;
+	height: 33rpx;
+	margin-right: 10rpx;
+}
+
+.box {
+	background: #fff;
+	border-radius: 12rpx;
+	margin: 30rpx 32rpx;
+	padding: 0 30rpx;
+	overflow: hidden;
+}
+
+.brief {
+	padding-bottom: 45rpx;
+}
+
+.tit {
+	font-size: 30rpx;
+	color: #000;
+	font-weight: 600;
+	margin: 35rpx 0 0;
+}
+
+.tit image {
+	width: 42rpx;
+	height: 42rpx;
+	margin-right: 20rpx;
+}
+
+.tit text {
+	font-size: 24rpx;
+	color: #999;
+	margin-left: 15rpx;
+	font-weight: normal;
+}
+
+.bri {
+	font-size: 28rpx;
+	color: #333;
+	line-height: 38rpx;
+	margin-top: 25rpx;
+}
+
+.card-datas {
+	margin-top: 20rpx;
+}
+
+.card-datas .li {
+	font-size: 24rpx;
+	color: #999;
+	width: 33.33%;
+	text-align: center;
+	padding: 35rpx 0;
+}
+
+.card-datas .li text {
+	display: block;
+	font-size: 38rpx;
+	color: #333;
+	margin-bottom: 5rpx;
+}
+
+.tit image.edit {
+	width: 30rpx;
+	height: 32rpx;
+	margin-right: 0;
+}
+
+.videos {
+	padding-bottom: 40rpx;
+}
+
+.video {
+	margin-top: 30rpx;
+}
+
+.not {
+	font-size: 30rpx;
+	color: #999999;
+	text-align: center;
+	padding: 70rpx 0 30rpx;
+}
+
+.not image {
+	width: 53rpx;
+	height: 46rpx;
+	margin: 0 auto 20rpx;
+}
+
+.video-sp {
+	width: 100%;
+	height: 352rpx;
+	border-radius: 4rpx;
+}
+
+.pic {
+	padding-bottom: 40rpx;
+}
+
+.picture {
+	margin-top: 30rpx;
+}
+
+.pics image {
+	width: 100%;
+}
+
+.also {
+	font-size: 26rpx;
+	color: #DB2A2A;
+	text-align: center;
+	padding: 20rpx 0 40rpx;
+}
+
+.contacts {
+	height: 136rpx;
+	overflow: hidden;
+	margin: 0rpx 0 0;
+}
+
+.contact {
+	white-space: nowrap;
+	height: 136rpx;
+	padding-bottom: 20rpx;
+}
+
+.contact .li {
+	display: inline-block;
+	height: 136rpx;
+	background: #FFFFFF;
+	border: 1rpx solid #CFCFCF;
+	border-radius: 10rpx;
+	box-sizing: border-box;
+	padding: 25rpx 22rpx 0;
+	margin-right: 25rpx;
+	min-width: 270rpx;
+}
+
+.contact .li:first-child {
+	margin-left: 32rpx;
+}
+
+.contact .li:last-child {
+	margin-right: 32rpx;
+}
+
+.lit {
+	font-size: 26rpx;
+	color: #000;
+}
+
+.lit image {
+	width: 34rpx;
+	height: 34rpx;
+	margin-right: 10rpx;
+}
+
+.num {
+	font-size: 24rpx;
+	color: #666;
+	margin-top: 22rpx;
+}
+
+.btns {
+	justify-content: space-between;
+	margin: 45rpx 30rpx 30rpx;
+	overflow: hidden;
+}
+
+.share-ta {
+	height: 80rpx;
+	font-size: 26rpx;
+	font-weight: 500 !important;
+	color: #FFFFFF;
+	text-align: center;
+	line-height: 80rpx !important;
+	border-radius: 47rpx !important;
+	margin-right: 15rpx !important;
+	justify-content: center;
+}
+.share-ta:last-child{
+	margin-right: 0;
+}
+.share-ta image{
+	width: 36rpx;
+	height: 36rpx;
+	margin-right: 10rpx;
+}
+.save {
+	width: 300rpx;
+	height: 94rpx;
+	background: #DB2A2A;
+	font-size: 36rpx;
+	color: #fff;
+	text-align: center;
+	line-height: 94rpx;
+	border-radius: 47rpx;
+}
+.save-text{
+	color: var(--main);
+	text-align: center;
+	margin-top: 43rpx;
+	justify-content: center;
+}
+.save-text image{
+	width: 28rpx;
+	height: 27rpx;
+	margin-right: 10rpx;
+}
+.q-hud {
+	height: 104rpx;
+	border-radius: 10rpx;
+	position: relative;
+	margin: 40rpx 30rpx 0;
+	justify-content: space-between;
+	border-top: 1px solid #E9E9E9;
+}
+
+.q-bg {
+	width: 100%;
+	height: 100%;
+	position: absolute;
+	top: 0;
+	left: 0;
+}
+
+.q-hud-c {
+	position: relative;
+	z-index: 2;
+	height: 100%;
+	font-size: 24rpx;
+	color: #999;
+	padding: 0 0rpx 0 0rpx;
+}
+
+.q-users {
+	margin-right: 20rpx;
+}
+
+.q-users image {
+	width: 50rpx;
+	height: 50rpx;
+	border: 2rpx solid #E5E5E5;
+	border-radius: 50%;
+	margin-left: -14rpx;
+	background: #D8D8D8;
+}
+
+.q-users image:first-child {
+	margin-left: 0;
+}
+
+.q-rico {
+	width: 15rpx;
+	height: 25rpx;
+}
+
+.q-hud-r {
+	font-size: 22rpx;
+	color: #5F5F5F;
+}
+
+.extend-info{
+	margin: 30rpx;
+	padding: 37rpx 47rpx;
+	background:#f8f8f8;
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+}
+.extend-info-data{
+	font-size: 39rpx;
+	font-weight: 400;
+	color: #333333;
+	text-align: center;
+}
+.extend-info-label{
+	font-size: 24rpx;
+	font-weight: 500;
+	color: #A1A1A1;
+	justify-content: center;
+	text-align: center;
+	margin-top: 10rpx;
+}
+.extend-info-label image{
+	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%;
+}
+
+
+/* 评分 */
+.pf-box{
+	padding: 30rpx;
+	background-color: #fff;
+}
+.pf-nav{
+	line-height: 45rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC-Bold, PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.pf-more{
+	line-height: 33rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC Regular-, PingFang SC Regular;
+	font-weight: normal;
+	color: #9C9392;
+}
+.pf-number{
+	line-height: 79rpx;
+	font-size: 60rpx;
+	font-family: HarmonyOS Sans-Bold, HarmonyOS Sans;
+	font-weight: bold;
+	color: #FF4600;
+}
+.pf-note{
+	line-height: 33rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	text-align: center;
+}
+.pf-data{
+	padding: 30rpx;
+	background: rgba(241, 241, 241, 0.5);
+	border-radius: 20rpx 20rpx 20rpx 20rpx;
+	margin-top: 25rpx;
+}
+.pf-user{
+	justify-content: space-between;
+}
+.pf-user-header{
+	width: 30rpx;
+	height: 30rpx;
+	border-radius: 100%;
+	margin-right: 4rpx;
+}
+.pf-user-name{
+	line-height: 40rpx;
+	font-size: 28rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #222222;
+	max-width: 175rpx;
+}
+.pf-user-time{
+	line-height: 30rpx;
+	font-size: 22rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+}
+.pf-user-content{
+	margin-top: 20rpx;
+	line-height: 33rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #333333;
+}
+.pf-btn{
+	height: 76rpx;
+	line-height: 76rpx;
+	background: #FFFFFF;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+	opacity: 1;
+	border: 2rpx solid #DEDEDE;
+	font-size: 28rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #7A7B7F;
+	text-align: center;
+	margin-top: 30rpx;
+}
+
+.index-tab{
+	padding: 30rpx 30rpx 10rpx;
+}
+.index-tab view{
+	margin-right: 40rpx;
+	color: #7A7B7F;
+	font-weight: bold;
+	font-size: 32rpx;
+}
+.index-tab-active{
+	color: #333333 !important;
+	position: relative;
+}
+
+.index-tab-active::after{
+	content: '';
+	width: 30rpx;
+	height: 7rpx;
+	background: #27D699;
+	border-radius: 4rpx 4rpx 4rpx 4rpx;
+	opacity: 1;
+	position: absolute;
+	bottom: -17rpx;
+	left: 50%;
+	transform: translateX(-50%);
+}
+
+
+/* 动态 */
+.list{
+	border-top: 20rpx solid #f5f5f5;
+}
+.list .li{background: #fff;padding: 40rpx 30rpx 45rpx;margin-bottom: 20rpx;margin: 30rpx;border-radius: 10rpx;}
+.userimg{width: 66rpx;height: 66rpx;border-radius: 50%;margin-right: 12rpx;}
+.name{font-size: 28rpx;color: #333;font-weight: bold;}
+.vip-tag{width: 41rpx;height: 31rpx;margin-left: 10rpx;}
+.time{font-size: 24rpx;color: #999;}
+.area{font-size: 24rpx;color: #999;margin-top: 8rpx;}
+.des{font-size: 30rpx;color: #000;line-height: 50rpx;margin: 30rpx 0 0;-webkit-line-clamp: 5;}
+.wen{display: inline-block;width: 60rpx;height: 34rpx;background: #3DB4FF;border-radius: 4rpx;font-size: 24rpx;color: #fff;text-align: center;line-height: 34rpx;margin-right: 15rpx;}
+
+.link{height: 150rpx;background: #F8F8F8;border-radius: 16rpx;padding: 24rpx;font-size: 28rpx;color: #333;box-sizing: border-box;margin-top: 30rpx;}
+.link image{width: 102rpx;height: 102rpx;border-radius: 12rpx;margin-right: 12rpx;}
+.video{margin: 20rpx 0 0;position: relative;}
+.video video{width: 100%;height: 397rpx;border-radius: 15rpx;display: block;}
+.video-play{position: absolute;top: 0;left: 0;right: 0;bottom: 0;justify-content: center;background: rgba(0,0,0,.5);border-radius: 15rpx;}
+.video-play image{width: 82rpx;height: 82rpx;}
+.imgbox{flex-wrap: wrap;margin-top: 20rpx;}
+.imgbox image{width: 222rpx;height: 222rpx;border-radius: 16rpx;margin: 0 12rpx 12rpx 0;}
+.imgbox image:nth-child(3n){margin-right: 0;}
+.topic{height: 40rpx;background: #E1FFF4;border-radius: 20rpx;font-size: 20rpx;color: var(--main);padding: 0 20rpx 0 10rpx;margin-top: 18rpx;}
+.topic image{width: 28rpx;height: 28rpx;margin-right: 7rpx;}
+.loca{margin-top: 20rpx;font-size: 20rpx;color: #666;}
+.loca image{width: 26rpx;height: 31rpx;margin-right: 8rpx;}
+.loca text{margin-right: 10rpx;}
+
+.step-box{
+	background-color: #f7f8fa;
+	border-radius: 16rpx;
+	padding: 40rpx;
+	margin-top: 30rpx;
+	color: var(--main);
+}
+.step-date{
+	font-size: 64rpx;
+	font-weight: 500;
+}
+.step-label{
+	font-size: 24rpx;
+	font-weight: 500;
+}
+.step-pic{
+	width: 150rpx;
+	height: 150rpx;
+	background: #E2E2E2;
+	border-radius: 16rpx 16rpx 16rpx 16rpx;
+	opacity: 1;
+	margin-right: 20rpx;
+}
+.step-title{
+	height: 74rpx;
+	line-height: 37rpx;
+	font-size: 26rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #1A1F30;
+}
+.step-price{
+	line-height: 33rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Medium, PingFang SC;
+	font-weight: 500;
+	color: #999;
+}
+.step-btn{
+	width: 94rpx;
+	height: 46rpx;
+	line-height: 46rpx;
+	background: var(--main);
+	border-radius: 23rpx 23rpx 23rpx 23rpx;
+	opacity: 1;
+	text-align: center;
+	font-size: 28rpx;
+	color: #FFFFFF;
+}
+
+.product{height: 168rpx;margin-top: 30rpx;overflow: hidden;}
+.pro-view{height: 168rpx;padding-bottom: 20rpx;white-space: nowrap;}
+.pro-view .li{display: inline-block;width: 554rpx;height: 168rpx;background: #F7F8FA;border-radius: 16rpx;margin-right: 20rpx;padding: 16rpx;box-sizing: border-box;}
+.pro-view1 .li{width: 688rpx;}
+/* .pro-view .li:first-child{margin-left: 30rpx;} */
+/* .pro-view .li:last-child{margin-right: 30rpx;} */
+.pro-pic{width: 136rpx;height: 136rpx;border-radius: 16rpx;background: #fff;margin-right: 19rpx;}
+.title{white-space: initial;font-size: 26rpx;color: #1A1F30;line-height: 37rpx;height: 74rpx;}
+.opts{justify-content: space-between;margin-top: 10rpx;}
+.money{font-size: 24rpx;color: var(--main);}
+.pro-btn{width: 94rpx;height: 46rpx;background: var(--main);border-radius: 23rpx;font-size: 28rpx;color: #fff;text-align: center;line-height: 46rpx;}
+.opt{font-size: 24rpx;color: #999;margin-top: 30rpx;justify-content: flex-end;}
+.opt image{width: 33rpx;height: 33rpx;margin-right: 8rpx;}
+.opt .ddflex{margin-left: 50rpx;}
+.opt-share{font-size: 24rpx;color: #999;margin-left: 50rpx !important;}
+.vote-box{margin-top: 50rpx;}
+.vote-box.ends{background: #f8f8f8;margin-top: 30rpx;padding: 20rpx;}
+.vote-tit{font-size: 28rpx;color: #000;}
+.vote-list .lis{height: 74rpx;background: #F9FAFC;border: 1rpx solid #EBEBEB;border-radius: 8rpx;font-size: 30rpx;color: var(--main);text-align: center;line-height: 74rpx;margin-top: 20rpx;padding: 0 28rpx;position: relative;overflow: hidden;}
+.end .lis{text-align: left;color: #9B9B9B;}
+.end .lis view{position: relative;z-index: 2;}
+.end .lis view.percent{position: absolute;top: 0;bottom: 0;left: 0;background: #F0F0F0;z-index: 0;}
+.end .lis.active{color: var(--main);}
+.end .lis.active view.percent{background: #E1FFF4;}
+.vote-can{font-size: 22rpx;color: #999;margin-top: 15rpx;}
+.vote-can text{margin-right: 15rpx;}

+ 817 - 0
card/index/index.vue

@@ -0,0 +1,817 @@
+<template>
+	<view style="padding-bottom: 30rpx;" v-if="!loading">
+		<view class="bg">
+			<image src="/static/pages/images/userBg.png"></image>
+		</view>
+		<view class="infos">
+			<view class="infos-border">
+				<view class="photo">
+					<block v-if="cardInfo.avatar">
+						<image :src="cardInfo.avatar" mode="aspectFill" class="poster"></image>
+						<view class="change-option ddflex">
+							<view v-if="cardId" class="change ddflex" style="right: 140rpx;background-color:#27D699;"
+								@click="userBehavior(3)">
+								<image v-if="!cardInfo.isThumbs" style="width: 35rpx;height: 32rpx;"
+									src="/card/static/images/dz1.png"></image>
+								<image v-else style="width: 35rpx;height:32rpx;" src="/card/static/images/dz1_h.png">
+								</image>
+								<!-- 点赞 -->
+							</view>
+							<view v-if="cardId&&(userInfo.manageSaleNo!=cardInfo.jobNumber)" class="change ddflex" @click="jumpUrl('/card/cardFound/cardFound')">
+								<image src="/card/static/images/change.png"></image>
+								<!-- 更换销售员-->
+							</view>
+						</view>
+					</block>
+				</view>
+				<view class="info dflex">
+					<view class="flex">
+						<view class="name">
+							{{ cardInfo.realName }}
+							<text class="job" v-if="cardInfo.job">{{ cardInfo.jobName }}</text>
+							<text class="job">入司{{cardInfo.inDate?getAge(cardInfo.inDate):1}}年</text>
+						</view>
+						<view class="company ddflex" style="margin-top: 20rpx;">
+							<image src="/card/static/images/gs.png"></image>
+							{{ cardInfo.companyName }}
+						</view>
+						<view class="company ddflex">
+							<image src="/card/static/images/area.png"></image>
+							服务区域 {{ cardInfo.areaCodeName?cardInfo.areaCodeName:'湖南' }}
+						</view>
+						<view class="company">
+							执业证书:{{ cardInfo.professionalCertificateNo?cardInfo.professionalCertificateNo:'暂无'}}
+						</view>
+						<view class="ddflex" style="margin-top: 30rpx;" v-if="cardInfo.wechat||cardInfo.wechat">
+							<view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;margin-right: 30rpx;" v-if="cardInfo.phone">
+								<image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/phone.png"></image>
+								{{cardInfo.phone}}
+							</view>
+							<view class="ddflex fflex" style="background: #F8F8F8;border-radius: 10rpx;padding: 20rpx;font-size: 26rpx;" v-if="cardInfo.wechat">
+								<image style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" src="/card/static/images/wx.png"></image>
+								{{cardInfo.wechat}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="btns ddflex" v-if="cardId">
+				<view class="share-ta ddflex fflex" style="background: linear-gradient(80deg, #7EBFF1 0%, #458EEE 100%);"
+					@click="copy(cardInfo.wechat, 1)">
+					<image src="../../static/pages/images/wx.png"></image>微信联系</view>
+				<view class="share-ta ddflex fflex" style="background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);"
+					@click="goPhone()">
+					<image src="/card/static/images/phone1.png"></image>电话联系</view>
+				<view class="share-ta ddflex fflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);"
+					 @click="jumpUrl('/card/poster/poster?id'+cardInfo.id)">
+					<image src="/card/static/images/fx.png"></image>分享名片</view>
+			</view>
+			<view class="save-text ddflex" v-if="cardId" @click="saveToPhone()">
+				<image src="/card/static/images/save.png"></image>保存到通讯录
+			</view>
+			<view class="btns ddflex" v-if="!cardId" style="justify-content: center;">
+				<view class="share-ta ddflex" style="background: linear-gradient(84deg, #6FE5BC 0%, #27D699 100%);width: 260rpx;margin-right: 30rpx;"
+					@click="jumpUrl('/card/poster/poster?id'+cardInfo.id)">
+					<image src="/card/static/images/wdmp.png"></image>我的名片码</view>
+				<view open-type="share" class="share-ta ddflex" style="background: linear-gradient(80deg, #FF985A 0%, #FF5700 100%);width:260rpx;"
+					>
+					<image src="/card/static/images/fx.png"></image>发送名片</view>
+			</view>
+			<view class="extend-info ddflex">
+				<view class="extend-info-item fflex">
+					<view class="extend-info-data">{{cardInfo.cntCust?cardInfo.cntCust:0}}</view>
+					<view class="extend-info-label ddflex">
+						<image src="../../static/pages/images/fw_hui.png"></image>
+						<view>服务客户</view>
+					</view>
+				</view>
+				<view class="extend-info-item fflex">
+					<view class="extend-info-data">{{cardInfo.cntCntr?cardInfo.cntCntr:0}}</view>
+					<view class="extend-info-label ddflex">
+						<image src="/static/pages/images/cy_hui.png"></image>
+						<view>保单件数</view>
+					</view>
+				</view>
+				<view class="extend-info-item fflex">
+					<view class="extend-info-data">{{cardInfo.thumbs?cardInfo.thumbs:0}}</view>
+					<view class="extend-info-label ddflex">
+						<image src="/static/pages/images/dz_hui.png"></image>
+						<view>点赞量</view>
+					</view>
+				</view>
+			</view>
+			<view class="q-hud ddflex">
+				<view class="q-hud-c ddflex">
+					<view class="q-users ddflex">
+						<image :src="item.avatar?item.avatar:'../../static/images/userimg.png'" mode="aspectFill" v-for="(item, index) in cardInfo.pageUser.list"
+							v-if="index<3" :key="index"></image>
+					</view>
+					<view class="fflex">
+						{{cardInfo.pageUser.total}}人看过
+					</view>
+					<!-- <image src="../static/images/q_rico.png" class="q-rico"></image> -->
+				</view>
+				<view class="q-hud-r ddflex">
+					<view class="ddflex">
+						<image style="width: 23rpx;height: 31rpx;margin-right: 10rpx;"
+							src="/card/static/images/hot.png"></image>
+						<text>{{cardInfo.share}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<!-- 评分 -->
+		<view class="pf-box" v-if="false">
+			<view class="ddflex" style="justify-content: space-between;">
+				<view class="pf-nav">客户评价</view>
+				<view class="ddflex pf-more" @click="jumpUrl('/card/evaluateList/evaluateList?groupId='+cardInfo.id)">
+					全部评价
+					<image style="width: 9rpx;height: 19rpx;margin-left: 10rpx;" src="/static/pages/images/more.png"></image>
+				</view>
+			</view>
+			<view class="ddflex" style="justify-content: center;margin-top: 40rpx;">
+				<view class="pf-number">
+				{{evaluateInfo.info?evaluateInfo.info.avage:0}}<text style="font-size: 24rpx;color: #333333;font-weight: 400;margin-left: 10rpx;">分</text>
+				</view>
+				<uni-rate style="justify-content: center;margin-left: 30rpx;" class="ddflex" color="#999999" active-color="#FF4600" :readonly="true" size="18" allow-half :value="evaluateInfo.info.avage/2" />
+			</view>
+			<view class="pf-note">综合评分 {{evaluateInfo.info?evaluateInfo.info.total:0}}人评分</view>
+			<view class="pf-data" v-if="evaluateInfo.evaluateDTO">
+				<view class="pf-user ddflex">
+					<view class="ddflex">
+						<image class="pf-user-header" :src="evaluateInfo.evaluateDTO.avatar?evaluateInfo.evaluateDTO.avatar:'../../static/images/userimg.png'"></image>
+						<view class="pf-user-name tover">{{evaluateInfo.evaluateDTO.name}}</view>
+						<uni-rate style="justify-content: center;margin-left: 30rpx;" class="ddflex" color="#999999" active-color="#FF4600" :readonly="true" size="14" allow-half :value="evaluateInfo.evaluateDTO.serveScore/2" />
+						<text style="font-size: 20rpx;color: #FF4600;">{{evaluateInfo.evaluateDTO.serveScore}}分</text>
+					</view>
+					<view class="pf-user-time">{{evaluateInfo.evaluateDTO.createDate}}</view>
+				</view>
+				<view class="pf-user-content">
+					{{evaluateInfo.evaluateDTO.content}}
+				</view>
+				<view class="" style="margin-top: 20rpx;">
+					<image :style="'width: 200rpx;height: 200rpx;margin-bottom: 10rpx;display: inline-block;'+((index+1)%3==0?'':'margin-right:10rpx')" 
+						v-for="item,index in evaluateInfo.evaluateDTO.evaluateImgUrls" :src="item" mode="aspectFit"
+						@click="previewImg(evaluateInfo.evaluateDTO.evaluateImgUrls,index)"></image>
+				</view>
+			</view>
+			<view class="pf-btn" v-if="cardId" @click="jumpUrl('/card/evaluate/evaluate?id='+cardInfo.id)">点击输入您的评价</view>
+		</view>
+		
+		<view class="ddflex index-tab">
+			<view :class="tabType==1?'index-tab-active':''" @click="tabChange(1)">个人主页</view>
+			<!-- <view :class="tabType==2?'index-tab-active':''" @click="tabChange(2)">最新动态</view> -->
+		</view>
+		
+		<block v-if="tabType==1">
+			<view class="box brief" v-if="cardInfo.honorImg">
+				<view class="tit ddflex">
+					<view class="flex ddflex">
+						<image src="/card/static/images/shry.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,index in cardInfo.honorImg.split(',')" @click="previewImg(cardInfo.honorImg.split(','),index)">
+							<image :src="item" mode="aspectFill"></image>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+			<view class="box brief" v-if="cardInfo.styleImg">
+				<view class="tit ddflex">
+					<view class="flex ddflex">
+						<image src="/card/static/images/grfc.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,index in cardInfo.styleImg.split(',')" @click="previewImg(cardInfo.styleImg.split(','),index)">
+							<image :src="item" mode="aspectFill"></image>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+			<view class="box brief">
+				<view class="tit ddflex">
+					<view class="flex ddflex">
+						<image src="/card/static/images/grjj.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="/card/static/images/gsjj.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.companyIntroduction ? cardInfo.companyIntroduction : ''"></rich-text></view>
+			</view>
+		</block>
+		
+		
+		<block v-if="tabType==2">
+			<view class="list" v-if="pageList && pageList.length > 0">
+				<view class="li" v-for="(item, index) in pageList" :key="index">
+					<view class="user ddflex">
+						<image :src="item.userDTO.avatar" mode="aspectFill" class="userimg" @click="toUserHomePage(item.userDTO.id)"></image>
+						<view class="fflex">
+							<view class="namea ddflex">
+								<view class="name fflex ddflex" @click="toUserHomePage(item.userDTO.id)">
+									{{ item.userDTO.nickName }}
+									<image v-if="item.userDTO.levelGrade > 0" src="../../static/images/vip_tag.png" class="vip-tag"></image>
+								</view>
+								<view class="time">{{ item.time }}</view>
+							</view>
+							<view class="area" @click="toUserHomePage(item.userDTO.id)" v-if="item.userDTO.cityName">{{ item.userDTO.provinceName }} {{ item.userDTO.cityName }}</view>
+						</view>
+					</view>
+					<!-- 分享的动态 -->
+					<block v-if="item.source">
+						<view class="link ddflex" @click="jumpUrlDetail(item)">
+							<block v-if="item.url&&item.url.length>0"><image mode="aspectFill" v-if="idx == 0" v-for="(it, idx) in item.url" :src="it" :key="idx"></image></block>
+							<view class="fflex tover"><rich-text :nodes="item.content"></rich-text></view>
+						</view>
+					</block>
+					<!-- 非分享的动态 -->
+					<block v-else>
+						<view v-if="item.type == 2" class="des tovers" @click="jumpUrlDetail(item)">
+							<view class="wen">提问</view>
+							{{ removeHtml(item.content) }}
+						</view>
+						<view class="des" v-else @click="jumpUrlDetail(item)"><rich-text :nodes="item.content"></rich-text></view>
+						
+						
+						<!-- //如果有投票,就不显示图片 -->
+						<block v-if="!item.qyPoll">
+						<view class="video" v-if="item.isHaveVideo && config.open_community_video == 1">
+							<video :src="item.url" :show-center-play-btn="false" :controls="item.isControls" :autoplay="item.isControls" :id="'myVideo'+index" @pause="videoPause(index)" @ended="videoEnded(index)"></video>
+							<view class="video-play ddflex" @click="videoPlay(index)" v-if="item.isShowPlayBtn"><image src="../../static/images/play.png"></image></view>
+						</view>
+						<view class="imgbox ddflex" @click="jumpUrlDetail(item)" v-if="!item.isHaveVideo"><!-- @click="previewImgss(item.url, idx)" -->
+							<block v-if="item.url&&item.url.length>0">
+								<image mode="aspectFill" v-for="(it, idx) in item.url" :src="it" :key="idx"></image>
+							</block>
+						</view>
+						</block>
+						<!-- 话题 -->
+						<view class="ddflex" v-if="item.qyDialogu">
+							<view class="topic ddflex" @click="jumpUrl('/topics/detail/detail?topicId=' + item.qyDialogu.id)">
+								<image src="../../static/images/topic.png"></image>
+								{{ item.qyDialogu.title }}
+							</view>
+						</view>
+						<view class="loca ddflex" @click="jumpUrlPoi(item,'/office/poi/index')" v-if="item.poiName"><image :src="picUrlss+'office_images/loca.png'"></image><text v-if="item.poiDistance > 0">{{item.poiDistance ? item.poiDistance < 1000 ? item.poiDistance+'m' : (item.poiDistance/1000).toFixed(1)+'km' : ''}}</text>{{item.poiName}}</view>
+						<!-- 投票 -->
+						<view :class="'vote-box' + (item.qyPoll.isEnd ? ' ends' : '')" v-if="item.qyPoll">
+							<view class="vote-tit">{{ item.qyPoll.title }}</view>
+							<block v-if="item.qyPoll.isVote == 1">
+								<view class="vote-list end" @click="jumpUrlDetail(item)">
+									<view :class="'lis ddflex  ' + (itpy.isVote == 1 ? 'active' : '')" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex">
+										<view class="percent" :style="'width:' + parseFloat(itpy.proportion) + '%;'"></view>
+										<view class="fflex">{{ itpy.name }}</view>
+										<view>{{ parseFloat(itpy.proportion) + '%' }}</view>
+									</view>
+								</view>
+							</block>
+							<block v-else>
+								<view class="vote-list">
+									<view class="lis" v-for="(itpy, idex) in JSON.parse(item.qyPoll.optionJson)" :key="idex" @click="submitPoll(item, index, idex)">
+										{{ itpy.name }}
+									</view>
+								</view>
+							</block>
+							<view class="vote-can" v-if="item.qyPoll.isEnd"><text>{{item.qyPoll.voteCount}}人参与</text>投票已结束</view>
+						</view>
+						<block v-if="item.type==10||item.type==11">
+							<view v-if="item.type==10" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/exercise/record/record?userId=' + item.userId)">
+								<view>
+									<view class="step-date">{{item.wxRun.step}}</view>
+									<view class="step-label">步数</view>
+								</view>
+								<view>
+									<view class="step-date">{{item.wxRun.index}}</view>
+									<view class="step-label" style="text-align: right;">名次</view>
+								</view>
+							</view>
+							<view v-if="item.type==11" class="ddflex step-box" style="justify-content: space-between;" @click="jumpUrl('/match/activityDetail/activityDetail?id=' + item.matchContent.id)">
+								<image class="step-pic" :src="item.matchContent.pic" mode="aspectFill"></image>
+								<view class="fflex">
+									<view class="step-title tovers">{{item.matchContent.title}}</view>
+									<view class="ddflex" style="justify-content: space-between;margin-top: 10rpx;">
+										<view class="step-price">{{item.matchContent.endTime}}</view>
+										<view  class="step-btn">查看</view>
+									</view>
+								</view>
+							</view>
+						</block>
+						<view v-if="item.userGroupId" class="ddflex step-box" style="padding: 25rpx 21rpx;" @click="jumpUrl('/office/team/index?id=' + item.userGroupId)">
+							<image style="width: 24rpx;height: 24rpx;margin-right: 13rpx;" src="../../static/images/link.png"></image>
+							<view style="font-weight: 500;color: #999999;">Team:</view>
+							<view>{{item.userGroupTitle}}</view>
+						</view>
+						<block v-else>
+							<view class="product" v-if="item.products && item.products.length > 0">
+								<view scroll-x="true" :class="'pro-view' + (item.products.length == 1 ? ' pro-view1' : '')">
+									<view class="li" v-for="(it, idx) in item.products" :key="idx" @click="toProductDetail(it)">
+										<view class="ddflex">
+											<image :src="it.pic + '?x-oss-process=style/w375'" mode="aspectFill" class="pro-pic"></image>
+											<view class="fflex">
+												<view class="title tovers">{{ it.title }}</view>
+												<view class="opts ddflex">
+													<view class="money">¥{{ it.salePrice }}</view>
+													<view class="pro-btn">购买</view>
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</block>
+					</block>
+					<view class="opt ddflex" v-if="!item.source && type != 3">
+						<view class="fflex" @click="jumpUrlDetail(item)">{{ item.count.browseCount }}次浏览</view>
+						<view class="ddflex" @click="submitFabulous(2, item.id, index)">
+							<image :src="'../../static/images/' + (item.isPraise == 1 ? 'like_h' : 'like') + '.png'"></image>
+							{{ item.count.fabulousCount < 99 ? item.count.fabulousCount : '99+' }}
+						</view>
+						<view class="ddflex" @click="jumpUrlDetail(item)">
+							<image src="../../static/images/comment.png"></image>
+							{{ item.count.commentCount < 99 ? item.count.commentCount : '99+' }}
+						</view>
+						<button open-type="share" class="opt-share ddflex">
+							<image src="../../static/images/share.png"></image>
+							分享
+						</button>
+					</view>
+				</view>
+			</view>
+			<view class="nodata" v-else>
+				<image :src="picUrlss + 'empty_jl.png'"></image>
+				<text>{{ type == 1 ? '暂无动态' : type == 2 ? '暂无提问' : type == 3 ? '暂无日记' : '' }}</text>
+			</view>
+		</block>
+		
+	</view>
+</template>
+<script>
+	const app = getApp();
+	const req = require('../../utils/request.js');
+	import util from '../../utils/util.js';
+	export default {
+		data() {
+			return {
+				picUrlss: req.public.picUrls,
+				systems: {},
+				isTop: 0,
+				options: {},
+				scene: null,
+				cardId: '',
+				cardInfo: '',
+				cardCount: '',
+				zhiPicUrls: [],
+
+				isFirst: true, //页面加载第一次调用
+
+				uploader: '',
+				isStart: false,
+				videoInfo: '',
+				fileName: '', //视频名称
+				
+				evaluateInfo:null,//评分
+				
+				tabType:1,
+				
+				loading:true,
+				
+				config: {},
+				isLoad: true,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				pageList: [],
+				userId: '',
+				videoCurrent: null,
+				videoContext: '',
+				
+				userInfo:''
+			};
+		},
+		components:{  },
+		onLoad(options) {
+			this.options = options
+			this.cardId = options.cardId;
+			if (options.scene)
+				this.scene = options.scene
+			uni.showLoading({
+				title:'加载中'
+			})
+		},
+
+		async onShow() {
+			this.getConfig()
+			if (this.scene) {
+				await this.loadCodeParams();
+			}
+			await req.silenceLogin(this.options.userId ? this.options.userId : '', '')
+			this.userInfo = req.getStorage('userInfo')
+			this.getCardInfo();
+		},
+		onReachBottom() {
+			this.form.page++;
+			this.getOfficeList();
+		},
+		onShareAppMessage(res) {
+			if (res.from == 'button') {
+				let userInfo = req.getStorage('userInfo');
+				this.userBehavior(6)
+				return {
+					title: this.cardInfo.realName,
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id,
+					imageUrl: this.cardInfo.avatar + '?x-oss-process=style/w375', // 分享图
+				};
+			}
+		},
+		onShareTimeline(res) {
+			if (res.from == 'button') {
+				let userInfo = req.getStorage('userInfo');
+				this.userBehavior(6)
+				return {
+					title: this.cardInfo.realName,
+					path: '/card/index/index?cardId=' + this.cardInfo.id + '&userId=' + userInfo.id,
+					imageUrl: this.cardInfo.avatar + '?x-oss-process=style/w375', // 分享图
+				};
+			}
+		},
+
+		methods: {
+			
+			getConfig() {
+				var _this = this;
+				return new Promise((res, rej) => {
+					req.g(
+						'/api/other/config',
+						data => {
+							req.setStorage('configRes', JSON.stringify(data));
+							this.config = data;
+							res(data);
+						},
+						true
+					);
+				});
+			},
+			loadCodeParams() {
+				let _ts = this;
+				return new Promise((resolve, reject) => {
+					if (!_ts.scene) {
+						resolve();
+						return false;
+					}
+					req.getRequest(
+						'/api/code/params', {
+							scene: _ts.scene
+						},
+						data => {
+							this.options.userId = data.userId
+							this.cardId = data.scene
+							resolve();
+						}
+					);
+				});
+			},
+			getImgList(url) {
+				var list = [];
+				if (url) {
+					list = url.split(',');
+				}
+				return list;
+			},
+
+			jumpUrl(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+
+			getCardInfo() {
+				var url = '';
+				var dataP = {
+					id:this.cardId
+				};
+				if (this.cardId) {
+					url = '/api/visiting/card/info';
+					dataP.id = this.cardId;
+				} else {
+					url = '/api/visiting/card/userInfo';
+					dataP = {};
+				}
+				req.getRequest(url, dataP, data => {
+					this.cardInfo = data;
+					this.userId = this.cardInfo.userId
+					if(this.pageList.length==0){
+						this.getOfficeList();
+					}
+					console.log('isFirst')
+					if (this.cardId && this.cardInfo.userId == req.getStorage('userInfo').id) {
+						this.cardId = null
+						this.getCardInfo()
+					} else {
+						if (this.cardInfo.userId == req.getStorage('userInfo').id) {
+
+						} else {
+							// 用户浏览
+							if (this.isFirst) {
+								this.userBehavior(4)
+							}
+						}
+						this.isFirst = false
+						uni.hideLoading()
+						this.loading = false
+					}
+					this.getEvaluate()
+				});
+			},
+
+			// 用户行为
+			userBehavior(type) {
+				var dataP = {};
+				dataP.type =
+					23 //、产品 2、活动 3、未知 4、内容 5、课程 6、老师 7、素材 8、题目 9、资料领取 10、招聘职位 12、用户须知 13、素材 15、医院科室 16、海报 20、医生 21 新闻 23名片
+				dataP.behavior = type; //1、关注 2、收藏 3、点赞 4、浏览 5、确认 6、分享
+				dataP.bindId = this.cardInfo.id;
+				req.postRequestLoding('/api/v3/behavior/save', dataP, data => {
+					if (type == 3) {
+						this.cardInfo.isThumbs = !this.cardInfo.isThumbs
+					}
+					if (type == 1) {
+						this.cardInfo.follow = !this.cardInfo.follow
+					}
+				});
+			},
+
+			// 存入名片夹
+			saveToFolder() {
+				let form = {
+					visitingCardId: this.cardInfo.id,
+					userId: req.getStorage('userInfo').id
+				}
+				req.postRequest('/api/v3/visiting/card/folder/saveOrUpdate', form, res => {
+					req.msg('已存入名片夹')
+					this.cardInfo.isSave = true
+				})
+			},
+			// 存入通讯录
+			saveToPhone() {
+				console.log('saveToPhone')
+				uni.addPhoneContact({
+					nickName: this.cardInfo.realName,
+					firstName: this.cardInfo.realName,
+					mobilePhoneNumber: this.cardInfo.phone,
+					success: (res) => {
+						console.log(res)
+						uni.showModal({
+							title: '提示',
+							content: '已存入通讯录,请前往手机通讯录查看',
+							showCancel: false,
+						})
+					},
+					fail: (err) => {
+						console.log(err)
+						req.msg('存入失败')
+					}
+				})
+			},
+
+			goPhone() {
+				uni.makePhoneCall({
+					phoneNumber: this.cardInfo.phone
+				}); // 传参带入号码即可
+			},
+
+			copy(valueText, type) {
+				uni.setClipboardData({
+					data: valueText,
+					success: function(res) {
+						if (type == 1) {
+							req.msg('微信号复制成功');
+						} else if (type == 2) {
+							req.msg('邮箱复制成功');
+						}
+					}
+				});
+			},
+			//预览图片
+			previewImg(picUrls, index) {
+				//预览合同图片
+				var src = picUrls[index];
+				let imgs = picUrls;
+				uni.previewImage({
+					current: src, // 当前显示图片的http链接
+					urls: imgs
+				});
+			},
+
+			cleanimages(index) {
+				// 删除图片
+				let arr = this.zhiPicUrls;
+				arr.splice(index, 1);
+				this.zhiPicUrls = arr;
+			},
+
+			/**
+			 * @param {Object} type 1图片 2、视频
+			 * @param {Object} url 资源地址
+			 */
+			updateCard(type, url) {
+				var dataP = {};
+				dataP.id = this.cardInfo.id;
+				if (type == 1) {
+					dataP.pictures = url;
+				} else if (type == 2) {
+					dataP.video = url;
+				} else if (type == 3) {
+					dataP.imageMap = url;
+				}
+				req.postRequest(api.api_addressList_update, dataP, json => {
+					if (type == 1) {
+						this.cardInfo.pictures = url;
+					} else if (type == 2) {
+						this.cardInfo.video = url;
+					} else if (type == 3) {
+						this.cardInfo.imageMap = url;
+					}
+				});
+			},
+			getAge(date){
+				return util.getAge(date)
+			},
+			
+			// 获取评论
+			getEvaluate(){
+				req.getRequest('/api/evaluate/cardInfo',{bindId:this.cardInfo.id,type:2},res=>{
+					this.evaluateInfo = res
+				})
+			},
+			
+			tabChange(type){
+				if(type==this.tabType) return false
+				this.tabType = type
+			},
+			
+			getOfficeList() {
+				let that = this;
+				var pramData = this.form;
+				// pramData.type = this.type;
+				pramData.orderType = 2;
+				pramData.userId = this.userId;
+				if (!this.isLoad) return false;
+				this.isLoad = false;
+				req.getRequest('/api/v3/moments/page', pramData, data => {
+					if(data.list&&data.list.length > 0){
+						this.total = data.total
+						data.list.map(it=>{
+							if(it.qyPoll && it.qyPoll.isEnd){
+								it.qyPoll.voteCount = that.sum(JSON.parse(it.qyPoll.optionJson))
+							}
+							if(it.url){
+								let h = it.url.substring(it.url.lastIndexOf('.') + 1)
+								if(h.indexOf('mp4')<0&&h.indexOf('MP4')<0){
+									it.url = it.url.split(',');
+								}else{
+									it.isHaveVideo = true
+									it.isControls = false
+									it.isShowPlayBtn = true
+								}
+							}
+							it.content = '<div style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 5;-webkit-box-orient: vertical;word-break: break-all;">' + it.content + '</div>'
+							return it;
+						})
+					}
+					if (data.list && data.list.length >= this.form.limit) {
+						this.isLoad = true;
+					}
+					if (this.form.page > 1) {
+						data.list = this.pageList.concat(data.list);
+					}
+					this.pageList = data.list;
+					this.isShowView = true;
+				});
+			},
+			sum(arr) {
+				var s = 0;
+				for (var i=arr.length-1; i>=0; i--) {
+					if(arr[i].count){
+						s += Number(arr[i].count);
+					}
+				}
+				return s;
+			},
+			//提交点赞、取消点赞;收藏、取消收藏
+			submitFabulous(type, id, index) {
+				if (!req.isLogins(true)) {
+					return;
+				}
+				var dataP = {};
+				dataP.type = type; //1,观看 ,2点赞,3评论,4分享,5收藏
+				dataP.momentsId = id;
+				req.postRequestLoding('/api/v3/fabulous/save', dataP, data => {
+					if (type == 2) {
+						//动态点赞
+						if (this.pageList[index].isPraise == 1) {
+							//已赞
+							this.pageList[index].isPraise = 0;
+							this.pageList[index].count.fabulousCount--;
+						} else {
+							this.pageList[index].isPraise = 1;
+							this.pageList[index].count.fabulousCount++;
+						}
+					}
+				});
+			},
+			
+			//提交投票
+			submitPoll(item, pIndex, pollIndex) {
+				if(item.qyPoll.isEnd) return false;
+				var dataP = {};
+				// dataP.id = item.id;
+				dataP.pollId = item.qyPoll.id;
+				var pollObjList = JSON.parse(item.qyPoll.optionJson);
+				dataP.pollOptionCode = pollObjList[pollIndex].code;
+				req.postRequest('/api/v3/poll/saveDetails', dataP, data => {
+					req.msg('投票成功');
+					//图片完之后要将该投票的对象返回,便于做渲染%
+					this.pageList[pIndex].qyPoll = data;
+				});
+			},
+			videoPlay(index){
+				var that = this;
+				var curIdx = index;
+				this.pageList[index].isControls = true
+				this.pageList[index].isShowPlayBtn = false
+				// 有播放时先将prev暂停,再播放当前点击的current
+				if (that.videoCurrent != null) {
+					var videoContextPrev = uni.createVideoContext('myVideo' + that.videoCurrent)
+					if (that.videoCurrent != curIdx) {
+						this.pageList[that.videoCurrent].isControls = false
+						this.pageList[that.videoCurrent].isShowPlayBtn = true
+						
+						videoContextPrev.stop()
+					}
+					that.videoCurrent = curIdx
+					var videoContextCurrent = uni.createVideoContext('myVideo' + curIdx)
+					videoContextCurrent.play()
+				} else {  
+					// 没有播放时播放视频
+					that.videoCurrent = curIdx
+					var videoContext = uni.createVideoContext('myVideo' + curIdx) // 对应的视频id
+					videoContext.play()
+				}
+			},
+			videoPause(index){
+				this.pageList[index].isControls = false
+				this.pageList[index].isShowPlayBtn = true
+			},
+			videoEnded(index){
+				this.pageList[index].isControls = false
+				this.pageList[index].isShowPlayBtn = true
+			},
+			jumpUrlDetail(item) {
+				this.jumpUrl('/office/detail/detail?contentId=' + item.id);
+			},
+			toUserHomePage(userId) {
+				this.jumpUrl('/topics/home/home?userId=' + userId);
+			},
+		},
+		mounted() {
+			const systemInfo = uni.getSystemInfoSync();
+			// px转换到rpx的比例
+			let pxToRpxScale = 750 / systemInfo.windowWidth;
+			let systems = {
+				ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
+				navigationHeight: 44 * pxToRpxScale // 导航栏的高度
+			};
+			systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
+			this.systems = systems;
+		},
+		onPageScroll: function(e) {
+			if (e.scrollTop > this.systems.barHeight) {
+				this.isTop = 1;
+			} else {
+				this.isTop = 0;
+			}
+		}
+	};
+</script>
+
+<style>
+	@import './index.css';
+</style>

BIN=BIN
card/static/images/add.png


BIN=BIN
card/static/images/addFile.png


BIN=BIN
card/static/images/add_ico1.png


BIN=BIN
card/static/images/area.png


BIN=BIN
card/static/images/bg.png


BIN=BIN
card/static/images/bj_ico.png


BIN=BIN
card/static/images/car_p_bg.png


BIN=BIN
card/static/images/card_ico1.png


BIN=BIN
card/static/images/card_ico2.png


BIN=BIN
card/static/images/card_ico3.png


BIN=BIN
card/static/images/card_ico4.png


BIN=BIN
card/static/images/card_logo_bg.png


BIN=BIN
card/static/images/change.png


BIN=BIN
card/static/images/code.png


BIN=BIN
card/static/images/down.png


BIN=BIN
card/static/images/dz.png


BIN=BIN
card/static/images/dz1.png


BIN=BIN
card/static/images/dz1_h.png


BIN=BIN
card/static/images/edit.png


BIN=BIN
card/static/images/edit1.png


BIN=BIN
card/static/images/empty.png


BIN=BIN
card/static/images/fx.png


BIN=BIN
card/static/images/fx_ico.png


BIN=BIN
card/static/images/grfc.png


BIN=BIN
card/static/images/grjj.png


BIN=BIN
card/static/images/gs.png


BIN=BIN
card/static/images/gsjj.png


BIN=BIN
card/static/images/hb_ico1.png


BIN=BIN
card/static/images/hb_ico2.png


BIN=BIN
card/static/images/hot.png


BIN=BIN
card/static/images/jj_ico.png


BIN=BIN
card/static/images/message.png


BIN=BIN
card/static/images/pf_star.png


BIN=BIN
card/static/images/pf_star_h.png


BIN=BIN
card/static/images/phone.png


BIN=BIN
card/static/images/phone1.png


BIN=BIN
card/static/images/posterBg.png


BIN=BIN
card/static/images/remove.png


BIN=BIN
card/static/images/rm.png


BIN=BIN
card/static/images/rqico.png


BIN=BIN
card/static/images/save.png


BIN=BIN
card/static/images/sc_ico.png


BIN=BIN
card/static/images/sh.png


BIN=BIN
card/static/images/share.png


BIN=BIN
card/static/images/shcg.png


BIN=BIN
card/static/images/shry.png


BIN=BIN
card/static/images/shsb.png


BIN=BIN
card/static/images/sj_ico.png


BIN=BIN
card/static/images/sp_ico.png


BIN=BIN
card/static/images/tp_ico.png


BIN=BIN
card/static/images/upload.png


BIN=BIN
card/static/images/wdmp.png


BIN=BIN
card/static/images/wechat.png


BIN=BIN
card/static/images/wx.png


BIN=BIN
card/static/images/wxChat.png


BIN=BIN
card/static/images/yin_l.png


BIN=BIN
card/static/images/yin_r.png


BIN=BIN
card/static/images/zan_ico.png


+ 13 - 0
card/success/success.css

@@ -0,0 +1,13 @@
+/* success.css */
+page{background: #fff;}
+.success{padding: 134rpx 50rpx 0;text-align: center;}
+.success image{width: 106rpx;height: 106rpx;margin: 0 auto;}
+.tip{font-size: 40rpx;color: #000;margin: 25rpx 0 20rpx;}
+.tips{font-size: 24rpx;color: #999;line-height: 40rpx;}
+.mine{color: var(--btn);display: inline-block;}
+.share{width: 371rpx !important;height: 80rpx !important;background: var(--btn);border-radius: 40rpx !important;font-size: 36rpx;color: #fff;line-height: 80rpx !important;margin: 90rpx auto 0 !important;}
+.backhome{width: 367rpx;height: 76rpx;background: #FFFFFF;border: 2rpx solid var(--btn);border-radius: 40rpx;font-size: 36rpx;color: var(--btn);text-align: center;line-height: 76rpx;margin: 20rpx auto 0;}
+.color-red{
+	border: 2rpx solid red;
+	color: red;
+}

+ 57 - 0
card/success/success.vue

@@ -0,0 +1,57 @@
+<template>
+	<view class="success">
+		<block>
+			<image v-if="state==1" src="../static/images/shcg.png"></image>
+			<image v-if="state==2" src="../static/images/shsb.png"></image>
+			<image v-if="state==0" src="../static/images/sh.png"></image>
+		</block>
+		<view class="tip">
+			<block v-if="state==1">审核成功</block>
+			<block v-if="state==2">审核失败</block>
+			<block v-if="state==0">审核中</block>
+		</view>
+		<view class="tips">
+			<block v-if="state==0">您已成功提交名片信息,请耐心等待审核</block>
+			<block v-if="state==1">您的名片信息已通过审核</block>
+			<block v-if="state==2">{{msg}}</block>
+		</view>
+		<navigator v-if="state==0" url="/card/index/index" open-type="navigate" hover-class="none" class="backhome">预览名片</navigator>
+		<view v-if="state==1">
+			<navigator url="/card/index/index" open-type="navigate" hover-class="none" class="backhome">预览名片</navigator>
+			<navigator url="/card/create/create?isEdit=true" open-type="navigate" hover-class="none" class="backhome color-red">修改信息</navigator>
+		</view>
+		<navigator v-if="state==2" url="/card/create/create?isEdit=true" open-type="navigate" hover-class="none" class="backhome">去修改</navigator>
+	</view>
+</template>
+
+<script>
+const req = require('../../utils/request.js');
+const util = require('../../utils/util.js');
+const app = getApp();
+export default {
+	components: {
+	},
+	data() {
+		return {
+			options: {},
+			detail: {},
+			state:0
+		};
+	},
+	onLoad(options) {
+		this.options = options;
+		this.state = options.state?options.state:0
+		this.msg = options.msg
+	},
+	onShow() {
+	},
+	onReachBottom: function() {
+	},
+	methods: {
+	}
+};
+</script>
+
+<style>
+	@import "./success.css";
+</style>

+ 3 - 2
main.js

@@ -1,5 +1,4 @@
 import App from './App'
-
 // #ifndef VUE3
 import Vue from 'vue'
 Vue.config.productionTip = false
@@ -18,4 +17,6 @@ export function createApp() {
     app
   }
 }
-// #endif
+// #endif
+import { VueJsonp } from 'vue-jsonp';
+Vue.use(VueJsonp);

+ 10 - 0
manifest.json

@@ -72,6 +72,16 @@
     "h5" : {
         "router" : {
             "mode" : "history"
+        },
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "CBRBZ-5SHKL-3NCPX-EP5MQ-B57M6-CWFUU"
+                }
+            }
+        },
+        "devServer" : {
+            "https" : false
         }
     }
 }

+ 12 - 0
node_modules/.package-lock.json

@@ -0,0 +1,12 @@
+{
+  "name": "renshouH5",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "node_modules/vue-jsonp": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
+      "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
+    }
+  }
+}

+ 21 - 0
node_modules/vue-jsonp/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 LancerComet
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 153 - 0
node_modules/vue-jsonp/README.md

@@ -0,0 +1,153 @@
+# Vue-jsonp
+
+[![VueJsonp](https://github.com/LancerComet/vue-jsonp/workflows/Test/badge.svg)](https://github.com/LancerComet/vue-jsonp/actions)
+
+A tiny library for handling JSONP request.
+
+## Quick Start
+
+As Vue plugin:
+
+```ts
+import { VueJsonp } from 'vue-jsonp'
+
+// Vue Plugin.
+Vue.use(VueJsonp)
+
+// Now you can use this.$jsonp in Vue components.
+const vm = new Vue()
+vm.$jsonp('/some-jsonp-url', {
+  myCustomUrlParam: 'veryNice'
+})
+```
+
+Use function directly:
+
+```ts
+import { jsonp } from 'vue-jsonp'
+
+jsonp('/some-jsonp-url', {
+  myCustomUrlParam: 'veryNice'
+})
+```
+
+## Send data and set query & function name
+
+### Send data
+
+```ts
+// The request url will be "/some-jsonp-url?name=LancerComet&age=100&callback=jsonp_{RANDOM_STR}".
+jsonp('/some-jsonp-url', {
+  name: 'LancerComet',
+  age: 100
+})
+```
+
+### Custom query & function name
+
+The url uniform is `/url?{callbackQuery}={callbackName}&...`, the default is `/url?callback=jsonp_{RANDOM_STRING}&...`.
+
+And you can change it like this:
+
+```ts
+// The request url will be "/some-jsonp-url?name=LancerComet&age=100&cb=jsonp_func".
+jsonp('/some-jsonp-url', {
+  callbackQuery: 'cb',
+  callbackName: 'jsonp_func',
+  name: 'LancerComet',
+  age: 100
+})
+```
+
+## Module exports
+
+ - `VueJsonp: PluginObject<never>`
+ 
+ - `jsonp<T>: (url: string, param?: IJsonpParam, timeout?: number) => Promise<T>`
+ 
+## API
+
+### IJsonpParam
+
+IJsonpParam is the type of param for jsonp function.
+
+```ts
+/**
+ * JSONP parameter declaration.
+ */
+interface IJsonpParam {
+  /**
+   * Callback query name.
+   * This param is used to define the query name of the callback function.
+   *
+   * @example
+   * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
+   * jsonp('/some-url', {
+   *   callbackQuery: 'myCallback',
+   *   callbackName: 'jsonp_func',
+   *   myCustomUrlParam: 'veryNice'
+   * })
+   *
+   * @default callback
+   */
+  callbackQuery?: string
+
+  /**
+   * Callback function name.
+   * This param is used to define the jsonp function name.
+   *
+   * @example
+   * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
+   * jsonp('/some-url', {
+   *   callbackQuery: 'myCallback',
+   *   callbackName: 'jsonp_func',
+   *   myCustomUrlParam: 'veryNice'
+   * })
+   *
+   * @default jsonp_ + randomStr()
+   */
+  callbackName?: string
+
+  /**
+   * Custom data.
+   */
+  [key: string]: any
+}
+```
+
+## Example
+
+```ts
+import Vue from 'vue'
+import { VueJsonp } from 'vue-jsonp'
+
+Vue.use(VueJsonp)
+
+const vm = new Vue()
+const { code, data, message } = await vm.$jsonp<{
+  code: number,
+  message: string,
+  data: {
+    id: number,
+    nickname: string
+  }
+}>('/my-awesome-url', {
+  name: 'MyName', age: 20
+})
+
+assert(code === 0)
+assert(message === 'ok')
+assert(data.id === 1)
+assert(data.nickname === 'John Smith')
+```
+
+```ts
+import { jsonp } from 'vue-jsonp'
+
+const result = await jsonp<string>('/my-awesome-url')
+assert(result === 'such a jsonp')
+```
+
+## License
+
+MIT

+ 73 - 0
node_modules/vue-jsonp/dist/index.d.ts

@@ -0,0 +1,73 @@
+/**
+ * Vue Jsonp.
+ * # Carry Your World #
+ *
+ * @author: LancerComet
+ * @license: MIT
+ */
+import { PluginObject } from 'vue/types/plugin';
+declare module 'vue/types/vue' {
+    interface Vue {
+        $jsonp: typeof jsonp;
+    }
+}
+/**
+ * Vue JSONP.
+ */
+declare const VueJsonp: PluginObject<never>;
+/**
+ * JSONP function.
+ *
+ * @param { string } url Target URL address.
+ * @param { IJsonpParam } param Querying params object.
+ * @param { number } timeout Timeout setting (ms).
+ *
+ * @example
+ * jsonp('/url', {
+ *   callbackQuery: ''
+ *   callbackName: '',
+ *   name: 'LancerComet',
+ *   age: 26
+ * }, 1000)
+ */
+declare function jsonp<T = any>(url: string, param?: IJsonpParam, timeout?: number): Promise<T>;
+export { VueJsonp, jsonp };
+/**
+ * JSONP parameter declaration.
+ */
+interface IJsonpParam {
+    /**
+     * Callback query name.
+     * This param is used to define the query name of the callback function.
+     *
+     * @example
+     * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
+     * jsonp('/some-url', {
+     *   callbackQuery: 'myCallback',
+     *   callbackName: 'jsonp_func',
+     *   myCustomUrlParam: 'veryNice'
+     * })
+     *
+     * @default callback
+     */
+    callbackQuery?: string;
+    /**
+     * Callback function name.
+     * This param is used to define the jsonp function name.
+     *
+     * @example
+     * // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
+     * jsonp('/some-url', {
+     *   callbackQuery: 'myCallback',
+     *   callbackName: 'jsonp_func',
+     *   myCustomUrlParam: 'veryNice'
+     * })
+     *
+     * @default jsonp_ + randomStr()
+     */
+    callbackName?: string;
+    /**
+     * Custom data.
+     */
+    [key: string]: any;
+}

+ 8 - 0
node_modules/vue-jsonp/dist/index.esm.js

@@ -0,0 +1,8 @@
+function e(t,n){t=t.replace(/=/g,"");var o=[];switch(n.constructor){case String:case Number:case Boolean:o.push(encodeURIComponent(t)+"="+encodeURIComponent(n));break;case Array:n.forEach((function(n){o=o.concat(e(t+"[]=",n))}));break;case Object:Object.keys(n).forEach((function(r){var a=n[r];o=o.concat(e(t+"["+r+"]",a))}))}return o}function t(e){var n=[];return e.forEach((function(e){"string"==typeof e?n.push(e):n=n.concat(t(e))})),n}
+/**
+ * Vue Jsonp.
+ * # Carry Your World #
+ *
+ * @author: LancerComet
+ * @license: MIT
+ */var n={install:function(e){e.prototype.$jsonp=o}};function o(n,o,r){if(void 0===o&&(o={}),"string"!=typeof n)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof o||!o)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(a,c){var u="string"==typeof o.callbackQuery?o.callbackQuery:"callback",i="string"==typeof o.callbackName?o.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);o[u]=i,delete o.callbackQuery,delete o.callbackName;var s=[];Object.keys(o).forEach((function(t){s=s.concat(e(t,o[t]))}));var l=t(s).join("&"),f=function(){p(),clearTimeout(m),c({status:400,statusText:"Bad Request"})},p=function(){b.removeEventListener("error",f)},d=function(){document.body.removeChild(b),delete window[i]},m=null;r>-1&&(m=setTimeout((function(){p(),d(),c({statusText:"Request Timeout",status:408})}),r)),window[i]=function(e){clearTimeout(m),p(),d(),a(e)};var b=document.createElement("script");b.addEventListener("error",f),b.src=n+(/\?/.test(n)?"&":"?")+l,document.body.appendChild(b)}))}export{n as VueJsonp,o as jsonp};

+ 8 - 0
node_modules/vue-jsonp/dist/index.js

@@ -0,0 +1,8 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueJsonp={})}(this,(function(e){"use strict";function t(e,o){e=e.replace(/=/g,"");var n=[];switch(o.constructor){case String:case Number:case Boolean:n.push(encodeURIComponent(e)+"="+encodeURIComponent(o));break;case Array:o.forEach((function(o){n=n.concat(t(e+"[]=",o))}));break;case Object:Object.keys(o).forEach((function(r){var c=o[r];n=n.concat(t(e+"["+r+"]",c))}))}return n}function o(e){var t=[];return e.forEach((function(e){"string"==typeof e?t.push(e):t=t.concat(o(e))})),t}
+/**
+   * Vue Jsonp.
+   * # Carry Your World #
+   *
+   * @author: LancerComet
+   * @license: MIT
+   */var n={install:function(e){e.prototype.$jsonp=r}};function r(e,n,r){if(void 0===n&&(n={}),"string"!=typeof e)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof n||!n)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(c,a){var i="string"==typeof n.callbackQuery?n.callbackQuery:"callback",s="string"==typeof n.callbackName?n.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);n[i]=s,delete n.callbackQuery,delete n.callbackName;var u=[];Object.keys(n).forEach((function(e){u=u.concat(t(e,n[e]))}));var f=o(u).join("&"),l=function(){p(),clearTimeout(b),a({status:400,statusText:"Bad Request"})},p=function(){m.removeEventListener("error",l)},d=function(){document.body.removeChild(m),delete window[s]},b=null;r>-1&&(b=setTimeout((function(){p(),d(),a({statusText:"Request Timeout",status:408})}),r)),window[s]=function(e){clearTimeout(b),p(),d(),c(e)};var m=document.createElement("script");m.addEventListener("error",l),m.src=e+(/\?/.test(e)?"&":"?")+f,document.body.appendChild(m)}))}e.VueJsonp=n,e.jsonp=r,Object.defineProperty(e,"__esModule",{value:!0})}));

+ 20 - 0
node_modules/vue-jsonp/dist/utils/index.d.ts

@@ -0,0 +1,20 @@
+/**
+ * Generate random string.
+ *
+ * @return { string }
+ */
+declare function randomStr(): string;
+/**
+ * Format params into querying string.
+ *
+ * @return {string[]}
+ */
+declare function formatParams(queryKey: string, value: any): string[];
+/**
+ * Flat querys.
+ *
+ * @param {string[] | (string[])[]} array
+ * @returns
+ */
+declare function flatten(array: string[] | (string[])[]): string[];
+export { formatParams, flatten, randomStr };

+ 50 - 0
node_modules/vue-jsonp/package.json

@@ -0,0 +1,50 @@
+{
+  "name": "vue-jsonp",
+  "version": "2.0.0",
+  "description": "A tiny library for handling JSONP request.",
+  "main": "./dist/index.js",
+  "module": "./dist/index.esm.js",
+  "keywords": [
+    "Vue",
+    "JSONP"
+  ],
+  "files": [
+    "dist/",
+    "index.d.ts",
+    "README.md"
+  ],
+  "scripts": {
+    "build": "rollup -c",
+    "test": "jest",
+    "pretest": "npm run build",
+    "preversion": "npm run test",
+    "prepublish": "npm run test"
+  },
+  "author": {
+    "name": "LancerComet",
+    "email": "chw644@hotmail.com"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/LancerComet/vue-jsonp.git"
+  },
+  "license": "MIT",
+  "devDependencies": {
+    "@types/expect-puppeteer": "^4.4.3",
+    "@types/jest": "^26.0.14",
+    "@types/jest-environment-puppeteer": "^4.4.0",
+    "@types/puppeteer": "^3.0.2",
+    "jest": "^26.4.2",
+    "jest-puppeteer": "^4.4.0",
+    "puppeteer": "^5.3.1",
+    "rollup": "^2.28.2",
+    "rollup-plugin-cleanup": "^3.2.1",
+    "rollup-plugin-delete": "^2.0.0",
+    "rollup-plugin-terser": "^7.0.2",
+    "rollup-plugin-typescript2": "^0.27.3",
+    "ts-jest": "^26.4.1",
+    "tslint": "^6.1.3",
+    "typescript": "^4.0.3",
+    "vue": "^2.6.12"
+  }
+}

+ 24 - 0
package-lock.json

@@ -0,0 +1,24 @@
+{
+  "name": "renshouH5",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "vue-jsonp": "^2.0.0"
+      }
+    },
+    "node_modules/vue-jsonp": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
+      "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
+    }
+  },
+  "dependencies": {
+    "vue-jsonp": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz",
+      "integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA=="
+    }
+  }
+}

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "vue-jsonp": "^2.0.0"
+  }
+}

+ 10 - 0
pages.json

@@ -17,6 +17,16 @@
 			"style": {
 				"navigationBarTitleText": "详情"
 			}
+		}, {
+			"path": "success/success",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		}, {
+			"path": "index/index",
+			"style": {
+				"navigationBarTitleText": ""
+			}
 		}]
 	}],
 	"globalStyle": {

BIN=BIN
static/images/comment.png


BIN=BIN
static/images/link.png


BIN=BIN
static/images/play.png


BIN=BIN
static/images/share.png


BIN=BIN
static/images/topic.png


BIN=BIN
static/images/vip_tag.png


BIN=BIN
static/pages/images/fw_hui.png


BIN=BIN
static/pages/images/wx.png


+ 1238 - 0
utils/qqmap-wx-jssdk.js

@@ -0,0 +1,1238 @@
+/**
+ * 微信小程序JavaScriptSDK
+ * 
+ * @version 1.2
+ * @date 2019-03-06
+ * @author v_ylyue@tencent.com
+ */
+var ERROR_CONF = {
+  KEY_ERR: 311,
+  KEY_ERR_MSG: 'key格式错误',
+  PARAM_ERR: 310,
+  PARAM_ERR_MSG: '请求参数信息有误',
+  SYSTEM_ERR: 600,
+  SYSTEM_ERR_MSG: '系统错误',
+  WX_ERR_CODE: 1000,
+  WX_OK_CODE: 200
+};
+var BASE_URL = 'https://apis.map.qq.com/ws/';
+var URL_SEARCH = BASE_URL + 'place/v1/search';
+var URL_SUGGESTION = BASE_URL + 'place/v1/suggestion';
+var URL_GET_GEOCODER = BASE_URL + 'geocoder/v1/';
+var URL_CITY_LIST = BASE_URL + 'district/v1/list';
+var URL_AREA_LIST = BASE_URL + 'district/v1/getchildren';
+var URL_DISTANCE = BASE_URL + 'distance/v1/';
+var URL_DIRECTION = BASE_URL + 'direction/v1/';
+var MODE = {
+  driving: 'driving',
+  transit: 'transit'
+};
+var EARTH_RADIUS = 6378136.49;
+var Utils = {
+  /**
+  * md5加密方法
+  * 版权所有©2011 Sebastian Tschan,https://blueimp.net
+  */
+  safeAdd(x, y) {
+    var lsw = (x & 0xffff) + (y & 0xffff);
+    var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+    return msw << 16 | lsw & 0xffff;
+  },
+
+  bitRotateLeft(num, cnt) {
+    return num << cnt | num >>> 32 - cnt;
+  },
+
+  md5cmn(q, a, b, x, s, t) {
+    return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(a, q), this.safeAdd(x, t)), s), b);
+  },
+
+  md5ff(a, b, c, d, x, s, t) {
+    return this.md5cmn(b & c | ~b & d, a, b, x, s, t);
+  },
+
+  md5gg(a, b, c, d, x, s, t) {
+    return this.md5cmn(b & d | c & ~d, a, b, x, s, t);
+  },
+
+  md5hh(a, b, c, d, x, s, t) {
+    return this.md5cmn(b ^ c ^ d, a, b, x, s, t);
+  },
+
+  md5ii(a, b, c, d, x, s, t) {
+    return this.md5cmn(c ^ (b | ~d), a, b, x, s, t);
+  },
+
+  binlMD5(x, len) {
+    /* append padding */
+    x[len >> 5] |= 0x80 << len % 32;
+    x[(len + 64 >>> 9 << 4) + 14] = len;
+    var i;
+    var olda;
+    var oldb;
+    var oldc;
+    var oldd;
+    var a = 1732584193;
+    var b = -271733879;
+    var c = -1732584194;
+    var d = 271733878;
+
+    for (i = 0; i < x.length; i += 16) {
+      olda = a;
+      oldb = b;
+      oldc = c;
+      oldd = d;
+      a = this.md5ff(a, b, c, d, x[i], 7, -680876936);
+      d = this.md5ff(d, a, b, c, x[i + 1], 12, -389564586);
+      c = this.md5ff(c, d, a, b, x[i + 2], 17, 606105819);
+      b = this.md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
+      a = this.md5ff(a, b, c, d, x[i + 4], 7, -176418897);
+      d = this.md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
+      c = this.md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
+      b = this.md5ff(b, c, d, a, x[i + 7], 22, -45705983);
+      a = this.md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
+      d = this.md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
+      c = this.md5ff(c, d, a, b, x[i + 10], 17, -42063);
+      b = this.md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
+      a = this.md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
+      d = this.md5ff(d, a, b, c, x[i + 13], 12, -40341101);
+      c = this.md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
+      b = this.md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
+      a = this.md5gg(a, b, c, d, x[i + 1], 5, -165796510);
+      d = this.md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
+      c = this.md5gg(c, d, a, b, x[i + 11], 14, 643717713);
+      b = this.md5gg(b, c, d, a, x[i], 20, -373897302);
+      a = this.md5gg(a, b, c, d, x[i + 5], 5, -701558691);
+      d = this.md5gg(d, a, b, c, x[i + 10], 9, 38016083);
+      c = this.md5gg(c, d, a, b, x[i + 15], 14, -660478335);
+      b = this.md5gg(b, c, d, a, x[i + 4], 20, -405537848);
+      a = this.md5gg(a, b, c, d, x[i + 9], 5, 568446438);
+      d = this.md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
+      c = this.md5gg(c, d, a, b, x[i + 3], 14, -187363961);
+      b = this.md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
+      a = this.md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
+      d = this.md5gg(d, a, b, c, x[i + 2], 9, -51403784);
+      c = this.md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
+      b = this.md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
+      a = this.md5hh(a, b, c, d, x[i + 5], 4, -378558);
+      d = this.md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
+      c = this.md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
+      b = this.md5hh(b, c, d, a, x[i + 14], 23, -35309556);
+      a = this.md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
+      d = this.md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
+      c = this.md5hh(c, d, a, b, x[i + 7], 16, -155497632);
+      b = this.md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
+      a = this.md5hh(a, b, c, d, x[i + 13], 4, 681279174);
+      d = this.md5hh(d, a, b, c, x[i], 11, -358537222);
+      c = this.md5hh(c, d, a, b, x[i + 3], 16, -722521979);
+      b = this.md5hh(b, c, d, a, x[i + 6], 23, 76029189);
+      a = this.md5hh(a, b, c, d, x[i + 9], 4, -640364487);
+      d = this.md5hh(d, a, b, c, x[i + 12], 11, -421815835);
+      c = this.md5hh(c, d, a, b, x[i + 15], 16, 530742520);
+      b = this.md5hh(b, c, d, a, x[i + 2], 23, -995338651);
+      a = this.md5ii(a, b, c, d, x[i], 6, -198630844);
+      d = this.md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
+      c = this.md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
+      b = this.md5ii(b, c, d, a, x[i + 5], 21, -57434055);
+      a = this.md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
+      d = this.md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
+      c = this.md5ii(c, d, a, b, x[i + 10], 15, -1051523);
+      b = this.md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
+      a = this.md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
+      d = this.md5ii(d, a, b, c, x[i + 15], 10, -30611744);
+      c = this.md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
+      b = this.md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
+      a = this.md5ii(a, b, c, d, x[i + 4], 6, -145523070);
+      d = this.md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
+      c = this.md5ii(c, d, a, b, x[i + 2], 15, 718787259);
+      b = this.md5ii(b, c, d, a, x[i + 9], 21, -343485551);
+      a = this.safeAdd(a, olda);
+      b = this.safeAdd(b, oldb);
+      c = this.safeAdd(c, oldc);
+      d = this.safeAdd(d, oldd);
+    }
+
+    return [a, b, c, d];
+  },
+
+  binl2rstr(input) {
+    var i;
+    var output = '';
+    var length32 = input.length * 32;
+
+    for (i = 0; i < length32; i += 8) {
+      output += String.fromCharCode(input[i >> 5] >>> i % 32 & 0xff);
+    }
+
+    return output;
+  },
+
+  rstr2binl(input) {
+    var i;
+    var output = [];
+    output[(input.length >> 2) - 1] = undefined;
+
+    for (i = 0; i < output.length; i += 1) {
+      output[i] = 0;
+    }
+
+    var length8 = input.length * 8;
+
+    for (i = 0; i < length8; i += 8) {
+      output[i >> 5] |= (input.charCodeAt(i / 8) & 0xff) << i % 32;
+    }
+
+    return output;
+  },
+
+  rstrMD5(s) {
+    return this.binl2rstr(this.binlMD5(this.rstr2binl(s), s.length * 8));
+  },
+
+  rstrHMACMD5(key, data) {
+    var i;
+    var bkey = this.rstr2binl(key);
+    var ipad = [];
+    var opad = [];
+    var hash;
+    ipad[15] = opad[15] = undefined;
+
+    if (bkey.length > 16) {
+      bkey = this.binlMD5(bkey, key.length * 8);
+    }
+
+    for (i = 0; i < 16; i += 1) {
+      ipad[i] = bkey[i] ^ 0x36363636;
+      opad[i] = bkey[i] ^ 0x5c5c5c5c;
+    }
+
+    hash = this.binlMD5(ipad.concat(this.rstr2binl(data)), 512 + data.length * 8);
+    return this.binl2rstr(this.binlMD5(opad.concat(hash), 512 + 128));
+  },
+
+  rstr2hex(input) {
+    var hexTab = '0123456789abcdef';
+    var output = '';
+    var x;
+    var i;
+
+    for (i = 0; i < input.length; i += 1) {
+      x = input.charCodeAt(i);
+      output += hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f);
+    }
+
+    return output;
+  },
+
+  str2rstrUTF8(input) {
+    return unescape(encodeURIComponent(input));
+  },
+
+  rawMD5(s) {
+    return this.rstrMD5(this.str2rstrUTF8(s));
+  },
+
+  hexMD5(s) {
+    return this.rstr2hex(this.rawMD5(s));
+  },
+
+  rawHMACMD5(k, d) {
+    return this.rstrHMACMD5(this.str2rstrUTF8(k), str2rstrUTF8(d));
+  },
+
+  hexHMACMD5(k, d) {
+    return this.rstr2hex(this.rawHMACMD5(k, d));
+  },
+
+  md5(string, key, raw) {
+    if (!key) {
+      if (!raw) {
+        return this.hexMD5(string);
+      }
+
+      return this.rawMD5(string);
+    }
+
+    if (!raw) {
+      return this.hexHMACMD5(key, string);
+    }
+
+    return this.rawHMACMD5(key, string);
+  },
+
+  /**
+   * 得到md5加密后的sig参数
+   * @param {Object} requestParam 接口参数
+   * @param {String} sk签名字符串
+   * @param {String} featrue 方法名
+   * @return 返回加密后的sig参数
+   */
+  getSig(requestParam, sk, feature, mode) {
+    var sig = null;
+    var requestArr = [];
+    Object.keys(requestParam).sort().forEach(function (key) {
+      requestArr.push(key + '=' + requestParam[key]);
+    });
+
+    if (feature == 'search') {
+      sig = '/ws/place/v1/search?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'suggest') {
+      sig = '/ws/place/v1/suggestion?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'reverseGeocoder') {
+      sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'geocoder') {
+      sig = '/ws/geocoder/v1/?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'getCityList') {
+      sig = '/ws/district/v1/list?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'getDistrictByCityId') {
+      sig = '/ws/district/v1/getchildren?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'calculateDistance') {
+      sig = '/ws/distance/v1/?' + requestArr.join('&') + sk;
+    }
+
+    if (feature == 'direction') {
+      sig = '/ws/direction/v1/' + mode + '?' + requestArr.join('&') + sk;
+    }
+
+    sig = this.md5(sig);
+    return sig;
+  },
+
+  /**
+   * 得到终点query字符串
+   * @param {Array|String} 检索数据
+   */
+  location2query(data) {
+    if (typeof data == 'string') {
+      return data;
+    }
+
+    var query = '';
+
+    for (var i = 0; i < data.length; i++) {
+      var d = data[i];
+
+      if (!!query) {
+        query += ';';
+      }
+
+      if (d.location) {
+        query = query + d.location.lat + ',' + d.location.lng;
+      }
+
+      if (d.latitude && d.longitude) {
+        query = query + d.latitude + ',' + d.longitude;
+      }
+    }
+
+    return query;
+  },
+
+  /**
+   * 计算角度
+   */
+  rad(d) {
+    return d * Math.PI / 180.0;
+  },
+
+  /**
+   * 处理终点location数组
+   * @return 返回终点数组
+   */
+  getEndLocation(location) {
+    var to = location.split(';');
+    var endLocation = [];
+
+    for (var i = 0; i < to.length; i++) {
+      endLocation.push({
+        lat: parseFloat(to[i].split(',')[0]),
+        lng: parseFloat(to[i].split(',')[1])
+      });
+    }
+
+    return endLocation;
+  },
+
+  /**
+   * 计算两点间直线距离
+   * @param a 表示纬度差
+   * @param b 表示经度差
+   * @return 返回的是距离,单位m
+   */
+  getDistance(latFrom, lngFrom, latTo, lngTo) {
+    var radLatFrom = this.rad(latFrom);
+    var radLatTo = this.rad(latTo);
+    var a = radLatFrom - radLatTo;
+    var b = this.rad(lngFrom) - this.rad(lngTo);
+    var distance = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLatFrom) * Math.cos(radLatTo) * Math.pow(Math.sin(b / 2), 2)));
+    distance = distance * EARTH_RADIUS;
+    distance = Math.round(distance * 10000) / 10000;
+    return parseFloat(distance.toFixed(0));
+  },
+
+  /**
+   * 使用微信接口进行定位
+   */
+  getWXLocation(success, fail, complete) {
+    uni.getLocation({
+      type: 'gcj02',
+      success: success,
+      fail: fail,
+      complete: complete
+    });
+  },
+
+  /**
+   * 获取location参数
+   */
+  getLocationParam(location) {
+    if (typeof location == 'string') {
+      var locationArr = location.split(',');
+
+      if (locationArr.length === 2) {
+        location = {
+          latitude: location.split(',')[0],
+          longitude: location.split(',')[1]
+        };
+      } else {
+        location = {};
+      }
+    }
+
+    return location;
+  },
+
+  /**
+   * 回调函数默认处理
+   */
+  polyfillParam(param) {
+    param.success = param.success || function () {};
+
+    param.fail = param.fail || function () {};
+
+    param.complete = param.complete || function () {};
+  },
+
+  /**
+   * 验证param对应的key值是否为空
+   * 
+   * @param {Object} param 接口参数
+   * @param {String} key 对应参数的key
+   */
+  checkParamKeyEmpty(param, key) {
+    if (!param[key]) {
+      var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key + '参数格式有误');
+      param.fail(errconf);
+      param.complete(errconf);
+      return true;
+    }
+
+    return false;
+  },
+
+  /**
+   * 验证参数中是否存在检索词keyword
+   * 
+   * @param {Object} param 接口参数
+   */
+  checkKeyword(param) {
+    return !this.checkParamKeyEmpty(param, 'keyword');
+  },
+
+  /**
+   * 验证location值
+   * 
+   * @param {Object} param 接口参数
+   */
+  checkLocation(param) {
+    var location = this.getLocationParam(param.location);
+
+    if (!location || !location.latitude || !location.longitude) {
+      var errconf = this.buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + ' location参数格式有误');
+      param.fail(errconf);
+      param.complete(errconf);
+      return false;
+    }
+
+    return true;
+  },
+
+  /**
+   * 构造错误数据结构
+   * @param {Number} errCode 错误码
+   * @param {Number} errMsg 错误描述
+   */
+  buildErrorConfig(errCode, errMsg) {
+    return {
+      status: errCode,
+      message: errMsg
+    };
+  },
+
+  /**
+   * 
+   * 数据处理函数
+   * 根据传入参数不同处理不同数据
+   * @param {String} feature 功能名称
+   * search 地点搜索
+   * suggest关键词提示
+   * reverseGeocoder逆地址解析
+   * geocoder地址解析
+   * getCityList获取城市列表:父集
+   * getDistrictByCityId获取区县列表:子集
+   * calculateDistance距离计算
+   * @param {Object} param 接口参数
+   * @param {Object} data 数据
+   */
+  handleData(param, data, feature) {
+    if (feature == 'search') {
+      var searchResult = data.data;
+      var searchSimplify = [];
+
+      for (var i = 0; i < searchResult.length; i++) {
+        searchSimplify.push({
+          id: searchResult[i].id || null,
+          title: searchResult[i].title || null,
+          latitude: searchResult[i].location && searchResult[i].location.lat || null,
+          longitude: searchResult[i].location && searchResult[i].location.lng || null,
+          address: searchResult[i].address || null,
+          category: searchResult[i].category || null,
+          tel: searchResult[i].tel || null,
+          adcode: searchResult[i].ad_info && searchResult[i].ad_info.adcode || null,
+          city: searchResult[i].ad_info && searchResult[i].ad_info.city || null,
+          district: searchResult[i].ad_info && searchResult[i].ad_info.district || null,
+          province: searchResult[i].ad_info && searchResult[i].ad_info.province || null
+        });
+      }
+
+      param.success(data, {
+        searchResult: searchResult,
+        searchSimplify: searchSimplify
+      });
+    } else if (feature == 'suggest') {
+      var suggestResult = data.data;
+      var suggestSimplify = [];
+
+      for (var i = 0; i < suggestResult.length; i++) {
+        suggestSimplify.push({
+          adcode: suggestResult[i].adcode || null,
+          address: suggestResult[i].address || null,
+          category: suggestResult[i].category || null,
+          city: suggestResult[i].city || null,
+          district: suggestResult[i].district || null,
+          id: suggestResult[i].id || null,
+          latitude: suggestResult[i].location && suggestResult[i].location.lat || null,
+          longitude: suggestResult[i].location && suggestResult[i].location.lng || null,
+          province: suggestResult[i].province || null,
+          title: suggestResult[i].title || null,
+          type: suggestResult[i].type || null
+        });
+      }
+
+      param.success(data, {
+        suggestResult: suggestResult,
+        suggestSimplify: suggestSimplify
+      });
+    } else if (feature == 'reverseGeocoder') {
+      var reverseGeocoderResult = data.result;
+      var reverseGeocoderSimplify = {
+        address: reverseGeocoderResult.address || null,
+        latitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lat || null,
+        longitude: reverseGeocoderResult.location && reverseGeocoderResult.location.lng || null,
+        adcode: reverseGeocoderResult.ad_info && reverseGeocoderResult.ad_info.adcode || null,
+        city: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.city || null,
+        district: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.district || null,
+        nation: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.nation || null,
+        province: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.province || null,
+        street: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street || null,
+        street_number: reverseGeocoderResult.address_component && reverseGeocoderResult.address_component.street_number || null,
+        recommend: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.recommend || null,
+        rough: reverseGeocoderResult.formatted_addresses && reverseGeocoderResult.formatted_addresses.rough || null
+      };
+
+      if (reverseGeocoderResult.pois) {
+        //判断是否返回周边poi
+        var pois = reverseGeocoderResult.pois;
+        var poisSimplify = [];
+
+        for (var i = 0; i < pois.length; i++) {
+          poisSimplify.push({
+            id: pois[i].id || null,
+            title: pois[i].title || null,
+            latitude: pois[i].location && pois[i].location.lat || null,
+            longitude: pois[i].location && pois[i].location.lng || null,
+            address: pois[i].address || null,
+            category: pois[i].category || null,
+            adcode: pois[i].ad_info && pois[i].ad_info.adcode || null,
+            city: pois[i].ad_info && pois[i].ad_info.city || null,
+            district: pois[i].ad_info && pois[i].ad_info.district || null,
+            province: pois[i].ad_info && pois[i].ad_info.province || null
+          });
+        }
+
+        param.success(data, {
+          reverseGeocoderResult: reverseGeocoderResult,
+          reverseGeocoderSimplify: reverseGeocoderSimplify,
+          pois: pois,
+          poisSimplify: poisSimplify
+        });
+      } else {
+        param.success(data, {
+          reverseGeocoderResult: reverseGeocoderResult,
+          reverseGeocoderSimplify: reverseGeocoderSimplify
+        });
+      }
+    } else if (feature == 'geocoder') {
+      var geocoderResult = data.result;
+      var geocoderSimplify = {
+        title: geocoderResult.title || null,
+        latitude: geocoderResult.location && geocoderResult.location.lat || null,
+        longitude: geocoderResult.location && geocoderResult.location.lng || null,
+        adcode: geocoderResult.ad_info && geocoderResult.ad_info.adcode || null,
+        province: geocoderResult.address_components && geocoderResult.address_components.province || null,
+        city: geocoderResult.address_components && geocoderResult.address_components.city || null,
+        district: geocoderResult.address_components && geocoderResult.address_components.district || null,
+        street: geocoderResult.address_components && geocoderResult.address_components.street || null,
+        street_number: geocoderResult.address_components && geocoderResult.address_components.street_number || null,
+        level: geocoderResult.level || null
+      };
+      param.success(data, {
+        geocoderResult: geocoderResult,
+        geocoderSimplify: geocoderSimplify
+      });
+    } else if (feature == 'getCityList') {
+      var provinceResult = data.result[0];
+      var cityResult = data.result[1];
+      var districtResult = data.result[2];
+      param.success(data, {
+        provinceResult: provinceResult,
+        cityResult: cityResult,
+        districtResult: districtResult
+      });
+    } else if (feature == 'getDistrictByCityId') {
+      var districtByCity = data.result[0];
+      param.success(data, districtByCity);
+    } else if (feature == 'calculateDistance') {
+      var calculateDistanceResult = data.result.elements;
+      var distance = [];
+
+      for (var i = 0; i < calculateDistanceResult.length; i++) {
+        distance.push(calculateDistanceResult[i].distance);
+      }
+
+      param.success(data, {
+        calculateDistanceResult: calculateDistanceResult,
+        distance: distance
+      });
+    } else if (feature == 'direction') {
+      var direction = data.result.routes;
+      param.success(data, direction);
+    } else {
+      param.success(data);
+    }
+  },
+
+  /**
+   * 构造微信请求参数,公共属性处理
+   * 
+   * @param {Object} param 接口参数
+   * @param {Object} param 配置项
+   * @param {String} feature 方法名
+   */
+  buildWxRequestConfig(param, options, feature) {
+    var that = this;
+    options.header = {
+      "content-type": "application/json"
+    };
+    options.method = 'GET';
+
+    options.success = function (res) {
+      var data = res.data;
+
+      if (data.status === 0) {
+        that.handleData(param, data, feature);
+      } else {
+        param.fail(data);
+      }
+    };
+
+    options.fail = function (res) {
+      res.statusCode = ERROR_CONF.WX_ERR_CODE;
+      param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+    };
+
+    options.complete = function (res) {
+      var statusCode = +res.statusCode;
+
+      switch (statusCode) {
+        case ERROR_CONF.WX_ERR_CODE:
+          {
+            param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+            break;
+          }
+
+        case ERROR_CONF.WX_OK_CODE:
+          {
+            var data = res.data;
+
+            if (data.status === 0) {
+              param.complete(data);
+            } else {
+              param.complete(that.buildErrorConfig(data.status, data.message));
+            }
+
+            break;
+          }
+
+        default:
+          {
+            param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG));
+          }
+      }
+    };
+
+    return options;
+  },
+
+  /**
+   * 处理用户参数是否传入坐标进行不同的处理
+   */
+  locationProcess(param, locationsuccess, locationfail, locationcomplete) {
+    var that = this;
+
+    locationfail = locationfail || function (res) {
+      res.statusCode = ERROR_CONF.WX_ERR_CODE;
+      param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+    };
+
+    locationcomplete = locationcomplete || function (res) {
+      if (res.statusCode == ERROR_CONF.WX_ERR_CODE) {
+        param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));
+      }
+    };
+
+    if (!param.location) {
+      that.getWXLocation(locationsuccess, locationfail, locationcomplete);
+    } else if (that.checkLocation(param)) {
+      var location = Utils.getLocationParam(param.location);
+      locationsuccess(location);
+    }
+  }
+
+};
+
+class QQMapWX {
+  /**
+   * 构造函数
+   * 
+   * @param {Object} options 接口参数,key 为必选参数
+   */
+  constructor(options) {
+    if (!options.key) {
+      throw Error('key值不能为空');
+    }
+
+    this.key = options.key;
+  }
+
+  /**
+   * POI周边检索
+   *
+   * @param {Object} options 接口参数对象
+   * 
+   * 参数对象结构可以参考
+   * @see http://lbs.qq.com/webservice_v1/guide-search.html
+   */
+  search(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (!Utils.checkKeyword(options)) {
+      return;
+    }
+
+    var requestParam = {
+      keyword: options.keyword,
+      orderby: options.orderby || '_distance',
+      page_size: options.page_size || 10,
+      page_index: options.page_index || 1,
+      output: 'json',
+      key: that.key
+    };
+
+    if (options.address_format) {
+      requestParam.address_format = options.address_format;
+    }
+
+    if (options.filter) {
+      requestParam.filter = options.filter;
+    }
+
+    var distance = options.distance || "1000";
+    var auto_extend = options.auto_extend || 1;
+    var region = null;
+    var rectangle = null; //判断城市限定参数
+
+    if (options.region) {
+      region = options.region;
+    } //矩形限定坐标(暂时只支持字符串格式)
+
+
+    if (options.rectangle) {
+      rectangle = options.rectangle;
+    }
+
+    var locationsuccess = function (result) {
+      if (region && !rectangle) {
+        //城市限定参数拼接
+        requestParam.boundary = "region(" + region + "," + auto_extend + "," + result.latitude + "," + result.longitude + ")";
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');
+        }
+      } else if (rectangle && !region) {
+        //矩形搜索
+        requestParam.boundary = "rectangle(" + rectangle + ")";
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');
+        }
+      } else {
+        requestParam.boundary = "nearby(" + result.latitude + "," + result.longitude + "," + distance + "," + auto_extend + ")";
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'search');
+        }
+      }
+
+      uni.request(Utils.buildWxRequestConfig(options, {
+        url: URL_SEARCH,
+        data: requestParam
+      }, 'search'));
+    };
+
+    Utils.locationProcess(options, locationsuccess);
+  }
+
+  /**
+   * sug模糊检索
+   *
+   * @param {Object} options 接口参数对象
+   * 
+   * 参数对象结构可以参考
+   * http://lbs.qq.com/webservice_v1/guide-suggestion.html
+   */
+  getSuggestion(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (!Utils.checkKeyword(options)) {
+      return;
+    }
+
+    var requestParam = {
+      keyword: options.keyword,
+      region: options.region || '全国',
+      region_fix: options.region_fix || 0,
+      policy: options.policy || 0,
+      page_size: options.page_size || 10,
+      //控制显示条数
+      page_index: options.page_index || 1,
+      //控制页数
+      get_subpois: options.get_subpois || 0,
+      //返回子地点
+      output: 'json',
+      key: that.key
+    }; //长地址
+
+    if (options.address_format) {
+      requestParam.address_format = options.address_format;
+    } //过滤
+
+
+    if (options.filter) {
+      requestParam.filter = options.filter;
+    } //排序
+
+
+    if (options.location) {
+      var locationsuccess = function (result) {
+        requestParam.location = result.latitude + ',' + result.longitude;
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest');
+        }
+
+        uni.request(Utils.buildWxRequestConfig(options, {
+          url: URL_SUGGESTION,
+          data: requestParam
+        }, "suggest"));
+      };
+
+      Utils.locationProcess(options, locationsuccess);
+    } else {
+      if (options.sig) {
+        requestParam.sig = Utils.getSig(requestParam, options.sig, 'suggest');
+      }
+
+      uni.request(Utils.buildWxRequestConfig(options, {
+        url: URL_SUGGESTION,
+        data: requestParam
+      }, "suggest"));
+    }
+  }
+
+  /**
+   * 逆地址解析
+   *
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * http://lbs.qq.com/webservice_v1/guide-gcoder.html
+   */
+  reverseGeocoder(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+    var requestParam = {
+      coord_type: options.coord_type || 5,
+      get_poi: options.get_poi || 1,
+      output: 'json',
+      key: that.key
+    };
+
+    if (options.poi_options) {
+      requestParam.poi_options = options.poi_options;
+    }
+
+    var locationsuccess = function (result) {
+      requestParam.location = result.latitude + ',' + result.longitude;
+
+      if (options.sig) {
+        requestParam.sig = Utils.getSig(requestParam, options.sig, 'reverseGeocoder');
+      }
+
+      uni.request(Utils.buildWxRequestConfig(options, {
+        url: URL_GET_GEOCODER,
+        data: requestParam
+      }, 'reverseGeocoder'));
+    };
+
+    Utils.locationProcess(options, locationsuccess);
+  }
+
+  /**
+   * 地址解析
+   *
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * http://lbs.qq.com/webservice_v1/guide-geocoder.html
+   */
+  geocoder(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (Utils.checkParamKeyEmpty(options, 'address')) {
+      return;
+    }
+
+    var requestParam = {
+      address: options.address,
+      output: 'json',
+      key: that.key
+    }; //城市限定
+
+    if (options.region) {
+      requestParam.region = options.region;
+    }
+
+    if (options.sig) {
+      requestParam.sig = Utils.getSig(requestParam, options.sig, 'geocoder');
+    }
+
+    uni.request(Utils.buildWxRequestConfig(options, {
+      url: URL_GET_GEOCODER,
+      data: requestParam
+    }, 'geocoder'));
+  }
+
+  /**
+   * 获取城市列表
+   *
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * http://lbs.qq.com/webservice_v1/guide-region.html
+   */
+  getCityList(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+    var requestParam = {
+      output: 'json',
+      key: that.key
+    };
+
+    if (options.sig) {
+      requestParam.sig = Utils.getSig(requestParam, options.sig, 'getCityList');
+    }
+
+    uni.request(Utils.buildWxRequestConfig(options, {
+      url: URL_CITY_LIST,
+      data: requestParam
+    }, 'getCityList'));
+  }
+
+  /**
+   * 获取对应城市ID的区县列表
+   *
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * http://lbs.qq.com/webservice_v1/guide-region.html
+   */
+  getDistrictByCityId(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (Utils.checkParamKeyEmpty(options, 'id')) {
+      return;
+    }
+
+    var requestParam = {
+      id: options.id || '',
+      output: 'json',
+      key: that.key
+    };
+
+    if (options.sig) {
+      requestParam.sig = Utils.getSig(requestParam, options.sig, 'getDistrictByCityId');
+    }
+
+    uni.request(Utils.buildWxRequestConfig(options, {
+      url: URL_AREA_LIST,
+      data: requestParam
+    }, 'getDistrictByCityId'));
+  }
+
+  /**
+   * 用于单起点到多终点的路线距离(非直线距离)计算:
+   * 支持两种距离计算方式:步行和驾车。
+   * 起点到终点最大限制直线距离10公里。
+   *
+   * 新增直线距离计算。
+   * 
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * http://lbs.qq.com/webservice_v1/guide-distance.html
+   */
+  calculateDistance(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (Utils.checkParamKeyEmpty(options, 'to')) {
+      return;
+    }
+
+    var requestParam = {
+      mode: options.mode || 'walking',
+      to: Utils.location2query(options.to),
+      output: 'json',
+      key: that.key
+    };
+
+    if (options.from) {
+      options.location = options.from;
+    } //计算直线距离
+
+
+    if (requestParam.mode == 'straight') {
+      var locationsuccess = function (result) {
+        var locationTo = Utils.getEndLocation(requestParam.to); //处理终点坐标
+
+        var data = {
+          message: "query ok",
+          result: {
+            elements: []
+          },
+          status: 0
+        };
+
+        for (var i = 0; i < locationTo.length; i++) {
+          data.result.elements.push({
+            //将坐标存入
+            distance: Utils.getDistance(result.latitude, result.longitude, locationTo[i].lat, locationTo[i].lng),
+            duration: 0,
+            from: {
+              lat: result.latitude,
+              lng: result.longitude
+            },
+            to: {
+              lat: locationTo[i].lat,
+              lng: locationTo[i].lng
+            }
+          });
+        }
+
+        var calculateResult = data.result.elements;
+        var distanceResult = [];
+
+        for (var i = 0; i < calculateResult.length; i++) {
+          distanceResult.push(calculateResult[i].distance);
+        }
+
+        return options.success(data, {
+          calculateResult: calculateResult,
+          distanceResult: distanceResult
+        });
+      };
+
+      Utils.locationProcess(options, locationsuccess);
+    } else {
+      var locationsuccess = function (result) {
+        requestParam.from = result.latitude + ',' + result.longitude;
+
+        if (options.sig) {
+          requestParam.sig = Utils.getSig(requestParam, options.sig, 'calculateDistance');
+        }
+
+        uni.request(Utils.buildWxRequestConfig(options, {
+          url: URL_DISTANCE,
+          data: requestParam
+        }, 'calculateDistance'));
+      };
+
+      Utils.locationProcess(options, locationsuccess);
+    }
+  }
+
+  /**
+   * 路线规划:
+   * 
+   * @param {Object} options 接口参数对象
+   * 
+   * 请求参数结构可以参考
+   * https://lbs.qq.com/webservice_v1/guide-road.html
+   */
+  direction(options) {
+    var that = this;
+    options = options || {};
+    Utils.polyfillParam(options);
+
+    if (Utils.checkParamKeyEmpty(options, 'to')) {
+      return;
+    }
+
+    var requestParam = {
+      output: 'json',
+      key: that.key
+    }; //to格式处理
+
+    if (typeof options.to == 'string') {
+      requestParam.to = options.to;
+    } else {
+      requestParam.to = options.to.latitude + ',' + options.to.longitude;
+    } //初始化局部请求域名
+
+
+    var SET_URL_DIRECTION = null; //设置默认mode属性
+
+    options.mode = options.mode || MODE.driving; //设置请求域名
+
+    SET_URL_DIRECTION = URL_DIRECTION + options.mode;
+
+    if (options.from) {
+      options.location = options.from;
+    }
+
+    if (options.mode == MODE.driving) {
+      if (options.from_poi) {
+        requestParam.from_poi = options.from_poi;
+      }
+
+      if (options.heading) {
+        requestParam.heading = options.heading;
+      }
+
+      if (options.speed) {
+        requestParam.speed = options.speed;
+      }
+
+      if (options.accuracy) {
+        requestParam.accuracy = options.accuracy;
+      }
+
+      if (options.road_type) {
+        requestParam.road_type = options.road_type;
+      }
+
+      if (options.to_poi) {
+        requestParam.to_poi = options.to_poi;
+      }
+
+      if (options.from_track) {
+        requestParam.from_track = options.from_track;
+      }
+
+      if (options.waypoints) {
+        requestParam.waypoints = options.waypoints;
+      }
+
+      if (options.policy) {
+        requestParam.policy = options.policy;
+      }
+
+      if (options.plate_number) {
+        requestParam.plate_number = options.plate_number;
+      }
+    }
+
+    if (options.mode == MODE.transit) {
+      if (options.departure_time) {
+        requestParam.departure_time = options.departure_time;
+      }
+
+      if (options.policy) {
+        requestParam.policy = options.policy;
+      }
+    }
+
+    var locationsuccess = function (result) {
+      requestParam.from = result.latitude + ',' + result.longitude;
+
+      if (options.sig) {
+        requestParam.sig = Utils.getSig(requestParam, options.sig, 'direction', options.mode);
+      }
+
+      uni.request(Utils.buildWxRequestConfig(options, {
+        url: SET_URL_DIRECTION,
+        data: requestParam
+      }, 'direction'));
+    };
+
+    Utils.locationProcess(options, locationsuccess);
+  }
+
+}
+
+;
+module.exports = QQMapWX;

+ 91 - 0
utils/qqmap.js

@@ -0,0 +1,91 @@
+const QQMapWX = require("./qqmap-wx-jssdk.js");
+
+const req = require("./request.js");
+
+let qqmapsdk;
+
+const initMap = key => {
+  if (!qqmapsdk) {
+    qqmapsdk = new QQMapWX({
+      key: key ? key : req.public.mapLBSKEY
+    });
+  }
+};
+
+const geocoder = (address, success) => {
+  //进行地址解析
+  qqmapsdk.geocoder({
+    address: address,
+
+    success(res) {
+      if (res.status !== 0) return req.msg(res.message);
+      // if (res.result.deviation < 0 || res.result.reliability < 7) return req.msg('请输入详细的街道及门牌号');
+      success.call(this, res.result);
+    },
+
+    fail: function (error) {
+      console.error(error);
+      success.call(this, false);
+    },
+    complete: function (res) {
+      // console.log(res);
+    }
+  });
+}; //计算两点之间的距离默认直线距离
+
+
+const calculateDistance = (form, to, success, mode) => {
+  // console.log(form, to);
+  qqmapsdk.calculateDistance({
+    mode: mode ? mode : 'straight',
+    from: form,
+    to: to,
+
+    success(res) {
+      // console.log(res);
+      if (res.status !== 0) return req.msg(res.message);
+      success.call(this, res.result);
+    }
+
+  });
+}; //计算是否超出配送距离
+
+
+const calculate = (form, to, distance, success) => {
+  calculateDistance(form, to, res => {
+    if (res.elements[0].distance / 1000 > distance) {
+      return req.msg('非常抱歉,您的配送地址超出我们的配送服务范围');
+    } else {
+      success.call(this);
+    }
+  });
+};
+
+const reverseGeocoder = (location, success) => {
+  qqmapsdk.reverseGeocoder({
+    location: location,
+
+    success(res) {
+		console.log('反地址地理位置数据>>>>>>>==',res);
+		// req.setStorage('loctionAddressMap', res.result.ad_info);
+		req.setStorage('loctionAddressMap', res.result);
+      success.call(this, res.result);
+    },
+
+    fail: function (error) {
+      console.error(error);
+      success.call(this, false);
+    },
+    complete: function (res) {
+      // console.log(res);
+    }
+  });
+};
+
+module.exports = {
+  initMap: initMap,
+  geocoder: geocoder,
+  calculateDistance: calculateDistance,
+  calculate: calculate,
+  reverseGeocoder: reverseGeocoder
+};

+ 9 - 5
utils/request.js

@@ -25,7 +25,7 @@ var header = {
 
 /**小程序配置 */
 const publics = {
-
+	'mapLBSKEY': 'XTABZ-5K3RW-MZVRD-3ZS33-GC5RE-YOBEG',
 }
 /*
  * 获取token
@@ -252,11 +252,15 @@ const silenceLogin = (saleNo) => {
 		let params = {
 			saleNo: saleNo
 		}
-		postRequest('/api/h5/login', params, data => {
-			if(data) setStorage('userInfo', data);
-			if (data.token) setStorage('AUTH_TOKEN', data.token);
+		if(getStorage('userInfo')){
 			resolve();
-		});
+		}else{
+			postRequest('/api/h5/login', params, data => {
+				if(data) setStorage('userInfo', data);
+				if (data.token) setStorage('AUTH_TOKEN', data.token);
+				resolve();
+			});
+		}
 	});
 }
 

+ 275 - 68
utils/util.js

@@ -8,18 +8,21 @@ const formatTime = date => {
 	var t1 = [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(
 		':');
 	var t2 = [year, month, day].map(formatNumber).join('-');
+	var t3 = [year, month, day].map(formatNumber).join('-');
 	var time = {
 		t1: t1,
-		t2: t2
+		t2: t2,
+		t3: t3
 	};
 	return time;
 };
-
 /**
  * 获取上一个月
  *
  * @date 格式为yyyy-mm-dd的日期,如:2014-01-25
  */
+
+
 const getPreMonth = date => {
 	var arr = date.split('-');
 	var year = arr[0]; //获取当前日期的年份
@@ -181,77 +184,157 @@ const isMobile = (value) => {
 	}
 }
 
-const convertUrlObj = (data) => {
-	var _result = [];
-	for (var key in data) {
-		var value = data[key];
-		if (value.constructor == Array) {
-			value.forEach(function(_value) {
-				_result.push(key + "=" + _value);
-			});
-		} else {
-			_result.push(key + '=' + value);
-		}
+ const convertUrlObj=(data)=> {
+    var _result = [];
+    for (var key in data) {
+      var value = data[key];
+      if (value.constructor == Array) {
+        value.forEach(function(_value) {
+          _result.push(key + "=" + _value);
+        });
+      } else {
+        _result.push(key + '=' + value);
+      }
+    }
+	console.log('Obj==',_result.join('&'))
+    return _result.join('&');
+  }
+  
+  // 隐藏手机号中间四位
+  function styleHintText(tel) {
+  	if (tel) {
+  		var reg = /^(\d{6})\d{8}(\d{4})$/;
+  		tel = tel.replace(reg, "$1********$2");
+  	}
+  	return tel;
+  }
+  
+function getDateDiff(dateTimeStamp){
+	var minute = 1000 * 60;
+	var hour = minute * 60;
+	var day = hour * 24;
+	var halfamonth = day * 15;
+	var month = day * 30;
+	var now = new Date().getTime();
+	var diffValue = now - dateTimeStamp;
+	if(diffValue < 0){return;}
+	var monthC =diffValue/month;
+	var weekC =diffValue/(7*day);
+	var dayC =diffValue/day;
+	var hourC =diffValue/hour;
+	var minC =diffValue/minute;
+	if(monthC>=1){
+			result="" + parseInt(monthC) + "月前";
+	}
+	else if(weekC>=1){
+			result="" + parseInt(weekC) + "周前";
+	}
+	else if(dayC>=1){
+			result=""+ parseInt(dayC) +"天前";
 	}
-	return _result.join('&');
+	else if(hourC>=1){
+			result=""+ parseInt(hourC) +"小时前";
+	}
+	else if(minC>=1){
+			result=""+ parseInt(minC) +"分钟前";
+	}else
+	result="刚刚";
+	return result;
 }
 
-// 隐藏身份证中间位数
-function styleHintText(tel) {
-	if (tel) {
-		var reg = /^(\d{6})\d{8}(\d{4})$/;
-		tel = tel.replace(reg, "$1********$2");
+function formatNumbers(num) {
+	if (num >= 1e4) {
+		return parseInt(num / 1e4).toFixed(0) + 'w+'
+	} else if (num >= 999) {
+		return '999+'
+	} else if (num >= 99) {
+		return '99+'
+	} else {
+		return num
 	}
-	return tel;
 }
 
-
-// 隐藏手机号中间四位
-function phoneHintText(tel) {
-	if (tel) {
-		var reg = /^(\d{3})\d{4}(\d{4})$/;
-		tel = tel.replace(reg, "$1****$2");
+// 金钱
+function toDecimal(x) {
+	var f = Math.round(x * 100) / 100;
+	var s = f.toString();
+	var rs = s.indexOf('.');
+	if (rs < 0) {
+		rs = s.length;
+		s += '.';
 	}
-	return tel;
+	while (s.length <= rs + 2) {
+		s += '0';
+	}
+	return s;
 }
 
-function getDateDiff(dateTimeStamp) {
-	var minute = 1000 * 60;
-	var hour = minute * 60;
-	var day = hour * 24;
-	var halfamonth = day * 15;
-	var month = day * 30;
-	var now = new Date().getTime();
-	var diffValue = now - dateTimeStamp;
-	if (diffValue < 0) {
-		return;
+// 时间字符串返回时分 
+function captureTime(time,isTime){
+	var fullTime = time; // 日期字符串
+	// console.log(fullTime + '----');
+	var timeArr = fullTime.replace(" ", ":").replace(/\:/g, "-").split("-");
+	var nian = timeArr[0];
+	var yue = timeArr[1];
+	var ri = timeArr[2];
+	var shi = timeArr[3];
+	var fen = timeArr[4];
+	var miao = timeArr[5];
+	// console.log(nian + '-' + yue + '-' + ri + ' ' + shi + ':' + fen + ':' + miao);
+	var str = shi + ':' + fen;
+	var date =nian + '-' + yue + '-' + ri;
+	// var str = yue + '-' + ri + ' ' + shi + ':' + fen;
+	// console.log(str);
+	if(isTime){
+		return str
+	}else{
+		return date
 	}
-	var monthC = diffValue / month;
-	var weekC = diffValue / (7 * day);
-	var dayC = diffValue / day;
-	var hourC = diffValue / hour;
-	var minC = diffValue / minute;
-	if (monthC >= 1) {
-		result = "" + parseInt(monthC) + "月前";
-	} else if (weekC >= 1) {
-		result = "" + parseInt(weekC) + "周前";
-	} else if (dayC >= 1) {
-		result = "" + parseInt(dayC) + "天前";
-	} else if (hourC >= 1) {
-		result = "" + parseInt(hourC) + "小时前";
-	} else if (minC >= 1) {
-		result = "" + parseInt(minC) + "分钟前";
-	} else
-		result = "刚刚";
-	return result;
 }
 
-function removeHtml(content) {
-	var temp = content.replace(/<\/?.+?>/g, "");
-	var result = temp.replace(/ /g, "");
-	var test = result.replace(/<br>/ig, "");
-	var text = test.replace(/&nbsp;/ig, "");
-	return text;
+function isAuth(fun) {
+	if (!uni.saveImageToPhotosAlbum) {
+		uni.showModal({
+			title: '提示',
+			content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+		});
+		return;
+	} //可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope
+	// #ifndef H5
+	uni.getSetting({
+		success(res) {
+			if (!res.authSetting['scope.writePhotosAlbum']) {
+				// 接口调用询问
+				uni.authorize({
+					scope: 'scope.writePhotosAlbum',
+					success() {
+						// console.log("2-授权《保存图片》权限成功");
+						fun(true);
+					},
+					fail() {
+						wx.showModal({
+							title: '提示',
+							content: '用户拒绝授权访问本地相册导致图片无法保存!如需继续操作,请点击确定前往开启授权',
+							success: function(res) {
+								if (res.confirm) {
+									//点击确定后前往授权设置页面
+									wx.openSetting();
+								}
+							}
+						});
+						fun(false);
+					}
+				});
+			} else {
+				// 拒绝授权
+				fun(true);
+			}
+		},
+		fail(res) {
+			fun(false);
+		}
+	});
+	// #endif
 }
 
 /**
@@ -268,6 +351,129 @@ function isIosSys() {
 	return uni.getSystemInfoSync().platform == 'ios';
 }
 
+async function isAuthWritePhotosAlbum(fun) {
+	console.log('isAuthWritePhotosAlbum>>>>');
+	var result = await permission.requestAndroidPermission('android.permission.READ_EXTERNAL_STORAGE');
+	console.log('数据>>>>', result);
+	if (result == 1) {
+		// strStatus = "已获得授权"
+		fun(true);
+	} else if (result == 0) {
+		// strStatus = "未获得授权"
+		fun(false);
+	} else {
+		gotoAppPermissionSetting();
+		fun(false);
+		// strStatus = "被永久拒绝权限"
+	}
+}
+
+function gotoAppPermissionSetting() {
+	permission.gotoAppPermissionSetting()
+}
+
+
+/**
+ * 保存图片到相册
+ * @param {Object} tempFilePath
+ */
+function saveImageToPhotosAlbum(tempFilePath, suc) {
+	uni.saveImageToPhotosAlbum({
+		filePath: tempFilePath,
+		success(res) {
+			uni.showToast({
+				title: '图片保存成功',
+				icon: 'none'
+			});
+			if (suc) {
+				suc(true);
+			}
+		}
+		// fail(res) {
+		// 	uni.showModal({
+		// 		title: '提示',
+		// 		content: '检测到您没有授权访问相册权限,是否去设置打开?',
+		// 		confirmText: '去打开',
+		// 		cancelText: '取消',
+		// 		success: (res) => {
+		// 			if (res.confirm) {
+		// 				// #ifdef APP-PLUS
+		// 				gotoAppPermissionSetting();
+		// 				// #endif
+		// 				//#ifndef APP-PLUS
+		// 				wx.openSetting();
+		// 				// #endif
+		// 			} else {
+		// 				uni.showToast({
+		// 					title: '图片保存失败',
+		// 					icon: 'none'
+		// 				});
+		// 			}
+		// 		}
+		// 	});
+		// }
+	});
+}
+
+/**
+ * 保存图片
+ * @param {Object} tempFilePath
+ */
+function saveImage(tempFilePath, suc) {
+	let that = this;
+	// #ifdef APP-PLUS
+	if (isIosSys()) {
+		saveImageToPhotosAlbum(tempFilePath, suc);
+	} else {
+		isAuthWritePhotosAlbum(success => {
+			if (success) {
+				saveImageToPhotosAlbum(tempFilePath, suc);
+			}
+		});
+	}
+	// #endif
+	// #ifndef APP-PLUS
+	isAuth(success => {
+		if (success) {
+			uni.saveImageToPhotosAlbum({
+				filePath: tempFilePath,
+				success(res) {
+					uni.showToast({
+						title: '图片保存成功',
+						icon: 'none',
+						success() {
+							// suc(true);
+						}
+					});
+				}
+			});
+		}
+	});
+	// #endif
+}
+
+function getAge(birthYearMonthDay) {
+	birthYearMonthDay = birthYearMonthDay.replace(/-/g, '/')
+	const birthDate = new Date(birthYearMonthDay);
+	const momentDate = new Date();
+	momentDate.setHours(0, 0, 0, 0);
+	const thisYearBirthDate = new Date(
+		momentDate.getFullYear(),
+		birthDate.getMonth(),
+		birthDate.getDate()
+	);
+	const aDate = thisYearBirthDate - birthDate;
+	const bDate = momentDate - birthDate;
+	let tempAge = momentDate.getFullYear() - birthDate.getFullYear();
+	let age = null;
+	if (bDate < aDate) {
+		tempAge = tempAge - 1;
+		age = tempAge < 0 ? 0 : tempAge;
+	} else {
+		age = tempAge;
+	}
+	return age;
+}
 
 module.exports = {
 	formatTime: formatTime,
@@ -279,12 +485,13 @@ module.exports = {
 	transTime: transTime,
 	throttle: throttle,
 	getPreMonth: getPreMonth,
-	isMobile: isMobile,
-	convertUrlObj: convertUrlObj,
+	isMobile:isMobile,
+	convertUrlObj:convertUrlObj,
 	getDateDiff: getDateDiff,
-	styleHintText: styleHintText,
-	removeHtml: removeHtml,
-	isAndroidSys: isAndroidSys,
-	isIosSys: isIosSys,
-	phoneHintText: phoneHintText,
+	styleHintText:styleHintText,
+	formatNumbers: formatNumbers,
+	toDecimal: toDecimal,
+	captureTime: captureTime,
+	saveImage: saveImage,
+	getAge:getAge
 };