xhj 2 năm trước cách đây
mục cha
commit
3123bb8477

+ 2 - 1
manifest.json

@@ -71,7 +71,8 @@
     "vueVersion" : "2",
     "h5" : {
         "router" : {
-            "mode" : "history"
+            "mode" : "history",
+            "base" : ""
         },
         "sdkConfigs" : {
             "maps" : {

+ 166 - 0
match/activityEdit/activityEdit.css

@@ -0,0 +1,166 @@
+page{
+	background-color: #fff;
+}
+.form{
+	padding: 30rpx;
+}
+.form-title{
+	line-height: 50rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC-Bold, PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.form-item-title{
+	line-height: 45rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC-Medium, PingFang SC;
+	font-weight: 500;
+	color: #333333;
+	margin-top: 32rpx;
+}
+.upload-pic{
+	width: 690rpx;
+	height: 400rpx;
+	background: #F8F8F8;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+	opacity: 1;
+	margin:30rpx auto 0;
+	text-align: center;
+	line-height: 45rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	flex-direction: column;
+	justify-content: center;
+}
+.upload-pic image{
+	width: 59rpx;
+	height: 62rpx;
+}
+.upload-image{
+	width: 690rpx;
+	height: 400rpx;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+	opacity: 1;
+	margin:30rpx auto 0;
+}
+.form-limit{
+	line-height: 33rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	margin-top: 20rpx;
+}
+.upload-photo{
+	width: 120rpx;
+	height: 120rpx;
+	background: #F8F8F8;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+	opacity: 1;
+	margin-bottom: 20rpx;
+}
+.upload-photo image{
+	width: 46rpx;
+	height: 35rpx;
+	margin: auto;
+}
+.upload-photo-image{
+	width: 120rpx;
+	height: 120rpx;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+	opacity: 1;
+	margin-right: 20rpx;
+	position: relative;
+	margin-bottom: 20rpx;
+}
+.upload-photo-image:nth-child(5n){
+	margin-right: 0rpx;
+}
+.upload-photo-image image{
+	width: 120rpx;
+	height: 120rpx;
+	border-radius: 10rpx 10rpx 10rpx 10rpx;
+}
+.upload-photo-close{
+	width: 28rpx !important;
+	height: 28rpx !important;
+	position: absolute;
+	top:-14rpx;
+	right: -14rpx;
+}
+.form-border{
+	height: 20rpx;
+	background: #F8F8F8;
+	border-radius: 0rpx 0rpx 0rpx 0rpx;
+	opacity: 1;
+}
+.form-input-box{
+	padding: 30rpx 0;
+	border-bottom: 2rpx solid #DEDEDE;
+	line-height: 45rpx;
+	font-size: 32rpx;
+}
+.form-input-box input{
+	font-size: 32rpx;
+}
+.form-input-placeholder{
+	color: #CCCCCC;
+	font-size: 32rpx;
+}
+.more{
+	float: right;
+}
+.more image{
+	width: 14rpx;
+	height: 22rpx;
+	margin-left: 10rpx;
+}
+.next-btn{
+	height: 88rpx;
+	line-height: 88rpx;
+	background: #27D699;
+	border-radius: 44rpx 44rpx 44rpx 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #FFFFFF;
+	text-align: center;
+	margin: 150rpx auto 30rpx;
+}
+.form-number-select{
+	margin-top: 30rpx;
+}
+.form-number-select view:first-child,.form-number-select view:last-child{
+	width: 80rpx;
+	height: 67rpx;
+	line-height: 67rpx;
+	background: #F8F8F8;
+	border-radius: 4rpx 4rpx 4rpx 4rpx;
+	opacity: 1;
+	text-align: center;
+	color: #B3B3B3;
+	font-size: 40rpx;
+}
+.form-number-select input{
+	width: 112rpx;
+	height: 63rpx;
+	background: #FFFFFF;
+	border-radius: 4rpx 4rpx 4rpx 4rpx;
+	opacity: 1;
+	border: 2rpx solid #DEDEDE;
+	margin: 0 20rpx;
+	text-align: center;
+	padding: 0 10rpx;
+}
+.form-date-select{
+	background: #F8F8F8;
+	border-radius: 5rpx 5rpx 5rpx 5rpx;
+	text-align: center;
+	line-height: 76rpx;
+	height: 76rpx;
+	color: #CCCCCC;
+	font-size: 32rpx;
+}

+ 449 - 0
match/activityEdit/activityEdit.vue

@@ -0,0 +1,449 @@
+<template>
+	<view>
+		<view v-if="stepOne">
+			<view class="form">
+				<view class="form-title">基本信息</view>
+				<view class="form-item-title">封面图</view>
+				<view class="upload-pic ddflex" v-if="!pic" @click="uploadImage(1)">
+					<image src="../static/images/pic.png"></image>
+					<view style="margin-top: 30rpx;">上传封面图</view>
+				</view>
+				<image v-else class="upload-image" :src="pic" @click="uploadImage(1)"></image>
+				<view class="form-limit">* 图片尺寸限制:680*350</view>
+				<view class="form-item-title">活动详情轮播图</view>
+				<view class="ddflex" style="margin-top: 30rpx;">
+					<view class="upload-photo-image" v-for="item ,index in fileList" @click="uploadImage(2,index+1)">
+						<image :src="item" mode="aspectFill"></image>
+						<image class="upload-photo-close" src="/static/pages/images/close3.png" @click.stop="deleteImage(2,index+1)"></image>
+					</view>
+					<view class="upload-photo ddflex" @click="uploadImage(2)" v-if="fileList.length<9">
+						<image src="../static/images/photo.png"></image>
+					</view>
+				</view>
+				<view class="form-limit">* 图片尺寸限制:670*350</view>
+			</view>
+			<view class="form-border"></view>
+			<view class="form">
+				<view class="form-item-title">活动标题</view>
+				<view class="form-input-box">
+					<input v-model="title" placeholder-class="form-input-placeholder" placeholder="请输入活动标题"/>
+				</view>
+				<view class="form-item-title">活动说明</view>
+				<view class="form-input-box">
+					<input v-model="brief" placeholder-class="form-input-placeholder" placeholder="请填写活动简介说明"/>
+				</view>
+				<view class="form-item-title">
+					活动详情
+					<view class="more ddflex" @click="jumpUrl('/match/editorContent/editorContent')">
+						<text v-if="!text">编辑</text>
+						<text v-else style="color: var(--main);">已完善</text>
+						<image  src="../../static/pages/images/more.png"></image>
+					</view>
+				</view>
+				<view class="next-btn" @click="next">下一步</view>
+			</view>
+		</view>
+		
+		<!-- 第二步 -->
+		<view v-if="stepTwo">
+			<view class="form">
+				<view class="form-title">报名设置</view>
+				<view class="form-item-title">最大报名人数</view>
+				<view class="form-number-select ddflex">
+					<view>-</view>
+					<input v-model="personLimit" type="number" placeholder="最大报名人数" placeholder-class="form-input-placeholder"/>
+					<view>+</view>
+				</view>
+				<view class="form-item-title">报名时间</view>
+				<view  class="ddflex" style="margin-top: 20rpx;">
+					<picker v-model="enlistStartTime" mode="date" class="flex" @change="enlistStartTimeChange">
+						<view class="form-date-select" :style="enlistStartTime?'color:#333':''">
+							{{enlistStartTime?enlistStartTime:'开始日期'}}
+						</view>
+					</picker>
+					<text style="margin: 0 20rpx;">至</text>
+					<picker v-model="enlistEndTime" mode="date" class="flex" @change="enlistEndTimeChange">
+						<view class="form-date-select" :style="enlistEndTime?'color:#333':''">
+							{{enlistEndTime?enlistEndTime:'结束日期'}}
+						</view>
+					</picker>
+				</view>
+				<view class="form-item-title">活动时间</view>
+				<view  class="ddflex" style="margin-top: 20rpx;">
+					<picker v-model="startTime" mode="date" class="flex" @change="startTimeChange">
+						<view class="form-date-select" :style="startTime?'color:#333':''">
+							{{startTime?startTime:"开始日期"}}
+						</view>
+					</picker>
+					<text style="margin: 0 20rpx;">至</text>
+					<picker v-model="endTime" mode="date" class="flex" @change="endTimeChange">
+						<view class="form-date-select" :style="endTime?'color:#333':''">
+							{{endTime?endTime:"结束日期"}}
+						</view>
+					</picker>
+				</view>
+			</view>
+			<view class="form-border"></view>
+			<view class="form">
+				<view class="form-title">活动地址</view>
+				<view class="form-item-title">地址名称</view>
+				<view class="form-input-box">
+					<input v-model="house" placeholder-class="form-input-placeholder" placeholder="请输入活动地址简称"/>
+				</view>
+				<view class="form-item-title">选择城市</view>
+				<view class="form-input-box">
+					<!-- <picker class="form-input-placeholder" mode="region" @change="bindRegionChange" :value="region" > -->
+						<view class="picker" :style="region.length>0?'color: #333;':'color:#cccccc'" @click="chooseLocation()">
+							{{region.length > 0 ? region[0]+region[1]+region[2] : '请选择所在城市'}}
+						</view>
+					<!-- </picker> -->
+					<!-- <image src="/card/static/images/area.png" class="loca" @click="chooseLocation()"></image> -->
+				</view>
+				<view class="form-item-title">
+					详细地址
+				</view>
+				<view class="form-input-box">
+					<input v-model="address" placeholder-class="form-input-placeholder" placeholder="请输入详细地址"/>
+				</view>
+				<view class="next-btn" @click="submit()">提交</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import util from "../../utils/util.js";
+	const app = getApp();
+	const req = require("../../utils/request.js");
+
+	export default {
+		components: {},
+		props: {},
+		data() {
+			return {
+				stepOne:true,
+				stepTwo:false,
+				
+				pic:'',//封面图
+				fileList:[],//banner
+				title:'',
+				brief:'',
+				text:'',
+				personLimit:-1,
+				enlistStartTime:'',
+				enlistEndTime:'',
+				startTime:'',
+				endTime:'',
+				house:'',
+				region:[],
+				address:'',
+				regionCode:[],
+				id:'',
+				longitude:null,
+				latitude:null
+				
+			}
+		},
+		onLoad(options) {
+			this.id = options.id
+			if(this.id){
+				this.getActivityInfo()
+			}
+		},
+		onShow() {
+			
+		},
+		methods: {
+			jumpUrl(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			getActivityInfo(){
+				req.getRequest('/api/match/detail',{id:this.id},res=>{
+					this.pic = res.pic
+					this.fileList = res.imageList.map(item=>{return item.url})
+					this.title = res.title
+					this.brief = res.brief
+					this.text = res.text
+					this.personLimit = res.personLimit
+					this.enlistStartTime = this.formatTime(res.enlistStartTime)
+					this.enlistEndTime = this.formatTime(res.enlistEndTime)
+					this.startTime = this.formatTime(res.startTime)
+					this.endTime = this.formatTime(res.endTime)
+					this.house = res.house
+					this.regionCode = [res.province,res.city,res.country]
+					this.region = res.areaAdd.split(',')
+					this.address = res.address
+					this.longitude = res.lng?res.lng:null
+					this.latitude = res.lat?res.lat:null
+				})
+			},
+			next(){
+				if(!this.pic){
+					return req.msg('请上传封面图')
+				}
+				if(this.fileList.length==0){
+					return req.msg('请上传活动轮播图')
+				}
+				if(!this.title){
+					return req.msg('请填写活动名称')
+				}
+				if(!this.brief){
+					return req.msg('请填写活动简介')
+				}
+				if(!this.text){
+					return req.msg('请填写活动详情')
+				}
+				this.stepOne = false
+				this.stepTwo = true
+			},
+			uploadImage(type,index){
+				let that = this;
+				let count = 1
+				if(type==1){
+					count = 1
+				}else if(type==2){
+					if(index){
+						count = 1
+					}else{
+						count = 9-that.fileList.length
+					}
+				}
+				uni.chooseImage({
+					count: count,
+					sizeType: ['original', 'compressed'],
+					sourceType: ['album', 'camera'],
+					success: function({ tempFilePaths }) {
+						var promise = Promise.all(
+							tempFilePaths.map(tempFilePath => {
+								return new Promise(function(resolve, reject) {
+									req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
+										// type 1 封面图
+										if(type==1){
+											that.pic = res.src
+										}else if(type==2){
+											if(index){
+												that.fileList[index] = res.src
+												that.fileList = JSON.parse(JSON.stringify(that.fileList))
+											}else{
+												that.fileList = that.fileList.concat(res.src)
+											}
+										}
+									});
+								});
+							})
+						);
+						promise
+							.then(function(results) {
+								console.log(results);
+							})
+							.catch(function(err) {
+								console.log(err);
+							});
+					}
+				});
+			},
+			deleteImage(type,index){
+				if(type==2)
+					this.fileList.splice(index,1)
+			},
+			enlistStartTimeChange(e){
+				if(this.enlistEndTime){
+					if(this.enlistEndTime<e.detail.value)
+					return req.msg('报名开始时间不能大于结束时间')
+				}
+				this.enlistStartTime = e.detail.value
+			},
+			enlistEndTimeChange(e){
+				if(this.enlistStartTime){
+					if(this.enlistStartTime>e.detail.value)
+					return req.msg('报名结束时间不能小于开始时间')
+				}
+				this.enlistEndTime = e.detail.value
+			},
+			startTimeChange(e){
+				if(this.endTime){
+					if(this.endTime<e.detail.value)
+					return req.msg('活动开始时间不能大于结束时间')
+				}
+				this.startTime = e.detail.value
+			},
+			endTimeChange(e){
+				if(this.startTime){
+					if(this.startTime>e.detail.value)
+					return req.msg('活动结束时间不能小于开始时间')
+				}
+				this.endTime = e.detail.value
+			},
+			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.region = [data.ad_info.province,data.ad_info.city,data.ad_info.district]
+						this.regionCode = [data.ad_info.adcode.substring(0,2)+'0000',data.ad_info.adcode.substring(0,4)+'00',data.ad_info.adcode]
+						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.region = [data.ad_info.province,data.ad_info.city,data.ad_info.district]
+						this.regionCode = [data.ad_info.adcode.substring(0,2)+'0000',data.ad_info.adcode.substring(0,4)+'00',data.ad_info.adcode]
+						this.longitude = data.ad_info.location.lng
+						this.latitude = data.ad_info.location.lat
+					});
+				//#endif
+			},
+			bindRegionChange(event) {
+				console.log(event)
+				this.region = event.detail.value
+				this.regionCode = event.detail.code
+			},
+			submit(){
+				if(!this.pic){
+					return req.msg('请上传封面图')
+				}
+				if(this.fileList.length==0){
+					return req.msg('请上传活动轮播图')
+				}
+				if(!this.title){
+					return req.msg('请填写活动名称')
+				}
+				if(!this.brief){
+					return req.msg('请填写活动简介')
+				}
+				if(!this.text){
+					return req.msg('请填写活动详情')
+				}
+				if(!this.enlistStartTime){
+					return req.msg('请选择报名开始时间')
+				}
+				if(!this.enlistEndTime){
+					return req.msg('请选择报名结束时间')
+				}
+				if(!this.startTime){
+					return req.msg('请选择活动开始时间')
+				}
+				if(!this.endTime){
+					return req.msg('请选择活动结束时间')
+				}
+				if(!this.house){
+					return req.msg('请填写活动地址')
+				}
+				if(this.regionCode.length==0){
+					return req.msg('请选择活动所在城市')
+				}
+				if(!this.address){
+					return req.msg('请填写详细地址')
+				}
+				
+				let dataP = {
+					pic:this.pic,
+					fileList:JSON.stringify(this.fileList.map(item=>{return {url:item}})),
+					title:this.title,
+					brief:this.brief,
+					text:this.text,
+					personLimit:this.personLimit,
+					enlistStartTime:this.enlistStartTime,
+					enlistEndTime:this.enlistEndTime,
+					startTime:this.startTime,
+					endTime:this.endTime,
+					house:this.house,
+					province:this.regionCode[0],
+					city:this.regionCode[1],
+					country:this.regionCode[2],
+					areaAdd:this.region.join(','),
+					address:this.address,
+					lng:this.longitude,
+					lat:this.latitude
+				}
+				let prices = [{
+					    title: "VIP",
+					    marketMoney: 0,
+					    money: 0,
+					    vipMoney: 0,
+					    vipModels: [],
+					    personCount: 1,
+					    isDefault: 0
+					}]
+				dataP.prices = prices
+				let url = '/api/match/save'
+				if(this.id) {
+					dataP.id = this.id
+					url = '/api/match/update'
+					uni.showModal({
+						title:'提示',
+						content:'修改活动将重新审核,确定修改?',
+						success: (res) => {
+							if(res.confirm){
+								req.postRequest(url,dataP,res=>{
+									req.msg('创建成功')
+									let pages = getCurrentPages();
+									var prevPage = pages[pages.length - 2];
+									if (prevPage) {
+										prevPage.$vm.isLoad = true
+										prevPage.$vm.form.page = 1
+										prevPage.$vm.getPageList()
+									}
+									setTimeout(()=>{
+										uni.navigateBack()
+									},1000)
+								})
+							}
+						}
+					})
+				}else{
+					req.postRequest(url,dataP,res=>{
+						req.msg('创建成功')
+						let pages = getCurrentPages();
+						var prevPage = pages[pages.length - 2];
+						if (prevPage) {
+							prevPage.$vm.isLoad = true
+							prevPage.$vm.form.page = 1
+							prevPage.$vm.getPageList()
+						}
+						setTimeout(()=>{
+							uni.navigateBack()
+						},1000)
+					})
+				}
+			},
+			formatTime(date){
+				date = new Date(date.replace(/-/g, '/'))
+				return util.formatTime(date).t3
+			},
+		},
+		mounted() {
+			
+		}
+	}
+</script>
+
+<style>
+	@import "./activityEdit.css";
+</style>

