dever 4 years ago
parent
commit
24865f8fad
3 changed files with 44 additions and 14 deletions
  1. 1 1
      lib/graceUI/components/graceNumberBox.vue
  2. 29 13
      pages/dream/index.vue
  3. 14 0
      pages/dream/view/product.vue

+ 1 - 1
lib/graceUI/components/graceNumberBox.vue

@@ -63,7 +63,7 @@ export default {
 		},
 		inputFontSize : {
 			type : String,
-			default : '26rpx'
+			default : '28rpx'
 		},
 		inputColor : {
 			type : String,

+ 29 - 13
pages/dream/index.vue

@@ -43,28 +43,37 @@
 				<info :id="id" :bgcolor="fetch.button.bgcolor" :color="fetch.button.color" @hideInfo="hideInfo"></info>
 			</view>
 			
-			<dever-share ref="share" :id="id" :code="fetch.code" :data="fetch.share" v-if="fetch.share"></dever-share>
+			<dever-share ref="share" :id="id" :code="fetch.code" :data="fetch.share" v-if="fetch.share && fetch.code"></dever-share>
 			
-			<view class="mask buy-layer" v-if="inviteState && fetch.share_user">
+			<view class="mask buy-layer" v-if="inviteState && fetch.share_user && fetch.share_user.code">
 			  <view class="buytip-layer layer " catchtap="handleStop">
 				<view class="buy-tit buy-user"><image :src="fetch.share_user.avatar" mode="widthFix"></image></view>
-				<view class="buy-tit" style="margin-top: 10rpx;">{{fetch.share_user.username}}赠送</view>
+				<view class="buy-tit" style="margin-top: 10rpx;">{{fetch.share_user.username}}赠送{{fetch.info.ticket_name}}</view>
 				<view v-if="fetch.share_user.ticket && fetch.share_user.ticket.desc">
 					<text class="p">“{{fetch.share_user.ticket.desc}}”</text>
-					<text class="p">——“他”是这么说的</text>
-				</view>
-				
-				<view v-else>
-					<text class="p">“{{fetch.share.content}}”</text>
-					<text class="p">——{{fetch.share.title}}</text>
+					<text class="p">—“他”是这么说的</text>
+				</view>
+				
+				<view v-else>
+					<text class="p">“{{fetch.share.content}}”</text>
+					<text class="p">—{{fetch.share.title}}</text>
+				</view>
+				
+				<view v-if="fetch.share_ticket">
+					<text class="p">“{{fetch.share_ticket}}”</text>
+					<text class="p">—你已拥有{{fetch.info.ticket_name}},你这么回复“他”吧</text>
 				</view>
-				
-				<view class="btn-wrapper">
+
+				<view class="btn-wrapper" v-if="!fetch.share_ticket">
 				  <view class="button cancel" @click="hideInvite">不要
 				  </view>
-				  <view class="button primary" :style="fetch.button.bgcolor" @click="hideInvite">收下
+				  <view class="button primary" :style="fetch.button.bgcolor" @click="saveTicket(fetch.share_user.code)">收下
 					<button formType="submit"></button>
 				  </view>
+				</view>
+				
+				<view class="btn-wrapper" v-if="fetch.share_ticket">
+				  <view class="button primary" style="margin: 0 auto;" @click="hideInvite" :style="fetch.button.bgcolor">关闭</view>
 				</view>
 				
 			  </view>
@@ -138,6 +147,13 @@ export default{
 		hideInvite : function() {
 			this.inviteState = false;
 		},
+		saveTicket : function(code) {
+			var self = this;
+			this.Dever.post('app/user/?l=api.saveTicket', {code:code}, function(t) {
+				self.Dever.alert('已收下');
+				self.hideInvite();
+			});
+		},
 		showBuy : function() {
 			this.buyState = true;
 		},
@@ -536,7 +552,7 @@ swiper-item image{
 	object-fit: cover; 
 	object-position: center;
 	position: absolute;
-	top: -20%;
+	top: -16%;
 	left: 208rpx;
 }
 .buy-user image {

+ 14 - 0
pages/dream/view/product.vue

@@ -73,6 +73,17 @@
 							</view>
 						</view>
 					</view>
+					
+					<view class="grace-wrap" style="margin-top: 20rpx;">
+						<view class="grace-capsule margin">
+							<text class="grace-capsule-icon">地址</text>
+							<text class="grace-capsule-text">河北省三河市燕郊开发区理想新城一期南区36号楼</text>
+						</view>
+						<view class="grace-capsule margin">
+							<text class="grace-capsule-icon grace-icon-br" style="background:#E76B61;">自提</text>
+							<text class="grace-capsule-text grace-text-br" style="border-color:#E76B61; color:#E76B61;">河北省三河市燕郊开发区理想新城一期南区</text>
+						</view>
+					</view>
 					<!-- 属性列表区 -->
 					<scroll-view style="height:700rpx;" scroll-y>
 						<block v-for="(v, k) in item.goods.sell_attr" :key="k" v-if="item.goods.price_type == 2">
@@ -304,4 +315,7 @@ export default {
   text-align: center;
   z-index: 2000;
 }
+.block1{line-height:80rpx; display:block; width:100%; text-align:center; font-size:28rpx;}
+.block2{line-height:66rpx; display:block; width:100%; text-align:center; font-size:28rpx;}
+.margin{margin:10rpx 10rpx 0 0;}
 </style>