Przeglądaj źródła

邀请下单 与 红包

shish 4 lat temu
rodzic
commit
0dcf76980a

+ 27 - 17
hdApp/src/components/module/app-activily-coupon.vue

@@ -1,27 +1,25 @@
 <template>
 	<modal-module :show="show" @cancel="modalCancel" :custom="true" padding="0 0" bgcolor="none">
 		<div class="app-activily-coupon" @click="receive">
+			<view class="close" @click.stop="modalCancel()">x</view>
 			<div class="sctivliy-bg">
-				<img :src="`${constant.imgUrl}/retail/coupon/new-bg.png`" alt mode="widthFix" />
+				<img :src="`${constant.imgUrl}/retail/coupon/new-bg3.png`" alt mode="widthFix" />
 			</div>
 			<div class="coupon-wrap">
 				<div class="coupon-bg">
-					<img :src="`${constant.imgUrl}/retail/coupon/new-coupon-bg.png`" alt mode="widthFix" />
+					<img :src="`${constant.imgUrl}/retail/coupon/new-coupon-bg2.png`" alt mode="widthFix" />
 				</div>
-				<!-- 列表 -->
 				<div class="list-det">
 					<div class="list-det-left">
 						<div class="price-wrap">
 							<span>¥</span>
 							<span class="price">{{ info.amount }}</span>
 						</div>
-						<div class="full-reduc">满{{ info.miniCost }}可使用</div>
 					</div>
 					<div class="list-det-right">
 						<div class="coupon-message">
-							<div class="app-color-0">优惠券</div>
-							<div>适用:全品类</div>
-							<div>有效至:{{ info.validTime }}</div>
+							<div class="app-color-2" style="font-weight:700;font-size:40rpx;margin-bottom:10rpx;margin-left:18rpx;">到店红包</div>
+							<div style="font-size:30rpx;margin-left:30rpx;">本店专用</div>
 						</div>
 					</div>
 				</div>
@@ -29,10 +27,8 @@
 		</div>
 	</modal-module>
 </template>
-
 <script>
 import ModalModule from '@/components/plugin/modal'
