修改支付功能,优化合同详情
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 payPrepay = (data) => oahttp.post('/pay/prepay', data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付配置
|
||||||
|
*/
|
||||||
|
export const wechatJsConfig = (data) => oahttp.get('/wechat/jsConfig', data)
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {},
|
"ios" : {
|
||||||
|
"dSYMs" : false
|
||||||
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"payment" : {
|
"payment" : {
|
||||||
@ -53,7 +55,8 @@
|
|||||||
"appid" : "__UNI__3A527D1",
|
"appid" : "__UNI__3A527D1",
|
||||||
"UniversalLinks" : ""
|
"UniversalLinks" : ""
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"ad" : {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
18
pages.json
18
pages.json
@ -134,6 +134,24 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "contract/contract",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "合同签订",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "contractDetail/contractDetail",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "合同详情",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
|
@ -6,13 +6,15 @@
|
|||||||
<view class="login-card">
|
<view class="login-card">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="text item">
|
<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>
|
</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.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="输入手机号" />
|
<input v-if="current==1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
||||||
<view v-if="current==1" class="code item">
|
<view v-if="current==1" class="code item">
|
||||||
<input placeholder="输入验证码" v-model="formData.code"/>
|
<input placeholder="输入验证码" v-model="formData.code" />
|
||||||
<view class="get-code">获取验证码</view>
|
<view class="get-code">获取验证码</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
@ -36,15 +38,15 @@
|
|||||||
account: 'admin123',
|
account: 'admin123',
|
||||||
password: 'qq123456',
|
password: 'qq123456',
|
||||||
code: '',
|
code: '',
|
||||||
terminal: 3,
|
terminal: 6, //6是APP端
|
||||||
scene: 1
|
scene: 1
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeTabs(e){
|
changeTabs(e) {
|
||||||
this.current = e.index;
|
this.current = e.index;
|
||||||
this.formData.scene = e.index+1;
|
this.formData.scene = e.index + 1;
|
||||||
},
|
},
|
||||||
async login() {
|
async login() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -56,7 +58,7 @@
|
|||||||
token: res.data.token
|
token: res.data.token
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url:'/pages/oaHome/oaHome'
|
url: '/pages/oaHome/oaHome'
|
||||||
})
|
})
|
||||||
// uni.request({
|
// uni.request({
|
||||||
// url: 'https://worker-task.lihaink.cn/api/login/account',
|
// url: 'https://worker-task.lihaink.cn/api/login/account',
|
||||||
@ -72,8 +74,34 @@
|
|||||||
// this.res = res.data.m
|
// this.res = res.data.m
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
},
|
||||||
|
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>
|
</script>
|
||||||
@ -159,7 +187,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
input{
|
|
||||||
|
input {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +196,8 @@
|
|||||||
color: #3274F9;
|
color: #3274F9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn{
|
|
||||||
|
.btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,8 @@ export const oaHomeData = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '合同签订',
|
text: '合同签订',
|
||||||
icon: prefix + 'oa/cgsq@2x.png'
|
icon: prefix + 'oa/cgsq@2x.png',
|
||||||
|
url: '/subpkg/contract/contract'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '公司管理',
|
text: '公司管理',
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {recharge, payWay, payPrepay} from "@/api/pay.js"
|
import {recharge, payWay, payPrepay, wechatJsConfig} from "@/api/pay.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -62,7 +62,37 @@ export default {
|
|||||||
order_id: data.order_id,
|
order_id: data.order_id,
|
||||||
pay_way: res.data.lists[0].pay_way
|
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() {
|
onPullDownRefresh() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user