lhl il y a 6 mois
Parent
commit
fe3bb66566
6 fichiers modifiés avec 25 ajouts et 11 suppressions
  1. 3 3
      manifest.json
  2. 1 0
      pages/index/index.vue
  3. 15 5
      pages/money/pay.vue
  4. 4 1
      pages/order/createOrder.vue
  5. 1 1
      pages/order/order.vue
  6. 1 1
      store/index.js

+ 3 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "精联惠选",
     "appid" : "__UNI__991D0D9",
     "description" : "精联惠选",
-    "versionName" : "1.3.4",
-    "versionCode" : 134,
+    "versionName" : "1.3.6",
+    "versionCode" : 136,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -126,7 +126,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "https://www.jlxnykj.cn/api",
+                    "target" : "https://zero.jlxnykj.cn/api",
                     // "target" : "http://7131.frp.qiniu1314.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {

+ 1 - 0
pages/index/index.vue

@@ -403,6 +403,7 @@
 					}) => {
 						let goods = data.info;
 						console.log(goods, '商品信息');
+						
 						this.carouselList = data.banner;
 						this.swiperLength = this.carouselList.length;
 						this.bastList = data.giftInfo; //会员礼包

+ 15 - 5
pages/money/pay.vue

@@ -20,7 +20,7 @@
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
 			</view>
 			<!-- #endif -->
-			<view class="type-item" @click="changePayType(4)" v-if="is_zero==1">
+			<view class="type-item" @click="changePayType(4)" v-if="is_zero==1 || is_pack == 1">
 				<!-- <text class="icon iconfont iconyue"></text> -->
 				<image src="../../static/icon/task1.png" class="icon iconfont" mode="widthFix" style="width: 40rpx;height: 40rpx;margin-right: 50rpx;"></image>
 				<view class="con">
@@ -43,9 +43,12 @@
 </template>
 
 <script>
+	import {
+		getUserInfo,
+	} from '@/api/user.js';
 import { balance } from '@/api/wallet.js';
 import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
-import { mapState } from 'vuex';
+import { mapState,mapMutations } from 'vuex';
 // #ifdef H5
 import weichatObj from '@/plugin/jweixin-module/index.js';
 // #endif
@@ -66,7 +69,8 @@ export default {
 			froms: '', //保存h5中数据来源对象
 			// #endif
 			pinkid: '' ,//保存拼团商品id
-			is_zero: 0
+			is_zero: 0,
+			is_pack: 0,
 		};
 	},
 	computed: {
@@ -98,15 +102,21 @@ export default {
 			this.pinkid = options.pinkid;
 		}
 		// 载入消费积分
-		balance({}).then(({ data }) => {
+		getUserInfo().then(({ data }) => {
 			// 获取消费积分
 			this.now_money = data.now_money;
+			console.log(data,'data');
+			this.setUserInfo(data);
 		});
 		if(options.is_zero) {
 			this.is_zero = options.is_zero
 		}
+		if(options.is_pack) {
+			this.is_pack = options.is_pack
+		}
 	},
 	methods: {
+		...mapMutations('user', ['setUserInfo']),
 		//选择支付方式
 		changePayType(type) {
 			this.payType = type;
@@ -284,7 +294,7 @@ export default {
 
 			let data = {
 				is_zero: obj.is_zero,
-				is_pack: prepage.is_pack,//是否礼包商品
+				is_pack: obj.is_pack,//是否礼包商品
 				real_name: prepage.addressData.real_name, //联系人名称
 				phone: prepage.addressData.phone, //联系人号码
 				couponId: prepage.couponChecked.id, //优惠券编号

+ 4 - 1
pages/order/createOrder.vue

@@ -435,7 +435,7 @@
 					// 计算金额
 					this.payMoneyNub();
 					// 加载优惠券
-					obj.couponsOrder(data.priceGroup.totalPrice);
+					// obj.couponsOrder(data.priceGroup.totalPrice);
 				});
 			},
 			// 购买数量变化
@@ -475,6 +475,9 @@
 				if(this.is_zero) {
 					url += '&is_zero=' + this.is_zero
 				}
+				if(this.is_pack) {
+					url += '&is_pack=' + this.is_pack
+				}
 				uni.navigateTo({
 					url
 				});

+ 1 - 1
pages/order/order.vue

@@ -190,7 +190,7 @@ export default {
 		// 订单支付
 		orderPay(e) {
 			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price + '&is_zero=' + e.is_zero
+				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price + '&is_zero=' + e.is_zero + '&is_pack=' + e.is_pack
 			});
 		},
 		//获取订单列表

+ 1 - 1
store/index.js

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