软测宝小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

986 lines
39 KiB

<template>
<view>
<view class="infoNav" :style="{ height: infoHeight + 4 + 'px' }"></view>
<view class="myNav" :style="{ height: navHeight + 'px', top: infoHeight + 3 + 'px' }">
<view>首页</view>
<image @click="scan" src="http://image.bjkeyware.com/static/index/renliwb/scan.png" class="cycontentitimg"
mode=""></image>
</view>
<view :style="{ height: infoHeight + navHeight + 7 + 'px' }"></view>
<!-- <button type="primary" open-type="contact">在线咨询</button> -->
<!-- <button type="primary" @click="test">在线咨询</button> -->
<!-- class="contents" :actionStyle="customActionStyle"actionText="搜索" @custom='serchfot'-->
<view class="logobg">
<swiper class="homeSwiper" circular autoplay="true" indicator-dots="true" interval="3000" duration="500">
<swiper-item class="swiper-item" :key="key">
<img style="width: 100%;" src="http://image.bjkeyware.com/static/index/hhome_page2.png" alt="">
</swiper-item>
<swiper-item class="swiper-item" :key="key">
<img style="width: 100%;" src="http://image.bjkeyware.com/static/index/hhome_page1.png" alt="">
</swiper-item>
</swiper>
<!-- <view style="display: flex;justify-content: space-between;align-items: center;">
<u-search class="keyewar" v-model='keywares' placeholder='输入搜索内容' :clearabled='true' clear='cleardata' :show-action="false" :animation="false"></u-search>
<view class="customActionStyle" @click="serchfot">搜索</view>
</view> -->
</view>
<!-- <view class="uni-margin-wrap">
<swiper class="swiper" circular autoplay="true" interval="2500" :duration="duration">
<swiper-item v-for="item in 3">
<view class="swiper-item uni-bg-red">
<view>标题</view>
<view>内容</view>
<view>去学习</view>
</view>
</swiper-item>
</swiper>
</view> -->
<!-- <u-input class="keywar" />
<div style="display: flex;justify-content: space-between;">
<view style="display:flex;align-items: center;">
<img style="width:30rpx;height:30rpx;margin-left: 10px;" src="http://image.bjkeyware.com/static/index/ss.png">
<text style="color:#999999;margin:0 10px;font-size:14px">输入搜索内容</text>
<view class="sos" @click="serchfot">搜索</view>
</div> -->
<!-- <img src="src="http://image.bjkeyware.com/static/index/ss.png" alt=""> -->
<view class="fouassociation">
<view class="association" @click="gametype('tool')">
<img src="http://image.bjkeyware.com/static/index/hzuli.png" alt="">
<text>工具服务</text>
<!-- <view class="tostnew">
<image class="tostnewimg" src="../../static/index/toast.png" mode=""></image>
<text class="tostnewtext">即将上线</text>
</view> -->
</view>
<view class="association" @click="gametype('test')">
<img src="http://image.bjkeyware.com/static/index/hstudu.png" alt="">
<text>培训服务</text>
<!-- <view class="tostnew">
<image class="tostnewimg" src="../../static/index/toast.png" mode=""></image>
<text class="tostnewtext">即将上线</text>
</view> -->
</view>
<view class="association" @click="gametype('crowd')">
<img src="http://image.bjkeyware.com/static/index/hzhongb.png" alt="">
<text>众包服务</text>
</view>
<view class="association" @click="gametype('human')">
<img src="http://image.bjkeyware.com/static/index/hhuman.png" alt="">
<text>人才服务</text>
</view>
</view>
<view class="uni-margin-wrap" v-if="onLineList.length">
<swiper class="swiper mySwiper" circular autoplay="true" interval="35500" duration="500">
<swiper-item v-for="(item, key) in onLineList" :key="key">
<onLineCourseItem style="margin-left: 20rpx;" :onLineCourse="item" @toLearn="toLearn">
</onLineCourseItem>
</swiper-item>
</swiper>
</view>
<!-- <poster></poster> -->
<view class='schedule'>
<!-- 测试工具 -->
<view style='display:flex;justify-content:space-between;margin:40rpx 0 40rpx 0'>
<view style='display:flex;align-items: center;'>
<img style="width:29rpx;height:40rpx" src="http://image.bjkeyware.com/static/index/hhot.png">
<p style='font-size:34rpx;font-weight: bold;color: #333333;margin-left:10px'>国产自主研发测试工具推荐</p>
</view>
<!-- <view style='display:flex;align-items: center;' @click="gametype('tool')">
<text style='color: #999999;font-size:13px;'>更多</text>
<img style='width:15rpx;height:25rpx;margin-top:3px;margin-left:5px;'
src="http://image.bjkeyware.com/static/index/xia.png" alt="">
</view> -->
</view>
<scroll-view class="scroll-view_H" scroll-x="true">
<!-- <view class="scroll-view-item_H">A</view> -->
<view class="scroll-view-item_H" v-for="(item, key) of toollist" :key="key">
<view class="imgone" @click="details('tool', item.toolId)">
<view style="width: 120rpx;height: 120rpx;">
<img :src="item.img" alt="">
<!-- <img v-if="item.name=='代码静态分析工具'" :src="item.imgs" alt="">
<img v-if="item.name=='源代码安全检测工具'" :src="item.imgs" alt="">
<img v-if="item.name=='C/C++单元测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='接口测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='JAVA单元测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='功能测试工具AutoFun'" :src="item.imgs" alt="">
<img v-if="item.name=='代码组成分析平台'" :src="item.imgs" alt="">
<img v-if="item.name=='性能测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='自鉴-交互式应用安全测试系统IAST'" :src="item.imgs" alt="">
<img v-if="item.name=='Web应用安全测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='资产识别及漏洞管理工具'" :src="item.imgs" alt="">
<img v-if="item.name=='性能测试工具AutoLoad'" :src="item.imgs" alt=""> -->
</view>
</view>
<p class="leop leop1">{{ item.name }}</p>
<view style='display:flex;margin:30rpx 0'>
<view v-if='item.toolTypeName' class="tabone">{{ item.typel }}测试</view>
<view class="tabone" style="color: #FF8A00;border: 1px solid #FF8A00;margin-left: 10px;">
{{ item.deliverType }}</view>
</view>
<view style='display:flex;justify-content:space-between;margin:15rpx 0;width:100%'>
<p style="font-size: 24rpx;" v-if="item.price == 0">限时免费</p>
<p style="font-size: 34rpx;" v-else>¥ {{ item.price }}</p>
<!-- <img class="imgtwo" src="http://image.bjkeyware.com/static/index/add.png" alt="" @click="addcart(item.toolId)"> -->
</view>
</view>
<view class="scroll-view-item_M" @click="gametype('tool')">更多</view>
</scroll-view>
<!-- <view class='koeui'>
<view class="currekei" v-for="(item, key) of toollist" :key="key">
<view class="imgone" @click="details('tool', item.toolId)">
<view style="width: 120rpx;height: 120rpx;">
<img :src="item.img" alt="">
<img v-if="item.name=='代码静态分析工具'" :src="item.imgs" alt="">
<img v-if="item.name=='源代码安全检测工具'" :src="item.imgs" alt="">
<img v-if="item.name=='C/C++单元测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='接口测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='JAVA单元测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='功能测试工具AutoFun'" :src="item.imgs" alt="">
<img v-if="item.name=='代码组成分析平台'" :src="item.imgs" alt="">
<img v-if="item.name=='性能测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='自鉴-交互式应用安全测试系统IAST'" :src="item.imgs" alt="">
<img v-if="item.name=='Web应用安全测试工具'" :src="item.imgs" alt="">
<img v-if="item.name=='资产识别及漏洞管理工具'" :src="item.imgs" alt="">
<img v-if="item.name=='性能测试工具AutoLoad'" :src="item.imgs" alt="">
</view>
</view>
<p class="leop leop1">{{ item.name }}</p>
<view style='display:flex;margin:30rpx 0'>
<view v-if='item.toolTypeName' class="tabone">{{ item.typel }}测试</view>
<view class="tabone" style="color: #FF8A00;border: 1px solid #FF8A00;margin-left: 10px;">
{{ item.deliverType }}</view>
</view>
<view style='display:flex;justify-content:space-between;margin:15rpx 0;width:100%'>
<p style="font-size: 24rpx;" v-if="item.price == 0">限时免费</p>
<p style="font-size: 34rpx;" v-else>¥ {{ item.price }}</p>
<img class="imgtwo" src="http://image.bjkeyware.com/static/index/add.png" alt="" @click="addcart(item.toolId)">
</view>
</view>
</view> -->
<!-- 培训服务 -->
<!-- <view style='display:flex;justify-content:space-between;margin:20px 0'>
<view style='display:flex;align-items: center;'>
<img style="width:1.5rem;height:2rem" src="http://image.bjkeyware.com/static/index/hhot.png"></image>
<p style='font-size:20px;font-weight: bold;color: #333333;margin-left:10px'>推荐-培训服务</p>
</view>
<view style='display:flex;align-items: center;' @click="gametype('test')">
<text style='color: #999999;font-size:13px;'>更多</text>
<img style='width:15rpx;height:25rpx;margin-top:3px;margin-left:5px;' src="http://image.bjkeyware.com/static/index/xia.png" alt="">
</view>
</view>
<view style="margin-top:20px; background: #FFFFFF; border-radius:10px;padding: 10px 0px 15px 0;" @click="applytest(1)">
<view style='display:flex;justify-content:space-between;margin:10px 15px' >
<img style="width:160px;height:30px;" src="http://image.bjkeyware.com/xian_kjdx.png" alt="">
<view style='display:flex;align-items: center;' >
<p style="color: #1F84F9;">查看详情</p>
<u-icon name="arrow-right" color="#2084F9" style='margin-top: 2px;margin-left: 5px;'></u-icon>
</view>
</view>
<view class="fline"></view>
<view style="margin-left:15px">
<p style="font-size: 16px;font-weight: bold;color: #000000;margin:14px 0 11px 0px;">智能软件测试协同创新班 </p>
<p style="font-size:12px;font-weight:500;color: #808080;">培训静态测试、单元测试、配置项测试、测试管理等课程 </p>
</view>
</view>
<view style="margin-top:15px; background: #FFFFFF; border-radius:10px;padding: 10px 0px 15px 0;" @click="applytest(2)">
<view style='display:flex;justify-content:space-between;margin:10px 15px'>
<img style="width:139px;height:30px;" src="http://image.bjkeyware.com/chongqing_gcxy.png" alt="">
<view style='display:flex;align-items: center;' >
<p style="color: #1F84F9;">查看详情</p>
<u-icon name="arrow-right" color="#2084F9" style='margin-top: 2px;margin-left: 5px;'></u-icon>
</view>
</view>
<view class="fline"></view>
<view style="margin-left:15px">
<p style="font-size: 16px;font-weight: bold;color: #000000;margin:14px 0 11px 0px;">软件测试创新班</p>
<p style="font-size:12px;font-weight:500;color: #808080;">培训静态测试、单元测试、配置项测试、测试管理等课程 </p>
</view>
</view> -->
<!-- 众包服务 -->
<view style='display:flex;justify-content:space-between;margin:40rpx 0'>
<view style='display:flex;align-items: center;'>
<p style='font-size:34rpx;font-weight: bold;color: #333333;margin-left:10px' @click='nearfuture'>
众包服务
</p>
</view>
<view style='display:flex;align-items: center;' @click="gametype('crowd')">
<text style='color: #999999;font-size:13px;'>更多</text>
<img style='width:15rpx;height:25rpx;margin-top:3px;margin-left:5px;'
src="http://image.bjkeyware.com/static/index/xia.png" alt="">
</view>
</view>
<view class="notice" @click="details('crpwd', item.taskId)" v-for="(item, key) of crowdlist" :key="key">
<!-- <img v-if="item.icon" style='width:160rpx;height:160rpx;margin-right:39rpx;' :src="item.icon" alt="">
<img v-else style='width:160rpx;height:160rpx;margin-right:39rpx;' src="http://image.bjkeyware.com/static/crowd_testing.png" alt=""> -->
<view style="width:160rpx;height:160rpx;margin-right:39rpx;">
<image v-if="item.testType.split(',')[0] == 'static'"
src="http://image.bjkeyware.com/static/index/renliwb/jtcs.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
<image v-else-if="item.testType.split(',')[0] == 'function'"
src="http://image.bjkeyware.com/static/index/renliwb/gncs.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
<image v-else-if="item.testType.split(',')[0] == 'performance'"
src="http://image.bjkeyware.com/static/index/renliwb/xncs.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
<image v-else-if="item.testType.split(',')[0] == 'security'"
src="http://image.bjkeyware.com/static/index/renliwb/aqcs.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
<image v-else-if="item.testType.split(',')[0] == 'reliability'"
src="http://image.bjkeyware.com/static/index/renliwb/kkxcs.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
<image v-else-if="item.testType.split(',')[0] == 'development'"
src="http://image.bjkeyware.com/static/index/renliwb/ycrw.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
<image v-else src="http://image.bjkeyware.com/static/index/renliwb/qtcs.png" mode=""
style='width:160rpx;height:160rpx;margin-right:39rpx;'></image>
</view>
<view style="width:58vw;">
<p class="leop" style="margin:0;justify-content: initial;">{{ item.projectName }} <levelTag :level="item.level"></levelTag> </p>
<!-- <p class="typej">类型:静态测试</p> -->
<p class="typej">
类型:{{ findLabelValueByPropnew(tasktypelist, item.testType, 'dictValue', 'dictLabel') }}</p>
<!-- <p class="typej" v-if="item.testType=='function'">类型:功能测试</p>
<p class="typej" v-if="item.testType=='performance'">类型:性能测试</p>
<p class="typej" v-if="item.testType=='security'">类型:安全测试</p>
<p class="typej" v-if="item.testType=='configuration'">类型:配置项测试</p>
<p class="typej" v-if="item.testType=='reliability'">类型:可靠性测试</p>
<p class="typej" v-if="item.testType=='development'">类型:研发任务</p>
<p class="typej" v-if="item.testType=='outsource'">类型:用人任务</p>
<p class="typej" v-if="item.testType=='other'">类型:其他</p> -->
<p class="typej">工期:{{ item.period }}天 I
共招<text style="color: #0066EB;">{{ item.needPerson }}</text>人 / 已报名
<text style="color: #0066EB;">{{ item.companyAppCount + item.personalAppCount }}</text>人
<!-- <text style="color: #0066EB;">{{(item.companyAppCount + item.personalAppCount) +'/' + item.needPerson }}</text> -->
</p>
<view style="display:flex;justify-content:space-between;margin-top:20rpx">
<view style="display: flex;align-items: center;">
<p style='color:#FF8A00;font-size: 24rpx;'></p>
<p v-if="item.price == 0" style="color: #FF3200;font-size:30rpx;">面议</p>
<p v-else style="color: #FF3200;font-size:34rpx;">¥ {{ item.price }}</p>
<p style="color: #4C4644;font-size: 22rpx;"></p>
</view>
<!-- <view class="buttonyz">竞标报名</view> -->
<view v-if="item.processStatus == 0" class="buttonyz">报名中</view>
<view v-if="item.processStatus == 1" class="buttonyz"
style="background: linear-gradient(90deg, #FAC024, #FD9B1D);">实施中</view>
<view v-if="item.processStatus == 2" class="buttonyz"
style="background: linear-gradient(90deg, #1EE2F9, #14CADA);">待验收</view>
<view v-if="item.processStatus == 3" class="buttonyz"
style="background: linear-gradient(90deg, #FB9A78, #FC612A);">待结算</view>
<view v-if="item.processStatus == 4" class="buttonyz"
style="background: linear-gradient(90deg, #3BF199, #13CB6E);">已完成</view>
<!-- <view v-if="item.taskStatus == 0" class="buttonyz">竞标报名</view>
<view v-else class="buttonyz1">报名结束</view> -->
</view>
</view>
</view>
<!-- 测试工具 -->
<!-- 人才服务 -->
<!-- <view style='display:flex;justify-content:space-between;margin:10px 0 0 0'>
<view style='display:flex;align-items: center;'>
<p style='font-size:20px;font-weight: bold;color: #333333;margin-left:10px' >人才服务</p>
</view>
<view style='display:flex;align-items: center;' @click="gametype('human')">
<text style='color: #999999;font-size:13px;'>更多</text>
<img style='width:15rpx;height:25rpx;margin-top:3px;margin-left:5px;' src="http://image.bjkeyware.com/static/index/xia.png" alt="">
</view>
</view>
<view style="display: flex;justify-content: space-between;flex-wrap: wrap;align-items: center;">
<view class="statictosol" style="position: relative;padding:0px;height: auto;">
<img style="width:75rpx;height:38rpx;position: absolute;top: 0;left: 0" src="http://image.bjkeyware.com/static/index/renliwb/2.png" alt="">
<img style="margin:15px 0" src="http://image.bjkeyware.com/static/outsource/test.png" alt="">
<u-line></u-line>
<p style="color:#1A1A1A;font-size: 1rem;font-weight: bold;margin:15px 0 ;">测试工程师 </p>
</view>
<view class="statictosol" style="position: relative;padding:0px;height: auto;">
<img style="width:75rpx;height:38rpx;position: absolute;top: 0;left: 0" src="http://image.bjkeyware.com/static/index/renliwb/2.png" alt="">
<img style="margin:15px 0" src="http://image.bjkeyware.com/static/outsource/java.png" alt="">
<u-line></u-line>
<p style="color:#1A1A1A;font-size: 1rem;font-weight: bold;margin:15px 0 ;">JAVA开发工程师 </p>
</view>
<view class="statictosol" style="padding:0px;height: auto;">
<img style="margin:15px 0" src="http://image.bjkeyware.com/static/outsource/c++.png" alt="">
<u-line></u-line>
<p style="color:#1A1A1A;font-size: 1rem;font-weight: bold;margin:15px 0 ;">C++开发工程师 </p>
</view>
<view class="statictosol" style="padding:0px;height: auto;">
<img style="margin:15px 0" src="http://image.bjkeyware.com/static/outsource/web.png" alt="">
<u-line></u-line>
<p style="color:#1A1A1A;font-size: 1rem;font-weight: bold;margin:15px 0 ;">Web前端开发工程师</p>
</view>
<view class="statictosol" style="padding:0px;height: auto;">
<img style="margin:15px 0" src="http://image.bjkeyware.com/static/outsource/implant.png" alt="">
<u-line></u-line>
<p style="color:#1A1A1A;font-size: 1rem;font-weight: bold;margin:15px 0 ;">嵌入式工程师 </p>
</view>
<view class="statictosol" style="padding:0px;height: auto;">
<img style="margin:15px 0" src="http://image.bjkeyware.com/static/outsource/php.png" alt="">
<u-line></u-line>
<p style="color:#1A1A1A;font-size: 1rem;font-weight: bold;margin:15px 0 ;">PHP开发工程师</p>
</view>
</view> -->
<!-- 人才服务 -->
</view>
<view style="height:10px;"></view>
<u-toast ref="uToast" />
<u-modal title='温馨提示' v-model="tokenshow" content="您还没有登录" confirm-text='现在就去' cancel-text='稍等一下'
show-cancel-button='true' cancel-color='#1578ED' confirm-color='#1578ED' @confirm="confirm"
@cancel='tokenshow = false'></u-modal>
</view>
</template>
<script>
import { findLabelValueByPropnew } from '@/utils/util.js'
import mixin from '@/utils/mixin/index.js'
import onLineCourseItem from '@/components/onLineCourseItem/index.vue'
import poster from '@/components/poster/index.vue'
import levelTag from '@/components/levelTag/index.vue'
// import { dateFormat } from '../../utils/util';
export default {
mixins: [mixin],
components: {
onLineCourseItem,poster,levelTag
},
data() {
return {
navHeight: 0,
infoHeight: 0,
title: '首页',
keywares: '',
toollist: [], //工具数组
crowdlist: [], //众包数组
tokenshow: false,
onLineList: []
}
},
created() {
this.infoHeight = uni.getSystemInfoSync().statusBarHeight
// #ifdef MP-WEIXIN
// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
const custom = wx.getMenuButtonBoundingClientRect()
const { height, top } = custom
console.log(custom)
// #endif
this.navHeight = height + (top - this.infoHeight) * 2
// console.log(custom.height);
},
onShow() {
this.http.quickGet('/business/tool/listAnon?status=1').then((res) => {
let tooldata = res.data.rows
tooldata.forEach((item) => {
if (item.name == '代码静态分析工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/11.png'
} else if (item.name == '源代码安全检测工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/5.png'
} else if (item.name == 'C/C++单元测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/2.png'
} else if (item.name == '接口测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/12.png'
} else if (item.name == 'JAVA单元测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/1.png'
} else if (item.name == '功能测试工具AutoFun') {
item.imgs = 'http://image.bjkeyware.com/static/index/3.png'
} else if (item.name == '代码组成分析平台') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/4.png'
} else if (item.name == '性能测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/6.png'
} else if (item.name == '自鉴-交互式应用安全测试系统IAST') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/3.png'
} else if (item.name == 'Web应用安全测试工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/tool/2.png'
} else if (item.name == '资产识别及漏洞管理工具') {
item.imgs = 'http://image.bjkeyware.com/static/index/zc.png'
} else if (item.name == '性能测试工具KeyTurbo') {
item.imgs = 'http://image.bjkeyware.com/static/index/xn.png'
}
item.typel = item.toolTypeName.slice(0, 2)
})
this.toollist = res.data.rows.splice(0, 4)
}),
this.http.quickGet('/crowdsource/listAnon?pageNum=1&pageSize=10').then((res) => {
this.crowdlist = res.data.rows
this.crowdlist = this.crowdlist.splice(0, 3)
})
this.getOnLineCourse()
},
filters: {
tiilnamechange(value) {
if (!value) return ''
if (value.length > 9) {
return value.slice(0, 7) + '...'
}
return value
},
},
methods: {
findLabelValueByPropnew,
test() {
uni.navigateTo({
url: '/pages/index/test',
// url: 'https://w102.ttkefu.com/k/linkurl/?t=6F5CCH6'
})
},
async toLearn(course) {
if (course.isPay == '0' && !course.signUp) {
const res = await this.http.quickPost(`/train/online/signUp/${course.courseId}`, {}, true)
if (res.data.code == 200) {
uni.navigateTo({
url: `/pages/index/testtraining/onLineCourse?courseId=${course.courseId}`
})
}
else {
return
}
} else {
uni.navigateTo({
url: `/pages/index/testtraining/onLineCourse?courseId=${course.courseId}&learnStatus=${course.show ? true : false}`
})
}
},
getOnLineCourse() {
function filterCourse(course) {
return course.filter(item => {
return item
// const todayZero = new Date(dateFormat(new Date()).split(' ')[0] + ' 00:00:00').getTime()
// const couTime = new Date(item.courseTime).getTime()
// const endTime = new Date(item.dateTime).getTime()
// const endSubTime = couTime - endTime
// const sub = new Date(item.courseTime).getTime() - new Date().getTime()
// const oneDay = 24 * 1000 * 60 * 60
// if ((sub >= 0) && ((couTime - todayZero) <= oneDay * 2)) {
// return item
// }
// else if ((sub < 0) && (Math.abs(sub) <= endSubTime)) {
// return item
// }
})
}
let accessToken = uni.getStorageSync('accessToken')
if (accessToken) {
const wxUserInfo = uni.getStorageSync('wxUserInfo')
const userId = wxUserInfo.userId
this.http.quickGet(`/course/online/courses?userId=${userId}&portal=1`).then((res) => {
// console.log(res);
this.onLineList = filterCourse(res.data.data)
})
} else {
this.http.quickGet(`/course/online/courses/?portal=1`, false).then((res) => {
// console.log(res);
this.onLineList = filterCourse(res.data.data)
})
}
},
// onShareAppMessage(res) {
// if (res.from === 'button') {// 来自页面内分享按钮
// console.log(res.target)
// }
// return {
// title: '自定义分享标题',
// path: '/pages/test/test?id=123'
// }
// },
//工具,众包详情
details(type, id) {
// console.log('id---',id)
if (type == 'tool') {
// uni.showToast({ title: '该功能开发中', icon: 'none', duration: 1000 });
uni.navigateTo({
url: `./toolleasing/tooldetails?id=${id}`,
})
} else {
uni.navigateTo({
url: `./testcrowdsourc/crowdsourcingdetails?id=${id}`,
})
}
},
//搜索框
serchfot() {
uni.navigateTo({
url: './searchfor',
})
},
cleardata() { },
// 扫码
scan() {
console.log('二维码扫描')
// uni.navigateTo({
// url:`/pages/personal/courseSign/courseSign`
// })
uni.scanCode({
onlyFromCamera: true,
success: function (res) {
if (res.result) {
uni.navigateTo({
url: `/pages/personal/courseSign/courseSign?objStr=${res.result}`,
})
} else {
uni.showToast({ title: '无法识别二维码', icon: 'none', duration: 1000 })
}
},
})
},
confirm() {
uni.navigateTo({
url: '/pages/personal/login',
})
},
//工具加入购物车
addcart(id) {
uni.showToast({
title: '该功能开发中',
icon: 'none',
duration: 1000,
})
return
let accessToken = uni.getStorageSync('accessToken')
if (!accessToken) {
this.tokenshow = true
} else {
this.http.quickGet(`/my/addShoppingCart/${id}/1`, true).then((response) => {
console.log('response', response)
if (response.data.code == 200) {
console.log('111')
this.$refs.uToast.show({
title: '添加购物车成功',
type: 'success',
duration: 1000,
isTab: true,
url: '/pages/shoppingtrolley/shoppingtrolley',
})
}
})
}
},
// 四大模块跳转
gametype(type) {
if (type == 'test') {
uni.navigateTo({
url: './testtraining/testtraining',
})
} else if (type == 'crowd') {
uni.switchTab({
url: '/pages/index/testcrowdsourc/testcrowdsourc',
})
} else if (type == 'tool') {
// uni.showToast({
// title: '功能即将上线,敬请期待',
// icon: 'none',
// duration: 1000
// });
uni.navigateTo({
url: './toolleasing/toolleasing',
})
} else {
// uni.showToast({ title: '功能即将上线,敬请期待', icon: 'none', duration: 1000 });
const userinform = uni.getStorageSync('wxUserInfo')
if (userinform && userinform.companyStatus == 2) {
uni.navigateTo({
url: '/pages/index/outsourcing/outsourcing',
})
} else {
uni.navigateTo({
url: '/pages/index/outsourcing/cloudUserPage',
})
}
}
},
// 培训学校
applytest(type) {
uni.navigateTo({
url: `./testtraining/testtraining?currenttab=${type}`,
})
},
},
}
</script>
<style lang="scss">
.wx-swiper-dots.wx-swiper-dots-horizontal {
// bottom: 160rpx;
margin-bottom: 140rpx;
// float: right;
// text-align: right;
// right: 0;
// width: 100%;
// background-color: #ffffff;
// padding-right: 15px;
}
.wx-swiper-dot {
background: #FFFFFF !important;
}
.wx-swiper-dot.wx-swiper-dot-active {
background-color: #2387ee !important;
}
.homeSwiper {
height: 481.9rpx;
}
.infoNav {
position: fixed;
width: 100%;
background-color: #284cd1;
z-index: 99;
}
.myNav {
position: fixed;
width: 100%;
text-align: center;
color: #ffffff;
font-family: PingFang-SC-Bold;
display: flex;
align-items: center;
justify-content: center;
background-color: #284cd1;
z-index: 99;
/* position: relative; */
}
page {
background-color: #f7f7f7;
}
.myNav image {
position: absolute;
width: 50rpx;
height: 50rpx;
left: 34rpx;
margin-right: 10rpx;
}
.logobg {
width: 100vw;
height: 51vw;
/* background-size: 100% 55vw; */
/* background-image: url('http://image.bjkeyware.com/static/index/hhome_page.png'); */
/* background-repeat: no-repeat; */
/* padding: 20px 5vw 20px 5vw; */
margin-top: -1px;
/* padding:30px 0vw 20px 5vw; */
/* z-index:0; */
}
.keyewar {
width: 72vw;
border-radius: 50rpx;
/* position: relative; */
/* margin:1vw 5vw 20px 0vw;
display: flex;
justify-content: space-between; */
/* padding: 10px; */
}
.buttonyz1 {
width: 139rpx;
height: 49rpx;
background: #a8aeb6;
border-radius: 25rpx;
color: #ffffff;
font-size: 24rpx;
text-align: center;
line-height: 49rpx;
}
.customActionStyle {
width: 115rpx;
height: 60rpx;
background: linear-gradient(90deg, #5ea6fd, #1a81f9);
border-radius: 39rpx;
text-align: center;
line-height: 55rpx;
color: #ffffff;
font-size: 14px;
z-index: 99;
}
/* @media screen and (max-width: 350px) {
body {
font-size: 14px;
color: blue;
}
} */
.contents {
padding-bottom: 50px;
}
.fouassociation {
position: relative;
/* z-index: 2; */
/* width:90vw; */
margin: -5vw 3vw 0 3vw;
display: flex;
justify-content: space-around;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 29px 0px rgba(187, 86, 25, 0.17);
border-radius: 10px;
padding: 0 5px;
}
.association {
width: 20vw;
margin: 10px 0;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.uni-margin-wrap {
width: 100%;
// margin: 20rpx 20rpx;
}
.mySwiper {
// background: linear-gradient(135deg, #FCF5F0, #ECF3FD);
width: 100%;
// height: 100%
height: 315rpx;
// box-shadow: 0rpx 2rpx 14rpx 1rpx rgba(8, 67, 140, 0.12);
}
.swiper {
// height: 300rpx;
}
.association img {
width: 13vw;
height: 13vw;
margin-bottom: 5px;
display: block;
}
.association text {
font-size: 14px;
display: block;
}
.schedule {
width: 94vw;
margin: 0px 3vw 20px 3vw;
}
.koeui {
display: flex;
overflow: auto;
/* flex-wrap: wrap; */
/* justify-content: space-between; */
}
.currekei {
/* width: 48%; */
/* width: 600rpx; */
/* height: 360rpx; */
background: #ffffff;
border-radius: 10px;
padding: 10px 10px;
margin: 0rpx 20rpx 20rpx 20rpx;
}
.leop {
font-size: 30rpx;
/* height:40px ; */
font-weight: bold;
color: #1a1a1a;
/* margin: 13rpx 0; */
display: flex;
align-items: center;
justify-content: center;
}
.leop1 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
justify-content: flex-start;
}
.tabone {
padding: 2rpx 5rpx;
border: 1px solid #2b80fc;
border-radius: 4rpx;
font-size: 20rpx;
font-weight: 500;
color: #2387ee;
text-align: center;
box-sizing: border-box;
}
.currekei :nth-child(4) {
color: #fd461a;
font-weight: 800;
font-size: 34rpx;
}
.imgone {
width: 180rpx;
margin: 10px auto;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.imgone img {
width: 100%;
height: 100%;
}
.imgsone {
width: 150rpx;
margin: 20px auto;
}
.imgsone img {
width: 150rpx;
height: 123rpx;
}
.imgtwo {
width: 32rpx;
height: 32rpx;
}
.notice {
/* width: 90vw; */
/* height: 130px; */
margin-top: 10px;
background: #ffffff;
border-radius: 10px;
display: flex;
padding: 10px 15px;
align-items: center;
}
.typej {
font-size: 24rpx;
color: #9d9d9d;
margin: 13rpx 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.buttonyz {
width: 139rpx;
height: 49rpx;
background: linear-gradient(90deg, #5ea6fd, #1a81f9);
border-radius: 25rpx;
color: #ffffff;
font-size: 24rpx;
text-align: center;
line-height: 49rpx;
}
.fline {
width: 100%;
height: 1rpx;
border: 1rpx solid #f2f2f2;
opacity: 0.15;
}
.statictosol {
width: 48%;
height: 180px;
background: #ffffff;
border-radius: 10rpx;
text-align: center;
margin-top: 20px;
padding: 15px 10px;
}
.statictosol img {
width: 17vw;
height: 17vw;
margin-bottom: 10px;
}
.statictosol p {
font-size: 0.8rem;
color: #808080;
margin-bottom: 5px;
line-height: 21px;
}
.tostnew {
position: absolute;
top: -12rpx;
right: -32rpx;
}
.tostnewimg {
width: 76rpx;
height: 32rpx;
}
.tostnewtext {
position: absolute;
top: 3rpx;
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
font-weight: 500;
font-size: 16rpx !important;
color: #ffffff;
}
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.scroll-view-item {
height: 300rpx;
line-height: 300rpx;
text-align: center;
font-size: 36rpx;
}
.scroll-view-item_H {
display: inline-block;
width: 45%;
background: #ffffff;
border-radius: 10px;
padding: 10px 10px;
margin: 0rpx 20rpx 20rpx 0rpx;
/* height: 300rpx; */
/* line-height: 300rpx; */
/* text-align: center; */
/* font-size: 36rpx; */
}
.scroll-view-item_M {
display: inline-block;
writing-mode: vertical-rl;
text-align: center;
margin: 0 auto;
height: 300rpx;
color: #2387ee;
font-weight: 500;
}
</style>