Browse Source

2023-10-30

cmy 1 year ago
parent
commit
6fb16619b6

+ 6 - 0
api/user.js

@@ -221,6 +221,12 @@ export function getGreedUserList(q) {
 export function getBaseIntegralList(q) {
 	return request.get("base_integral/list", q);
 }
+/*
+ * 积分记录
+ * */
+export function getReloadIntegralList(q) {
+	return request.get("reorder_integral/list", q);
+}
 /**
  * 获取分销海报图片
  * 

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "壹柒科技",
     "appid" : "__UNI__B0B5BE7",
     "description" : "壹柒科技",
-    "versionName" : "2.7.1",
-    "versionCode" : 271,
+    "versionName" : "2.7.3",
+    "versionCode" : 273,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 20 - 0
pages.json

@@ -384,6 +384,26 @@
             }
           }
         },
+		{
+		  "path": "user_integral/reload",
+		  "style": {
+		    "navigationBarTitleText": "复投积分详情"
+		
+		      // #ifdef MP
+		      ,
+		    "navigationBarTextStyle": "black",
+		    "navigationBarBackgroundColor": "#FFFFFF"
+		      // #endif
+		      ,
+		    "app-plus": {
+		      // #ifdef APP-PLUS
+		      "titleNView": {
+		        "type": "default"
+		      }
+		      // #endif
+		    }
+		  }
+		},
 		{
 		  "path": "user_integral/greed",
 		  "style": {

+ 32 - 1
pages/goods/order_confirm/index.vue

@@ -92,6 +92,17 @@
 						</checkbox-group>
 					</view>
 				</view>
+				<view class='item acea-row row-between-wrapper'>
+					<view>复投积分抵扣</view>
+					<view class='discount acea-row row-middle'>
+						<view> {{useReorderIntegral ? "剩余积分":"当前积分"}}
+							<text class='num font-color'>{{reorder_integral || 0}}</text>
+						</view>
+						<checkbox-group @change="ChangeReorderIntegral">
+							<checkbox :disabled="reorder_integral<=0 && !useReorderIntegral" :checked='useReorderIntegral ? true : false' />
+						</checkbox-group>
+					</view>
+				</view>
 				<view v-if="invoice_func || special_invoice" class='item acea-row row-between-wrapper' @tap="goInvoice">
 					<view>开具发票</view>
 					<view class='discount'>
@@ -316,6 +327,10 @@
 					<view>积分抵扣:</view>
 					<view class='money'>-¥{{parseFloat(integral_price).toFixed(2)}}</view>
 				</view>
+				<view class='item acea-row row-between-wrapper' v-if="reorder_deduction_price > 0">
+					<view>复投积分抵扣:</view>
+					<view class='money'>-¥{{parseFloat(reorder_deduction_price).toFixed(2)}}</view>
+				</view>
 				<view class='item acea-row row-between' v-for="(item,index) in promotions_detail" :key="index"
 					v-if="parseFloat(item.promotions_price)">
 					<view>{{item.title}}:</view>
@@ -515,6 +530,9 @@
 				useIntegral: false, //是否使用积分
 				integral_price: 0, //积分抵扣金额
 				integral: 0,
+				useReorderIntegral:false,//是否使用复投积分
+				reorder_deduction_price: 0, //复投积分抵扣金额
+				reorder_integral:0,
 				ChangePrice: 0, //使用积分抵扣变动后的金额
 				formIds: [], //收集formid
 				status: 0,
@@ -1006,6 +1024,7 @@
 					postOrderComputed(this.orderKey, {
 						addressId: this.addressId,
 						useIntegral: this.useIntegral ? 1 : 0,
+						useReorderIntegral: this.useReorderIntegral ? 1 : 0,
 						couponId: this.priceGroup.couponPrice == 0 ? 0 : this.couponId,
 						shipping_type: this.tableId ? 4 : parseInt(shippingType) + 1,
 						payType: this.payType
@@ -1015,10 +1034,14 @@
 						if (result) {
 							console.log(result, 'result');
 							this.totalPrice = result.pay_price;
+							// 积分
 							this.integral_price = result.deduction_price;
+							this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
 							this.coupon_price = result.coupon_price;
 							this.promotions_detail = result.promotions_detail;
-							this.integral = this.useIntegral ? result.SurplusIntegral : this.userInfo.integral;
+							// 复投积分
+							this.reorder_deduction_price = result.reorder_deduction_price;
+							this.reorder_integral = this.useReorderIntegral ? result.SurplusReorderIntegral : this.userInfo.reorder_integral;
 							this.$set(this.priceGroup, 'storePostage', shippingType == 1 ? 0 : result
 								.pay_postage);
 							this.$set(this.priceGroup, 'storePostageDiscount', result.storePostageDiscount);
@@ -1102,6 +1125,13 @@
 				this.useIntegral = !this.useIntegral;
 				this.computedPrice();
 			},
+			/**
+			 * 使用复投积分抵扣
+			 */
+			ChangeReorderIntegral: function() {
+				this.useReorderIntegral = !this.useReorderIntegral;
+				this.computedPrice();
+			},
 			/**
 			 * 选择地址后改变事件
 			 * @param object e
@@ -1832,6 +1862,7 @@
 					couponId: that.priceGroup.couponPrice == 0 ? 0 : that.couponId,
 					payType: that.payType,
 					useIntegral: that.useIntegral,
+					useReorderIntegral:that.useReorderIntegral,
 					bargainId: that.BargainId,
 					combinationId: that.combinationId,
 					discountId: that.discountId,

+ 4 - 0
pages/goods/order_details/index.vue

@@ -360,6 +360,10 @@
 					<view>积分抵扣:</view>
 					<view class='conter'>-¥{{parseFloat(orderInfo.deduction_price).toFixed(2)}}</view>
 				</view>
+				<view class='item acea-row row-between' v-if="orderInfo.use_reorder_integral > 0">
+					<view>复投积分抵扣:</view>
+					<view class='conter'>-¥{{parseFloat(orderInfo.use_reorder_integral).toFixed(2)}}</view>
+				</view>
 				<view class='item acea-row row-between' v-for="(item,index) in orderInfo.promotions_detail" :key="index" v-if="parseFloat(item.promotions_price)">
 					<view>{{item.title}}:</view>
 					<view class='conter'>-¥{{parseFloat(item.promotions_price).toFixed(2)}}</view>

+ 1 - 0
pages/index/index.vue

@@ -720,6 +720,7 @@
 				return m;
 			},
 			setDiyData(data) {
+				console.log(data)
 				this.errorNetwork = false
 				if (data.is_bg_color) {
 					this.bgColor = data.color_picker

+ 4 - 0
pages/user/index.vue

@@ -228,6 +228,10 @@
 							<text class="num">{{userInfo.base_integral || 0}}</text>
 							<view class="txt">母积分</view>
 						</view>
+						<view class="num-item" style="flex-grow:1" @click="goMenuPage('/pages/users/user_integral/reload')">
+							<text class="num">{{userInfo.reorder_integral || 0}}</text>
+							<view class="txt">复投积分</view>
+						</view>
 					</view>
 					<view class="num-wrapper" v-if="userInfo.uid">
 						<view class="num-item">

File diff suppressed because it is too large
+ 222 - 0
pages/users/user_integral/reload.vue


BIN
static/images/1-001.png


BIN
static/images/1-002.png


BIN
static/images/2-001.png


BIN
static/images/2-002.png


BIN
static/images/3-001.png


BIN
static/images/3-002.png


BIN
static/images/4-001.png


BIN
static/images/4-002.png


BIN
static/images/5-001.png


BIN
static/images/5-002.png


+ 8 - 2
utils/util.js

@@ -179,11 +179,17 @@ export default {
 				if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index', '/pages/index/index','/pages/store_cate/store_cate']
 					.indexOf(url.split('?')[0]) == -1) {
 					uni.navigateTo({
-						url: url
+						url: url,
+						fail(res){
+							console.log(res,'11');
+						}
 					})
 				} else {
 					uni.reLaunch({
-						url: url
+						url: url,
+						fail(res){
+							console.log(res,'22');
+						}
 					})
 				}
 			} 

Some files were not shown because too many files changed in this diff