Sfoglia il codice sorgente

commit -m 订单支付跳转

zhengjinyi 4 anni fa
parent
commit
22259dd461

+ 9 - 0
App.vue

@@ -13,9 +13,18 @@ export default {
 			success: function(e) {
 				let modelmes = e.model
 				self.$store.commit('setWindowHeight', e.windowHeight)
+				let reg =  (	
+								/iphone\sx/i.test(modelmes) 
+								|| (/iphone/i.test(modelmes) && /unknown/.test(modelmes)) 
+								|| /iphone\s11/.test(modelmes)
+								|| /iPhone 11/i.test(modelmes)
+								|| /iPhone X/i.test(modelmes)
+							);
+				console.log(reg)			
 				if (
 					modelmes.search('iPhone 11') != -1 ||
 					modelmes.search('iPhone 11 Pro Max') != -1 ||
+					modelmes.search('iPhone 12') != -1 ||
 					modelmes.search('iPhone X') != -1
 				) {
 					//XS,XR,XS MAX均可以适配

+ 5 - 5
pages/goods/cart.vue

@@ -2,7 +2,7 @@
 	<view class="container cart clearfix" v-if="hasLogin" :style="{paddingTop:CustomBar+'px'}"> 	
 		<headerNavbar :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :page='1'></headerNavbar>
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="5"></tui-skeleton>
-		<view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn || goodsList.length == 0 ? '0rpx':'80rpx'}">
+		<view class="container-cart-main tui-skeleton" :style="{paddingTop:isshowDelbtn ? '0rpx':'80rpx'}">
 			<view class="foot-check-delbtn" v-if="!isshowDelbtn && goodsList.length>0" :style="{top:CustomBar+'px'}">
 				<view class="foot-text">共<text>{{kindCount}}</text>件商品</view>
 				<view class="delBtn" @tap.stop="showDelManager">删除</view>
@@ -25,9 +25,9 @@
 										<view class="checkbox-box" @click.stop="ischeck(item,pros)">
 											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-xuanze':'icon-weixuanze']"></view>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productId)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
+										<view class="pros-img" @click.stop="navToListPage(pros)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
 										<view class="pros-product">
-											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>{{pros.productName}}</view>
+											<view class="producttitle" @click.stop="navToListPage(pros)"	>{{pros.productName}}</view>
 											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
 											<view class="floor-item-act" v-if="pros.activeStatus == 1">
 												<text class="tag tag-01" v-if="!pros.heUserId">自营</text>
@@ -453,8 +453,8 @@
 					return
 				}else{
 					pros.productCount--
-					this.processActivityPrice(pros)
 				}
+				this.processActivityPrice(pros)
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},
@@ -470,8 +470,8 @@
 					pros.productCount = 1
 				}else{
 					pros.productCount = e.detail.value
-					this.processActivityPrice(pros)
 				}
+				this.processActivityPrice(pros)
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},

+ 6 - 5
pages/goods/product-activi.vue

@@ -70,7 +70,7 @@
 					</view>
 					<view class="product-parameter" @click="showPopup">
 						<text class="title">参数:</text>
-						<text class="name">品牌  起订量  分类...</text>
+						<text class="name">品牌  分类...</text>
 						<text class="iconfont icon-chakangengduo"></text>
 					</view>
 				</view>
@@ -284,12 +284,13 @@
 				scrollTopArray:[],
 				sectionTopRangeArr: [],
 				winHeight:'',
-				isShowButton:false
+				isShowButton:false,
+				heUserId:0
 			}
 		},
