Sfoglia il codice sorgente

地图部分bug,大转盘部分bug

yfso 2 anni fa
parent
commit
e1a39427c2

+ 1 - 1
components/hch-position/hch-position.vue

xqd
@@ -2,7 +2,7 @@
 	<view style="height:100%;">
 		<view class="page-body" style="height:100%;">
 			<view class="page-section page-section-gap" style="height:100%;">
-				<map scale="10"  ubkey='CQIBZ-P2MR5-PM3IB-QRKTX-SEVJE-GYF34' :showScale="false" :showLocation="true"  :showCompass="false" enableZoom="true" enableScroll="true" enableBuilding="true" enable3D="true" id="myMap" style="width: 100%; height: 100%;"
+				<map scale="12"  ubkey='CQIBZ-P2MR5-PM3IB-QRKTX-SEVJE-GYF34' :showScale="false" :showLocation="true"  :showCompass="false" enableZoom="true" enableScroll="true" enableBuilding="true" enable3D="true" id="myMap" style="width: 100%; height: 100%;"
 					:latitude="innerGeo.latitude" 
 					:longitude="innerGeo.longitude"
 					:markers="markersIn" 

+ 3 - 3
components/q-turntable/index.vue

xqd xqd
@@ -10,9 +10,9 @@
 					<text>{{item.name}}</text>
 				</view>
 			</view>
-			<image class="circle" src="http://t9.9026.com/imgs/banner14.png"/>
+			<image class="circle" :src="big_wheel_disc"/>
 		</view>
-		<image class="button" src="http://t9.9026.com/imgs/banner04.png" @click="start"/>
+		<image class="button" :src="big_wheel_button" @click="start"/>
 	</view>
 </template>
 