+ 165 - 0
match/activityManage/activityManage.css

@@ -0,0 +1,165 @@
+page{
+	background-color: #fff;
+}
+.top-fixed{
+	position: fixed;
+	top: 0;
+	right: 0;
+	left: 0;
+	background-color: #fff;
+	z-index: 101;
+}
+.search-box{
+	padding: 30rpx;
+	background-color: #fff;
+}
+
+.search-text{
+	color: #999999;
+}
+
+
+.search-input{
+	height: 76rpx;
+	line-height: 76rpx;;
+	background: #F5F5F5;
+	border-radius: 60rpx;
+	padding: 0 26rpx;
+	font-size: 24rpx;
+}
+.search-input input{
+	font-size: 24rpx;
+}
+.search-input image{
+	width: 34rpx;
+	height: 34rpx;
+	margin-right: 26rpx;
+}
+.search-all{
+	color: #2a82fd;
+	font-size: 30rpx;
+	margin-left: 46rpx;
+}
+
+
+.title{
+	line-height: 50rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC-Bold, PingFang SC;
+	font-weight: bold;
+	color: #333333;
+	padding: 0 30rpx;
+}
+.title text{
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #A1A1A1;
+	margin-left: 20rpx;
+}
+
+.padd30{
+	padding: 30rpx;
+}
+.act-bar{
+	padding-bottom:42rpx ;
+	border-bottom: 2rpx solid #E8E8E8;
+	margin-bottom: 40rpx;
+}
+.act-bar:last-child{
+	border-bottom: none;
+}
+.act-pic{
+	position: relative;
+	width: 270rpx;
+	height: 174rpx;
+	border-radius: 6rpx 6rpx 6rpx 6rpx;
+	margin-right: 24rpx;
+}
+.act-pic image{
+	width: 100%;
+	height: 100%;
+	border-radius: 6rpx 6rpx 6rpx 6rpx;
+}
+.act-pic-tag{
+	position: absolute;
+	top: 0;
+	left: 0;
+	background-color: rgba(0, 0, 0, 0.7);
+	border-radius: 6rpx 0rpx 15rpx 0rpx;
+	padding: 0 10rpx;
+	line-height: 28rpx;
+	font-size: 20rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	text-align: center;
+	color: #FFFFFF;
+}
+.act-title{
+	max-height: 80rpx;
+	line-height: 40rpx;
+	font-size: 28rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #000000;
+}
+.act-time{
+	line-height: 33rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+	margin-top: 10rpx;
+}
+.act-bottom{
+	justify-content: space-between;
+	margin-top: 20rpx;
+}
+.act-bottom-look{
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #999999;
+}
+.act-bottom-look image{
+	width: 28rpx;
+	height: 28rpx;
+	margin-right: 6rpx;
+}
+.act-edit{
+	width: 113rpx;
+	height: 52rpx;
+	line-height: 52rpx;
+	background: #27D699;
+	border-radius: 26rpx 26rpx 26rpx 26rpx;
+	opacity: 1;
+	text-align: center;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #FFFFFF;
+}
+
+.act-create{
+	width: 110rpx;
+	height: 110rpx;
+	background: var(--main);
+	box-shadow: 0rpx 4rpx 24rpx 1rpx rgba(0,155,98,0.2);
+	opacity: 1;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	font-weight: 400;
+	color: #FFFFFF;
+	text-align: center;
+	border-radius: 100%;
+	padding: 20rpx;
+	box-sizing: border-box;
+	position: fixed;
+	bottom: 200rpx;
+	right: 30rpx;
+}
+.act-create image{
+	width: 39rpx;
+	height: 39rpx;
+	margin: auto;
+}