-// api
 import { receiveGift } from '@/api/coupon'
 export default {
 	name: 'app-activily-coupon',
@@ -48,9 +44,9 @@ export default {
 			type: Object,
 			default: () => {}
 		},
-		introUserId: {
-			type: String,
-			default: ''
+		ghsId: {
+			type: Number,
+			default: 0
 		}
 	},
 	data() {
@@ -60,11 +56,16 @@ export default {
 	},
 	methods: {
 		receive() {
-			console.log('领取!')
-			let id = this.introUserId || ''
-			receiveGift({introUserId: id}).then(res => {
-				this.$msg('领取成功!')
-				this.modalCancel()
+			let that = this
+			if(this.ghsId == 0){
+				this.$msg('稍等2秒')
+				return false
+			}
+			receiveGift({ghsId: this.ghsId}).then(res => {
+				if(res.code == 0){
+					that.$msg('领取成功')
+					that.modalCancel()
+				}
 			})
 		},
 		modalCancel() {
@@ -76,6 +77,15 @@ export default {
 
 <style lang="scss" scoped>
 	.app-activily-coupon {
+		.close{
+			color:white;
+			float:right;
+			font-size:30rpx;
+			margin-right:30rpx;
+			border:1rpx solid white;
+			border-radius: 40rpx;
+			padding:1rpx 17rpx 9rpx 17rpx;
+		}
 		height: 748px;
 		.coupon-wrap {
             position: relative;

+ 2 - 2
hdApp/src/pagesInvite/inviteHdShop.vue

@@ -5,10 +5,10 @@
     </view>
     <!-- 确认 -->
       <div class="confirm-btn">
-        <button class="admin-button-com big blue" @click="downloadImg">保存图片邀请</button>
+        <button class="admin-button-com big blue" @click="downloadImg">保存图片分享</button>
       </div>
       <div class="confirm-btn1">
-        <button class="admin-button-com big blue" @click="goToMallPt()">直接打开邀请</button>
+        <button class="admin-button-com big blue" @click="goToMallPt()">直接打开分享</button>
       </div>
   </view>
 </template>

+ 2 - 1
hdApp/src/pagesInvite/inviteShop.vue

@@ -7,7 +7,8 @@
       <view>1、保存图片分享给供应商,供应商识别并注册</view>
       <view>2、直接打开分享给供应商注册也可以</view>
       <view>3、奖金分二次发放,供应商注册并审核通过奖励10元,供应商线上营业额达20万元,奖励290元</view>
-      <view>4、如有疑问,请<text style="color:blue" @click="getCustomService()">点我联系客服</text></view>
+      <view>4、只能邀请城市批发商,昆明批发商无法使用</view>
+      <view>5、如有疑问,请<text style="color:blue" @click="getCustomService()">点我联系客服</text></view>
     </view>
     <div class="confirm-btn">
       <button class="admin-button-com big blue" @click="downloadImg">保存图片邀请</button>

+ 62 - 21
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -11,8 +11,8 @@
 			</view>
 
 			<view v-if="ghsInfo.hasRechargeHb && ghsInfo.hasRechargeHb ==1" class="shop_intro" @tap="recharge(ghsInfo)">
-				<text>充值送红包<text style="color:red;font-weight:700;">{{parseFloat(ghsInfo.hasRechargeHbAmount)}}</text>元
-					<text style="z-index:999999;margin-left:15rpx;color:red;border:1px solid red;padding:3rpx 12rpx 3rpx 12rpx;border-radius:10rpx;">去充值</text>
+				<text>充值<text style="color:red;font-weight:700;">{{parseFloat(ghsInfo.hasRechargeHbAmount)}}</text>元红包
+					<text style="z-index:999999;margin-left:15rpx;color:red;color: #3385FF;">点我充值</text>
 				</text>
 			</view>
 
@@ -22,7 +22,8 @@
 			</view>
 
         </view>
-        <i class="iconfont icondianhua1" v-if="ghsInfo.mobile !=''" @tap="toPhone(ghsInfo.mobile)"></i>
+		<image class="hbImg" :src="`${constant.imgUrl}/icon/hb128.png`" mode="widthFix" @click="invite()"></image>
+        <view class="hbInfo" @click="invite()">邀请得红包</view>
       </view>
     </view>
 		<view class="input-wrap" >
@@ -97,18 +98,33 @@
 			</template>
 		</modal-module>
 		<modal-module
-			:show="showSubmitModel"
-			@cancel="cancelEvent"
-			@click="submitEvent"
-			:title="confirmContent"
+			:show="true"
+
+			:title="'aaaa'"
 			color="#333"
 			:size="32"
 			padding="30rpx 30rpx"
 		>
+
+			<template slot="customContent">
+				<view class="select-cmd_bx">
+					<view class="num_bx">
+							aaaa
+					</view>
+				</view>
+			</template>
+
 		</modal-module>
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" ></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="toPage"></wangCg>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
+
+		<app-activily-coupon
+		:show.sync="isNewMan"
+		:info="newUserGift"
+		:ghsId="ghsId"
+		/>
+
 	</view>
 </template>
 
@@ -128,6 +144,7 @@ import { COMMODITY_TYPE } from "@/utils/declare";
 import productMins from "@/mixins/product";
 import { getGhsDataApi, ghsInfo,visitMall } from "@/api/ghs/index";
 import SelPopup from "@/components/sel-popup.vue";
+import AppActivilyCoupon from "@/components/module/app-activily-coupon";
 export default {
 	name: "cgProduct", // 开单
 	components: {
@@ -136,7 +153,7 @@ export default {
 		AppWrapperEmpty,
 		Commondity,
 		ModalModule,
-		FooterCart,allMoreSelectInput,PxClassCommondity,GoodsCommondity,wangCg,SelPopup
+		FooterCart,allMoreSelectInput,PxClassCommondity,GoodsCommondity,wangCg,SelPopup,AppActivilyCoupon
 	},
 	props: {
 		ghsShopAdminId:{
@@ -173,7 +190,10 @@ export default {
 			infoData:{},
 			xjData:{},
 			xjDataInfo:{},
-			shareDiscount:1
+			shareDiscount:1,
+			isNewMan:false,
+			ghsId:0,
+			newUserGift:{amount:100,miniCost:500,validTime:'2021-12-05'}
 		};
 	},
 	onPullDownRefresh() {
@@ -267,12 +287,24 @@ export default {
 
 		return {
 			title: this.ghsInfo.name,
-			desc: "",
+			desc: "首次下单领红包",
 			path: `pagesPurchase/ghsProduct?hdShopAdminId=${this.loginInfo.shopAdminId}&ghsShopAdminId=${ghsShopAdminId}&shopId=${this.shopId}&id=0`
 		}
 
 	},
 	methods: {
+		invite(){
+			uni.showModal({
+				title: '提示',
+				content: '邀新人下单您得30元红包,新人得100元红包',
+				confirmText:'去邀请',
+				success: function (res) {
+					if (res.confirm) {
+
+					}
+				}
+			})
+		},
 		recharge(item){
 			this.$util.pageTo({url:'/pagesStore/me/recharge',query:{ghsId:item.id}})
 		},
@@ -332,6 +364,7 @@ export default {
 				ghsInfo({shopId: this.option.shopId}).then(res => {
 					this.ghsInfo = res.data
 					let id = res.data.id
+					this.ghsId = id
 					this.visitMall(id)
 					//获取供货商花材
 					this.initGhsData(id,shopId);					
@@ -340,6 +373,7 @@ export default {
 					this.option.id = res.data.id;
 				}).catch(err => {})
 			} else {
+				this.ghsId = this.option.id
 				//获取供货商花材
 				this.initGhsData(id,shopId);
 				getGhsDataApi({id: this.option.id}).then(res => {
@@ -554,7 +588,7 @@ export default {
         margin-left: 30upx;
         &>.shop_title{
           margin-top: 14upx;
-          font-size: 40px;
+          font-size: 36px;
           font-weight: 600;
           color: #060606;
 		  width: 430rpx;
@@ -562,10 +596,10 @@ export default {
 		  white-space: nowrap;
 		  text-overflow: ellipsis;
 		  .level{
-            margin-left:30rpx;
+            margin-left:20rpx;
             color:white;
-            background:#3385FF;
-            border:1px solid #3385FF;
+            background:#6da3f5;
+            border:1px solid #6da3f5;
             border-radius:50rpx;
             font-size:22rpx;
             padding:6rpx 10rpx;
@@ -589,14 +623,21 @@ export default {
           color: #666666;
         }
       }
-      &>.iconfont{
-        font-size: 60upx;
-        position: absolute;
-        right: 30upx;
-        top: 50%;
-        transform: translateY(-50%);
-        color: #3385FF;
+      .hbInfo{
+        font-size:20rpx;
+		position: absolute;
+        right:15rpx;
+		top: 120rpx;
+		color: #3385FF;
       }
+	  .hbImg{
+		width:120rpx;
+		height:120rpx;
+		position: absolute;
+        right:0;
+		top: 10rpx;
+		background: white;
+	  }
     }
   }
 	.input-wrap {

+ 1 - 1
hdApp/src/pagesPurchase/order.vue

@@ -38,7 +38,7 @@
     </view>
 
     <view class="app-footer open_btn">
-			<view @click="inviteGhs" class="admin-button-com middle blue">邀请供应商加入,奖励300元</view>
+			<view @click="inviteGhs" class="admin-button-com middle blue">邀请供应商300元</view>
 		</view>
 
   </view>