Merge branch 'fix/0714-ch' into msb_test

msb_test
ch 2 years ago
commit 29495b9677

@ -1,3 +1,3 @@
VUE_APP_BASE_URL = https://you-gateway.mashibing.com
VUE_APP_STATIC_URL = https://you-gateway.mashibing.com
VUE_APP_STATIC_URL = https://you-app.mashibing.com
VUE_APP_IM_URL = wss://you-gateway.mashibing.com

@ -1,3 +1,3 @@
VUE_APP_BASE_URL = https://you-gateway.mashibing.com
VUE_APP_STATIC_URL = https://you-gateway.mashibing.com
VUE_APP_STATIC_URL = https://you-app.mashibing.com
VUE_APP_IM_URL = wss://you-gateway.mashibing.com

@ -1,3 +1,3 @@
VUE_APP_BASE_URL = https://k8s-horse-gateway.mashibing.com
VUE_APP_STATIC_URL = https://k8s-shop-app.mashibing.com
VUE_APP_BASE_URL = https://k8s-horse-gateway.mashibing.cn
VUE_APP_STATIC_URL = https://k8s-shop-app.mashibing.cn
VUE_APP_IM_URL = wss://k8s-horse-gateway.mashibing.cn

@ -3,18 +3,18 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"serve:test": "npm run dev:h5-test",
"serve:bate": "npm run dev:h5-bate",
"serve:prod": "npm run dev:h5-prod",
"server": "npm run dev:h5",
"server:test": "npm run dev:h5-test",
"server:bate": "npm run dev:h5-bate",
"server:prod": "npm run dev:h5-prod",
"build:test": "npm run build:h5-test",
"build:bate": "npm run build:h5-bate",
"build:prod": "npm run build:h5-prod",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5-test": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode test",
"build:h5:bate": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode bate",
"build:h5:prod": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode prod",
"build:h5-bate": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode bate",
"build:h5-prod": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build --mode prod",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",

