cmy vor 3 Jahren
Ursprung
Commit
2e90ee33c1

+ 1 - 1
manifest.json

@@ -79,7 +79,7 @@
             "proxy" : {
                 "/api" : {
                     // "target" : "http://www.zjxwcm.cn/api",
-                    "target" : "https://ysg.liuniu946.com/api",
+                    "target" : "http://ysg.frp.liuniu946.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 53 - 52
pages/index/index.vue

@@ -108,25 +108,52 @@
 		<view class="store-wrapper">
 			<view class="title-wrapper flex">
 				<image src="/static/icon/t3.png" mode=""></image>
-				<view class="">会员礼包</view>
+				<view class="">代理礼包</view>
 				<view class="title-b">享受多重优惠</view>
 			</view>
 			<view class="goods-wrapper flex">
-
 				<view class="good" v-if="userInfo.uid &&  userInfo.level<=1" v-show="auth ==0"
+					@click="navTo('/pages/store/apply')">
+					<image src="../../static/img/daili.jpg" class="good-img"></image>
+					<view class="good-name clamp">加盟代理</view>
+					<!-- <view class="good-info clamp">纯植物无香精</view> -->
+					<view class="good-price">
+						<text class="new-price">5680起</text>
+						<text class="old-price">7550</text>
+					</view>
+				</view>
+				<view class="good" v-for="item in dlVip"
+					@click="navTo('/pages/product/product?id='+ item.id + '&vipType=2' )" :key="item.id">
+					<image :src="item.image" mode="" class="good-img"></image>
+					<view class="good-name clamp">{{ item.store_name }}</view>
+					<!-- <view class="good-info clamp"></view> -->
+					<view class="good-price">
+						<text class="new-price">{{ item.price }}</text>
+						<text class="old-price">{{ item.ot_price }}</text>
+					</view>
+				</view>
+
+			</view>
+		</view>
+		<view class="store-wrapper">
+			<view class="title-wrapper flex">
+				<image src="/static/icon/t3.png" mode=""></image>
+				<view class="">会员礼包</view>
+				<view class="title-b">享受多重优惠</view>
+			</view>
+			<view class="goods-wrapper flex">
+				<!-- <view class="good" v-if="userInfo.uid &&  userInfo.level<=1" v-show="auth ==0"
 					@click="navTo('/pages/store/apply')">
 					<image src="../../static/img/daili.jpg" class="good-img"></image>
 					<view class="good-name clamp">加盟代理</view>
 					<view class="good-info clamp">纯植物无香精</view>
 					<view class="good-price">
 						<text class="new-price">568.00</text>
-
 						<text class="old-price">755.00</text>
 					</view>
-				</view>
-
+				</view> -->
 				<view class="good" v-for="item in vip"
-					@click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
+					@click="navTo('/pages/product/product?id='+ item.id + '&vipType=1')" :key="item.id">
 					<image :src="item.image" mode="" class="good-img"></image>
 					<view class="good-name clamp">{{ item.store_name }}</view>
 					<!-- <view class="good-info clamp">纯植物无香精</view> -->
@@ -145,25 +172,7 @@
 				<view class="">爆单专区</view>
 				<view class="title-b">优选商品低价入手</view>
 			</view>
-
-
-
-
 			<view class="goods-wrapper flex">
-
-				<!-- <view class="good" v-if="userInfo.uid &&  userInfo.level<=1"
-				v-show="auth ==0"
-					@click="navTo('/pages/store/apply')">
-					<image src="../../static/img/daili.jpg"  class="good-img"></image>
-					<view class="good-name clamp">加盟代理</view>
-					<!-- <view class="good-info clamp">纯植物无香精</view> -->
-				<!-- 	<view class="good-price">
-						<text class="new-price">568.00</text>
-						
-						<text class="old-price">755.00</text>
-					</view> -->
-				<!-- </view> -->
-
 				<view class="good" v-for="item in bastList"
 					@click="navTo('/pages/product/product?id='+ item.id + '&spread=' + userInfo.uid )" :key="item.id">
 					<image :src="item.image" mode="" class="good-img"></image>
@@ -177,20 +186,17 @@
 
 			</view>
 		</view>
-
 		<view class="Mask" v-show="shareShow">
 			<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
 			<view class="Toshare" @click="Toshare"></view>
 			<view class="Tocancel" @click="Tocancel"></view>
 		</view>
-
 		<uni-popup ref="popup" type="center">
 			<view class="popup-box">
 				<image :src="wechat_qrcode" mode="" class="gzhqr"></image>
 				<view>长按关注公众号</view>
 			</view>
 		</uni-popup>
-		<p>{{laji | filter}}</p>
 	</view>
 </template>
 
@@ -228,12 +234,7 @@
 		shareLoad
 	} from '@/utils/wxAuthorized';
 	// #endif
-
-
 	export default {
-		components: {
-			// seckill
-		},
 		watch: {
 			//自适应swiper高度
 			checkid(newValue, oldValue) {
@@ -254,9 +255,8 @@
 		},
 		data() {
 			return {
-				laji: ['吃藕垃圾', '我不是垃圾'],
 				vip: [], //会员礼包
-				shop: [],
+				dlVip:[],//代理礼包
 				isAuth: 0,
 				wechat_qrcode: '', //公众号二维码
 				storeList: [], //门店列表
@@ -313,12 +313,6 @@
 				return this.isAuth
 			}
 		},
-		filters: {
-			filter(laji) {
-				return laji[0]
-			}
-		},
-
 		onShareAppMessage() {
 			// 设置菜单中的转发按钮触发转发事件时的转发内容
 			let pages = getCurrentPages(); //获取加载的页面
@@ -381,7 +375,6 @@
 			// this.getaddress();
 		},
 		onShow: function() {
-
 			// 判断是否强制登录
 			// if (this.loginInterceptor && !this.hasLogin) {
 			// 	// 登录拦截
@@ -391,14 +384,15 @@
 			if (this.userInfo.uid) {
 				wx.showShareMenu()
 			}
-
 			this.loadData();
 			this.getBargainList();
 			// #ifdef MP-WEIXIN
 			this.IndexShare()
 			// #endif
-
-			this.getVip()
+			// 获取会员礼包
+			this.getVip(1, 'vip')
+			// 获取代理礼包
+			this.getVip(2, 'dlVip')
 		},
 		//下拉刷新
 		onPullDownRefresh() {
@@ -431,15 +425,22 @@
 		},
 		// #endif
 		methods: {
-			getVip() {
+			// 获取礼包
+			getVip(num,itemName) {
 				let obj = this
-				getProducts({
-					is_gift: 1
-				}).then(res => {
-
-					obj.vip = res.data
-					console.log(obj.vip, '21312');
-
+				let data = {};
+				// 是否会员
+				if(num == 1 ){
+					data.is_gift=1
+				}
+				// 是否代理
+				if(num == 2 ){
+					data.is_agent=1
+				}
+				getProducts(data).then(res => {
+					obj[itemName] =res.data;
+					console.log(obj.vip,obj.dlVip, '21312');
+					
 				})
 			},
 			// #ifdef MP-WEIXIN

+ 13 - 0
pages/money/pay.vue

@@ -93,6 +93,7 @@
 				topify: '',
 				is_gift: '',
 				mer_id: '', //商户id
+				vipType:'',//是否礼包商品
 			};
 		},
 		computed: {
@@ -105,6 +106,9 @@
 			if (options.isgift) {
 				this.is_gift = options.isgift
 			}
+			if(options.vipType){
+				this.vipType = options.vipType;
+			}
 			this.mer_id = options.mer_id
 			this.checkedAuto = options.checked || 0;
 			this.topify = options.topify || 0;
@@ -320,6 +324,15 @@
 					is_gift: obj.is_gift,
 					mer_id: obj.mer_id
 				};
+				// 获取礼包类型
+				if(obj.vipType){
+					if(+obj.vipType==1){
+						data.is_gift=1
+					}else if(+obj.vipType==2){
+						data.is_agent=1
+					}
+				}
+				
 				// 判断是否拼团商品
 				if (obj.pinkid) {
 					data.pinkId = obj.pinkid;

+ 0 - 404
pages/money/pay1.vue

@@ -1,404 +0,0 @@
-<template>
-	<view class="app">
-		<view class="price-box">
-			<text>支付金额</text>
-			<text class="price">{{ money }}</text>
-		</view>
-		<view class="pay-type-list">
-			<view class="type-item b-b" @click="changePayType(1)">
-				<text class="icon iconfont iconweixin"></text>
-				<view class="con">
-					<text class="tit">微信支付</text>
-					<text>推荐使用微信支付</text>
-				</view>
-				<label class="radio">
-					<radio value="" color="#ff4c4c" :checked="payType == 1"></radio>
-				</label>
-			</view>
-			<!-- #ifdef APP-PLUS -->
-			<view class="type-item b-b" @click="changePayType(2)">
-				<text class="icon iconfont iconzhifubao"></text>
-				<view class="con"><text class="tit">支付宝支付</text></view>
-				<label class="radio">
-					<radio value="" color="#ff4c4c" :checked="payType == 2"></radio>
-				</label>
-			</view>
-			<!-- #endif -->
-			<view class="type-item" @click="changePayType(3)">
-				<text class="icon iconfont iconyue"></text>
-				<view class="con">
-					<text class="tit">余额支付</text>
-					<text>可用余额 ¥{{ now_money }}</text>
-				</view>
-				<label class="radio">
-					<radio value="" color="#ff4c4c" :checked="payType == 3"></radio>
-				</label>
-			</view>
-		</view>
-		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
-	</view>
-</template>
-
-<script>
-	import {
-		balance
-	} from '@/api/wallet.js';
-	import {
-		createOrderkey,
-		computedOrderkey,
-		orderPay
-	} from '@/api/order.js';
-	import {
-		mapState
-	} from 'vuex';
-	// #ifdef H5
-	import weixinObj from '@/utils/wxAuthorized.js';
-	// #endif
-	export default {
-		data() {
-			return {
-				payType: 1, //支付类型
-				// #ifdef H5
-				payName: 'weixin',
-				// #endif
-				// #ifdef MP-WEIXIN
-				payName: 'weixin',
-				// #endif
-				orderInfo: {},
-				money: 0.0, //订单金额
-				now_money: 0.0, //余额
-				orderKey: '',
-				orderId: '', //保存订单id
-				payLoding: false, //判断是否支付中
-				type: '', //判断是否从订单中进入
-				// #ifdef H5
-				froms: '', //保存h5中数据来源对象
-				// #endif
-				pinkid: '', //保存拼团商品id
-				isdrop: 0
-			};
-		},
-		onLoad(options) {
-			if (options.isdrop) {
-				this.isdrop = options.isdrop * 1
-			}
-			if (options.type == 1) {
-				this.type = 1;
-				this.orderId = options.ordid;
-				this.money = options.money;
-			} else {
-				this.orderKey = options.key;
-				let prepage = this.$api.prePage();
-				computedOrderkey({
-					orderkey: this.orderKey,
-					couponId: prepage.couponChecked.id, //优惠券编号
-					addressId: prepage.addressData.id, //地址编号
-					useIntegral: prepage.checkedPoints ? 1 : 0,
-					is_drop: this.isdrop
-				}).then(({
-					data
-				}) => {
-					// 获取支付金额
-					this.money = data.result.pay_price;
-				});
-			}
-			// 保存pinkid
-			if (options.pinkid) {
-				this.pinkid = options.pinkid;
-			}
-			// 载入余额
-			balance({}).then(({
-				data
-			}) => {
-				// 获取余额
-				this.now_money = data.now_money;
-			});
-		},
-		methods: {
-			//选择支付方式
-			changePayType(type) {
-				this.payType = type;
-				if (this.payType == 1) {
-					this.payName = 'weixin';
-				}
-				if (this.payType == 2) {
-					this.payName = 'ali';
-				}
-				if (this.payType == 3) {
-					this.payName = 'yue';
-				}
-			},
-			// 支付金额
-			orderMoneyPay() {
-				let obj = this;
-				orderPay({
-						uni: obj.orderId,
-						// #ifdef H5
-						from: obj.froms ? 'weixin' : 'H5', //来源
-						// #endif
-						// #ifdef MP-WEIXIN
-						from: 'routine', //来源
-						// #endif
-						// #ifdef APP-PLUS
-						from: 'app', //来源
-						// #endif
-						paytype: obj.payName //支付类型  weixin-微信 yue-余额
-					})
-					.then(e => {
-						// 判断是否为余额支付
-						if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
-							if (e.status == 200) {
-								obj.paySuccessTo();
-							} else {
-								obj.$api.msg(msg);
-							}
-						}
-						if (obj.payName == 'weixin' || obj.payName == 'routine') {
-							let da = e.data.result.jsConfig;
-							let data = {
-								// #ifdef H5
-								timestamp: da.timestamp,
-								// #endif
-								// #ifdef MP
-								timeStamp: da.timestamp,
-								// #endif
-								nonceStr: da.nonceStr,
-								package: da.package,
-								signType: da.signType,
-								paySign: da.paySign,
-								success: function(res) {
-									obj.paySuccessTo();
-								},
-								fail: () => {
-									uni.navigateTo({
-										url: '/pages/order/order?state=0'
-									});
-								}
-							};
-							// #ifdef H5
-							if (obj.payName == 'weixin') {
-								weixinObj.chooseWXPay(data);
-							}
-							// #endif
-							// #ifdef MP-WEIXIN
-							if (obj.payName == 'routine') {
-								wx.requestPayment(data);
-							}
-							// #endif
-						}
-						uni.hideLoading();
-						obj.payLoding = false;
-					})
-					.catch(e => {
-						// 支付完成
-						uni.hideLoading();
-						obj.payLoding = false;
-						console.log(e);
-					});
-			},
-			// 支付成功跳转
-			paySuccessTo() {
-				uni.hideLoading();
-				uni.redirectTo({
-					url: '/pages/money/paySuccess?orderid=' + this.orderId
-				});
-			},
-			//确认支付
-			confirm: async function() {
-				let obj = this;
-				uni.showLoading({
-					title: '支付中',
-					mask: true
-				})
-				// 判断是否余额不足
-				if (obj.payName == 'yue' && +obj.now_money < obj.money) {
-					uni.showModal({
-						title: '提示',
-						content: '账户余额不足!',
-						showCancel: false,
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-					return;
-				}
-				// 支付中
-				obj.payLoding = true;
-				// #ifdef H5
-				// 获取当前是否为微信浏览器
-				obj.froms = uni.getStorageSync('weichatBrowser') || '';
-				// #endif
-				// 判断是否为未支付订单中跳转进入
-				if (obj.type != 1) {
-					// 初次生成订单
-					obj.firstCreateOrder();
-				} else {
-					// 已经生成订单未支付
-					obj.orderMoneyPay();
-				}
-			},
-			// 初次订单创建
-			firstCreateOrder() {
-				let obj = this;
-				// 获取下单页面数据
-				let prepage = obj.$api.prePage();
-
-				let data = {
-					real_name: prepage.addressData.real_name, //联系人名称
-					phone: prepage.addressData.phone, //联系人号码
-					couponId: prepage.couponChecked.id, //优惠券编号
-					addressId: prepage.addressData.id, //支付地址id
-					useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
-					payType: obj.payName, //支付类型  weixin-微信 yue-余额
-					mark: prepage.desc, //备注
-					// #ifdef H5
-					from: obj.froms ? 'weixin' : 'H5', //来源
-					// #endif
-					// #ifdef MP-WEIXIN
-					from: 'routine', //来源
-					// #endif
-					// #ifdef APP-PLUS
-					from: 'app', //来源
-					// #endif
-					shipping_type: 1, //提货方式 1 快递 2自提
-					is_drop: this.isdrop //是否上门安装
-				};
-				// 判断是否拼团商品
-				if (obj.pinkid) {
-					data.pinkId = obj.pinkid;
-				}
-				// 生成订单
-				createOrderkey(data, obj.orderKey)
-					.then(({
-						data,
-						status,
-						msg
-					}) => {
-						// 判断是否支付失败
-						if (data.status == 'ORDER_EXIST') {
-							uni.showModal({
-								title: '提示',
-								content: msg,
-								showCancel: false
-							});
-							uni.hideLoading();
-							obj.payLoding = false;
-							return;
-						}
-						// 保存订单号
-						obj.orderId = data.result.orderId;
-						// 判断是否为余额支付
-						if (obj.payName == 'yue') {
-							if (status == 200 && data.status == 'SUCCESS') {
-								obj.paySuccessTo();
-							} else {
-								obj.$api.msg(msg);
-							}
-						} else {
-							// 立即支付
-							obj.orderMoneyPay();
-						}
-					})
-					.catch(e => {
-						uni.hideLoading();
-						obj.payLoding = false;
-						console.log(e);
-					});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.app {
-		width: 100%;
-	}
-
-	.price-box {
-		background-color: #fff;
-		height: 265upx;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		font-size: 28upx;
-		color: #909399;
-
-		.price {
-			font-size: 50upx;
-			color: #303133;
-			margin-top: 12upx;
-
-			&:before {
-				content: '¥';
-				font-size: 40upx;
-			}
-		}
-	}
-
-	.pay-type-list {
-		margin-top: 20upx;
-		background-color: #fff;
-		padding-left: 60upx;
-
-		.type-item {
-			height: 120upx;
-			padding: 20upx 0;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding-right: 60upx;
-			font-size: 30upx;
-			position: relative;
-		}
-
-		.icon {
-			width: 100upx;
-			font-size: 52upx;
-		}
-
-		.iconyue {
-			color: #fe8e2e;
-		}
-
-		.iconweixin {
-			color: #36cb59;
-		}
-
-		.iconzhifubao {
-			color: #01aaef;
-		}
-
-		.tit {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			margin-bottom: 4upx;
-		}
-
-		.con {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			font-size: $font-sm;
-			color: $font-color-light;
-		}
-	}
-
-	.mix-btn {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 630upx;
-		height: 80upx;
-		margin: 80upx auto 30upx;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10upx;
-		/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
-	}
-
-	.clickbg {
-		background-color: $color-gray !important;
-	}
-</style>

+ 9 - 0
pages/order/createOrder.vue

@@ -229,6 +229,7 @@
 				payType: true, //是否可支付
 				pinkid: '', //保存拼团商品id
 				isgift: 0,
+				vipType:'',//会员礼包类型1会员2代理
 
 			};
 		},
@@ -246,6 +247,10 @@
 				this.isgift = option.isgift * 1
 				console.log(this.isgift, )
 			}
+			// 判断是否礼包商品
+			if(option.vipType){
+				this.vipType = option.vipType
+			}
 			this.userinfo();
 		},
 		watch: {
@@ -395,6 +400,10 @@
 				}
 				console.log(this.isdrop, 'dddddddddddddddddddddddddd')
 				let url = '/pages/money/pay?key=' + this.orderKey + '&isgift=' + this.isgift + '&mer_id=' + this.mer_id
+				// 礼包商品
+				if(this.vipType){
+					url+=`&vipType=${this.vipType}`
+				}
 				if (this.pinkid) {
 					url += '&pinkid=' + this.pinkid
 				}

+ 3 - 1
pages/product/common/productBottom.vue

@@ -254,7 +254,7 @@
 		justify-content: space-between;
 		// justify-content: space-between;
 		position: fixed;
-		padding: 20rpx;
+		padding: 20rpx 10rpx;
 		bottom: 0;
 		background-color: #fff;
 
@@ -269,6 +269,7 @@
 			font-weight: 500;
 			color: #ff4c4c;
 			line-height: 90rpx;
+			margin: 0 10rpx;
 		}
 		.add-btn1 {
 			width: 100%;
@@ -280,6 +281,7 @@
 			font-weight: 500;
 			color: black;
 			line-height: 90rpx;
+			margin: 0 10rpx;
 		}
 
 		.buy-btn {

+ 62 - 47
pages/product/product.vue

@@ -19,8 +19,8 @@
 		<!-- 底部高度撑开 -->
 		<view class="contentBottomHeight"></view>
 		<!-- 底部操作菜单 -->
-		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :option='option' :jifen="jifen" :goodsid="goodsid" @specOPne="specOPne"
-			:showAdd="showAdd"></product-bottom>
+		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :option='option' :jifen="jifen" :goodsid="goodsid"
+			@specOPne="specOPne" :showAdd="showAdd"></product-bottom>
 		<!-- 规格-模态层弹窗 -->
 		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
 			<!-- 遮罩层 -->
@@ -69,7 +69,6 @@
 </template>
 
 <script>
-
 	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
 	import {
 		goodsDetail,
@@ -87,8 +86,13 @@
 		saveUrl
 	} from '@/utils/loginUtils.js';
 	// #ifdef H5
-	import { weixinObj,shareLoad } from '@/utils/wxAuthorized';
-	import {getPageUrl } from '@/utils/loginUtils.js';
+	import {
+		weixinObj,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	import {
+		getPageUrl
+	} from '@/utils/loginUtils.js';
 	// #endif
 	// 头部轮播图
 	import topSwiper from './common/topSwiper.vue';
@@ -122,9 +126,9 @@
 		},
 		data() {
 			return {
-				option:'',
-				jifen:0,//是否有积分
-				mer_id:'',//商户编号
+				option: '',
+				jifen: 0, //是否有积分
+				mer_id: '', //商户编号
 				show: false,
 				showAdd: true,
 				isShare: false,
@@ -177,8 +181,10 @@
 					s: '' //秒
 				},
 				userInfo: '',
-				is_gift: false, //是否上门安装
-				showDrop: false //商品是否具有安装属性
+				// is_gift: false, //是否上门安装
+				vipType:'',//判断会员类型
+				showDrop: false ,//商品是否具有安装属性
+				
 			};
 		},
 		filters: {
@@ -193,7 +199,7 @@
 			}
 		},
 		async onLoad(options) {
-		console.log(options,'接受到的参数');
+			console.log(options, '接受到的参数');
 			let obj = this;
 			obj.option = options.cateId;
 			console.log(obj.option)
@@ -203,6 +209,11 @@
 			if (options.type) {
 				this.goodsType = options.type;
 			}
+			// 获取代理类型
+			if(options.vipType){
+				this.vipType=options.vipType;
+				this.showAdd = false;
+			}
 			// 判断有无人邀请
 			if (options.spread) {
 				// 存储邀请人
@@ -217,6 +228,7 @@
 				weixindata();
 			}
 			// #endif
+			
 		},
 		computed: {
 			...mapState(['weichatObj', 'baseURL', 'urlFile'])
@@ -228,8 +240,10 @@
 			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
 			let url = currentPage.route; //当前页面url
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-			addJifen({}).then(({data})=>{
-					console.log(data,'fenxiang');
+			addJifen({}).then(({
+				data
+			}) => {
+				console.log(data, 'fenxiang');
 			})
 			let shareObj = {
 				title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
@@ -237,11 +251,11 @@
 				imageUrl: this.goodsObjact.image,
 				success: function(res) {
 					// 转发成功之后的回调
-					console.log(res,'分享毁掉')
+					console.log(res, '分享毁掉')
 					if (res.errMsg == 'shareAppMessage:ok') {
-						
+
 					}
-				
+
 				},
 				fail: function() {
 					// 转发失败之后的回调
@@ -255,7 +269,7 @@
 
 			return shareObj;
 		},
-		onShow:function(){
+		onShow: function() {
 			wx.hideShareMenu()
 			if (this.userInfo.uid) {
 				wx.showShareMenu()
@@ -269,13 +283,12 @@
 				// 设置菜单中的转发按钮触发转发事件时的转发内容
 				let shareObj = {
 					title: obj.goodsObjact.store_name, // 默认是小程序的名称(可以写slogan等)
-					link: getPageUrl(true), // 默认是当前页面,必须是以‘/’开头的完整路径
+					link: getPageUrl(false) + "&speard=" + obj.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 					desc: obj.goodsObjact.store_name + '   价格:' + obj.goodsObjact.price,
 					imgUrl: obj.goodsObjact.image,
 					success: function(res) {
 						// 转发成功之后的回调
-						if (res.errMsg == 'shareAppMessage:ok') {
-						}
+						if (res.errMsg == 'shareAppMessage:ok') {}
 					},
 					fail: function() {
 						// 转发失败之后的回调
@@ -291,13 +304,13 @@
 			},
 			// #endif
 			//选择是否上门安装
-			dropClick(val) {
-				if (val == 1) {
-					this.is_gift = true;
-				} else {
-					this.is_gift = false;
-				}
-			},
+			// dropClick(val) {
+			// 	if (val == 1) {
+			// 		this.is_gift = true;
+			// 	} else {
+			// 		this.is_gift = false;
+			// 	}
+			// },
 			//选择数量
 			numberChange(e) {
 				console.log(e);
@@ -373,7 +386,7 @@
 			},
 			//加入购物车
 			Addcar(item) {
-				console.log(item,'777')
+				console.log(item, '777')
 				let obj = this;
 				cartAdd({
 						cartNum: '1', //商品数量
@@ -399,25 +412,25 @@
 			goodsDetail() {
 				let obj = this;
 				// 获取普通商品信息
-				if (obj.goodsType == 0 ) {
+				if (obj.goodsType == 0) {
 					goodsDetail({}, this.goodsid).then(function({
 						data
 					}) {
 						obj.list = data;
-						obj.jifen = data.storeInfo.use_integral*1
-						console.log(obj.jifen,typeof(obj.jifen));
-						
+						obj.jifen = data.storeInfo.use_integral * 1
+						console.log(obj.jifen, typeof(obj.jifen));
+
 						console.log(obj.list, '普通商品数据');
 						obj.good_list = data.good_list; //保存猜你喜欢列表
 						obj.reply = data.reply; //保存评论列表
 						let goods = data.storeInfo;
-						if (goods.is_gift == 1) {
-							obj.showAdd = false;
-							obj.showDrop = true;
-							obj.is_gift = true;
-						}
+						// if (goods.is_gift == 1) {
+						// 	obj.showAdd = false;
+						// 	obj.showDrop = true;
+						// 	obj.is_gift = true;
+						// }
 						obj.mer_id = data.mer_id;
-						console.log(obj.mer_id,'商户编号')
+						console.log(obj.mer_id, '商户编号')
 						obj.goodsObjact = goods;
 						// #ifdef H5
 						obj.IndexShare()
@@ -477,9 +490,9 @@
 						console.log(obj.list, '秒杀商品数据++++++++++');
 						obj.reply = data.reply; //保存评论列表
 						let goods = data.storeInfo;
-						if (goods.is_gift == 1) {
-							obj.showDrop = true;
-						}
+						// if (goods.is_gift == 1) {
+						// 	obj.showDrop = true;
+						// }
 						obj.goodsNumberMax = goods.num;
 						console.log(obj.seckillObj, '数据');
 						obj.goodsObjact = goods;
@@ -535,23 +548,25 @@
 					new: 1,
 					productId: obj.goodsid, //商品编号
 					uniqueId: obj.uniqueId,
-					is_gift: obj.is_gift ? 1 : 0,
+					// is_gift: obj.is_gift ? 1 : 0,
 					mer_id: obj.mer_id //商户编号
 				};
 				if (obj.type == 2) {
 					data.new = 0;
 				}
-				console.log(data,'777');
-			
+				console.log(data, '777');
+
 				cartAdd(data)
 					.then(function(e) {
 						let da = e.data;
 						if (obj.type == 1) {
 							// 跳转到支付页
-							let a = obj.is_gift ? 1 : 0;
-							console.log(a);
+							let url = '/pages/order/createOrder?id=' + da.cartId ;
+							if(obj.vipType){
+								url +=`&vipType=${obj.vipType}` ;
+							}
 							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId + '&isgift=' + a
+								url
 							});
 						}
 						if (obj.type == 2) {

+ 12 - 6
pages/store/apply.vue

@@ -43,8 +43,9 @@
 					<!-- <view class="img" style="margin-left: 45rpx;"><image class="img" src="../../static/img/vip-right.png"></image></view> -->
 				</view>
 				<view class="money-box flex">
-					<view class="money" v-for="(item, index) in payList" @click="changevip(item, index)"
+					<view class="money flex" v-for="(item, index) in payList" @click="changevip(item, index)"
 						:class="{ current: index == choose }">
+						<view style="flex-grow: 1;">
 						<view class="money-name">{{ item.explain }}</view>
 						<view class="now-money">
@@ -55,6 +56,7 @@
 							<!-- <image src="../../static/img/good.png" mode=""></image> -->
 							立省{{ item.sq }}元
 						</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -350,7 +352,10 @@
 						sj.sq = (sj.money * 0.33).toFixed(0);
 						sj.yuan = (sj.sq * 1 + sj.money * 1).toFixed(2);
 					});
-					this.payList = data;
+					this.payList = data.map((e) => {
+						e.money = +e.money;
+						return e;
+					});
 					// 设置默认选中的对象
 					this.level_id = data[0].id;
 					this.money = data[0].money;
@@ -971,7 +976,7 @@
 
 		.money-box {
 			margin-top: 40rpx;
-			justify-content: space-between;
+			justify-content: space-around;
 			align-items: center;
 			padding: 0 25rpx 25rpx;
 			.current {
@@ -980,13 +985,15 @@
 			}
 
 			.money {
-				width: 204rpx;
+				min-width: 204rpx;
 				height: 296rpx;
 				background: #f5f5f5;
 				border: 1rpx solid #ffffff;
 				border-radius: 20rpx;
 				position: relative;
 				text-align: center;
+				padding: 0 15rpx;
+				
 				// .tj {
 				// 	position: absolute;
 				// 	top: 0;
@@ -1013,7 +1020,6 @@
 				// }
 
 				.money-name {
-					margin-top: 58rpx;
 					font-size: 33rpx;
 					font-family: PingFang SC;
 					font-weight: 500;
@@ -1048,7 +1054,7 @@
 				.money-tip {
 					margin: 0 auto;
 					margin-top: 10rpx;
-					width: 158rpx;
+					// width: 158rpx;
 					height: 45rpx;
 					background: #f5f5f5;
 					border: 1px solid #f7cf9c;

+ 1 - 3
store/index.js

@@ -7,10 +7,8 @@ Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	state: {
-		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
 		baseURL:'https://ysg.liuniu946.com',//请求地址配置 
-		// baseURL:'http://ysg.frp.liuniu946.com',//请求地址配置 
-		// baseURL:'http://www.zjxwcm.cn',
+		// baseURL:'',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor:false,//是否打开强制登录