Explorar el Código

直播点播键盘修复

Signed-off-by: 李妹妹 <1639016684@qq.com>
李妹妹 hace 1 día
padre
commit
527da306bb

+ 3 - 3
common/request.js

@@ -7,8 +7,8 @@ export default class Request {
 	http(router, data = {}, method, contentType) {
 		let that = this;
 		// let path2 = 'https://userapp.klbycp.com'; //百域承品
-	     let path = 'https://userapp.klbycp.com'; //百域承品
-		//let path = 'http://e9c6a3a9.natappfree.cc'; //百域承品 todo yhq
+	    let path = 'https://userapp.klbycp.com'; //百域承品
+		//let path = 'http://tc46a925.natappfree.cc'; //百域承品 todo yhq
 	    // let path = 'http://f6b69df3.natappfree.cc'; //百域承品
 		// let path2 = 'https://userapp.zkhj6.com';
 		// let path = 'https://userapp.zkhj6.com';
@@ -129,7 +129,7 @@ export default class Request {
 			// if(isLiveApi) {
 			// 	useToken = liveToken
 			// }
-			//console.log("---qxj request url",`${path}${router}`+" params:"+JSON.stringify(data)+" \n AppToken:"+token);
+			console.log("---qxj request url",`${path}${router}`+" params:"+JSON.stringify(data)+" \n AppToken:"+token);
 			// 请求
 			uni.request({
 				header: {

+ 2 - 2
manifest.json

@@ -119,7 +119,7 @@
                     }
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
-                "schemes" : "zklive",
+                "schemes" : "lxshlive",
                 "targetSdkVersion" : 30,
                 "permissionExternalStorage" : {
                     "request" : "none", //可取值none、once、always。
@@ -436,7 +436,7 @@
             "modules" : {
                 "uni-push" : {}
             },
-            "bundleName" : "com.mytek.zklive1"
+            "bundleName" : "com.mytek.lxsh"
         }
     },
     "_spaceID" : "mp-3b8a6ec4-9bdf-43af-81e7-d3b36a017c34"

+ 23 - 12
pages.json

@@ -3622,7 +3622,17 @@
 					"path": "video",
 					"style": {
 						"navigationBarTitleText": "课程",
-						"enablePullDownRefresh": false
+						"enablePullDownRefresh": false,
+						"app-plus": {
+							"softinputMode":"adjustResize"
+							// "screenOrientation": [
+							// 	//可选,字符串数组类型,应用支持的横竖屏
+							// 	"portrait-primary", //可选,字符串类型,支持竖屏
+							// 	"portrait-secondary", //可选,字符串类型,支持反向竖屏
+							// 	"landscape-primary", //可选,字符串类型,支持横屏
+							// 	"landscape-secondary" //可选,字符串类型,支持反向横屏
+							// ]
+							}
 						// "usingComponents": {
 						// 	"uni-popup": "/uni_modules/uni-popup/components/uni-popup/uni-popup"
 						// },
@@ -3670,16 +3680,17 @@
 					"path": "videovip",
 					"style": {
 						"navigationBarTitleText": "看课详情",
-						"enablePullDownRefresh": false
-						// "app-plus": {
-						// 	"screenOrientation": [
-						// 		//可选,字符串数组类型,应用支持的横竖屏
-						// 		"portrait-primary", //可选,字符串类型,支持竖屏
-						// 		"portrait-secondary", //可选,字符串类型,支持反向竖屏
-						// 		"landscape-primary", //可选,字符串类型,支持横屏
-						// 		"landscape-secondary" //可选,字符串类型,支持反向横屏
-						// 	]
-						// 	}
+						"enablePullDownRefresh": false,
+						"app-plus": {
+							"softinputMode":"adjustResize"
+							// "screenOrientation": [
+							// 	//可选,字符串数组类型,应用支持的横竖屏
+							// 	"portrait-primary", //可选,字符串类型,支持竖屏
+							// 	"portrait-secondary", //可选,字符串类型,支持反向竖屏
+							// 	"landscape-primary", //可选,字符串类型,支持横屏
+							// 	"landscape-secondary" //可选,字符串类型,支持反向横屏
+							// ]
+							}
 					}
 				},
 				{
@@ -4414,7 +4425,7 @@
 						"navigationBarTextStyle": "black",
 						"navigationBarBackgroundColor": "#ffffff",
 						"app-plus": {
-							"bounce": "none",
+							"softinputMode":"adjustResize",
 							"screenOrientation": [
 								//可选,字符串数组类型,应用支持的横竖屏
 								"portrait-primary", //可选,字符串类型,支持竖屏

+ 207 - 19
pages/shopping/paymentOrder.vue

@@ -27,15 +27,15 @@
 							<radio :value="1" :checked="payType=='1'" />
 						</label>
 					</view>
-					<!-- <view class="item"  >
+					<view class="item">
 						<view class="left">
-							<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/pay_de.png" mode=""></image>
-							<text class="text">物流代收</text>
+							<image src="/static/images/zfb.png" mode=""></image>
+							<text class="text">支付宝</text>
 						</view>
 						<label>
-							<radio  :value="2" :checked="order.payType=='2'" />
+							<radio :value="99" :checked="payType == 99" />
 						</label>
-					</view> -->
+					</view>
 				</radio-group>
 			</view>
 			<!-- 订单详情查看 -->
@@ -92,6 +92,17 @@
 		orderBindUser,
 		clearPayType
 	} from '@/api/storeOrder'
+	import {
+		H5AliPayment,
+		aliPayment,
+		appWxPayment,
+		H5WxPayment,
+		weChatPayment,
+		zfbPayment
+	} from '@/api/pay_new'
+	import {
+		payConfirmReward
+	} from '@/api/liveOrder'
 	export default {
 		data() {
 			return {
@@ -242,6 +253,7 @@
 				);
 			},
 			payTypeChange(e) {
+				this.payType=e.detail.value
 				this.editPayType(e.detail.value)
 			},
 			copyOrderSn(text) {
@@ -336,28 +348,18 @@
 					payType: payType
 				};
 				this.payParams = data
-				var that = this;
 				uni.showLoading();
-
 				editPayType(data).then(
 					res => {
 						if (res.code == 200) {
 							console.log(res);
 							uni.hideLoading();
-							that.order = res.order;
+							this.order = res.order;
 							//this.payType=this.order.payType
-							this.payMoney = this.order.payMoney;
+							this.payMoney = this.order.payPrice;
 							this.payDelivery = this.order.payDelivery;
-							if(res.order.status==0){  //0:代付款   1:已支付
-								uni.showToast({title: '未支付成功',icon: 'none'});
-							}
-							else if(res.order.status==1){  //0:代付款   1:已支付
-								this.$refs.popTip.close();
-								uni.redirectTo({
-									url:"./success?order="+JSON.stringify(this.order)
-								}); 
-							}
 						} else {
+							uni.hideLoading();
 							uni.showToast({
 								icon: 'none',
 								title: res.msg,
@@ -373,7 +375,193 @@
 					url: '/pages_user/user/otherPaymentOrder?orderId=' + this.orderId
 				})
 			},
-	         payOrder() {
+			payOrder() {
+				if (this.type == 'win') {
+					this.toPayConfirmReward()
+				} else {
+					if (this.payType == 1) {
+						this.weixin()
+					} else if (this.payType == 99) {
+						this.aliPayOrder()
+					} else {
+						uni.showToast({
+							title: "暂时无可用支付",
+							icon: 'none'
+						})
+					}
+				}
+			},
+			toPayConfirmReward() {
+				let data = {
+					orderId: this.order.id,
+					appId:'wxecdaff01852ca309'
+				}
+				payConfirmReward(data).then(
+					res => {
+						if (res.code == 200) {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+							uni.redirectTo({
+								url: "./success?order=" + JSON.stringify(this.order)
+							})
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			aliPayOrder() {
+				console.log("选了支付宝", this.order)
+				const data = {
+					orderId: this.order.id,
+					appId: 'wxecdaff01852ca309',
+					// type: "live"
+				};
+				if(this.type=="live"){
+					data.type ="live"
+				}
+				const that = this;
+				uni.showLoading();
+				// #ifdef APP-PLUS
+				console.log("APP Ali payload", JSON.stringify(data))
+				zfbPayment(data).then(res => {
+					uni.hideLoading();
+					console.log("APP Ali response", JSON.stringify(res))
+					if (res.code == 200) {
+						if (res.type == "tz") {
+							const match = res.data.body.url.match(/[\?&]businessCstNo=([^&]+)/);
+							const businessCstNo = match ? match[1] : null;
+							const tzCashier = uni.requireNativePlugin("TZBank-Cashier");
+							tzCashier.pay({
+								env: 0,
+								wxMiniProgramType: 0,
+								wxAppId: 'wxecdaff01852ca309',
+								wxUniversalLink: "https://yjf.runtzh.com/",
+								orderFlowNo: res.data.body.orderFlowNo,
+								businessCstNo: businessCstNo,
+								platMerCstNo: res.data.body.platMerCstNo
+							}, (ret) => {
+								console.log("APP Ali tzCashier result", JSON.stringify(ret))
+								if (ret && ret.errCode == 0) {
+									that.$refs.popTip.open()
+									// uni.redirectTo({
+									// 	url: "./success?order=" + JSON.stringify(that.order)
+									// })
+								}
+							});
+						} else if (res.type == 'hf') {
+							const qr = res.data.qr_code;
+							let alipayScheme = '';
+							if (uni.getSystemInfoSync().platform == 'android') {
+								alipayScheme = 'alipays://platformapi/startApp?&saId=10000007&qrcode=' + qr;
+							} else {
+								alipayScheme = 'alipay://platformapi/startApp?&saId=10000007&qrcode=' + qr;
+							}
+							setTimeout(() => {
+								that.$refs.popTip.open()
+							}, 2000)
+							console.log("APP Ali openURL", alipayScheme)
+							plus.runtime.openURL(alipayScheme, function() {});
+						}
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: res.msg,
+						});
+					}
+				}).catch(() => {
+					console.log("APP Ali catch error")
+					uni.hideLoading();
+				});
+				// #endif
+				// #ifdef H5
+				console.log("H5 Ali payload", JSON.stringify(data))
+				H5AliPayment(data).then(res => {
+					uni.hideLoading();
+					console.log("H5 Ali response", JSON.stringify(res))
+					if (res.code == 200) {
+						if (res.type == "tz") {
+							console.log("H5 Ali redirect url", res.data.body.url)
+							window.location.href = res.data.body.url;
+						} else if (res.type == 'hf') {
+							const payUrl = res.data.pay_info || res.data.qr_code;
+							console.log("H5 Ali payUrl", payUrl)
+							window.location.href = payUrl;
+						}
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: res.msg,
+						});
+					}
+				}).catch(() => {
+					console.log("H5 Ali catch error")
+					uni.hideLoading();
+				});
+				// #endif
+			},
+			doWxPay(){
+				var that=this;
+				var data = {orderId:this.orderId};
+				// #ifdef APP-PLUS
+				uni.showLoading();
+				wxPayment(data).then(res => {
+						uni.hideLoading();
+						that.$refs.popPayType.close();
+						that.showPayTips = true;
+						setTimeout(() => {
+							that.$refs.popTip.open();
+						}, 500);
+						if(res.code==200){
+							if(res.type=="tz"){
+								let businessCstNo=this.userInfo.userId;
+								if(!!res.data.body.url){
+									const match = res.data.body.url.match(/[\?&]businessCstNo=([^&]+)/);
+									businessCstNo = match ? match[1] : null;
+								} 
+								let  payConfig={
+									 env:0, //0 生产环境  1-回归  2-测试环境
+									 wxAppId:"wxecdaff01852ca309",
+									 wxUniversalLink:"https://yjf.runtzh.com/",
+									 wxMiniProgramType:0,
+									 orderFlowNo:res.data.body.orderFlowNo,
+									 businessCstNo:businessCstNo,
+									 platMerCstNo:res.data.body.platMerCstNo
+								};
+								
+								this.tzCashier.pay({
+									env:0,
+									wxAppId:"wxecdaff01852ca309",
+									wxUniversalLink:"https://yjf.runtzh.com/",
+									wxMiniProgramType:0,
+									orderFlowNo:res.data.body.orderFlowNo,
+									businessCstNo:businessCstNo,
+									platMerCstNo:res.data.body.platMerCstNo
+								},(res)=>{
+										uni.$emit('closePrivilege', {}); 
+										that.$refs.popTip.open();
+								  });
+							}
+							else if(res.type=='hf'){
+								uni.$emit('closePrivilege', {});
+								that.$refs.popTip.open();
+							}
+						}
+						else{
+							uni.showToast({title:res.msg,icon:'none'})
+						}
+					},
+					rej => {}
+				);
+				// #endif
+			},
+	         weixin() {
 				var that=this;
 				plus.share.getServices(function(res){
 				    var sweixin = null;  

+ 1 - 1
pages_course/video.vue

@@ -1250,7 +1250,7 @@
 			
 			//this.getMenuButton()
 			// #ifndef H5
-			uni.onKeyboardHeightChange(this.keyboardHeightChange);
+			//uni.onKeyboardHeightChange(this.keyboardHeightChange);
 			// #endif
 		},
 		onShow() {

+ 1 - 1
pages_course/videovip.vue

@@ -1173,7 +1173,7 @@
 					this.featuredCommentInputFocused = false
 				}
 			}
-			uni.onKeyboardHeightChange(this._featuredCommentKbHandler)
+			//uni.onKeyboardHeightChange(this._featuredCommentKbHandler)
 			// #endif
 		},
 		onShow() {

+ 4 - 4
pages_live/components/liveCommentInput.vue

@@ -109,10 +109,10 @@
 				return this.theme === 'light' ? 'color:#999999;' : 'color:#e7e7e7;';
 			},
 			keyboardPanelStyle() {
-				const offset = this.keyboardHeight > 0 ? this.keyboardHeight : 0;
-				return {
-					transform: offset ? `translateY(-${offset}rpx)` : 'none'
-				};
+				// const offset = this.keyboardHeight > 0 ? this.keyboardHeight : 0;
+				// return {
+				// 	transform: offset ? `translateY(-${offset}rpx)` : 'none'
+				// };
 			}
 		},
 		watch: {

+ 4 - 2
pages_live/shopping/confirmCreateOrder.vue

@@ -504,16 +504,18 @@
 					}
 					
 					// 创建订单
-					let orderList;
+					let orderList, path;
 					if (this.type == "win") {
 						orderList = await this.createRewardOrder(); // 中奖订单
+						path=`/pages/shopping/paymentOrder?orderId=${orderList.id}&type=win`
 					} else {
 						orderList = await this.createLiveOrder(); // 购买订单
+						path=`/pages/shopping/paymentOrder?orderId=${orderList.id}&type=live`
 					}
 					// console.log("orderList>>", orderList)
 					// 跳转到支付页面
 					uni.redirectTo({
-						url: `/pages/shopping/paymentOrder?orderId=${orderList.id}`,
+						url: path,
 						success: () => {
 							// 跳转成功,不重置状态(页面会跳转走)
 							// 如果跳转失败,会在 fail 回调中重置

+ 2 - 0
pages_manage/components/courseItem.vue

@@ -538,6 +538,7 @@
 					this.showShare = false;
 					this.setTimeShow = false;
 					if (res.code == 200) {
+						console.log('短链地址',res)
 						this.copylink = res.url;
 						if (this.sendCourse) {
 							this.sendCourse = false;
@@ -583,6 +584,7 @@
 				};
 				sharecourselink(params).then((res) => {
 					if (res.code == 200) {
+						console.log('短链地址2',res)
 						this.copylink = res.url;
 						// 强制使用 HTTPS
 						//  if (this.copylink.startsWith('http://')) {