@@ -20,7 +20,7 @@
 	export default{
 		components:{
 		},
-		props:["drawProducts"],
+		props:["drawProducts", "big_wheel_disc", "big_wheel_button"],
 		data(){
 			return {
 				content: [],

+ 23 - 9
pages/goods/goods-lucky/index.vue

xqd xqd xqd xqd xqd xqd
@@ -1,13 +1,13 @@
 <template>
 	<view class="goods-lucky">
 		<!-- 转盘 -->
-		<view class="spinning" :style="{backgroundImage:'url('+backImageUrl+')'}">
-			<view class="spinning-title">
+		<view class="spinning" :style="{backgroundImage:'url('+bigWheelConfig.big_wheel_bg+')'}">
+			<view class="spinning-title" style="opacity: 0;">
 				<text>{{drawInfo.draw_template.name?drawInfo.draw_template.name:"幸运大轮盘"}}</text>
 			</view>
 <!-- 			<q-turntable isRenderImage ref="turntable" :areaNumber='9' @start="turntableStart" @success="turntableSuccess">
 			</q-turntable> -->
-			<q-turntable ref="turntable" @start="turntableStart"/>
+			<q-turntable ref="turntable" @start="turntableStart" :big_wheel_disc="bigWheelConfig.big_wheel_disc" :big_wheel_button="bigWheelConfig.big_wheel_button"/>
 		</view>
 
 		<view style="background-color: #f9f9f9; padding-bottom: 136rpx;">
@@ -36,7 +36,7 @@
 						<text class="introduce-top-rule2"></text>
 					</view>
 					<view class="introduce-text">
-						<text>{{drawInfo.draw_template.rule}}</text>
+						<view v-html="bigWheelConfig.big_wheel_rule"></view>
 					</view>
 				</view>
 			</view>
@@ -105,7 +105,8 @@
 			QTurntable
 		},
 		data() {
-			return {
+			return {
+				big_wheel:{},
 				//中奖等级
 				prizeLevel:'',
 				isexchange: true,
@@ -144,14 +145,22 @@
 				},
 				drawRecord:[],
 				drawResult:{},
-				drawResultProduct: {}
+				drawResultProduct: {},
+				bigWheelConfig:{}
 			}
 		},
 		onLoad(params){
 			const {draw_no} = params
 			this.drawInfo.draw_no = draw_no;
+			this.getBackgroundConfig()
 		},
 		onReady(){
+			if(!this.$store.getters.userInfo){
+				uni.redirectTo({
+					url: '/pages/login/login'
+				})
+				return;
+			}
 			// this.judageIsDraw(); //判断是否有权限访问
 			this.getDrawInfo();  //获取抽奖信息
 			this.getDrawRecord();	//获取获奖记录
@@ -160,9 +169,14 @@
 			recordMsg:(status)=>{
 				const di = ['未中奖','未兑换','已兑换'];
 				return di[status];
-			}
+			},
 		},
 		methods: {
+			getBackgroundConfig(){
+				this.$api.document.allSet().then(res => {
+					this.bigWheelConfig = res.data.big_wheel.value
+				})
+			},
 			judageIsDraw(){
 				if(!this.drawInfo.draw_no){
 					uni.showToast({
@@ -591,10 +605,10 @@
 		width: 100%;
 		height: 790rpx;
 		background-repeat: no-repeat;
-		background-size: cover;
+		background-size: 100% 100%;
 
 		.spinning-title {
-			margin-bottom: 40rpx;
+			margin-bottom: 20rpx;
 			display: flex;
 			align-items: center;
 			justify-content: center;

+ 0 - 2
pages/index/index.vue

xqd
@@ -314,8 +314,6 @@
 			this.getAllSet()
 			// this.isDevelopment = process.env.NODE_ENV === 'development';
 			this.isDevelopment = true;
-
-
 		},
 		methods: {
 			// **************** Data ***************//

+ 43 - 44
pages/index/vote-detail/index.vue

xqd
@@ -322,51 +322,50 @@
 				this.$api.active.getActiveProjectDetail({
 					activity_project_id: id
 				}).then(res => {
-					// console.log(res, "detail")
-					// if (res.code == 0) {
-					// 	this.voteDetail = res.data
-					// 	uni.getStorage({
-					// 		key: `is_vip_${this.voteDetail.id}`,
-					// 		success: (data)=> {
-					// 			this.is_vip = data.data === 1 ? true : false
-					// 		},
-					// 		fail:()=>{
-					// 			this.is_vip = false;
-					// 		}
-					// 	});
+					if (res.code == 0) {
+						this.voteDetail = res.data
+						uni.getStorage({
+							key: `is_vip_${this.voteDetail.id}`,
+							success: (data)=> {
+								this.is_vip = data.data === 1 ? true : false
+							},
+							fail:()=>{
+								this.is_vip = false;
+							}
+						});
 						
-					// 	this.startTime = res.data.activity.start_time.replace(/-/g, "/")
-					// 	// “yyyy-MM-dd-hh-mm-ss”.replace(/-/g,"/")
-					// 	this.endTime = res.data.activity.end_time.replace(/-/g, "/")
-					// 	this.cancelTime(this.startTime, this.endTime)
-					// 	//活动可以使用的投票数
-					// 	this.userCanVoteNum = res.data.user_can_vote_num
-					// 	if (this.userCanVoteNum > 0) {
-					// 		this.isVoteNum = true
-					// 	} else {
-					// 		this.isVoteNum = false
-					// 	}
-					// 	callback && callback()
-					// 	this.sourceId = res.data.id
-					// 	//跳转vip小程序获得投票数
-					// 	this.vipRewardTicketNum = res.data.activity.vip_reward_ticket_num
-					// 	// this.info =JSON.parse( res.data.img_urls)
-					// 	this.info = JSON.parse(res.data.img_urls).map(item => {
-					// 		return {
-					// 			img: item
-					// 		}
-					// 	})
-					// 	//跳转h5和小程序
-					// 	this.jump_type = res.data.jump_type,
-					// 		this.jump_config = res.data.jump_config
-					// 	//banner展示视频或者图片
-					// 	this.resource_type = res.data.resource_type
-					// 	this.video_url = res.data.video_url
-					// 	//视频自动播放
-					// 	this.openVideoPlay()
-						//海报图片
-						// this.posterData.mainImg = res.data.share_img
-						// this.codeImg = res.data.qrcode_url
+						this.startTime = res.data.activity.start_time.replace(/-/g, "/")
+						// “yyyy-MM-dd-hh-mm-ss”.replace(/-/g,"/")
+						this.endTime = res.data.activity.end_time.replace(/-/g, "/")
+						this.cancelTime(this.startTime, this.endTime)
+						//活动可以使用的投票数
+						this.userCanVoteNum = res.data.user_can_vote_num
+						if (this.userCanVoteNum > 0) {
+							this.isVoteNum = true
+						} else {
+							this.isVoteNum = false
+						}
+						callback && callback()
+						this.sourceId = res.data.id
+						//跳转vip小程序获得投票数
+						this.vipRewardTicketNum = res.data.activity.vip_reward_ticket_num
+						// this.info =JSON.parse( res.data.img_urls)
+						this.info = JSON.parse(res.data.img_urls).map(item => {
+							return {
+								img: item
+							}
+						})
+						//跳转h5和小程序
+						this.jump_type = res.data.jump_type,
+							this.jump_config = res.data.jump_config
+						//banner展示视频或者图片
+						this.resource_type = res.data.resource_type
+						this.video_url = res.data.video_url
+						//视频自动播放
+						this.openVideoPlay()
+						海报图片
+						this.posterData.mainImg = res.data.share_img
+						this.codeImg = res.data.qrcode_url
 
 					}
 				})

+ 2 - 2
pages/map/map.vue

xqd xqd
@@ -348,7 +348,7 @@
 					type: "gcj02", //返回可以用于wx.openLocation的经纬度
 					success: (res) => {
 						this.geo = {
-							latitude: res.latitude + Math.random()/100000,
+							latitude: res.latitude + Math.random()/10000000,
 							longitude: res.longitude
 						}
 					},
@@ -363,7 +363,7 @@
 					type: "gcj02", //返回可以用于wx.openLocation的经纬度
 					success: (res) => {
 						this.geo = {
-							latitude: res.latitude + Math.random()/100000,
+							latitude: res.latitude + Math.random()/10000000,
 							longitude: res.longitude
 						}
 						this.getList(true)

+ 0 - 1
store/getters.js

xqd
@@ -6,7 +6,6 @@ const getters = {
   allset: state => state.user.allset,
   person: state => state.user.person,
   staff: state => state.user.staff,
-  
 }
 export default getters