+ 144 - 0
match/activityManage/activityManage.vue

@@ -0,0 +1,144 @@
+<template>
+	<view>
+		<view class="top-fixed">
+			<view class="search-box ddflex">
+				<view class="search-input ddflex fflex">
+					<image src="/static/images/ssico.png"></image>
+					<input @confirm="searchFn" confirm-type="search" @input="searchFn" v-model="searchVal" class="fflex"
+						placeholder="请输入关键词" />
+				</view>
+			</view>
+		</view>
+		<view style="height: 150rpx;"></view>
+		<view class="title">
+			我的活动<text>共{{total}}个</text>
+		</view>
+		<view class="padd30" v-if="pageList.length>0">
+			<view class="act-bar ddflex" v-for="item,index in pageList">
+				<view class="act-pic">
+					<image :src="item.pic" mode="aspectFill"></image>
+					<view class="act-pic-tag" v-if="item.state==0">审核中</view>
+					<view class="act-pic-tag" v-if="item.state==6">审核失败</view>
+				</view>
+				<view class="flex">
+					<view class="act-title tovers">{{item.title}}</view>
+					<view class="act-time">活动时间:{{formatTime(item.endTime)}}</view>
+					<view class="act-bottom ddflex">
+						<view class="act-bottom-look ddflex">
+							<image src="../static/images/person.png"></image>
+							{{item.person}}人
+						</view>
+						<view class="act-edit" @click="jumpUrl('/match/activityEdit/activityEdit?id='+item.id)">修改</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="nodata nosp bgfff" v-else>
+			<image :src="picUrlss+'empty_sp.png'"></image>
+			<text>暂无活动</text>
+		</view>
+		<view class="act-create" @click="jumpUrl('/match/activityEdit/activityEdit')">
+			<image src="../static/images/add.png"></image>
+			<view>发布</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const app = getApp();
+	const req = require("../../utils/request.js");
+	import util from "../../utils/util.js";
+	export default {
+		components: {},
+		props: {},
+		data() {
+			return {
+				picUrlss:req.public.picUrls,
+				pageList: [],
+				isLoad: true,
+				form: {
+					page: 1,
+					limit: 10
+				},
+				searchVal:'',
+				total:0,
+				saleNo:null
+			}
+		},
+		async onLoad(opt) {
+			if(opt.saleNo){
+				console.log(opt.saleNo)
+				this.saleNo = opt.saleNo
+				req.setStorage('saleNo',this.saleNo)
+			}else{
+				console.log(req.getStorage('saleNo'))
+				opt.saleNo = req.getStorage('saleNo')
+				this.saleNo = opt.saleNo
+			}
+			
+			await req.silenceLogin(opt.saleNo)
+			this.getPageList()
+		},
+		onShow() {
+			
+		},
+		onReachBottom: function() {
+			this.form.page++;
+			this.getPageList(false);
+		},
+		methods: {
+			jumpUrl(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			getPageList(isShow) {
+				if (!this.isLoad) return false;
+				this.isLoad = false;
+				let form = this.form;
+				if(this.searchVal){
+					form.search = this.searchVal
+				}else{
+					form.search = ''
+				}
+				uni.showLoading();
+				req.getRequest(
+					'/api/match/page',
+					form,
+					res => {
+						this.total = res.total
+						res  = res?res.list:[]
+						this.isShow = true;
+						if (res && res.length == 10) {
+							this.isLoad = true;
+						}
+						if (this.form.page > 1) {
+							res = this.pageList.concat(res);
+						}
+						this.pageList = res;
+						uni.hideLoading();
+					},
+					isShow
+				);
+			},
+			searchFn(){
+				this.isLoad = true
+				this.form.page=1
+				this.getPageList()
+			},
+			formatTime(date){
+				date = new Date(date.replace(/-/g, '/'))
+				return util.formatTime(date).t3
+			},
+		},
+		mounted() {
+			
+		},
+		onPageScroll: function(e) {
+		}
+	}
+</script>
+
+<style>
+	@import "./activityManage.css";
+</style>

+ 350 - 0
match/components/jin-edit/jin-edit.vue

@@ -0,0 +1,350 @@
+<template>
+	<view class="container" :style="{
+		paddingBottom: showMoreTool ? '220rpx' : '120rpx'
+	}"> 
+		<editor
+			class="ql-container"
+			:placeholder="placeholder"
+			:show-img-size="true"
+			:show-img-toolbar="true"
+			:show-img-resize="true"
+			@ready="onEditorReady"
+			id="editor"
+			@statuschange="statuschange"
+			@focus="editFocus" 
+			@input="editBlur"
+			ref="editot"
+		></editor>   
+		<!-- 操作工具 -->
+		<view class="tool-view" > 
+			<view class="tool">
+				<jinIcon class="single" type="&#xe6f3;" font-size="44rpx" title="插入图片" @click="insertImage"></jinIcon>
+				<jinIcon class="single" type="&#xe6f9;" font-size="44rpx" title="修改文字样式" @click="showMore" :color="showMoreTool ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6eb;" font-size="44rpx" title="分割线" @click="insertDivider"></jinIcon>
+				<jinIcon class="single" type="&#xe6e8;" font-size="44rpx" title="撤销" @click="undo"></jinIcon>
+				<jinIcon class="single" type="&#xe705;" font-size="44rpx" title="重做" @click="redo"></jinIcon>
+				<jinIcon class="single" type="&#xeb8a;" font-size="44rpx" title="设置" @click="confirmContent"></jinIcon><!-- @click="showSetting" -->
+			</view>
+			<!-- 文字相关操作 -->
+			<view class="font-more" :style="{ height: showMoreTool ? '100rpx' : 0 }">
+				<jinIcon class="single" type="&#xe6e7;" font-size="44rpx" title="加粗" @click="setBold" :color="showBold ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6fe;" font-size="44rpx" title="斜体" @click="setItalic" :color="showItalic ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6f8;" font-size="44rpx" title="分割线" @click="setIns" :color="showIns ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6e3;" font-size="44rpx" title="标题" @click="setHeader" :color="showHeader ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6f1;" font-size="44rpx" title="居中" @click="setCenter" :color="showCenter ? activeColor : '#666666'"></jinIcon>
+				<jinIcon class="single" type="&#xe6ed;" font-size="44rpx" title="居右" @click="setRight" :color="showRight ? activeColor : '#666666'"></jinIcon>
+			</view>
+			<!-- <view class="setting-layer-mask" v-if="showSettingLayer" @click="showSetting"></view> -->
+			<!-- <view class="setting-layer" v-if="showSettingLayer">
+				<view class="single" @click="release(true)">
+					<jinIcon class="icon" type="&#xe639;" ></jinIcon>
+					<view>公开发布</view>
+				</view>
+				<view class="single" @click="release(false)">
+					<jinIcon class="icon" type="&#xe655;" ></jinIcon>
+					<view>私密保存</view>
+				</view>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+const req = require('../../../utils/request.js');
+import jinIcon from './jin-icons.vue';
+export default {
+	data() {
+		return {
+			showMoreTool: false,
+			showBold: false,
+			showItalic: false,
+			showIns: false,
+			showHeader: false,
+			showCenter: false,
+			showRight: false,
+			showSettingLayer: false,
+			activeColor: '#F56C6C',
+		};
+	},
+	components: {
+		jinIcon
+	},
+	props: {
+		// 点击图片时显示图片大小控件
+		showImgSize: {
+			type: Boolean,
+			default: false
+		},
+		// 点击图片时显示工具栏控件
+		showImgToolbar: {
+			type: Boolean,
+			default: false
+		},
+		// 点击图片时显示修改尺寸控件
+		showImgResize: {
+			type: Boolean,
+			default: false
+		},
+		// 占位符
+		placeholder: {
+			type: String,
+			default: '开始输入...'
+		},
+		// 图片上传的地址
+		uploadFileUrl: {
+			type: String,
+			default: '#'
+		},
+		// 上传文件时的name
+		fileKeyName: {
+			type: String,
+			default: 'file'
+		},
+		// 上传图片时,http请求的header
+		header: {
+			type: Object
+		},
+		// 初始化html
+		html: {
+			type: String,
+		}
+		
+	},
+	watch: {
+	},
+	computed:{
+		
+	},
+	mounted() {
+	},
+	methods: {
+		onEditorReady(e) {
+			uni.createSelectorQuery()
+				.in(this)
+				.select('.ql-container')
+				.fields({
+					size: true,
+					context: true
+				},res => {
+					this.editorCtx = res.context;
+					this.editorCtx.setContents({
+						html: this.html
+					})
+				})
+				.exec();
+		},
+		undo() {
+			this.editorCtx.undo();
+		},
+		// 插入图片
+		insertImage() {
+			let that = this;
+			uni.chooseImage({
+				count: 8,
+				sizeType: ['original', 'compressed'],
+				sourceType: ['album', 'camera'],
+				success: function({
+					tempFilePaths
+				}) {
+					var promise = Promise.all(tempFilePaths.map(tempFilePath => {
+						return new Promise(function(resolve, reject) {
+							uni.showLoading({
+								title: "正在上传中"
+							})
+							req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
+								that.editorCtx.insertImage({
+									src: res.src,  // 此处需要将图片地址切换成服务器返回的真实图片地址
+									alt: '图片',
+									success: function(e) {}
+								});
+								uni.hideLoading()
+							});
+						});
+					}));
+					promise.then(function(results) {
+						console.log(results);
+					}).catch(function(err) {
+						console.log(err);
+					});
+				}
+			});
+		},
+		insertDivider() {
+			this.editorCtx.insertDivider();
+		},
+		redo() {
+			this.editorCtx.redo();
+		},
+		showMore() {
+			this.showMoreTool = !this.showMoreTool;
+			this.editorCtx.setContents()
+		},
+		setBold() {
+			this.showBold = !this.showBold;
+			this.editorCtx.format('bold');
+		},
+		setItalic() {
+			this.showItalic = !this.showItalic;
+			this.editorCtx.format('italic');
+		},
+		checkStatus(name, detail, obj) {
+			if (detail.hasOwnProperty(name)) {
+				this[obj] = true;
+			} else {
+				this[obj] = false;
+			}
+		},
+		statuschange(e) {
+			var detail = e.detail;
+			this.checkStatus('bold', detail, 'showBold');
+			this.checkStatus('italic', detail, 'showItalic');
+			this.checkStatus('ins', detail, 'showIns');
+			this.checkStatus('header', detail, 'showHeader');
+			if (detail.hasOwnProperty('align')) {
+				if (detail.align == 'center') {
+					this.showCenter = true;
+					this.showRight = false;
+				} else if (detail.align == 'right') {
+					this.showCenter = false;
+					this.showRight = true;
+				} else {
+					this.showCenter = false;
+					this.showRight = false;
+				}
+			} else {
+				this.showCenter = false;
+				this.showRight = false;
+			}
+		},
+		setIns() {
+			this.showIns = !this.showIns;
+			this.editorCtx.format('ins');
+		},
+		setHeader() {
+			this.showHeader = !this.showHeader;
+			this.editorCtx.format('header', this.showHeader ? 'H2' : false);
+		},
+		setCenter() {
+			this.showCenter = !this.showCenter;
+			this.editorCtx.format('align', this.showCenter ? 'center' : false);
+		},
+		setRight() {
+			this.showRight = !this.showRight;
+			this.editorCtx.format('align', this.showRight ? 'right' : false);
+		},
+		showSetting() {
+			this.showSettingLayer = !this.showSettingLayer;
+		},
+		async editFocus() {
+			
+		},
+		editBlur(res) {
+			this.$emit('editBlur', res);
+		},
+		release(isPublic) {
+			this.showSettingLayer = false;
+			this.editorCtx.getContents({
+				success: res => {
+					Object.assign(res, {
+						isPublic: isPublic
+					})
+					this.$emit('editOk', res);
+				} 
+			})
+		},
+		confirmContent(){
+			this.editorCtx.getContents({
+				success: res => {
+					this.$emit('editOk', res);
+				} 
+			})
+		}
+	}
+};
+</script>
+
+<style scoped>
+.ql-editor.ql-blank:before {
+	/* 此处设置 placeholder 样式 */
+	color: rgba(204, 204, 204, 1);
+	font-style: normal;
+}
+
+.container {
+	padding: 30rpx 0;
+	box-sizing: border-box;
+	padding-bottom: 120rpx;
+}
+
+.ql-container {
+	line-height: 160%;
+	font-size: 34rpx;
+	width: calc(100% - 60rpx); 
+	height: auto;
+	margin: 0 auto;
+	font-style: normal !important;
+} 
+#editor{
+	font-style: normal !important;
+}
+.tool-view{
+	width: 100vw;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	
+}
+.tool {
+	height: 100rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-around;
+	width: 100%;
+	background: #eee;
+}
+
+.font-more {
+	position: absolute;
+	left: 0;
+	bottom: 100rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-around;
+	width: 100%;
+	background: rgb(235, 235, 235);
+	overflow: hidden;
+	transition: all 0.15s;
+}
+
+.setting-layer {
+	position: absolute;
+	bottom: 100rpx;
+	background: #fff;
+	width: 250rpx;
+	right: 20rpx;
+	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+	border-radius: 8rpx;
+}
+.setting-layer .single {
+	height: 80rpx;
+	font-size: 32rpx;
+	padding: 0 30rpx;
+	display: flex;
+	align-items: center;
+	line-height: 80rpx;
+	flex-direction: row;
+	color: #666;
+}
+.setting-layer .single .icon {
+	margin-right: 20rpx;
+}
+.setting-layer-mask{
+	position: fixed;
+	left: 0;
+	top: 0;
+	width: 100vw;
+	height: 100vh;
+	background: transparent; 
+}
+
+</style>

