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"; ...@@ -11,6 +11,7 @@ import {learnApiFun} from "@/common/api/learn.js";
import { orderApiFun } from "@/common/api/order.js"; import { orderApiFun } from "@/common/api/order.js";
import {assessmentApiFun} from"@/common/api/assessment.js" import {assessmentApiFun} from"@/common/api/assessment.js"
import {certApiFun} from"@/common/api/cert.js" import {certApiFun} from"@/common/api/cert.js"
import {contractApiFun} from "@/common/api/contract.js"
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
...@@ -19,6 +20,7 @@ let apiFun = function(vm) { ...@@ -19,6 +20,7 @@ let apiFun = function(vm) {
let assessmentApi = assessmentApiFun(vm) let assessmentApi = assessmentApiFun(vm)
let orderApi=orderApiFun(vm) let orderApi=orderApiFun(vm)
let certApi=certApiFun(vm) let certApi=certApiFun(vm)
let contractApi=contractApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...@@ -26,7 +28,8 @@ let apiFun = function(vm) { ...@@ -26,7 +28,8 @@ let apiFun = function(vm) {
...learnApi, ...learnApi,
...orderApi, ...orderApi,
...assessmentApi, ...assessmentApi,
...certApi ...certApi,
...contractApi
} }
return apiUrl return apiUrl
} }
......
...@@ -180,7 +180,14 @@ ...@@ -180,7 +180,14 @@
"navigationBarTitleText": "",//证件详情 "navigationBarTitleText": "",//证件详情
"navigationStyle":"custom" "navigationStyle":"custom"
} }
} },
{
"path":"contract/index",
"style":{
"navigationBarTitleText":"",//我的合同
"navigationStyle":"custom"
}
}
] ]
}, },
{ {
...@@ -483,11 +490,11 @@ ...@@ -483,11 +490,11 @@
"name": "学习 - 首页", //模式名称 "name": "学习 - 首页", //模式名称
"path": "pages/index/learn", //启动页面,必选 "path": "pages/index/learn", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "我的 - 我的证件 - 列表", //模式名称 "name": "我的 - 我的证件 - 列表", //模式名称
"path": "pages/mine/cert/list", //启动页面,必选 "path": "pages/mine/cert/list", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
} }
] ]
} }
......
...@@ -8,20 +8,21 @@ ...@@ -8,20 +8,21 @@
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<text class="title">合同清单</text> <text class="title">合同清单</text>
<view class="jf-currency-class"> <view class="jf-currency-class" v-for="item in res" :key="item.id">
<view class="left"> 自营平台技 工入驻签约 合同 </view> <view class="left">{{ item.name }}</view>
<view class="text1">自营平台技工入驻签约合同</view> <view class="text1">{{ item.name }}</view>
<view class="text2">下载时间: 2021.05.06 14:25:00</view> <view class="text2">下载时间: {{ item.create_at }}</view>
</view> </view>
<view class="jf-currency-class"> <!-- <view class="jf-currency-class">
<view class="left">新风机技工入驻签约合同</view> <view class="left">新风机技工入驻签约合同</view>
<view class="text1">《新风机技工入驻签约合同》</view> <view class="text1">《新风机技工入驻签约合同》</view>
<view class="text2">下载时间: 2021.05.06 15:01:48</view> <view class="text2">下载时间: 2021.05.06 15:01:48</view>
</view> </view> -->
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import moment from "moment";
export default { export default {
data() { data() {
return { return {
...@@ -36,10 +37,66 @@ export default { ...@@ -36,10 +37,66 @@ export default {
// 渐变色 // 渐变色
// backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))' // backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
}, },
res: [],
type: "充电桩",
}; };
}, },
onLoad() {}, onLoad() {
methods: {}, 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> </script>
......
<template> <template>
<view class="wallet-view"> <view class="wallet-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="我的钱包" titleColor="#333333" :border-bottom="false"></u-navbar> <u-navbar
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image> back-icon-color="#333333"
<view class="survey-view"> background="#F4F5F7"
<view class="survey-top-view"> title="我的钱包"
<view class="survey-top-left"> titleColor="#333333"
<view>账户总资产(元)</view> :border-bottom="false"
<view>{{info.totalPayAmount}}</view> ></u-navbar>
</view> <image
<view class="survey-top-right"> class="header-image"
<u-button>提现</u-button> mode="widthFix"
</view> :src="qianbaobeijing"
</view> ></image>
<view class="survey-bottom-view"> <view class="survey-view">
<view v-for="(value, key) in items" :key="key"> <view class="survey-top-view">
<view>{{value}}</view> <view class="survey-top-left">
<view>{{info[key]}}</view> <view>账户总资产(元)</view>
</view> <view>{{ info.totalPayAmount }}</view>
</view> </view>
</view> <view class="survey-top-right">
<view class="content-view"> <u-button>提现</u-button>
<view v-for="(item, index) in lists" :class="['content-list', {'first': index==0}]" :key="index"> </view>
<view class="content-list-left"> </view>
<image class="content-list-image" :src="item.icon"></image> <view class="survey-bottom-view">
<view class="content-list-text"> <view v-for="(value, key) in items" :key="key">
<view class="content-list-text-title">{{item.title}}</view> <view>{{ value }}</view>
<view>{{item.content}}</view> <view>{{ info[key] }}</view>
</view> </view>
</view> </view>
<view class="content-list-right"> </view>
<text class="content-list-right-text">点击查看</text> <view class="content-view">
<u-icon name="arrow-right"></u-icon> <view
</view> v-for="(item, index) in lists"
</view> :class="['content-list', { first: index == 0 }]"
</view> :key="index"
<view class="list-view"> >
<view class="content-list-left">
</view> <image class="content-list-image" :src="item.icon"></image>
</view> <view class="content-list-text">
<view class="content-list-text-title">{{
item.title
}}</view>
<view>{{ item.content }}</view>
</view>
</view>
<view class="content-list-right">
<text class="content-list-right-text">点击查看</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<view class="list-view"> </view>
</view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
info: { info: {
canApplyAmount: 0, // 可提现金额 canApplyAmount: 0, // 可提现金额
saveApplyCount: 0, // 已申请提现的支付单数 saveApplyCount: 0, // 已申请提现的支付单数
canApplyCount: 0, // 可申请提现的支付单数 canApplyCount: 0, // 可申请提现的支付单数
saveAndApplyAmount: 0, // 已申请提现金额 saveAndApplyAmount: 0, // 已申请提现金额
totalPayAmount: 0, // 总共收入 totalPayAmount: 0, // 总共收入
/* 还没对字段名 */ /* 还没对字段名 */
dairuzhang: 0, // 预计待入账 dairuzhang: 0, // 预计待入账
} },
} };
}, },
computed: { computed: {
lists() { lists() {
return [{ return [
title: '结算账单', {
content: '展示您已提现的账单信息', title: "结算账单",
icon: this.imageUrl + 'jiesuan.png' content: "展示您已提现的账单信息",
},{ icon: this.imageUrl + "jiesuan.png",
title: '收入流水', },
content: '当前展示最近5条,点击查看全部', {
icon: this.imageUrl + 'liushui.png' title: "收入流水",
}] content: "当前展示最近5条,点击查看全部",
}, icon: this.imageUrl + "liushui.png",
items() { },
return {canApplyAmount:'可提现(元)', dairuzhang:'预计待入账(元)'} ];
}, },
imageUrl() { items() {
return process.uniEnv.qn_base_url return {
}, canApplyAmount: "可提现(元)",
qianbaobeijing() { dairuzhang: "预计待入账(元)",
return this.imageUrl + 'qianbaobeijing.png' };
}, },
}, imageUrl() {
methods: { return process.uniEnv.qn_base_url;
},
} qianbaobeijing() {
} return this.imageUrl + "qianbaobeijing.png";
},
},
methods: {},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wallet-view { .wallet-view {
position: relative; position: relative;
height: 100vh; height: 100vh;
overflow: auto; overflow: auto;
background-color: #F4F5F7; background-color: #f4f5f7;
.header-image {
position: absolute;
width: 100%;
margin-left: 4rpx;
margin-top: 10rpx;
}
.survey-view {
position: relative;
height: 400rpx;
margin: 30rpx 30rpx 10rpx 30rpx;
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 {
display: flex;
justify-content: space-between;
}
}
.content-view {
position: relative;
padding: 0 30rpx;
.content-list {
height: 140rpx;
border-radius: 12rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #FFFFFF;
&.first {
margin-bottom: 20rpx;
}
.content-list-left {
display: flex;
.content-list-image {
width: 56rpx;
height: 56rpx;
margin-top: 2rpx;
}
.content-list-text {
font-size: 24rpx;
color: #666666;
margin-left: 20rpx;
.content-list-text-title {
font-size: 32rpx;
color: #333333;
}
}
}
.content-list-right {
color: #2272FF;
font-size: 26rpx;
.content-list-right-text {
margin-right: 4rpx;
}
}
}
}
.list-view {
position: relative;
}
}
.header-image {
position: absolute;
width: 100%;
margin-left: 4rpx;
margin-top: 10rpx;
}
.survey-view {
position: relative;
height: 400rpx;
margin: 30rpx 30rpx 10rpx 30rpx;
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 {
display: flex;
justify-content: space-between;
}
}
.content-view {
position: relative;
padding: 0 30rpx;
.content-list {
height: 140rpx;
border-radius: 12rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #ffffff;
&.first {
margin-bottom: 20rpx;
}
.content-list-left {
display: flex;
.content-list-image {
width: 56rpx;
height: 56rpx;
margin-top: 2rpx;
}
.content-list-text {
font-size: 24rpx;
color: #666666;
margin-left: 20rpx;
.content-list-text-title {
font-size: 32rpx;
color: #333333;
}
}
}
.content-list-right {
color: #2272ff;
font-size: 26rpx;
.content-list-right-text {
margin-right: 4rpx;
}
}
}
}
.list-view {
position: relative;
}
}
</style> </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