@ -121,20 +121,7 @@
"base" : ""
},
"devServer" : {
"proxy" : {
"/uc/" : {
"target" : "https://k8s-horse-gateway.mashibing.cn"
},
"/mall/" : {
"target" : "https://k8s-horse-gateway.mashibing.cn"
},
"/pay/" : {
"target" : "https://k8s-horse-gateway.mashibing.cn"
},
"/oss/" : {
"target" : "https://k8s-horse-gateway.mashibing.cn"
}
}
"port" : 8080
},
"optimization" : {
"treeShaking" : {

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-28 17:16:44
* @LastEditors: ch
* @LastEditTime: 2022-07-04 10:42:12
* @LastEditTime: 2022-07-13 20:05:42
* @Description: file content
-->
<template>
@ -11,7 +11,7 @@
<image class="icon" src="@/static/goods/cart.png"/>
<view class="title">商品已下架</view>
<view class="btns">
<UiButton class="btn" @click="$Router.back()"></UiButton>
<UiButton class="btn" @click="$Router.pushTab('/')"></UiButton>
</view>
</UiWhiteBox>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-15 17:46:10
* @LastEditors: ch
* @LastEditTime: 2022-07-13 14:13:24
* @LastEditTime: 2022-07-13 18:20:38
* @Description: file content
-->
<template>
@ -59,6 +59,7 @@ import {ApiPutCancelOrder,ApiPutOrderReceive} from '@/common/api/order';
import {ApiPostCashierPrepay} from '@/common/api/pay';
import BsPay from '../../../../components/BsPay.vue';
import ORDER from '@/common/dicts/order';
const ENV = process.env;
export default {
components: { UiButton, UiCell, BsPay },
props : {
@ -130,7 +131,14 @@ export default {
},
async handlePay(){
const {error, result} = await ApiPostCashierPrepay({orderId:this.orderInfo.orderId});
let payType = 'wxjsapi'
if(!this.$store.state.openId){
payType = 'h5'
}
const {error, result} = await ApiPostCashierPrepay({
orderId:this.orderInfo.orderId,
returnUrl : `${ENV.VUE_APP_STATIC_URL}/payResult?orderId=${this.orderInfo.orderId}&payType=${payType}`
});
if(error){
uni.$u.toast(error.message);
return false;
@ -138,7 +146,7 @@ export default {
// #ifdef H5
window.location.replace(result.wapCashierUrl)
window.location.href = result.wapCashierUrl;
// #endif
// #ifndef H5

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 10:58:24
* @LastEditors: ch
* @LastEditTime: 2022-07-13 14:12:17
* @LastEditTime: 2022-07-13 18:21:13
* @Description: file content
-->
<template>
@ -62,6 +62,7 @@ import UiGoodsInfo from '../../components/UiGoodsInfo.vue';
import UiGoodsInfoMax from '../../components/UiGoodsInfoMax.vue';
import UiMoney from '../../components/UiMoney.vue';
import ORDER from '@/common/dicts/order';
const ENV = process.env;
export default {
components: { BsEmpty, UiButton, BsPay, UiGoodsInfo, UiGoodsInfoMax, UiMoney },
@ -135,15 +136,19 @@ export default {
* 立即支付
*/
async handlePay(item){
const {error, result} = await ApiPostCashierPrepay({orderId:item.orderId});
if(error){
uni.$u.toast(error.message);
return false;
let payType = 'wxjsapi'
if(!this.$store.state.openId){
payType = 'h5'
}
const {error, result} = await ApiPostCashierPrepay({
orderId:item.orderId,
returnUrl : `${ENV.VUE_APP_STATIC_URL}/payResult?orderId=${item.orderId}&payType=${payType}`
});
// #ifdef H5
window.location.replace(result.wapCashierUrl)
window.location.href = result.wapCashierUrl
// #endif
// #ifndef H5

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-28 15:01:41
* @LastEditors: ch
* @LastEditTime: 2022-06-30 17:31:15
* @LastEditTime: 2022-07-13 18:41:57
* @Description: file content
-->
@ -69,9 +69,11 @@ export default {
},
back(){
const payType = this.$Route.query.payType;
if(payType !== 'wxjsapi'){
this.$Router.back(2);
}else{
if(payType === 'wxjsapi'){
this.$Router.back();
}else if(payType === 'h5'){
history.back(2);
}else if(payType === 'appWx'){
this.$Router.back();
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-07-13 14:08:54
* @LastEditTime: 2022-07-13 18:18:18
* @Description: file content
-->
<template>
@ -62,6 +62,7 @@ import {Wxpay, Alipay} from '@/common/utils';
import UiButton from '@/components/UiButton.vue';
import UiWhiteBox from '../../components/UiWhiteBox.vue';
import UiGoodsInfo from '../../components/UiGoodsInfo.vue';
const ENV = process.env;
export default {
components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo },
data(){
@ -174,7 +175,14 @@ export default {
uni.$u.toast(error.message);
return false;
}
const {error:er, result:res} = await ApiPostCashierPrepay({orderId:result.orderId});
let payType = 'wxjsapi'
if(!this.$store.state.openId){
payType = 'h5'
}
const {error:er, result:res} = await ApiPostCashierPrepay({
orderId:result.orderId,
returnUrl : `${ENV.VUE_APP_STATIC_URL}/payResult?orderId=${result.orderId}&payType=${payType}`
});
if(er){
uni.$u.toast(er.message);
return false;

@ -17,8 +17,19 @@ export default {
}
},
onLoad(){
this.url = decodeURIComponent(this.$Route.query.url)
console.log();
this.url = decodeURIComponent(this.$Route.query.url);
},
onReady() {
var currentWebview = this.$scope.$getAppWebview() //html5plusplus.webview.currentWebview()uni-appvue使plus.webview.currentWebview()
setTimeout(function() {
let wv = currentWebview.children()[0];
wv.addEventListener('loaded',function() {
console.log('xxxxx',wv.getURL())
console.log(wv.getURL()) //url
console.log(wv.getTitle()) //
}, false);
}, 1000); //
}
}
</script>
Loading…
Cancel
Save