| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <view class="content">
- <view class="self-title-box">
- <!-- <image src="/static/rect-icon.png" mode="aspectFill"></image> -->
- <view class="history-font" @tap="linkToChart()">历史面试记录</view>
- </view>
- <view class="list-box">
- <view v-for="(item, index) in postList" :key="index" class="flex-between" @click="goDetail(item)">
- <view>
- <image src="/static/require-icon.png" mode="aspectFill"></image>
- <text style="font-size: 28rpx;">{{item.postType}}</text>
- </view>
- <text>{{item.time}}</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- industryArray: [{
- name: "软件开发",
- value: 1
- }, {
- name: "广告",
- value: 2
- }, {
- name: "金融",
- value: 3
- }], //三个测试岗位 1-技术,2-测试,3-设计师
- positionArray: [{
- name: "技术",
- value: 1
- }, {
- name: "测试",
- value: 2
- }, {
- name: "设计师",
- value: 3
- }], //三个测试岗位 1-技术,2-测试,3-设计师
- postList: [
- ]
- };
- },
- mounted() {
- let that = this;
- uni.request({
- url: getApp().globalData.services.getInterviewHistory, //需要设置为全局
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- accesstoken: that.$store.state._token,
- jwtcode: that.$store.state._jwtcode,
- },
- success: ({
- data: {
- errmsg,
- data
- }
- }) => {
- if (errmsg === "OK") {
- that.postList = data.map(item => ({
- interviewid:item.id,
- postType: `${that.positionArray[item.position].name} ---- ${that.industryArray[item.industry].name}`,
- time: that.createrTime(item.addtime)
- }))
- }
- }
- });
- },
- onLoad() {},
- onShow() {},
- methods: {
- goDetail(item) {
- uni.navigateTo({
- url: `../historyDetail/index?interviewid=${item.interviewid}`
- })
- },
- createrTime(timestamp) {
- if (!timestamp) return "";
- // 时间戳
- // 此处时间戳以毫秒为单位
- let date = new Date(parseInt(timestamp) * 1000);
- let Year = date.getFullYear();
- let Moth = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
- let Day = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
- let Hour = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
- let Minute = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
- let Sechond = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
- let GMT = Year + '-' + Moth + '-' + Day + ' ' + Hour + ':' + Minute + ':' + Sechond;
- return GMT;
- },
- linkToChart(){
- uni.navigateBack()
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .content {
- overflow: hidden;
- .self-title-box {
- margin: 10% 0 5% 3%;
- image {
- width: 6rpx;
- height: 32rpx;
- margin-right: 2%;
- }
- }
- .flex-between {
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 1px solid #d3d3d3;
- padding: 5% 3% 5% 3%;
- image {
- width: 15rpx;
- height: 15rpx;
- margin-right: 2%;
- }
- ;
- view {
- width: 60%;
- }
- ;
- text {
- font-size: 26rpx;
- color: #555;
- }
- }
- }
- </style>
|