Commit 1c64cece authored by zhengzy's avatar zhengzy

dd

parent 9d0fd03b
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
const collegeApiUrl = globalUrl.ucenterUrl.xueUrl
const testApiUrl = globalUrl.systemUrl.apiUrl
let contractApiFun = function(vm){
//我的合同//
Mycontract = async (params)=>await vm.$u.get(ucenterApiUrl+'/v1/settled-contract/info'+'?Authorization='+ vm.vuex_token + params)
const contract = {
Mycontract
}
return contract
}
module.exports = {
contractApiFun
}
......@@ -11,6 +11,7 @@ import {learnApiFun} from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js";
import {assessmentApiFun} from"@/common/api/assessment.js"
import {certApiFun} from"@/common/api/cert.js"
import {contractApiFun} from "@/common/api/contract.js"
let apiFun = function(vm) {
let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm)
......@@ -19,6 +20,7 @@ let apiFun = function(vm) {
let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm)
let certApi=certApiFun(vm)
let contractApi=contractApiFun(vm)
let apiUrl = {
...commonApi,
...settledApi,
......@@ -26,7 +28,8 @@ let apiFun = function(vm) {
...learnApi,
...orderApi,
...assessmentApi,
...certApi
...certApi,
...contractApi
}
return apiUrl
}
......
......@@ -180,6 +180,13 @@
"navigationBarTitleText": "",//证件详情
"navigationStyle":"custom"
}
},
{
"path":"contract/index",
"style":{
"navigationBarTitleText":"",//我的合同
"navigationStyle":"custom"
}
}
]
},
......
......@@ -8,20 +8,21 @@
></u-navbar>
<view class="content">
<text class="title">合同清单</text>
<view class="jf-currency-class">
<view class="left"> 自营平台技 工入驻签约 合同 </view>
<view class="text1">自营平台技工入驻签约合同</view>
<view class="text2">下载时间: 2021.05.06 14:25:00</view>
<view class="jf-currency-class" v-for="item in res" :key="item.id">
<view class="left">{{ item.name }}</view>
<view class="text1">{{ item.name }}</view>
<view class="text2">下载时间: {{ item.create_at }}</view>
</view>
<view class="jf-currency-class">
<!-- <view class="jf-currency-class">
<view class="left">新风机技工入驻签约合同</view>
<view class="text1">《新风机技工入驻签约合同》</view>
<view class="text2">下载时间: 2021.05.06 15:01:48</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import moment from "moment";
export default {
data() {
return {
......@@ -36,10 +37,66 @@ export default {
// 渐变色
// backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
},
res: [],
type: "充电桩",
};
},
onLoad() {},
methods: {},
onLoad() {
this.getContract(this.type);
},
computed: {},
methods: {
getContract(params) {
this.$u.api.Mycontract(params).then((res) => {
if (res.code == 200) {
if (res.data) {
let length = res.data.length;
for (let i = 0; i < length; i++) {
let data = new Date(
Number(res.data[i].create_at) * 1000
);
res.data[i].create_at = moment(data).format(
"yyyy.MM.DD HH:mm:ss"
);
}
this.res = this.res.concat(res.data);
console.log(this.res);
}
} else {
console.log(res.code);
}
});
},
add0(m) {
return m < 10 ? "0" + m : m;
},
// format(shijianchuo) {
// //shijianchuo是整数,否则要parseInt转换
// var time = new Date(shijianchuo * 1000);
// var y = time.getFullYear();
// var m = time.getMonth() + 1;
// var d = time.getDate();
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
// return (
// y +
// "." +
// this.add0(m) +
// "." +
// this.add0(d) +
// " " +
// this.add0(h) +
// ":" +
// this.add0(mm) +
// ":" +
// this.add0(s)
// );
// // },
// gettime(time) {
// moment(new Date(time).format("yyyy.MM.DD HH:mm:ss"));
// },
},
};
</script>
......
<template>
<view class="wallet-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="我的钱包" titleColor="#333333" :border-bottom="false"></u-navbar>
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image>
<u-navbar
back-icon-color="#333333"
background="#F4F5F7"
title="我的钱包"
titleColor="#333333"
:border-bottom="false"
></u-navbar>
<image
class="header-image"
mode="widthFix"
:src="qianbaobeijing"
></image>
<view class="survey-view">
<view class="survey-top-view">
<view class="survey-top-left">
<view>账户总资产(元)</view>
<view>{{info.totalPayAmount}}</view>
<view>{{ info.totalPayAmount }}</view>
</view>
<view class="survey-top-right">
<u-button>提现</u-button>
......@@ -14,18 +24,24 @@
</view>
<view class="survey-bottom-view">
<view v-for="(value, key) in items" :key="key">
<view>{{value}}</view>
<view>{{info[key]}}</view>
<view>{{ value }}</view>
<view>{{ info[key] }}</view>
</view>
</view>
</view>
<view class="content-view">
<view v-for="(item, index) in lists" :class="['content-list', {'first': index==0}]" :key="index">
<view
v-for="(item, index) in lists"
:class="['content-list', { first: index == 0 }]"
:key="index"
>
<view class="content-list-left">
<image class="content-list-image" :src="item.icon"></image>
<view class="content-list-text">
<view class="content-list-text-title">{{item.title}}</view>
<view>{{item.content}}</view>
<view class="content-list-text-title">{{
item.title
}}</view>
<view>{{ item.content }}</view>
</view>
</view>
<view class="content-list-right">
......@@ -34,14 +50,12 @@
</view>
</view>
</view>
<view class="list-view">
</view>
<view class="list-view"> </view>
</view>
</template>
<script>
export default {
export default {
data() {
return {
info: {
......@@ -52,43 +66,47 @@
totalPayAmount: 0, // 总共收入
/* 还没对字段名 */
dairuzhang: 0, // 预计待入账
}
}
},
};
},
computed: {
lists() {
return [{
title: '结算账单',
content: '展示您已提现的账单信息',
icon: this.imageUrl + 'jiesuan.png'
},{
title: '收入流水',
content: '当前展示最近5条,点击查看全部',
icon: this.imageUrl + 'liushui.png'
}]
return [
{
title: "结算账单",
content: "展示您已提现的账单信息",
icon: this.imageUrl + "jiesuan.png",
},
{
title: "收入流水",
content: "当前展示最近5条,点击查看全部",
icon: this.imageUrl + "liushui.png",
},
];
},
items() {
return {canApplyAmount:'可提现(元)', dairuzhang:'预计待入账(元)'}
return {
canApplyAmount: "可提现(元)",
dairuzhang: "预计待入账(元)",
};
},
imageUrl() {
return process.uniEnv.qn_base_url
return process.uniEnv.qn_base_url;
},
qianbaobeijing() {
return this.imageUrl + 'qianbaobeijing.png'
return this.imageUrl + "qianbaobeijing.png";
},
},
methods: {
}
}
methods: {},
};
</script>
<style lang="scss" scoped>
.wallet-view {
.wallet-view {
position: relative;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
background-color: #f4f5f7;
.header-image {
position: absolute;
......@@ -100,17 +118,15 @@
position: relative;
height: 400rpx;
margin: 30rpx 30rpx 10rpx 30rpx;
color: #FFFFFF;
color: #ffffff;
padding: 30rpx;
.survey-top-view {
display: flex;
justify-content: space-between;
align-items: flex-end;
.survey-top-left {
}
.survey-top-right {
}
}
.survey-bottom-view {
......@@ -128,7 +144,7 @@
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #FFFFFF;
background-color: #ffffff;
&.first {
margin-bottom: 20rpx;
}
......@@ -150,7 +166,7 @@
}
}
.content-list-right {
color: #2272FF;
color: #2272ff;
font-size: 26rpx;
.content-list-right-text {
margin-right: 4rpx;
......@@ -161,9 +177,6 @@
.list-view {
position: relative;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment