Commit 574c030c authored by 刘用法's avatar 刘用法
parents 47e3fc29 6500c99f
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
} }
......
...@@ -166,36 +166,36 @@ ...@@ -166,36 +166,36 @@
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarBackgroundColor":"#F4F5F7" "navigationBarBackgroundColor":"#F4F5F7"
} }
}, },
{ {
"path": "wallet/withdraw", "path": "wallet/withdraw",
"style": { "style": {
"navigationBarTitleText": "提现", "navigationBarTitleText": "提现",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true, "disableScroll": true,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarBackgroundColor":"#F4F5F7" "navigationBarBackgroundColor":"#F4F5F7"
} }
}, },
{ {
"path": "wallet/statement", "path": "wallet/statement",
"style": { "style": {
"navigationBarTitleText": "收入流水", "navigationBarTitleText": "收入流水",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true, "disableScroll": true,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarBackgroundColor":"#F4F5F7" "navigationBarBackgroundColor":"#F4F5F7"
} }
}, },
{ {
"path": "wallet/settlement", "path": "wallet/settlement",
"style": { "style": {
"navigationBarTitleText": "结算账单", "navigationBarTitleText": "结算账单",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true, "disableScroll": true,
"navigationStyle": "custom", // 隐藏系统导航栏 "navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarBackgroundColor":"#F4F5F7" "navigationBarBackgroundColor":"#F4F5F7"
} }
}, },
{ {
"path": "cert/index", "path": "cert/index",
...@@ -212,6 +212,13 @@ ...@@ -212,6 +212,13 @@
} }
}, },
{ {
"path":"contract/index",
"style":{
"navigationBarTitleText":"",//我的合同
"navigationStyle":"custom"
}
},
{
"path": "customer/index", "path": "customer/index",
"style": { "style": {
"navigationStyle":"custom", "navigationStyle":"custom",
...@@ -227,7 +234,10 @@ ...@@ -227,7 +234,10 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
] ]
}, },
{ {
"root": "pages/order", "root": "pages/order",
...@@ -489,11 +499,11 @@ ...@@ -489,11 +499,11 @@
"name": "学习 - 首页", //模式名称 "name": "学习 - 首页", //模式名称
"path": "pages/index/learn", //启动页面,必选 "path": "pages/index/learn", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
}, },
{ {
"name": "我的 - 我的证件 - 列表", //模式名称 "name": "我的 - 我的证件 - 列表", //模式名称
"path": "pages/mine/cert/index", //启动页面,必选 "path": "pages/mine/cert/index", //启动页面,必选
"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>
......
...@@ -256,5 +256,5 @@ ...@@ -256,5 +256,5 @@
border-radius: 0 0 12rpx 12rpx; border-radius: 0 0 12rpx 12rpx;
} }
} }
} }
</style> </style>
...@@ -549,7 +549,9 @@ ...@@ -549,7 +549,9 @@
this.scenePhoto = true this.scenePhoto = true
this.readMore = true this.readMore = true
this.isAllowDianhuaAndDaohang = true this.isAllowDianhuaAndDaohang = true
} else {} } else {
this.isAllowDianhuaAndDaohang = true
}
}, },
handleBtn() { handleBtn() {
if(!this.submitType){ if(!this.submitType){
......
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