Commit c75257bf authored by zhengzy's avatar zhengzy

合同详情

parent ccff7124
......@@ -219,6 +219,13 @@
}
},
{
"path":"contract/out",
"style":{
"navigationBarTitleText":""
}
},
{
"path": "customer/index",
"style": {
"navigationStyle":"custom",
......
This diff is collapsed.
......@@ -8,16 +8,16 @@
></u-navbar>
<view class="content">
<text class="title">合同清单</text>
<view class="jf-currency-class" v-for="item in res" :key="item.id">
<view
class="jf-currency-class"
v-for="item in res"
:key="item.id"
@click="goBaidu(item.url)"
>
<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="left">新风机技工入驻签约合同</view>
<view class="text1">《新风机技工入驻签约合同》</view>
<view class="text2">下载时间: 2021.05.06 15:01:48</view>
</view> -->
</view>
</view>
</template>
......@@ -28,14 +28,6 @@ export default {
return {
background: {
backgroundColor: "#F4F5F7",
// 导航栏背景图
// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
// 还可以设置背景图size属性
// backgroundSize: 'cover',
// 渐变色
// backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
},
res: [],
type: "充电桩",
......@@ -52,50 +44,37 @@ export default {
if (res.data) {
let length = res.data.length;
for (let i = 0; i < length; i++) {
var re = /[^\u4e00-\u9fa5]/gi;
// res.data.name = res.data.name.replace(re, "");
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"
);
res.data[i].name = res.data[i].name.replace(re, "");
}
this.res = this.res.concat(res.data);
console.log(this.res);
}
} else {
console.log(res.code);
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
}
});
},
add0(m) {
return m < 10 ? "0" + m : m;
goBaidu(a) {
getApp().globalData.contractUrl = a;
wx.navigateTo({
url: "./out",
success: function () {}, //成功回调
fail: function () {},
complete: function () {},
});
},
// 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>
......@@ -122,7 +101,6 @@ export default {
}
.jf-currency-class {
width: 100%;
height: 180rpx;
border-radius: 12rpx;
padding-top: 40rpx;
margin-top: 74rpx;
......
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: "",
};
},
onLoad(option) {
this.url = option.url;
var app = getApp();
this.url = app.globalData.contractUrl;
console.log(app.globalData, "这是个标识符");
},
methods: {},
};
</script>
<style>
</style>
\ No newline at end of file
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