hwq %!s(int64=3) %!d(string=hai) anos
pai
achega
3fc17d26b3

+ 1 - 1
pages.json

@@ -65,7 +65,7 @@
 		}, {
 			"path": "pages/product/classify",
 			"style": {
-				"navigationStyle": "套餐商品",
+				"navigationBarTitleText": "套餐商品",
 				"app-plus": {
 					"titleNView": {
 						"type": "transparent"

+ 16 - 0
pages/award/withdrawal.vue

@@ -12,6 +12,11 @@
 					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
 					<text class="text">待审核提现佣金</text>
 				</view>
+				<view class="interval"></view>
+				<view class="buttom">
+					<view class=" icon">{{ userInfo.lock_group_award || 0 }}</view>
+					<text class="text">冻结极差奖</text>
+				</view>
 			</view>
 		</view>
 		<view class="row-box">
@@ -83,6 +88,7 @@
 </template>
 
 <script>
+import { mapState, mapMutations } from 'vuex';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
 import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
@@ -95,6 +101,7 @@ export default {
 	},
 	data() {
 		return {
+			isTing: false,
 			type: 'alipay', //提现方式
 			money: '0.00', //可提现金额
 			freeze: '0.0', //冻结金额
@@ -124,6 +131,7 @@ export default {
 		this.loadBank();
 	},
 	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
 		real() {
 			return (this.withdrawal * this.reall).toFixed(2) * 1 
 		},
@@ -185,6 +193,11 @@ export default {
 		// 提交
 		confirm() {
 			let obj = this;
+			if(obj.isTing) {
+				console.log("jing");
+				return
+			}
+			obj.isTing = true
 			let data = {
 				extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
 				money: obj.withdrawal, //金额
@@ -216,10 +229,12 @@ export default {
 						duration: 2000,
 						position: 'top'
 					});
+					obj.isTing = false
 					// 清空提现金额
 					obj.withdrawal = '';
 				})
 				.catch(e => {
+					obj.isTing = false
 					console.log();
 				});
 		}
@@ -258,6 +273,7 @@ page {
 		background-position: center;
 	}
 	.text {
+		font-size: 30rpx;
 		color: $font-color-light;
 	}
 }

+ 1 - 2
pages/index/index.vue

@@ -71,7 +71,7 @@
 					<view class="commodity-item" v-for="(item, index) in integralList" :key="item.id" @click="navToDetailPagejf(item)">
 						<image class="commodity-image" :src="item.image" mode=""></image>
 						<view class="commodity-title clamp">{{ item.store_name }}</view>
-						<view class="price">¥{{ item.ot_price }}</view>
+						<view class="price clamp">{{ item.max_use_integral * 1 }}积分+</view>
 						<view class="vip-price">
 							<!-- <image src="../../static/icon/jf.png" mode=""></image> -->
 							<text>¥{{ item.price }}</text>
@@ -682,7 +682,6 @@ page {
 				font-size: 24rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				text-decoration: line-through;
 				color: #999999;
 			}
 			.vip-price {

+ 28 - 13
pages/order/createOrder.vue

@@ -59,7 +59,10 @@
 					<text class="title clamp">{{ ls.productInfo.store_name }}</text>
 					<text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text>
 					<view class="price-box">
-						<text class="price">¥{{ moneyNum(ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price) }}</text>
+						<text class="price">¥{{ moneyNum(ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price) }}</text>
+						<text class="price" v-if="ls.productInfo.max_use_integral > 0 ">
+							+{{ ls.productInfo.max_use_integral * 1 }}积分
+						</text>
 						<text class="number">{{ 'x ' + ls.cart_num + ls.productInfo.unit_name }}</text>
 						<!-- <view><text class="price">¥{{lss.price}}</text></view> -->
 						<!-- <view class="number">
@@ -90,10 +93,10 @@
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
-			<view class="yt-list-cell b-b" v-if="shopList[0].productInfo.max_use_integral > 0">
+			<!-- <view class="yt-list-cell b-b" v-if="shopList[0].productInfo.max_use_integral > 0">
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
-			</view>
+			</view> -->
 			<view class="yt-list-cell b-b" v-if="inte_top > 0 && !checkedPoints && goodsType != 2">
 				<text class="cell-tit clamp">抵用金{{ '(可用上限:' + inte_top + ')' }}</text>
 				<view class="cell-tip"><radio @click="is_change = !is_change" color=" #5dbc7c" :checked="is_change" /></view>
@@ -124,10 +127,14 @@
 				{{ payAllMoney }}
 				</text>
 				<!-- <text class="cell-tip">¥{{ payAllMoney }}</text> -->
-			</view>
-			<view class="yt-list-cell b-b" v-if="(checkedPoints || is_change) && integralShow">
-				<text class="cell-tit clamp">扣除积分</text>
-				<text class="cell-tip">-¥{{ integralMoney }}</text>
+			</view>
+			<view class="yt-list-cell b-b" v-if="moneyAll.use_integral > 0">
+				<text class="cell-tit clamp">积分</text>
+				<text class="cell-tip">{{ moneyAll.use_integral }}</text>
+			</view>
+			<view class="yt-list-cell b-b" v-if="moneyAll.use_integral > 0">
+				<text class="cell-tit clamp">积分抵扣</text>
+				<text class="cell-tip">-¥{{ integralMoney }}</text>
 			</view>
 			<view class="yt-list-cell b-b" v-if="!checkedPoints && moneyNum(moneyAll.vipPrice) > 0">
 				<text class="cell-tit clamp">VIP优惠</text>
@@ -227,7 +234,8 @@ export default {
 				storeFreePostage: 0, //邮费优惠
 				storePostage: 0, //邮费
 				totalPrice: 0, //总支付金额
-				vipPrice: 0 //vip优惠价
+				vipPrice: 0 ,//vip优惠价
+				use_integral:0,//积分
 			},
 			payPrice: 0, //总支付金额
 			orderKey: '', //订单id
@@ -351,10 +359,17 @@ export default {
 				})
 					.then(({ data }) => {
 						this.payType = true;
-						this.integralShow = true;
+						this.integralShow = true;
 						// 获取支付金额
-						this.payPrice = +data.result.pay_price;
-						this.integralMoney = data.result.deduction_price;
+						if(+data.result.useIntegral > 0){
+							this.payPrice = +data.result.pay_price + '+' +data.result.useIntegral + '积分';
+						}else {
+							this.payPrice = +data.result.pay_price
+						}
+					
+						
+						this.integralMoney = data.result.useIntegral;
+						this.moneyAll.use_integral = data.result.useIntegral;
 						// 保存邮费
 						this.moneyAll.storePostage = data.result.pay_postage;
 						resolve(true);
@@ -387,10 +402,10 @@ export default {
 		// 载入数据
 		loadData: async function() {
 			let obj = this;
-			confirm({ cartId: obj.cartId + '' }).then(({ data }) => {
+			confirm({ cartId: obj.cartId + '' }).then(({ data }) => {
 				obj.addressData = data.addressInfo || {};
 				obj.shopList = data.cartInfo; //商品列表
-				obj.moneyAll = data.priceGroup; //金额数据
+				obj.moneyAll = data.priceGroup; //金额数据
 				obj.orderKey = data.orderKey; //订单key
 				(obj.system_store = data.system_store), //到店自提列表
 					obj.shopAddress = data.system_store //选中的地址

+ 2 - 2
pages/product/classify.vue

@@ -21,7 +21,7 @@
 		</view> -->
 
 		<view class="goodsList-box">
-			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list">
+			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list" @click="navTo(ls)">
 				<image :src="ls.image" mode=" scaleToFill"></image>
 				<view class="goodsList-content">
 					<view class="title">
@@ -38,7 +38,7 @@
 								<text class="sales">已售{{ ls.sales }}件</text>
 							</view>
 						</view>
-						<view @click="navTo(ls)" class="cart iconfont iconcart"></view>
+						<view class="cart iconfont iconcart"></view>
 					</view>
 				</view>
 			</view>

+ 62 - 41
pages/product/product.vue

@@ -33,11 +33,13 @@
 
 		<view class="introduce-section">
 			<text class="title" v-if="goodsType == 1">{{ goodsObjact.title }}</text>
-			<view class="price-box" v-if="goodsType == 0">
-				<text class="price-tip">¥</text>
-				<text class="price">{{ goodsObjact.price }}</text>
-				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
-				<!-- <text class="coupon-tip">7折</text> -->
+			<view class="price-box" v-if="goodsType == 0">
+				<text class="price-tip">¥</text>
+				<text class="price">{{ goodsObjact.price }}</text>
+				<text class="price-tip" v-if="goodsObjact.max_use_integral*1 > 0">+</text>
+				<text class="price" v-if="goodsObjact.max_use_integral*1 > 0">{{ goodsObjact.max_use_integral }}积分</text>
+				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
+				<!-- <text class="coupon-tip">7折</text> -->
 			</view>
 			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
 			<view class="bot-row">
@@ -95,16 +97,10 @@
 					<text class="selected-text">{{ goodsObjact.num + goodsObjact.unit_name }}</text>
 				</view>
 			</view>
-			<!-- <view class="c-row b-b">
-				<text class="tit">优惠券</text>
-				<text class="con t-r red">领取优惠券</text>
-				<text class="iconfont iconenter"></text>
-			</view> -->
-			<view class="c-row b-b" v-if="goodsObjact.max_use_integral != 0 ">
-				<text class="tit">积分</text>
-				<view class="bz-list con">
-					<text>最高抵扣¥{{ moneyNum(goodsObjact.max_use_integral) == 0 ? moneyNum(goodsObjact.price) : moneyNum(goodsObjact.max_use_integral) }}</text>
-				</view>
+			<view class="c-row b-b" v-if="goodsObjact.give_integral != 0">
+				<text class="tit">获取积分</text>
+				<text class="con t-r red">每购买一件商品送{{goodsObjact.give_integral}}积分</text>
+				<!-- <text class="iconfont iconenter"></text> -->
 			</view>
 		</view>
 		<view class="shop-box flex" v-if="goodsType == 0 && shopId > 0">
@@ -133,10 +129,13 @@
 				<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
 				<text>收藏</text>
 			</view>
-
-			<view class="action-btn-group">
-				<button type="primary" class=" action-btn no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button>
-				<button type="primary" class=" action-btn no-border  add-cart-btn" @click="toggleSpec(1)">立即购买</button>
+			
+			<view class="action-btn-group" v-if="goodsObjact.max_use_integral == 0">
+				<button type="primary" class=" action-btn no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button>
+				<button type="primary" class=" action-btn no-border  add-cart-btn" @click="toggleSpec(1)">立即购买</button>
+			</view>
+			<view class="action-btn-group" v-if="goodsObjact.max_use_integral != 0">
+				<button type="primary" class=" action-btn no-border  add-cart-btn" style="width: 750rpx;" @click="toggleSpec(1)">立即购买</button>
 			</view>
 		</view>
 		<!-- 秒杀商品购买 -->
@@ -164,7 +163,8 @@
 					<image :src="actionImage"></image>
 					<view class="right">
 						<view class="good-name clamp">{{goodsObjact.store_name}}</view>
-						<text class="price">¥{{ actionPrice }}</text>
+						<text class="price" v-if="goodsObjact.max_use_integral > 0">¥{{ actionPrice }}+{{goodsObjact.max_use_integral*1}}积分</text>
+						<text class="price" v-else>¥{{ actionPrice }}</text>
 						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
 						<!-- <view class="selected" v-if="goodsType == 0">
 							已选:
@@ -244,7 +244,8 @@ export default {
 			specList: [],
 			// 对比对象
 			productValue: [],
-			actionPrice: 0, //默认选中商品价格
+			actionPrice: 0, //默认选中商品价格
+			actionIntegral: 0,//默认选中商品积分
 			actionImage: '', //默认选中图片
 			uniqueId: '', //选中的商品分类
 			specSelected: [], //选中的分类
@@ -458,28 +459,47 @@ export default {
 		// 获取商品信息
 		goodsDetail() {
 			let obj = this;
-			goodsDetail({}, this.goodsid).then(function({ data }) {
-				obj.details = data;
+			goodsDetail({}, this.goodsid).then(function({ data }) {
+				obj.details = data;
 				let goods = data.storeInfo;
-				let store_info = data.system_store// 保存店铺信息
-				console.log(store_info)
+				let store_info = data.system_store; // 保存店铺信息
+				console.log(store_info);
 				obj.storeObjact = store_info;
-				obj.goodsObjact = goods;
-				obj.reply = data.reply; //保存评论列表
-				obj.imgList = goods.slider_image; //保存轮播图
-				obj.specList = data.productAttr; //保存分类列表
-				obj.productValue = data.productValue; //保存分类查询数据
-				obj.actionPrice = goods.price; //保存默认选中商品价格
-				obj.actionImage = goods.image_base; //保存默认选中商品价格
-				obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
-				obj.shopId = data.mer_id; //保存商店id
-				if (obj.shopId > 0) {
-					obj.getShoping();
-				}
-				// #ifdef H5
+				obj.goodsObjact = goods;
+				//商品详情图超出屏幕问题
+				if (obj.goodsObjact.description != null) {
+					obj.goodsObjact.description = obj.goodsObjact.description.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g, '<p class="pHeight"><img');
+				}
+				if ( obj.goodsObjact.rule != null ) {
+					obj.goodsObjact.rule ='<p>' + obj.goodsObjact.rule.replace(/\n/g, '</p><p>').trim() + '</p>'
+				}
+				obj.reply = data.reply; //保存评论列表
+				obj.imgList = goods.slider_image; //保存轮播图
+				obj.specList = data.productAttr; //保存分类列表
+				console.log(data.productAttr);
+				obj.productValue = data.productValue; //保存分类查询数据
+				obj.actionPrice = goods.price; //保存默认选中商品价格
+				obj.actionIntegral = goods.integral; //保存默认选中商品积分
+				obj.actionImage = goods.image_base; //保存默认选中商品价格
+				obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+				obj.shopId = data.mer_id; //保存商店id
+				// 保存默认选中的对象
+				obj.specSelected = []; //初始化默认选择对象
+				for (let i = 0; i < obj.specList.length; i++) {
+					// 设置默认数据
+					let attrValue = obj.specList[i].attr_value[0];
+					attrValue.check = true;
+					obj.specSelected.push(attrValue.attr);
+				}
+			
+				//保存默认选中的对象字符串名称
+				let str = obj.specSelected.join(',');
+				// 设置默认值
+				obj.actionImage = obj.productValue[str].image;
+				obj.uniqueId = obj.productValue[str].unique;
+				// #ifdef H5
 				obj.shareDate();
-				obj.IndexShare()
-				// #endif
+				// #endif
 			});
 		},
 		// #ifdef H5
@@ -535,7 +555,8 @@ export default {
 			if (this.productValue[str]) {
 				let data = this.productValue[str];
 				this.actionPrice = data.price;
-				this.goodsNumberMax = data.stock;
+				this.goodsNumberMax = data.stock;
+				this.actionIntegral = data.integral
 				this.actionImage = data.image;
 				this.uniqueId = data.unique;
 			}

+ 23 - 9
pages/user/user.vue

@@ -26,11 +26,12 @@
 					<view class="sy-item">
 						<view class="sy-item-name">团队等级</view>
 						<view class="sy-item-val">{{ userInfo.group_level_info != null? userInfo.group_level_info.name : '无' }}</view>
-					</view>
+					</view>        
 					<view class="jg"></view>
 					<view class="sy-item">
 						<view class="sy-item-name">极差奖励等级</view>
-						<view class="sy-item-val">{{ userInfo.award_level_info != null? userInfo.award_level_info.name : '无' }}</view>
+						<!-- <view class="sy-item-val">{{jcdj}}</view> -->
+						<view class="sy-item-val">{{userInfo.award_level_info!= null? userInfo.award_level_info.name : '无'}}</view>
 					</view>
 					<view class="jg"></view>
 					<view class="sy-item">
@@ -98,7 +99,7 @@
 			</view>
 		</view>
 		<!-- <view class="cover-container"> -->
-		<view class="vip" @click="navTo('/pages/wallet/openMember')" v-if="userInfo.level == 0"><image src="../../static/user/upgrade.png" mode=""></image></view>
+		<view class="vip" @click="navTo('/pages/wallet/openMember')" v-if="userInfo.level == 0"></view>
 
 		<!-- 订单 -->
 
@@ -267,7 +268,22 @@ export default {
 	},
 	computed: {
 		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
-
+		jcdj(){
+			if(this.userInfo.award_level_info != null) {
+				if(this.userInfo.group_level_info != null){
+					return this.userInfo.award_level_info.id < this.userInfo.group_level_info.id ? this.userInfo.award_level_info.name : this.userInfo.group_level_info.name
+				} else {
+					return this.userInfo.award_level_info.name
+				}
+			}else {
+				if(this.userInfo.group_level_info != null){
+					return this.userInfo.group_level_info.name
+				}else {
+					return '无'
+				}
+			}
+			
+		},
 		// #ifdef H5
 		...mapState(['weichatObj']),
 		// #endif
@@ -639,13 +655,11 @@ export default {
 	}
 }
 .vip {
+	margin: 0 30rpx;
 	margin-top: -50rpx;
-	padding: 0 30rpx;
 	height: 170rpx;
-	image {
-		height: 100%;
-		width: 100%;
-	}
+	background-image: url('../../static/user/upgrade.png');
+	background-size: 100% 170rpx;
 }
 .cover-container {
 	display: flex;