+ 47 - 0
match/components/jin-edit/jin-icons.vue

@@ -0,0 +1,47 @@
+<template>
+	<view class="content"><view class="icon" :style="{ color: color, fontSize: fontSize }" v-html="type" @click="toclick"></view></view>
+</template>
+
+<script>
+export default {
+	props: {
+		type: {
+			type: String,
+			default: '&#xe644;'
+		},
+		color: {
+			type: String,
+			default: '#666666'
+		},
+		fontSize: {
+			type: String,
+			default: '34rpx'
+		}
+	},
+	methods: {
+		toclick() {
+			this.$emit('click');
+		}
+	}
+};
+</script>
+
+<style scoped>
+.content {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+@font-face {
+	font-family: 'jin';
+	/** 阿里巴巴矢量图标库的字体库地址,可以替换自己的字体库地址 **/
+	/* src: url('https://at.alicdn.com/t/font_1491431_6m7ltjo8wi.ttf') format('truetype'); */
+	src:url('https://at.alicdn.com/t/font_1491431_6m7ltjo8wi.ttf') format('truetype');
+	/* src: url('./font_1491431_6m7ltjo8wi.ttf') format('truetype'); */
+}
+
+.icon {
+	font-family: jin !important;
+	font-size: 34rpx;
+}
+</style>

+ 65 - 0
match/components/jin-edit/readme.md

@@ -0,0 +1,65 @@
+## jin-edit 基于editor的富文本编辑器
+
+### 兼容性
+
+这是一个uni-app的通用组件,兼容微信小程序端、安卓端、ios端(未测试)、H5端。作者因没有ios设备无法对ios端进行测试,其他端测试无问题。
+
+微信小程序 | APP | H5
+:--: | :--: | :--:
+√ | √ | √
+
+我的HbuilderX版本2.6.7,不同的版本可能会造成不兼容的问题。
+
+### 使用方式
+
+1. 将此组件进入你的项目中的 /components/ 目录中
+2. 在某个页面中使用该插件
+- 在 `script` 中引用组件
+```javascript
+import jinEdit from '../../components/jin-edit/jin-edit.vue';
+export default {
+	data() {
+		return {
+			
+		}
+	},
+	components: {
+		jinEdit
+	},
+	methods: {
+		// 点击发布
+		editOk(res) {
+			console.log(res);
+		}
+	}
+}
+```
+- 在 `template` 中使用组件
+```html
+<jinEdit placeholder="请输入内容" @editOk="editOk" uploadFileUrl="/#"></jinEdit> 
+```
+
+### Demo
+
+[uni-jin(一个uni-app组件集合)](https://github.com/wangjinxin613/uni-jin)
+
+### 参数
+
+属性 | 类型 | 默认值 | 说明
+:--: | :--: | :--: | :--:
+showImgSize | Boolean | false | 点击图片时显示图片大小控件
+showImgToolbar | Boolean | false | 点击图片时显示工具栏控件
+showImgResize | Boolean | false | 点击图片时显示修改尺寸控件
+placeholder | String | '' | 编辑器占位符
+uploadFileUrl | String | '#' | 图片上传的服务器地址
+fileKeyName | String | 'file' | 图片上传时的name
+header | Object | - | 图片上传http请求的header
+html | String | - | 初始化的html 
+
+### 方法
+
+方法名 | 参数 | 说明
+:--: | :--: | :--:
+editOk | e={html,text,delta,isPublic} | 点击发布按钮触发	
+
+以上

+ 37 - 0
match/components/share-activity/share.css

@@ -0,0 +1,37 @@
+/* 分享弹窗 */
+.ceng{position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(0,0,0,.8);z-index: 99;}
+.beshare{position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);z-index: 100;width: 638rpx;}
+.beshares{background: #fff;border-radius: 12rpx;position: relative;}
+.sharebg{position: absolute;top: 0;left: 0;width: 100%;border-radius: 20rpx;z-index: 1;}
+.close{display: block;width: 41rpx;height: 41rpx;position: absolute;top: -20rpx;right: -20rpx;z-index: 10;}
+.dflex{display: flex;display: -webkit-flex;align-items: center;}
+.flex{flex: 1;-webkit-flex: 1;}
+.user{padding: 30rpx 0;position: relative;z-index: 2;}
+.user .toux{display: block;width: 100rpx;height: 100rpx;border-radius: 50%;margin-right: 30rpx;}
+.user .live{width: 100rpx; height: 56rpx; position: fixed; top: 60rpx; right: 30rpx;}
+.user .flex view{font-size: 32rpx;color: #333;}
+.user .flex text{display: block;font-size: 24rpx;color: #999;margin-top: 10rpx;}
+.user .flex view.colorfff,.user .flex text.colorfff{color: #fff;}
+.binfos{background: #fff;border-radius: 12rpx;position: relative;overflow: hidden;z-index: 2;}
+.bimgbox{width: 100%;}
+.bimg{display: block;width: 100%;height: 500rpx;margin: 0 auto;position: relative;z-index: 2;}
+.btit{font-size: 30rpx;color: #000;margin: 0 20rpx 0 0;display: -webkit-box;overflow : hidden;text-overflow: ellipsis;-webkit-line-clamp: 2;-webkit-box-orient: vertical;line-height: 1.6;}
+.bprice{font-size: 24rpx;color: #333;margin-top: 15rpx;}
+.bprice text{color: #999;margin-right: 15rpx;}
+.del{font-size: 24rpx;color: #999;text-decoration: line-through;margin-left: 20rpx;}
+.texts{font-size: 30rpx;color: #333;padding: 35rpx 30rpx;display: flex;display: -webkit-flex;align-items: center;justify-content: space-between;}
+.code{position: relative;z-index: 3;}
+.code image{display: block;width: 200rpx;height: 200rpx;margin: 0 auto;}
+.save{width: 330rpx;height: 80rpx;border-radius: 40rpx;border: 1rpx solid #BEBEBE;font-size: 30rpx;color: #fff;text-align: center;line-height: 80rpx;margin: 40rpx auto 0;}
+.sharePop{background: #F6F6F6;position: fixed;left: 0;bottom: 0;right: 0;z-index: 101;padding: 50rpx 0 0;}
+.share-tit{font-size: 36rpx;color: #333;text-align: center;display: flex;display: -webkit-flex;align-items: center;justify-content: center;}
+.share-tit::before{content: '';display: block;width: 70rpx;height: 2rpx;background: #666;margin-right: 20rpx;}
+.share-tit::after{content: '';display: block;width: 70rpx;height: 2rpx;background: #666;margin-left: 20rpx;}
+.share-btn{padding: 35rpx 0 60rpx;display: flex;display: -webkit-flex;justify-content: center;}
+.friend,.poster{width: 50% !important;text-align: center;font-size: 28rpx;color: #333;}
+.friend image,.poster image{display: block;width: 110rpx;height: 110rpx;margin: 0 auto 15rpx;}
+.cancel{font-size: 30rpx;color: #333;text-align: center;padding: 30rpx 0;background: #fff;}
+canvas{
+  position:fixed;left:9000px;
+}
+.blive{font-size: 40rpx; color: #333333;}

+ 385 - 0
match/components/share-activity/share.vue

@@ -0,0 +1,385 @@
+<template>
+	<view>
+		<view class="ceng" :hidden="hideToast" @tap="cancelPopup"></view>
+		<view class="sharePop" :hidden="hideToast">
+			<!-- <view class="share-tit">分享到</view> -->
+			<view class="share-btn">
+				<button class="friend" open-type="share" v-if="!isVideoScene">
+					<image src="/static/pages/images/wechat.png"></image>
+					微信好友
+				</button>
+				<view class="poster" @tap="generatePoster" v-if="codeUrl">
+					<image src="/static/pages/images/poster.png"></image>
+					生成海报
+				</view> 
+			</view>
+			<view class="cancel" @tap="cancelPopup">取消</view>
+		</view>
+
+		<canvas class="canvas" style="width:400px;height:460px;" canvas-id="share"></canvas>
+		<!-- 分享弹窗 -->
+		<view class="ceng" :hidden="hidePoster" @tap="showPoster"></view>
+		<view class="beshare" :hidden="hidePoster">
+			<view class="beshares">
+				<image src="/static/pages/images/close.png" class="close" @tap="showPoster"></image>
+				<view class="binfos">
+					<view class="bimgbox">
+						<image :src="product.fileUrl?product.fileUrl:product.pic" mode="aspectFit" class="bimg"></image>
+					</view>
+					<view class="texts">
+						<view class="binfo">
+							<view class="btit">{{product.title}}</view>
+							<view class="bprice dflex">
+								<text>会员码</text>{{userInfo.userCode}}
+							</view>
+						</view>
+						<view class="code">
+							<image :src="codeUrl"></image>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="save" @tap="saveImage">保存图片</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	const req = require("../../../utils/request.js");
+
+	export default {
+		data() {
+			return {
+				// canvasW: 0,
+				// canvasH: 0,
+				picUrlss: req.public.picUrls,
+				imgUrl: '',
+				userInfo: {},
+				isVideoScene: false
+			};
+		},
+
+		components: {},
+		props: {
+			hideToast: {
+				type: Boolean,
+				default: true
+			},
+			hidePoster: {
+				type: Boolean,
+				default: true
+			},
+			product: Object,
+			codeUrl: String,
+			bgUrl: String,
+			aType: Number,
+			canvasW: Number,
+			canvasH: Number,
+			address: {
+				type: String,
+				default: '湖南省娄底市经济技术开发区大埠桥办事处南阳村'
+			},
+		},
+		onReady() {
+			// console.log(this.hideToast)
+		},
+		onHide() {
+			// console.log(this.hideToast)
+		},
+		mounted() {
+			this.isVideoScene = req.getStorage('isVideoScene')
+			// console.log(this.hideToast,888888888)
+		},
+		methods: {
+			generatePoster() {
+				let that = this;
+				let isShowLoading = false;
+				let userInfo = req.getStorage('userInfo');
+				this.setData({
+					userInfo: userInfo
+				});
+
+				if (!isShowLoading) {
+					uni.showLoading({
+						title: '生成中…',
+						mask: true
+					});
+					isShowLoading = true;
+				}
+
+				this.generate(imgUrl => {
+					// console.log(isShowLoading);
+
+					if (isShowLoading) {
+						uni.hideLoading();
+						isShowLoading = false;
+					}
+
+					that.setData({
+						imgUrl: imgUrl,
+						hideToast: true,
+						hidePoster: false
+					});
+				});
+			},
+
+			showPoster() {
+				//隐藏海报
+				this.setData({
+					hidePoster: true
+				});
+				this.$emit('onFather', this.hideToast)
+			},
+
+			cancelPopup() {
+				this.setData({
+					hideToast: true
+				});
+				this.$emit('onFather', this.hideToast)
+			},
+
+			isAuth(fun) {
+				if (!uni.saveImageToPhotosAlbum) {
+					uni.showModal({
+						title: '提示',
+						content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
+					});
+					return;
+				}
+
+				; //可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope  
+				// #ifndef H5
+				uni.getSetting({
+					success(res) {
+						// console.log(res);
+
+						if (!res.authSetting['scope.writePhotosAlbum']) {
+							// 接口调用询问  
+							uni.authorize({
+								scope: 'scope.writePhotosAlbum',
+
+								success() {
+									// console.log("2-授权《保存图片》权限成功");
+									fun(true);
+								},
+
+								fail() {
+									fun(false);
+								}
+
+							});
+						} else {
+							// 拒绝授权
+							fun(true);
+						}
+					},
+
+					fail(res) {
+						fun(false);
+					}
+
+				});
+				// #endif
+			},
+
+			saveImage() {
+				let that = this;
+				that.isAuth(success => {
+					if (success) {
+						uni.saveImageToPhotosAlbum({
+							filePath: that.imgUrl,
+
+							success(res) {
+								uni.showToast({
+									title: '图片保存成功',
+									icon: 'none',
+
+									success() { // that.generate(imgUrl => {
+										//   that.setData({
+										//     imgUrl: imgUrl
+										//   })
+										// })
+									},
+
+									fail() {
+										uni.showToast({
+											title: '图片保存失败'
+										});
+									}
+
+								});
+							}
+
+						});
+					}
+				});
+			},
+
+			getImageInfo(url) {
+				// console.log(url);
+				return new Promise((resolve, reject) => {
+					if (!url) {
+						resolve();
+						return false;
+					}
+
+					uni.getImageInfo({
+						src: url,
+						success: resolve,
+						fail: reject
+					});
+				});
+			},
+
+			generate(success) {
+				// console.log(this);
+				let picPromise = '';
+				let picUrl = this.product.fileUrl?this.product.fileUrl:this.product.pic;
+				picPromise = this.getImageInfo(picUrl);
+
+				let codePromise;
+				if (!this.codeUrl) {
+					return req.msg('二维码生成失败');
+				} else {
+					codePromise = this.getImageInfo(this.codeUrl);
+				}
+				let that = this;
+				Promise.all([picPromise, codePromise]).then(([pic, code]) => {
+					// console.log(pic, avatar, code); // 创建绘图上下文
+
+					const ctx = uni.createCanvasContext('share', this); // 绘制背景,填充满整个canvas画布
+
+					let width = 400,
+						height = 460; //默认背景
+
+					ctx.setFillStyle('#fff');
+					ctx.fillRect(0, 0, width, height); // 拼团背景
+					
+					
+					//白色背景
+					// ctx.save();
+					// that.roundRect(ctx, 0, 0, 400, 460, 10);
+					// ctx.restore();
+					const picW = 400;
+					ctx.drawImage(pic.path, 0, 0, 400, 313);
+					// let lv;
+
+					// if (pic.height >= pic.width) {
+					// 	lv = pic.width / pic.height;
+					// 	ctx.drawImage(pic.path, (400 - picW * lv) / 2, 0, picW * lv, picW);
+					// } else {
+					// 	lv = pic.height / pic.width;
+					// 	ctx.drawImage(pic.path, 0, (400 - picW * lv) / 2, picW, picW * lv);
+					// }
+
+					ctx.drawImage(code.path, 265, 328, 120, 120);
+					ctx.fillStyle = '#000';
+					ctx.font = "18px PingFang SC";
+					let title = that.product.title;
+					// console.log(title);
+					if (title) {
+						for (let i = 0; i <= title.length / 16 && i < 2; i++) {
+							ctx.restore();
+							if (i == 1) {
+								if (title.length > 31) {
+									console.log('...===',title.substring(i * 15, (i + 1) * 15) + '...')
+									ctx.fillStyle = '#000';
+									ctx.font = "16px PingFang SC";
+									ctx.fillText(title.substring(i * 15, (i + 1) * 15) + '...', 15, 368 + i * 22);
+								} else {
+									console.log('...===27',title.substring(i * 15, (i + 1) * 15))
+									ctx.fillStyle = '#000';
+									ctx.font = "16px PingFang SC";
+									ctx.fillText(title.substring(i * 15, (i + 1) * 15), 15, 368 + i * 22);
+								}
+							} else {
+								console.log('...===0',title.substring(i * 16, (i + 1) * 15),i)
+								ctx.fillStyle = '#000';
+								ctx.font = "16px PingFang SC";
+								ctx.fillText(title.substring(i * 16, (i + 1) * 15), 15, 368 + i * 22);
+							}
+						}
+					}
+					
+					ctx.fillStyle = '#999';
+					ctx.font = "14px PingFang SC";
+					ctx.fillText('会员码', 15, 422);
+					
+					ctx.fillStyle = '#333';
+					ctx.font = "14px PingFang SC";
+					ctx.fillText(that.userInfo.userCode, 65, 422);
+
+					ctx.save();
+					// ctx.beginPath();
+					// ctx.arc(40, 40, 25, 0, 2 * Math.PI, true); //画一个圆形裁剪区域
+
+					// ctx.clip(); //裁剪
+					// let config = JSON.parse(req.getStorage('configRes'))
+					// ctx.drawImage(avatar && avatar.path ? avatar.path : config.CONFIG_PROJECT_LOGO, 15, 15, 50, 50); //绘制图片
+					ctx.stroke()
+					// 完成作画
+
+					ctx.draw(false, function() {
+						uni.canvasToTempFilePath({
+							canvasId: 'share',
+							success: function(res) {
+								success.call(this, res.tempFilePath);
+							},
+							fail: function(res) {
+								// console.log(res);
+							}
+						}, that);
+					});
+				});
+			},
+
+			/**
+			 * 
+			 * @param {CanvasContext} ctx canvas上下文
+			 * @param {number} x 圆角矩形选区的左上角 x坐标
+			 * @param {number} y 圆角矩形选区的左上角 y坐标
+			 * @param {number} w 圆角矩形选区的宽度
+			 * @param {number} h 圆角矩形选区的高度
+			 * @param {number} r 圆角的半径
+			 */
+			roundRect: function(ctx, x, y, w, h, r) {
+				// 开始绘制
+				ctx.beginPath(); // 因为边缘描边存在锯齿,最好指定使用 transparent 填充
+				// 这里是使用 fill 还是 stroke都可以,二选一即可
+
+				ctx.setFillStyle('white'); // ctx.setStrokeStyle('transparent')
+				// 左上角
+
+				ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5); // border-top
+
+				ctx.moveTo(x + r, y);
+				ctx.lineTo(x + w - r, y);
+				ctx.lineTo(x + w, y + r); // 右上角
+
+				ctx.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2); // border-right
+
+				ctx.lineTo(x + w, y + h - r);
+				ctx.lineTo(x + w - r, y + h); // 右下角
+
+				ctx.arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5); // border-bottom
+
+				ctx.lineTo(x + r, y + h);
+				ctx.lineTo(x, y + h - r); // 左下角
+
+				ctx.arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI); // border-left
+
+				ctx.lineTo(x, y + r);
+				ctx.lineTo(x + r, y); // 这里是使用 fill 还是 stroke都可以,二选一即可,但是需要与上面对应
+
+				ctx.fill(); // ctx.stroke()
+
+				ctx.closePath(); // 剪切
+
+				ctx.clip();
+			}
+		}
+	};
+</script>
+<style>
+	@import "./share.css";
+</style>

+ 1 - 0
match/editorContent/editorContent.css

@@ -0,0 +1 @@
+/* editorContent.css */

+ 65 - 0
match/editorContent/editorContent.vue

@@ -0,0 +1,65 @@
+<template>
+	<view><jinEdit placeholder="请填写" @editBlur="editBlur" @editOk="editOk" :html="content" uploadFileUrl="/#"></jinEdit></view>
+</template>
+
+<script>
+const req = require('../../utils/request.js');
+import jinEdit from '../components/jin-edit/jin-edit.vue';
+export default {
+	components: {
+		jinEdit
+	},
+	data() {
+		return {
+			content: ''
+		};
+	},
+	onLoad(options) {
+		let pages = getCurrentPages(); //获取所有页面栈实例列表
+		let prevPage = pages[pages.length - 2]; //上一页页面实例
+		this.content = prevPage.$vm.text;
+	},
+
+	onShow() {},
+
+	onUnload: function() {
+		// 页面销毁时执行保存
+		this.saveContent(this.content, false);
+	},
+
+	methods: {
+		editBlur(res) {
+			this.content = res.detail.html;
+			console.log('编辑器的数据>>>>>', this.content);
+		},
+
+		saveContent(content, isBack) {
+			let pages = getCurrentPages();
+			let prevPage = pages[pages.length - 2];
+			prevPage.$vm.text = content;
+			if (isBack) {
+				uni.navigateBack({
+					delta: 1
+				});
+			}
+		},
+
+		// 点击发布
+		editOk(res) {
+			this.saveContent(res.html, true);
+		}
+	}
+};
+</script>
+
+<style>
+	page{background: #fff;}
+</style>
+<style>
+@import './editorContent.css';
+.ql-editor.ql-blank:before {
+	/* 此处设置 placeholder 样式 */
+	color: #999;
+	font-style: normal;
+}
+</style>

BIN
match/static/images/add.png


BIN
match/static/images/person.png


BIN
match/static/images/photo.png


BIN
match/static/images/pic.png


+ 44 - 23
pages.json

@@ -6,29 +6,50 @@
 		}
 	}],
 	"subPackages": [{
-		"root": "card",
-		"pages": [{
-			"path": "create/create",
-			"style": {
-				"navigationBarTitleText": "创建名片"
-			}
-		}, {
-			"path": "editDesc/editDesc",
-			"style": {
-				"navigationBarTitleText": "详情"
-			}
-		}, {
-			"path": "success/success",
-			"style": {
-				"navigationBarTitleText": ""
-			}
-		}, {
-			"path": "index/index",
-			"style": {
-				"navigationBarTitleText": ""
-			}
-		}]
-	}],
+			"root": "card",
+			"pages": [{
+				"path": "create/create",
+				"style": {
+					"navigationBarTitleText": "创建名片"
+				}
+			}, {
+				"path": "editDesc/editDesc",
+				"style": {
+					"navigationBarTitleText": "详情"
+				}
+			}, {
+				"path": "success/success",
+				"style": {
+					"navigationBarTitleText": ""
+				}
+			}, {
+				"path": "index/index",
+				"style": {
+					"navigationBarTitleText": ""
+				}
+			}]
+		},
+		{
+			"root": "match",
+			"pages": [{
+				"path": "activityManage/activityManage",
+				"style": {
+					"navigationBarTitleText": "活动"
+				}
+			},{
+				"path": "activityEdit/activityEdit",
+				"style": {
+					"navigationBarTitleText": "创建活动"
+				}
+			},
+			{
+				"path": "editorContent/editorContent",
+				"style": {
+					"navigationBarTitleText": "活动详情"
+				}
+			}]
+		}
+	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",

BIN
static/images/ssico.png


BIN
static/pages/images/more.png


+ 2 - 1
utils/request.js

@@ -3,7 +3,7 @@ const app = getApp();
 const env = {
 	NODE_ENV: 'pota',
 	dev: {
-		apiUrl: 'https://rsapi.zhiqiyun.net'
+		apiUrl: 'https://unwx.e-chinalife.com'
 	},
 	prd: {
 		apiUrl: 'https://apimall.zhiqiyun.com',
@@ -25,6 +25,7 @@ var header = {
 
 /**小程序配置 */
 const publics = {
+	picUrls: 'https://zhiqiyun.oss-cn-hangzhou.aliyuncs.com/static/', //图片地址
 	'mapLBSKEY': 'XTABZ-5K3RW-MZVRD-3ZS33-GC5RE-YOBEG',
 }
 /*