-		onLoad(option) {
-			
+		onLoad(option) {			
 			this.productId = option.productId;//获取商品ID
+			this.heUserId = option.heUserId
 			this.isShareType = option.type
 			this.linkPath = option.path
 			this.isHeaderPoduct = true
@@ -495,7 +496,7 @@
 						productId:this.productId,
 						userId:this.userId,
 						productCount:this.number,
-						heUserId:0,
+						heUserId:this.heUserId,
 					}
 				)
 				.then(response => {

+ 1 - 1
pages/goods/product.vue

@@ -70,7 +70,7 @@
 					</view>
 					<view class="product-parameter" @click="showPopup">
 						<text class="title">参数:</text>
-						<text class="name">品牌  起订量  分类...</text>
+						<text class="name">品牌  分类...</text>
 						<text class="iconfont icon-chakangengduo"></text>
 					</view>
 				</view>

+ 17 - 10
pages/goods/search.vue

@@ -3,7 +3,7 @@
 		<view class="search-main">
 			<view class="gosearch-btn">
 				<text class="iconfont icon-sousuo"></text>
-				<input class="input" maxlength="20" :focus="isFocus" type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="subMitSearch()" placeholder="请输入搜索关键字" v-model.trim="listQuery.name"/>
+				<input class="input" maxlength="20" :focus="isFocus" type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="SubMitSearch()" placeholder="请输入搜索关键字" v-model.trim="listQuery.name"/>
 				<text class="iconfont icon-quxiao" v-if="isShowClose" @click.stop="delInputText()"></text>
 			</view>
 			<view class="search-btn" @click="SubMitSearch()">搜索</view>
@@ -204,13 +204,23 @@
 			},
 			handAddCarts(pro){
 				if(!this.hasLogin){
-					if(!uni.getStorageSync('_WX_State')){
-						this.$api.navigateTo(`/pages/authorize/authorize?type=1`)
-					}else{
-						this.$api.navigateTo(`/pages/login/login`)
-					}
+					this.$api.navigateTo(`/pages/login/login`)
 				}else{
-					this.$util.msg('加入成功',1500,true,'success')
+					this.ProductService.shoppingAddCart(
+						{
+							productId:pro.productId,
+							userId:this.listQuery.userId,
+							productCount:1,
+							heUserId:0,
+						}
+					)
+					.then(response => {
+						this.$util.msg('加入购物车成功',1500,true,'success')
+						this.GetCartNumber()
+					})
+					.catch(error =>{
+						this.$util.msg(error.msg,2000);
+					})
 				}
 			}, 
 			onShowClose () {//输入框输入时触发
@@ -233,9 +243,6 @@
 				this.isFocus = false
 				this.SubMitSearch();
 			},
-			keywordsClickPath(item){
-				this.$api.FlooryNavigateTo(item)
-			},
 			confirmDetele() {//清空历史记录
 				this.modal = true;
 			},

+ 2 - 2
pages/tabBar/cart/index.vue

@@ -441,8 +441,8 @@
 					return
 				}else{
 					pros.productCount--
-					this.processActivityPrice(pros)
 				}
+				this.processActivityPrice(pros)
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},
@@ -458,8 +458,8 @@
 					pros.productCount = 1
 				}else{
 					pros.productCount = e.detail.value
-					this.processActivityPrice(pros)
 				}
+				this.processActivityPrice(pros)
 				this.updateShoppogNum(pros)
 				this.totalShopPeice();
 			},

+ 1 - 3
pages/tabBar/index/index.vue

@@ -31,9 +31,7 @@
 				</view>
 				<view class="product-list-msg">
 					<view class="product-msg-name">{{ pro.name }}</view>
-					<view class="product-list-tag" v-if="pro.activeStatus == -1">
-						<text class="tag tag-01" v-if="pro.includedTax == '0'">自营</text>
-						<text class="tag tag-01" v-if="pro.includedTax == '1'">促销</text>
+					<view class="product-list-tag" v-if="pro.activeStatus == 1">
 						<text class="tag tag-02">活动价</text>
 					</view>
 					<view class="product-list-pri">

+ 3 - 2
pages/user/activity/activity-list.vue

