完善合同功能,对接公告接口,优化支付提示

This commit is contained in:
weipengfei 2023-07-20 16:32:30 +08:00
parent 3852df8598
commit 75bf2692d0
13 changed files with 521 additions and 326 deletions

12
api/contract.js Normal file
View File

@ -0,0 +1,12 @@
import oahttp from "@/utils/oahttp.js";
/**
* ºÏͬÁбí
*/
export const contractList = (data) => oahttp.get('/contract/index', data)
/**
* ºÏͬÏêÇé
*/
export const contractView = (data) => oahttp.get('/contract/view', data)

6
api/notice.js Normal file
View File

@ -0,0 +1,6 @@
import oahttp from "@/utils/oahttp.js";
/**
* 公告列表
*/
export const noticeList = (data) => oahttp.get('/article/lists', data)

View File

@ -20,3 +20,7 @@ export const payPrepay = (data) => oahttp.post('/pay/prepay', data)
*/
export const wechatJsConfig = (data) => oahttp.get('/wechat/jsConfig', data)
/**
* 支付状态
*/
export const payStatus = (data) => oahttp.get('/pay/payStatus', data)

8
babel.config.js Normal file
View File

@ -0,0 +1,8 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
],
plugins: [
'@babel/plugin-proposal-optional-chaining'
]
}

View File

@ -52,7 +52,7 @@
"payment" : {
"weixin" : {
"__platform__" : [ "android" ],
"appid" : "__UNI__3A527D1",
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : ""
}
},

View File

