zhengkaixin 3 سال پیش
والد
کامیت
839f05ca1e
3فایلهای تغییر یافته به همراه39 افزوده شده و 15 حذف شده
  1. 15 6
      pages/index/index.vue
  2. 3 3
      pages/login/welcome.vue
  3. 21 6
      pages/user/InviteFriends.vue

+ 15 - 6
pages/index/index.vue

@@ -85,7 +85,7 @@
 
 
 
-		<view style="height:100px"></view>
+		<view style="height:50px"></view>
 		<!-- 站点 -->
 		<view class="station" v-if="message == 'getLocation:ok' && chargeList.length == 0"
 			@click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
@@ -353,10 +353,17 @@
 		},
 		methods: {
 			friendsInvitation(obj){
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
 				 API.findActivity({
 					 id:obj.op.id,
-					 code:obj.op.code
+					 code:obj.op.icode
 				 }).then((res) => {
+					 	uni.hideLoading()
 					obj.activityInfo=res.data.activityInfo;
 					 var name=res.data.activityInfo.name;
 					 var title="参与活动"
@@ -518,12 +525,14 @@
 			},
 			rechargeActivity(index) {
 				if (this.userId) {
+					var uurl="&uid="+this.userId;
+					
 					var mod = this.activityList[index]
 					
 					if (mod.clickUrl == null) {
 					
 					} else if (mod.clickUrl.indexOf('http') == 0) {
-						window.location = mod.clickUrl;
+						window.location = mod.clickUrl+uurl;
 					
 					} else if (mod.clickUrl.indexOf('#/') == 0) {
 						if (mod.clickUrl.indexOf("?") == -1) {
@@ -532,13 +541,13 @@
 						var url=mod.clickUrl.split("#")[1]
 						//window.location = mod.clickUrl;
 						uni.navigateTo({
-							url: url
+							url: url+uurl
 						})
 					} else if (mod.clickUrl == '#' || mod.clickUrl == '') {
 					
 					} else {
 						uni.navigateTo({
-							url: mod.clickUrl
+							url: mod.clickUrl+uurl
 						})
 					}
 				} else {
@@ -662,7 +671,7 @@
 		text-align: center;
 		background-color: #fff;
 		position: absolute;
-		top: 210px;
+		top: 160px;
 		left: 0;
 		right: 0;
 		margin: auto;

+ 3 - 3
pages/login/welcome.vue

@@ -9,12 +9,12 @@
 				
 			</view>
 			
-			<u-image  id="imgw" v-if="imgmode"   @load="imgsload" ref="imgw"  mode="widthFix">
+			<u-image  id="imgw" v-if="imgmode"   @load="imgsload" ref="imgw"   mode="widthFix">
 				<view slot="loading"></view>
 				<view slot="error"></view>
 			</u-image>
 			
-			<u-image   v-if="!imgmode"  :height="imgH"  ref="imgw"  mode="aspectFill">
+			<u-image   v-if="!imgmode"  :height="imgH"   mode="aspectFill">
 				<view slot="loading"></view>
 				<view slot="error"></view>
 			</u-image>
@@ -183,7 +183,7 @@
 					op:op,
 					date:new Date().getTime()
 				})
-			
+					this.onReadyIng()
 			}else  if(op.gunId){
 				var k=API.codeOperation("jp_team51_charge_id:A_"+op.gunId);
 				if(k){

+ 21 - 6
pages/user/InviteFriends.vue

@@ -38,15 +38,15 @@
 						<p>3.和好友一起领5元红包</p>
 					</view>
 					<view class="InviteFriends-tips">
-						<span>*</span><p>邀请成功,你和好友各得5元红包,一年有效;邀请更多人,你可领最高500元红包,红包在本活动页兑换。</p>
+						<span>*</span><p>邀请成功,你和好友各得5元红包,一年有效;邀请更多人,你可领最高500元红包</p>
 					</view>
 				</view>
 				<view class="InviteFriends-title">我的奖励</view>
 				<view class="InviteFriends-reward">
 					<view class="reward-head">
-						<p>成功邀请{{list.length}}人,已获得</p>
+						<p>成功邀请{{list?list.length:0}}人,已获得</p>
 						<view class="reward-head-price">
-							<h2>{{amount}}</h2><span>元</span>
+							<h2>{{list?list.length*5:0}}</h2><span>元</span>
 						</view>
 					</view>
 					<view class="reward-main">
@@ -60,7 +60,7 @@
 								<view class="rewardList-item" v-for="(item,i) in list" :key="i" >
 									<view class="u-flex">
 										<u-avatar :src="item.headImg" size="72"></u-avatar>
-										<span :v-text="item.nickName"></span>
+										<span v-text="item.nickName"></span>
 									</view>
 									<p v-text="item.createTime"></p>
 								</view>
@@ -92,16 +92,31 @@
 				code:"",
 				show:false,
 				amount:0,
+				uid:"",
+				list:[]
 			}
 		},
 		onLoad(op) {
 				this.id=op.id
-				this.code=op.code
+				this.code=op.icode
+				this.uid=op.uid
 				this.get_wx_config();
 				
 		},
 		onShow() {
-				this.inviteCouponList();
+			
+			//pages/user/InviteFriends?id=2&icode=FX&uid=731b9765-3565-4b3c-918b-5d3ec3b505fb
+				var info=this.carhelp.getPersonInfo();
+				if(info){
+					this.inviteCouponList();
+				}else{
+					window.location= window.location.href.split("#")[0]+'#';
+					var url="/?friends=friends&id="+this.id+"&icode="+this.code+"&uid="+this.uid;
+					uni.redirectTo({
+						url:url
+					})
+				}
+				
 		},
 		methods: {
 			inviteCouponList(){