修改支付功能,优化合同详情
This commit is contained in:
parent
e00ab69248
commit
289e9fd9d6
@ -15,5 +15,8 @@ export const payWay = (data) => oahttp.get('/pay/payWay', data)
|
||||
*/
|
||||
export const payPrepay = (data) => oahttp.post('/pay/prepay', data)
|
||||
|
||||
|
||||
/**
|
||||
* 支付配置
|
||||
*/
|
||||
export const wechatJsConfig = (data) => oahttp.get('/wechat/jsConfig', data)
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"payment" : {
|
||||
@ -53,7 +55,8 @@
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"ad" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
18
pages.json
18
pages.json
@ -134,6 +134,24 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "contract/contract",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "合同签订",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "contractDetail/contractDetail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "合同详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
@ -6,10 +6,12 @@
|
||||
<view class="login-card">
|
||||
<view class="top">
|
||||
<view class="text item">
|
||||
<u-tabs :list="[{name:'账号登录'},{name:'手机登录'}]" @click="changeTabs" lineColor="#3274F9" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"></u-tabs>
|
||||
<u-tabs :list="[{name:'账号登录'},{name:'手机登录'}]" @click="changeTabs" lineColor="#3274F9"
|
||||
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"></u-tabs>
|
||||
</view>
|
||||
<input v-if="current==0" class="mobile item" v-model="formData.account" placeholder="输入账号" />
|
||||
<input v-if="current==0" class="mobile item" v-model="formData.password" placeholder="输入密码" password type="safe-password"/>
|
||||
<input v-if="current==0" class="mobile item" v-model="formData.password" placeholder="输入密码" password
|
||||
type="safe-password" />
|
||||
<input v-if="current==1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
||||
<view v-if="current==1" class="code item">
|
||||
<input placeholder="输入验证码" v-model="formData.code" />
|
||||
@ -36,7 +38,7 @@
|
||||
account: 'admin123',
|
||||
password: 'qq123456',
|
||||
code: '',
|
||||
terminal: 3,
|
||||
terminal: 6, //6是APP端
|
||||
scene: 1
|
||||
}
|
||||
};
|
||||
@ -73,8 +75,34 @@
|
||||
// }
|
||||
// })
|
||||
|
||||
},
|
||||
initTerminal() {
|
||||
// #ifndef APP-PLUS
|
||||
this.formData.terminal = 6;
|
||||
// #endif
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
const platform = res.platform.toLowerCase();
|
||||
if (platform === 'ios') {
|
||||
this.formData.terminal = 5;
|
||||
} else if (platform === 'windows') {
|
||||
this.formData.terminal = 4;
|
||||
} else if (platform === 'mac') {
|
||||
this.formData.terminal = 4;
|
||||
}
|
||||
}
|
||||
})
|
||||
// #ifdef H5
|
||||
this.formData.terminal = 3;
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
this.formData.terminal = 1;
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTerminal();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -159,6 +187,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
input {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
@ -167,6 +196,7 @@
|
||||
color: #3274F9;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -204,7 +204,8 @@ export const oaHomeData = [
|
||||
},
|
||||
{
|
||||
text: '合同签订',
|
||||
icon: prefix + 'oa/cgsq@2x.png'
|
||||
icon: prefix + 'oa/cgsq@2x.png',
|
||||
url: '/subpkg/contract/contract'
|
||||
},
|
||||
{
|
||||
text: '公司管理',
|
||||
|
@ -35,7 +35,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {recharge, payWay, payPrepay} from "@/api/pay.js"
|
||||
import {recharge, payWay, payPrepay, wechatJsConfig} from "@/api/pay.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -62,7 +62,37 @@ export default {
|
||||
order_id: data.order_id,
|
||||
pay_way: res.data.lists[0].pay_way
|
||||
})
|
||||
console.log(res1);
|
||||
console.log(res1.data, res1.data.config.package.split('=')[1]);
|
||||
let obj = {
|
||||
"appid": res1.data.config.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
|
||||
"noncestr": res1.data.config.nonceStr, // 随机字符串
|
||||
"package": res1.data.config.package, // 固定值
|
||||
"partnerid": res1.data.config.partnerid, // 微信支付商户号
|
||||
"prepayid": res1.data.config.package.split('=')[1], // 统一下单订单号
|
||||
"timestamp": res1.data.config.timestamp, // 时间戳(单位:秒)
|
||||
"sign": res1.data.config.paySign
|
||||
}
|
||||
console.log(obj);
|
||||
uni.getProvider({
|
||||
service:'payment',
|
||||
success: (paymentList) => {
|
||||
// console.log(paymentList);
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
// orderInfo: res1.data.config,
|
||||
orderInfo: obj,
|
||||
success: (e) => {
|
||||
console.log('成功', e);
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log('error', e);
|
||||
},
|
||||
complete: () => {
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user