@ -5,7 +5,10 @@
"path": "pages/oaHome/oaHome",
"style": {
"navigationBarTitleText": "首页",
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false
}
}
},
{
@ -29,12 +32,18 @@
{
"path": "pages/oaMy/oaMy",
"style": {
"navigationBarTitleText": "我的"
"navigationBarTitleText": "我的",
"app-plus": {
"titleNView": false
}
}
}, {
"path": "pages/oaLogin/oaLogin",
"style": {
"navigationBarTitleText": "登录"
"navigationBarTitleText": "登录",
"app-plus": {
"titleNView": false
}
}
}, {

View File

@ -1,6 +1,9 @@
<template>
<view class="oa_home" style="oaColor">
<image class="header_bg" src="../../static/img/home/head-bg.png"></image>
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view>
<!-- #endif -->
<view class="home_header">
<view class="my_info flex_a_c">
<view class="">
@ -37,8 +40,8 @@
</view>
</view>
<block v-for="(item,index) in ApproveList.slice(0,2)" :key="index">
<view class="backlog_item flex_a_c_j_sb" @click="backlogDetails">
<view class="text">{{ item.content }}</view>
<view class="backlog_item flex_a_c_j_sb" @click="clickNotice(item.id)">
<view class="text">{{ item.title }}</view>
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
</view>
</block>
@ -96,6 +99,7 @@
<script>
import { Toast } from '@/libs/uniApi.js'
import { oaHomeData } from '@/static/server/server.js'
import {noticeList} from "@/api/notice.js"
// import tabbar from '../components/tabbar'
import { getIndexListAPI, getTaskListAPI, getMyTaskListAPI, getApproveListAPI, getUserIndexAPI } from '@/api/oaApi.js'
export default {
@ -149,7 +153,7 @@
onShow() {
// this.getUserIndex()
// this.getIndexList()
// this.getApproveList()
this.getApproveList()
this.initUserInfo()
},
computed: {},
@ -170,8 +174,12 @@
this.$store.state.app.userInfo ? this.myOaInfo = this.$store.state.app.userInfo : null;
},
async getApproveList() {
const res = await getApproveListAPI({ status: 1 })
this.ApproveList = res.data
const res = await noticeList({
cid: 1,
sort: 'new',
keyword: '',
})
this.ApproveList = res.data.lists
},
async getIndexList() {
const { project, task } = await getIndexListAPI()
@ -204,8 +212,9 @@
url: url,
}) : Toast('暂未开放')
},
backlogDetails() {
Toast('点击待办事项')
//
clickNotice(){
Toast('点击公告')
},
async getUserIndex() {
const res = await getUserIndexAPI()
@ -296,6 +305,10 @@
.text {
font-size: 28.04rpx;
white-space: nowrap; /* 禁止换行 */
overflow: hidden; /* 溢出隐藏 */
text-overflow: ellipsis; /* 使用省略号代表被截断的文本 */
width: 580rpx; /* 设置元素宽度,根据需要进行调整 */
&::before {
content: '提醒';

View File

@ -1,6 +1,9 @@
<template>
<view class="login">
<image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image>
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view>
<!-- #endif -->
<view class="body">
<view class="title">欢迎进入里海供销平台</view>
<view class="login-card">

View File

@ -2,6 +2,9 @@
<view class="my">
<view class="head_box">
<image class="head_img" src="../../static/img/home/head-bg.png"></image>
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view>
<!-- #endif -->
<view v-if="!oaUserInfo" class="my_head">
<view class="department flex_a_c">
<view class="section">产品技术部</view>
@ -35,12 +38,12 @@
<view class="num">1000</view>
<view class="name">可提现金额</view>
</view>
<view class="cent_item">
<view class="cent_item" @click="naviTo('/subpkg/finance/finance')">
<!-- <view class="num">{{ oaUserInfo.department_money }}</view> -->
<view class="num">0</view>
<view class="name">冻结金额</view>
</view>
<view class="cent_item">
<view class="cent_item" @click="naviTo('/subpkg/finance/finance')">
<!-- <view class="num">{{ oaUserInfo.company_money }}</view> -->
<view class="num">0</view>
<view class="name">充值金额</view>

View File

@ -2,24 +2,25 @@
<view class="">
<view class="tabs">
<view class="left">
<view class="item active">合同列表</view>
<view class="item">已签订合同</view>
<view class="item" :class="changeType==0?'active':''" @click="changeType=0">合同列表</view>
<view class="item" :class="changeType==1?'active':''" @click="changeType=1">已签订合同</view>
</view>
<view class="right">
<text>新增</text>
</view>
</view>
<view class="contract_list">
<view class="item">
<view class="item" v-for="(item,index) in list" :key="item.id">
<view class="top">
<image src="../../static/img/contract/contract.png"></image>
<view class="text">
<view class="name">
<text class="title">合同名称</text>
<text class="number">合同编号5464643423423</text>
<view class="title">合同名称合同名称合同名称</view>
<view class="number">合同编号{{item.contract_no}}</view>
</view>
<view class="date">
<text class="time">2023-04-27 2024-04-28 </text>
<!-- <text class="time">2023-04-27 2024-04-28 </text> -->
<text class="time">修改时间:{{item.update_time}}</text>
<text class="expire">365天后到期</text>
</view>
</view>
@ -28,7 +29,7 @@
<view class="bottom">
<view class="left">已签订</view>
<!-- <view class="left red">已到期</view> -->
<button class="right" @click="naviTo('/subpkg/contractDetail/contractDetail')">详情</button>
<button class="right" @click="naviTo('/subpkg/contractDetail/contractDetail?id='+item.id)">详情</button>
</view>
</view>
</view>
@ -36,142 +37,182 @@
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {},
onShow() {},
methods: {
naviTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
import { contractList } from "@/api/contract.js"
export default {
data() {
return {
changeType: 0,
list: []
}
},
},
onPullDownRefresh() {
onLoad() {},
onShow() {
this.initContractList()
},
methods: {
naviTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
async initContractList() {
let res = await contractList();
if (res?.data?.data.length > 0) {
this.list = res.data.data;
}
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.tabs{
height: 112rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 28rpx;
.left{
.tabs {
height: 112rpx;
background-color: #fff;
display: flex;
.item{
margin-right: 52.5rpx;
width: 175rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
background-color: #F3F4F8FF;
border-radius: 35rpx 35rpx 35rpx 35rpx;
justify-content: space-between;
align-items: center;
padding: 0 28rpx;
.left {
display: flex;
.item {
margin-right: 52.5rpx;
width: 175rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
background-color: #F3F4F8FF;
border-radius: 35rpx 35rpx 35rpx 35rpx;
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.active {
background-color: #3274F9FF;
color: #FFFFFFFF;
}
}
.right {
font-size: 28rpx;
font-weight: 400;
color: #999999;
}
.active{
background-color: #3274F9FF;
color: #FFFFFFFF;
line-height: 0rpx;
-webkit-background-clip: text;
}
}
.right{
font-size: 28rpx;
font-weight: 400;
color: #999999;
line-height: 0rpx;
-webkit-background-clip: text;
}
}
.contract_list{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 28rpx;
.item{
width: 694rpx;
height: 263rpx;
padding: 28rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
.contract_list {
display: flex;
flex-direction: column;
justify-content: space-between;
.top{
align-items: center;
padding: 28rpx;
.item {
width: 694rpx;
height: 263rpx;
padding: 28rpx;
margin-bottom: 28rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
image{
width: 87.6rpx;
height: 87.6rpx;
margin-right: 28rpx;
}
.text{
flex: 1;
flex-direction: column;
justify-content: space-between;
.top {
display: flex;
flex-direction: column;
justify-content: space-between;
.name{
.title{
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 17.5rpx;
image {
width: 87.6rpx;
height: 87.6rpx;
margin-right: 28rpx;
}
.text {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
display: flex;
justify-content: space-between;
align-items: flex-end;
.title {
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 17.5rpx;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
/* 使用省略号代表被截断的文本 */
// width: 100rpx;
flex: 1;
/* 设置元素宽度,根据需要进行调整 */
}
.number {
font-size: 25rpx;
font-weight: 400;
color: #3274F9;
}
}
.number{
.date {
font-size: 25rpx;
font-weight: 400;
color: #3274F9;
}
}
.date{
font-size: 25rpx;
font-weight: 400;
color: #F9AA32;
.time{
color: #CCCCCCFF;
margin-right: 10rpx;
color: #F9AA32;
.time {
color: #CCCCCCFF;
margin-right: 10rpx;
}
}
}
}
}
.bottom{
display: flex;
justify-content: space-between;
.left{
font-size: 28rpx;
font-weight: 400;
color: #34A853;
}
.red{
color: #F02828FF;
}
.right{
width: 158rpx;
height: 53rpx;
.bottom {
display: flex;
justify-content: center;
align-items: center;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
opacity: 1;
border: 2rpx solid #3274F9;
font-size: 28rpx;
font-weight: 400;
color: #3274F9;
justify-content: space-between;
.left {
font-size: 28rpx;
font-weight: 400;
color: #34A853;
}
.red {
color: #F02828FF;
}
.right {
width: 158rpx;
height: 53rpx;
display: flex;
justify-content: center;
align-items: center;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
opacity: 1;
border: 2rpx solid #3274F9;
font-size: 28rpx;
font-weight: 400;
color: #3274F9;
}
}
}
}
}
</style>
</style>

View File

@ -5,10 +5,10 @@
<view class="card">
<view class="top">
<view class="left">
<image ></image>
<image></image>
<view class="text">
<view class="name">公司名称</view>
<view class="code">社会代码000000</view>
<view class="name">{{company.company_name}}</view>
<view class="code">社会代码{{company.organization_code}}</view>
</view>
</view>
<view class="right">公司类型</view>
@ -25,20 +25,20 @@
<view class="one">
<view class="linkman">主要联系人</view>
<view class="info">
<view class="info_item">姓名张三三</view>
<view class="info_item">职位公司总经理</view>
<view class="info_item">联系电话0830-123456</view>
<view class="info_item">邮箱123456789@qq.com</view>
<view class="info_item">姓名{{company.master_name}}</view>
<view class="info_item">职位{{company.master_position}}</view>
<view class="info_item">联系电话{{company.master_phone}}</view>
<view class="info_item">邮箱{{company.master_email}}</view>
</view>
</view>
<view style="height: 32rpx;"></view>
<view class="one">
<view class="one" v-for="(other, index) in company.other_contacts" :key="index">
<view class="linkman">其他联系人</view>
<view class="info">
<view class="info_item">姓名张三三</view>
<view class="info_item">职位公司总经理</view>
<view class="info_item">联系电话0830-123456</view>
<view class="info_item">邮箱123456789@qq.com</view>
<view class="info_item">姓名{{other.name}}</view>
<view class="info_item">职位{{company.position}}</view>
<view class="info_item">联系电话{{other.phone}}</view>
<view class="info_item">邮箱{{other.email}}</view>
</view>
</view>
</view>
@ -46,19 +46,19 @@
<view class="item">
<view class="title">资质信息</view>
<view class="image_box">
<image class="left"></image>
<image class="right"></image>
<image class="left" @click="priview(company.qualification.bank_account)" :src="company.qualification.bank_account"></image>
<image class="right" @click="priview(company.qualification.business_license)" :src="company.qualification.business_license"></image>
</view>
</view>
<view class="item">
<view class="title">电子合同</view>
<view class="card">
<view class="one">
<view class="linkman">签约公司名称</view>
<view class="linkman">公司名称</view>
<view class="info">
<view class="info_item">签约对象被签约对象名称</view>
<view class="info_item">合同类型系统获取</view>
<view class="info_item">合同编号系统获取</view>
<view class="info_item">合同类型{{contract.type}}</view>
<view class="info_item">合同编号{{contract.contract_no}}</view>
</view>
</view>
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
@ -66,11 +66,15 @@
<view class="left">
<image class="contract_img" src="../../static/img/contract/contract.png"></image>
<view class="text">
<view class="name">劳务派遣合同</view>
<view><text class="nickname">张郭郭</text><text>2023年01月01日</text></view>
<view class="name">合同</view>
<view>
<!-- <text class="nickname">张郭郭</text> -->
<text>{{contract.create_time}}</text>
</view>
</view>
</view>
<view class="right" @click="naviTo('/subpkg/pdfView/pdfView?url=' + 'https://lihai001.oss-cn-chengdu.aliyuncs.com/uploads/20230130/1.pdf')">
<view class="right"
@click="naviTo('/subpkg/pdfView/pdfView?url=' + contract.file)">
<!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
@ -78,202 +82,280 @@
</view>
</view>
</view>
<button class="back_btn">返回</button>
<button class="stop_btn">终止合同</button>
<button class="back_btn" @click="naviBack">返回</button>
<!-- <button class="stop_btn">终止合同</button> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {},
onShow() {},
methods: {
naviTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
import { contractView } from "@/api/contract.js"
export default {
data() {
return {
company: {
qualification: {
bank_account:"",
bank_accountB:"",
business_license:"",
business_licenseB:"",
},
},
contract: {},
users: []
}
},
},
onPullDownRefresh() {
onLoad(options) {
this.initContract(options.id)
},
onShow() {},
methods: {
naviTo(url) {
url ?
uni.navigateTo({
url: url
}) : Toast('暂未开放')
},
naviBack(){
uni.navigateBack()
},
async initContract(id) {
let res = await contractView({ id });
this.company = res.data.company;
this.user = res.data.user;
this.contract = res.data.contract;
console.log(res.data);
},
//
priview(url){
uni.previewImage({
urls:[url],
longPressActions: {
itemList: ['保存图片'],
success: function(data) {
if (data.tapIndex === 0) {
uni.saveImageToPhotosAlbum({
filePath: url,
success: function() {
uni.showToast({
title: '保存成功',
icon: 'success'
})
},
fail: function() {
uni.showToast({
title: '保存失败',
icon: 'none'
})
}
})
}
}
}
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.item{
padding: 31.5rpx 28rpx;
.title{
margin-bottom: 21rpx;
font-size: 35rpx;
font-weight: 500;
color: #333333;
display: flex;
justify-content: space-between;
}
.card{
width: 694rpx;
// height: 231rpx;
padding: 28rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.top{
.item {
padding: 31.5rpx 28rpx;
.title {
margin-bottom: 21rpx;
font-size: 35rpx;
font-weight: 500;
color: #333333;
display: flex;
justify-content: space-between;
.left{
display: flex;
image{
width: 102rpx;
height: 102rpx;
margin-right: 28rpx;
background: #CCCCCC;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
}
.text{
display: flex;
flex-direction: column;
justify-content: space-between;
.name{
font-size: 32rpx;
font-weight: 500;
color: rgba(0,0,0,0.8);
}
.code{
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
}
}
.right{
font-size: 28rpx;
font-weight: 500;
color: #3274F9;
}
}
.bottom{
display: flex;
align-items: center;
color: #666666FF;
margin-top: 32rpx;
.location{
margin-left: 28rpx;
}
}
.one{
.linkman{
height: 44rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
margin-bottom: 28rpx;
}
.info{
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 45rpx;
}
}
.contract{
.card {
width: 694rpx;
// height: 231rpx;
padding: 28rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.left{
.top {
display: flex;
.contract_img{
width: 102rpx;
height: 102rpx;
background: #F5F5F5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.text{
justify-content: space-between;
.left {
display: flex;
flex-direction: column;
justify-content: space-between;
.name{
font-size: 32rpx;;
font-weight: 500;
color: rgba(0,0,0,0.8);
line-height: 35rpx;
image {
width: 102rpx;
height: 102rpx;
margin-right: 28rpx;
background: #CCCCCC;
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
}
.nickname{
margin-right: 35rpx;
}
text{
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.code {
font-size: 28rpx;
font-weight: 400;
color: #666666;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: #3274F9;
}
}
.right{
font-size: 28rpx;
font-weight: 500;
color: #3274F9;
line-height: 35rpx;
.bottom {
display: flex;
justify-content: center;
align-items: center;
.icon{
width: 35rpx;
height: 39rpx;
background-color: #3274F9;
opacity: 1;
margin-right: 10rpx
color: #666666FF;
margin-top: 32rpx;
.location {
margin-left: 28rpx;
}
}
.one {
.linkman {
height: 44rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
margin-bottom: 28rpx;
}
.info {
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 45rpx;
}
}
.contract {
display: flex;
justify-content: space-between;
.left {
display: flex;
.contract_img {
width: 102rpx;
height: 102rpx;
background: #F5F5F5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.nickname {
margin-right: 35rpx;
}
text {
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: #3274F9;
line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 35rpx;
height: 39rpx;
background-color: #3274F9;
opacity: 1;
margin-right: 10rpx
}
}
}
}
.image_box {
display: flex;
justify-content: space-between;
.left {
width: 224rpx;
height: 319rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}
.right {
width: 450rpx;
height: 318rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}
}
}
.image_box{
.back_btn {
width: 694rpx;
height: 84rpx;
background: #3274F9;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: space-between;
.left{
width: 224rpx;
height: 319rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}
.right{
width: 450rpx;
height: 318rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}
justify-content: center;
align-items: center;
color: #fff;
margin: 30rpx auto;
}
}
.back_btn{
width: 694rpx;
height: 84rpx;
background: #3274F9;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
margin: 30rpx auto;
}
.stop_btn{
width: 694rpx;
height: 84rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: #3274F9;
background-color: transparent;
margin: 30rpx auto;
}
</style>
.stop_btn {
width: 694rpx;
height: 84rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx;
display: flex;
justify-content: center;
align-items: center;
color: #3274F9;
background-color: transparent;
margin: 30rpx auto;
}
</style>

View File

@ -11,6 +11,13 @@
账户充值
</view>
</view>
<view class="center">
<view>
<text style="margin-right: 20rpx;">账户总金额()</text><uni-icons type="eye" color="#fff"></uni-icons>
</view>
<view>1338.96</view>
<view>可提现金额</view>
</view>
</view>
</view>
</template>
@ -65,5 +72,8 @@ export default {
color: #FFFFFF;
}
}
.center{
color: #fff;
}
}
</style>

View File

@ -32,7 +32,7 @@
</template>
<script>
import { recharge, payWay, payPrepay, wechatJsConfig } from "@/api/pay.js"
import { recharge, payWay, payPrepay, wechatJsConfig, payStatus } from "@/api/pay.js"
export default {
data() {
return {
@ -95,17 +95,21 @@
success: (e) => {
console.log('成功', e);
uni.hideLoading();
uni.showToast({
icon:'success',
title:'支付成功!'
payStatus({
order_id: data.order_id,
from: data.from,
}).then((status)=>{
uni.showToast({
icon:status.data.pay_status?'success':'error',
title: status.data.pay_status?'支付成功!':'支付失败!'
})
})
},
fail: (e) => {
console.log('error', e);
uni.hideLoading();
uni.showToast({
icon:'error',
title: e.errMsg
title: '支付失败!'
})
},
complete: () => {},