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_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 VUE_APP_IM_URL = wss://you-gateway.mashibing.com

@ -1,3 +1,3 @@
VUE_APP_BASE_URL = https://you-gateway.mashibing.com 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 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_BASE_URL = https://k8s-horse-gateway.mashibing.cn
VUE_APP_STATIC_URL = https://k8s-shop-app.mashibing.com VUE_APP_STATIC_URL = https://k8s-shop-app.mashibing.cn
VUE_APP_IM_URL = wss://k8s-horse-gateway.mashibing.cn VUE_APP_IM_URL = wss://k8s-horse-gateway.mashibing.cn

@ -3,18 +3,18 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "npm run dev:h5", "server": "npm run dev:h5",
"serve:test": "npm run dev:h5-test", "server:test": "npm run dev:h5-test",
"serve:bate": "npm run dev:h5-bate", "server:bate": "npm run dev:h5-bate",
"serve:prod": "npm run dev:h5-prod", "server:prod": "npm run dev:h5-prod",
"build:test": "npm run build:h5-test", "build:test": "npm run build:h5-test",
"build:bate": "npm run build:h5-bate", "build:bate": "npm run build:h5-bate",
"build:prod": "npm run build:h5-prod", "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: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: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-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-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-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-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-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", "build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",

@ -121,20 +121,7 @@
"base" : "" "base" : ""
}, },
"devServer" : { "devServer" : {
"proxy" : { "port" : 8080
"/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"
}
}
}, },
"optimization" : { "optimization" : {
"treeShaking" : { "treeShaking" : {

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

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

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

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

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-20 14:14:53 * @Date: 2022-03-20 14:14:53
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-07-13 14:08:54 * @LastEditTime: 2022-07-13 18:18:18
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -62,6 +62,7 @@ import {Wxpay, Alipay} from '@/common/utils';
import UiButton from '@/components/UiButton.vue'; import UiButton from '@/components/UiButton.vue';
import UiWhiteBox from '../../components/UiWhiteBox.vue'; import UiWhiteBox from '../../components/UiWhiteBox.vue';
import UiGoodsInfo from '../../components/UiGoodsInfo.vue'; import UiGoodsInfo from '../../components/UiGoodsInfo.vue';
const ENV = process.env;
export default { export default {
components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo }, components : {UiCell, UiButton, UiWhiteBox, UiGoodsInfo },
data(){ data(){
@ -174,7 +175,14 @@ export default {
uni.$u.toast(error.message); uni.$u.toast(error.message);
return false; 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){ if(er){
uni.$u.toast(er.message); uni.$u.toast(er.message);
return false; return false;

@ -17,8 +17,19 @@ export default {
} }
}, },
onLoad(){ onLoad(){
this.url = decodeURIComponent(this.$Route.query.url) this.url = decodeURIComponent(this.$Route.query.url);
console.log(); },
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> </script>
Loading…
Cancel
Save