msb_test
ch 2 years ago
parent 194587ba1b
commit 5d8a42f48c

@ -3,15 +3,18 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "node env.config.js & npm run dev:h5",
"serve:bate": "node env.config.js --ENV:beta & npm run dev:h5",
"serve:prod": "node env.config.js --ENV:prod & npm run dev:h5",
"build": "npm run build:h5",
"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",
"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": "node env.config.js --ENV:test & cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:h5:bate": "node env.config.js --ENV:beta & cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:h5:prod": "node env.config.js --ENV:prod & cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"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: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",
@ -29,6 +32,9 @@
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:h5-test": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode test",
"dev:h5-bate": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode bate",
"dev:h5-prod": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve --mode prod",
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-28 16:30:54
* @LastEditors: ch
* @LastEditTime: 2022-06-29 17:15:57
* @LastEditTime: 2022-07-09 10:16:00
* @Description: file content
*/
@ -10,6 +10,10 @@ import {ToAsyncAwait, MsbRequest, MsbRequestTk} from '@/common/utils';
const BASE_URL = '/mall/trade';
export const ApiPostCashierPrepay = (data) =>
ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/payCenter/cashierPrepay`, data));
/**
* 微信h5支付获取支付URL
* @param {*} data

@ -10,6 +10,13 @@
"backgroundColor" : "#69ADE5"
}
},
{
"path": "pages/webView",
"aliasPath" : "/webView",
"style": {
"navigationBarTitleText": "马士兵严选"
}
},
{
"path": "pages/login",
"aliasPath" : "/login",

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
* @LastEditTime: 2022-06-29 17:23:04
* @LastEditTime: 2022-07-12 17:29:00
* @Description: file content
-->
<template>
@ -34,22 +34,6 @@
maxlength="50" placeholder="填写您想要备注的信息50字以内" />
</UiCell>
</UiWhiteBox>
<UiWhiteBox>
<text class="play--title">支付方式</text>
<radio-group>
<u-cell v-for="item in payData" :title="item.label" :key="item.val"
:border="false" @click="payType = item.val">
<image class="play--icon" slot="icon" :src="item.icon"/>
<radio class="play--radio" slot="right-icon" color="#FF875B"
:checked="payType == item.val" ></radio>
</u-cell>
<!-- <u-cell title="支付宝支付" :border="false" @click="payType = 'alipay'">
<image class="play--icon" slot="icon" src="@/static/order/zfb.png"/>
<radio class="play--radio" slot="right-icon" color="#FF875B"
:checked="payType == 'alipay'"></radio>
</u-cell> -->
</radio-group>
</UiWhiteBox>
<UiWhiteBox class="amount">
<u-cell title="商品总额" :value="`¥${orderInfo.productAmount}`" :border="false"></u-cell>
@ -72,6 +56,7 @@
import {GOODS_TYPE} from '@/common/dicts/goods';
import UiCell from '@/components/UiCell';
import {ApiPostSubmitOrder, ApiGetBeforeOrder, ApiGetBeforeCartOrder} from '@/common/api/order';
import {ApiPostCashierPrepay} from '@/common/api/pay';
import {ApiGetAddress } from '@/common/api/base';
import {Wxpay, Alipay} from '@/common/utils';
import UiButton from '@/components/UiButton.vue';
@ -85,15 +70,6 @@ export default {
address : {},
userMessage : '',
orderInfo : {},
payType : 'wxpay',
payData : [
{
label : '微信支付',
icon : require('@/static/order/wx.png'),
val : 'wxpay'
}
],
productType : this.$Route.query.productType,
}
},
@ -102,14 +78,6 @@ export default {
uni.$on('changeAddress',(item)=>{
this.address = item;
});
// APP
if(!this.$store.state.openId){
this.payData.push({
label : '支付宝支付',
icon : require('@/static/order/zfb.png'),
val : 'alipay'
})
}
},
onShow(){
//
@ -206,11 +174,10 @@ export default {
uni.$u.toast(error.message);
return false;
}
if(this.payType === 'wxpay'){
Wxpay({orderId : result.orderId, openId : this.$store.state.openId});
}else{
Alipay({orderId : result.orderId});
}
const {error:er, result:res} = await ApiPostCashierPrepay({orderId:result.orderId});
this.$Router.push(`/webView?url=${encodeURIComponent('http://www.baidu.com')}`)
// console.log(res);
}
}
}

@ -0,0 +1,24 @@
<!--
* @Author: ch
* @Date: 2022-07-12 17:19:59
* @LastEditors: ch
* @LastEditTime: 2022-07-12 17:34:26
* @Description: file content
-->
<template><view>
<!-- <web-view src="http://www.baidu.com"></web-view> -->
</view>
</template>
<script>
export default {
data (){
return {
url : ''
}
},
onLoad(){
this.url = this.$Route.query.url
console.log();
}
}
</script>
Loading…
Cancel
Save