@@ -29,6 +29,7 @@
 	export default{
 		data(){
 			return{
+				StaticUrl:this.$Static,
 				activityList:[],
 				hasNextPage:false,
 				listQuery:{
@@ -62,7 +63,7 @@
 				})
 			},
 			NavigatorPath(item){
-				this.$api.navigateTo(`/pages/user/activity/activity?activityId=${item.activityId}&userId=${this.listQuery.userId}`)
+				this.$api.navigateTo(`/pages/user/activity/activity?activityId=${item.activityId}&userId=${this.listQuery.userId}&name=${item.name}`)
 			}
 		},
 		onPullDownRefresh() {//下拉刷新
@@ -117,7 +118,7 @@
 				}
 			}
 			.activity-list-msg{
-				width: 470rpx;
+				width: 460rpx;
 				height: 100%;
 				float: right;
 				position: relative;

+ 5 - 3
pages/user/activity/activity.vue

@@ -8,7 +8,6 @@
 			<view class="product-list" v-for="(pro,index) in productList" :key="index" @click.stop="Details(pro)">
 				<view class="product-list-image">
 					<image class="product-image" :src="pro.mainImage" mode=""></image>
-					<image class="product-icon" :src="StaticUrl+'icon-hot.png'" mode="" v-if="pro.activeStatus == 1"></image>
 				</view>
 				<view class="product-list-msg">
 					<view class="product-msg-name">{{ pro.name }}</view>
@@ -36,6 +35,7 @@
 	export default{
 		data(){
 			return{
+				StaticUrl:this.$Static,
 				activityBanner:`${this.$Static}banner.png`,
 				listQuery:{
 					activityId:0,
@@ -43,6 +43,7 @@
 					pageNum:1,
 					pageSize:10
 				},
+				activityName:'',
 				UserId:0,//存储普通用户ID
 				hasNextPage:false,
 				productList:[],//商品列表
@@ -51,6 +52,7 @@
 		onLoad(option) {
 			this.listQuery.activityId = option.activityId
 			this.listQuery.userId = option.userId
+			this.activityName = option.name
 			this.GetProductActivityDetails();
 		},
 		filters: {
@@ -140,8 +142,8 @@
 			if (res.from === 'button') {
 		      // 来自页面内转发按钮
 		    }
-			return {
-			  title: '活动名称活动名称活动名称活动名称活动名称活动名称',
+			return { 
+			  title: `${this.activityName}`,
 			  path: `/pages/user/activity/activity?activityId=${this.listQuery.activityId}&userId=${this.listQuery.userId}`,
 			  imageUrl:'https://static.caimei365.com/app/mini-hehe/icon/icon-index-share.jpg'
 			}

+ 2 - 1
pages/user/order/order-details.vue

@@ -237,7 +237,8 @@
 						this.handBuyAgainInfo()					
 						break;
 					case 'pay':
-						this.MiniWxPayFor(data.order)
+						this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.order.payableAmount}`)
+						// this.MiniWxPayFor(data.order)
 						break;
 				}
 			},

+ 2 - 1
pages/user/order/order-list-retail.vue

@@ -408,7 +408,8 @@
 						this.handBuyAgainInfo()					
 						break;
 					case 'pay':
-						this.MiniWxPayFor(data.order)
+						this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.order.payableAmount}`)
+						// this.MiniWxPayFor(data.order)
 						break;
 				}
 			},

+ 2 - 1
pages/user/order/order-list.vue

@@ -376,7 +376,8 @@
 						this.handBuyAgainInfo()					
 						break;
 					case 'pay':
-						this.MiniWxPayFor(data.order)
+						this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.order.payableAmount}`)
+						// this.MiniWxPayFor(data.order)
 						break;
 				}
 			},

+ 2 - 1
pages/user/order/search-order.vue

@@ -369,7 +369,8 @@
 						this.handBuyAgainInfo()					
 						break;
 					case 'pay':
-						this.MiniWxPayFor(data.order)
+						this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.order.payableAmount}`)
+						// this.MiniWxPayFor(data.order)
 						break;
 				}
 			},