123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661 |
- <template>
- <view class="content">
- <view class="top">
- <u-navbar title=" " @leftClick="leftClick" height="44px" bgColor="rgb(255,255,255,0)" :placeholder="true">
- </u-navbar>
- <view class="hflex acenter jbetween">
- <view >
- <view class="top_name">{{pageData.name}}</view>
- <view class="scale">{{pageData.num_staff}}人</view>
- </view>
- <image :src="pageData.head_img" mode="aspectFill" class="top_avatar"></image>
- </view>
- </view>
- <view class="box">
- <view class="hflex acenter jcenter tabs">
- <view class="tabs_item" :class="tab_active == 1 ? 'tab_active' :''" @click="changeTab(1)">公司信息</view>
- <view class="tabs_item" :class="tab_active == 2 ? 'tab_active' :''" @click="changeTab(2)">职位信息</view>
- </view>
- <view class="box1" v-if="tab_active == 1">
- <view class="title cell">船厂简介</view>
- <view class="cell">
- <u-read-more closeText="展开" :shadowStyle="shadowStyle" ref="uReadMore" :toggle="true" openText="收起" showHeight="66" backgroundImage="none">
- <u-parse :content="pageData.intro" @load="load"></u-parse>
- </u-read-more>
- </view>
- <view class="title cell">船厂地址</view>
- <view class="cell">
- <view class="text">{{pageData.address}}</view>
- </view>
- <view class="title cell">船厂环境</view>
- <view class="cell">
- <block v-for="(item,index) in pageData.environment_imgs" :key="index">
- <image :src="item" mode="aspectFill" class="img"></image>
- </block>
- </view>
- <view class="title cell">产品介绍</view>
- <view class="cell">
- <view class="text">{{pageData.product_intro}}</view>
- </view>
- </view>
- <view class="list" v-if="tab_active == 2">
- <block v-for="(item,index) in pageList.position" :key="index">
- <view class="list_item">
- <view class="hflex acenter jbetween">
- <view class="item_title">{{item.job_name}}</view>
- <view class="item_blue">{{item.salary}}·{{item.salary_month}}薪</view>
- </view>
- <view class="hflex acenter" style="padding: 20rpx 0 24rpx;">
- <block v-for="(item2,index2) in item.tags" :key="index2">
- <view class="item_box">{{item2}}</view>
- </block>
- <!-- <view class="item_box">{{item.education}}</view>
- <view class="item_box">{{item.experience}}</view> -->
- </view>
- <view class="item_name">{{item.com_name}}</view>
- <view class="hflex acenter jbetween" style="padding-top: 16rpx;">
- <view class="hflex acenter">
- <image class="item_avatar" :src="item.pub_user_avatar"></image>
- <view class="user_name">{{item.pub_user_job}}·{{item.pub_user}}</view>
- </view>
- <view class="user_right">{{item.job_addr}}</view>
- </view>
- </view>
- </block>
- </view>
- </view>
- <view class="bottom hflex acenter jbetween">
- <view class="vflex acenter" @click="collect">
- <u-icon name="star" color="#444444" size="20" v-if="!pageData.is_fav"></u-icon>
- <u-icon name="star-fill" color="#506DFF" size="20" v-else></u-icon>
- <view class="text_style1">收藏</view>
- </view>
- <view class="vflex acenter" @click="share('Poster1')">
- <image src="https://ship-expert.zhousi.hdlkeji.com/common/share.png" mode="" class="bottom_img"></image>
- <view class="text_style1">分享</view>
- </view>
- <view class="bottom_btn" @click="into_chatroom">私信聊聊</view>
- </view>
- <view class="share_content" :class="share_show?'':'share_content1'">
- <!-- <view style="width: 100%;height: 168rpx;"></view> -->
- <view class="share_box vflex Poster1">
- <text class="share_name Poster1" style="margin: 40rpx 0 28rpx;" :data-enode="pageData.name">{{pageData.name}}</text>
- <text class="share_label Poster1" style="margin: 0 0 16rpx;" data-enode="船厂简介">船厂简介</text>
- <view class="share_text Poster1" style="margin: 0 0 24rpx;" data-etype="textarea" :data-enode="pageData.intro">{{pageData.intro}}</view>
- <text class="share_label Poster1" style="margin: 0 0 16rpx;" data-enode="船厂介绍">船厂介绍</text>
- <view class="share_text Poster1" style="margin: 0 0 42rpx;" data-etype="textarea" :data-enode="pageData.product_intro">{{pageData.product_intro}}</view>
- <view class="hflex acenter share_text jcenter Poster1" style=" margin: 0 190rpx 12rpx;" data-enode="长按或扫码查看">长按或扫码查看</view>
- <view style="width: 100%;" class="vflex acenter jcenter">
- <image class="Poster1" style="width: 25rpx;height: 20rpx;" :data-enode="style.img1" data-etype="image" :src="style.img1" shape="10"></image>
- <image class="Poster1" style="width: 100%;height: 2rpx;margin: 30rpx 0;" :data-enode="style.img2" data-etype="image" :src="style.img2" shape="10"></image>
- </view>
- <view class="hflex acenter jbetween">
- <view class="vflex">
- <view class="share_name Poster1" style="margin: 54rpx 0 20rpx;" data-enode="船百知">船百知</view>
- <view class="share_text Poster1" style="margin: 0 0 36rpx;" data-enode="船百知伴你一起杨帆启航,驶向成功彼岸">船百知伴你一起杨帆启航,驶向成功彼岸</view>
- </view>
- <image class="Poster1" data-etype="image" :data-enode="style.code" :src="style.code" style="width: 136rpx;height: 136rpx;" shape="10"></image>
- </view>
- </view>
- <evils-el-poster width="325" height="467" @on-error="onError" :list="list" backgroundColor="rgb(255,255,255)" @on-success="onSuccess" ref="Eposter"></evils-el-poster>
- <view class="share_bottom">
- <view class="hflex acenter jcenter">
- <button class="vflex acenter jcenter bottom_item" open-type="share">
- <image src="https://ship-expert.zhousi.hdlkeji.com/common/wx.png" class="item_icon"></image>
- <view class="item_text">微信好友</view>
- </button>
- <!-- <button class="vflex acenter jcenter bottom_item" open-type="share">
- <image src="https://ship-expert.zhousi.hdlkeji.com/common/moments.png" class="item_icon"></image>
- <view class="item_text">朋友圈</view>
- </button> -->
- <view class="vflex acenter jcenter bottom_item" @click="saveImg">
- <image src="https://ship-expert.zhousi.hdlkeji.com/common/download.png" class="item_icon"></image>
- <view class="item_text">保存图片</view>
- </view>
- </view>
- <view class="share_cancel" @click="close">取消</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import $api from '@/static/js/api.js'
- var that = ''
- export default {
- data() {
- return {
- list: [],
- style: {
- img1: 'https://ship-expert.zhousi.hdlkeji.com/common/down2.png',
- img2: 'https://ship-expert.zhousi.hdlkeji.com/common/line.png',
- code: 'https://ship-expert.zhousi.hdlkeji.com/common/code.jpg'
- },
- pageData: {
- },
- tab_active: 1,
- shadowStyle: {
- backgroundImage: "none",
- },
- share_show: false,
- tempImage:'',
- id: '',
- pageList: [],
- }
- },
- onLoad(options) {
- that = this
- that.id = options.id
- that.getData()
- that.getList()
- uni.showShareMenu({
- withShareTicket: false,
- menus: ["shareAppMessage", "shareTimeline"]
- })
- },
- onShareAppMessage(res) {
- console.log(res);
- if (res.from === 'button') {// 来自页面内分享按钮
- console.log(res.target)
- }
- return {
- title: '船百知', //分享的名称
- path: '/pages/tabbar/shipyard/detail?id=' + that.id
- }
- },
- onShareTimeline(res) {
- /* uni.authorize({
- scope: 'scope.writePhotosAlbum',
- success() {
- uni.saveImageToPhotosAlbum({
- filePath: that.tempImage,
- success: function (res) {
- console.log('图片下载地址',res);
- }
- });
- }
- }) */
- return {
- title: '船百知',
- path: '/pages/tabbar/shipyard/detail?id=' + that.id,
- // imageUrl: that.,
- }
- },
- methods: {
- // 返回
- leftClick() {
- console.log('返回');
- $api.jump(-1)
- },
- getData() {
- $api.req({
- url: '/data/api.ShipYard/show',
- data: {
- id: that.id
- }
- }, function(res) {
- if(res.code == 1) {
- that.pageData = res.data
- }
- })
- },
- getList() {
- $api.req({
- url: '/data/api.ShipYard/jobs',
- data: {
- shipyard_id: that.id
- }
- }, function(res) {
- that.pageList = res.data.data
- })
- },
- // 切换tabs
- changeTab(index) {
- that.tab_active = index
- },
- load() {
- this.$refs.uReadMore.init();
- },
- // 收藏
- collect() {
- that.pageData.is_fav = !that.pageData.is_fav
- $api.req({
- url: '/data/api.ShipYard/fav',
- data: {
- shipyard_id: that.id,
- action: that.pageData.is_fav?1:0
- }
- }, function(res) {
- if(res.code == 1) {
- $api.info(res.info)
- }
- })
- },
- share(elClass) {
- let view = uni.createSelectorQuery().in(this).select(".Poster1");
-
- view.fields({
- size: true,
- rect: true,
- scrollOffset: true
- }, data => {
- }).exec();
- that.share_show = true
- that.$refs.Eposter.createForElRect(elClass,false)
- },
- into_chatroom() {
- var my = uni.getStorageSync("myUsername");
- var nameList = {
- myName: my,
- your: that.pageData.huanxinID,
- };
- uni.navigateTo({
- url: "/pages/chatroom/chatroom?username=" + JSON.stringify(nameList),
- });
- },
- close() {
- that.share_show = false
- },
- onSuccess(e) {
- console.log(e);
- that.tempImage = e
- },
- onError(err) {
- console.log('发生错误');
- console.log(err);
- },
- saveImg() {
- console.log(that.tempImage);
- uni.getSetting({
- success(res) {
- if(!res.authSetting['scope.writePhotosAlbum']) {
- uni.authorize({
- scope: 'scope.writePhotosAlbum',
- success() {
- uni.saveImageToPhotosAlbum({
- filePath: that.tempImage,
- success: function () {
- console.log('save success');
- $api.info('保存成功')
- that.close()
- }
- });
- }
- })
- }else {
- uni.saveImageToPhotosAlbum({
- filePath: that.tempImage,
- success: function () {
- console.log('save success');
- $api.info('保存成功')
- that.close()
- }
- });
- }
-
- }
- })
- },
-
- },
- }
- </script>
- <style lang="scss" scoped>
- .content {
- position: relative;
- .top {
- background: url('https://ship-expert.zhousi.hdlkeji.com/common/nav_bg.png') no-repeat;
- background-size: 100%;
- box-sizing: border-box;
- padding: 30rpx;
- height: 540rpx;
- .top_name {
- font-size: 36rpx;
- font-weight: 500;
- color: #222222;
- line-height: 50rpx;
- }
- .scale {
- font-size: 24rpx;
- font-weight: 400;
- color: #222222;
- line-height: 34rpx;
- }
- .top_avatar {
- width: 116rpx;
- height: 116rpx;
- border-radius: 16rpx;
- }
- }
- .box {
- position: absolute;
- left: 0;
- top: 344rpx;
- width: 100%;
- min-height: calc(100vh - 256rpx);
- background: #FFFFFF;
- border-radius: 40rpx 40rpx 0px 0px;
- .tabs {
- width: 100%;
- padding: 36rpx 0 40rpx;
- .tabs_item {
- font-size: 32rpx;
- font-weight: 500;
- color: #959595;
- line-height: 44rpx;
- width: 50%;
- text-align: center;
- }
- .tab_active {
- position: relative;
- color: #222222;
- }
- .tab_active::after {
- content: "";
- position: absolute;
- bottom: -8rpx;
- left: 39%;
- width: 80rpx;
- height: 4rpx;
- background: #506DFF;
- border-radius: 4rpx;
- }
- }
- .box1 {
- width: 100%;
- box-sizing: border-box;
- padding: 0 30rpx;
- margin-bottom: 186rpx;
- .title {
- font-size: 36rpx;
- font-weight: 500;
- color: #222222;
- line-height: 50rpx;
- }
- .cell {
- padding: 14rpx 0;
- }
- .text {
- font-size: 28rpx;
- font-weight: 400;
- color: #555555;
- line-height: 40rpx;
- }
- .img {
- width: 200rpx;
- height: 200rpx;
- border-radius: 12rpx;
- margin: 0 16rpx 20rpx 0;
- }
- .img:nth-child(3n+3) {
- margin: 0 0 20rpx;
- }
- }
- .list {
- box-sizing: border-box;
- width: 100%;
- padding: 0 30rpx;
- .list_item {
- width: 100%;
- padding: 28rpx 0 20rpx;
- border-top: 1rpx solid #F4F4F4;
- .item_title {
- font-size: 32rpx;
- font-weight: 600;
- color: #222222;
- }
- .item_blue {
- font-size: 32rpx;
- font-weight: bold;
- color: #506DFF;
- }
- .item_box {
- height: 40rpx;
- background: #F0F2F6;
- border-radius: 2px;
- box-sizing: border-box;
- padding: 4rpx 18rpx;
- font-size: 22rpx;
- font-weight: 400;
- color: #444444;
- margin-right: 20rpx;
- }
- .item_name {
- font-size: 24rpx;
- font-weight: 400;
- color: #666666;
- }
- .item_avatar {
- width: 40rpx;
- height: 40rpx;
- border-radius: 50%;
- margin-right: 12rpx;
- }
- .item_avatar1 {
- width: 88rpx;
- height: 88rpx;
- border-radius: 50%;
- margin-right: 20rpx;
- }
- .item_right1 {
-
- }
- .text_style1 {
- font-size: 22rpx;
- font-weight: 400;
- color: #666666;
- padding: 12rpx 0;
- }
- .item_box1 {
- margin-top: 8rpx;
- background: #EDF0FF;
- border-radius: 8rpx;
- box-sizing: border-box;
- padding: 4rpx 16rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #506DFF;
- }
- .item_btn1 {
- width: 140rpx;
- height: 52rpx;
- background: #F1F3FF;
- border-radius: 28rpx;
- font-size: 26rpx;
- font-weight: 500;
- color: #506DFF;
- line-height: 52rpx;
- text-align: center;
- }
- .user_name {
- font-size: 20rpx;
- font-weight: 400;
- color: #333333;
- }
- .user_right {
- font-size: 20rpx;
- font-weight: 400;
- color: #A1A1A1;
- }
- }
- }
- }
- .bottom {
- width: 100%;
- z-index: 9;
- position: fixed;
- bottom: 0;
- height: 166rpx;
- background: #FFFFFF;
- box-sizing: border-box;
- padding: 8rpx 30rpx 74rpx;
-
- .bottom_btn {
- width: 530rpx;
- height: 84rpx;
- background: #506DFF;
- border-radius: 42rpx;
- font-size: 36rpx;
- font-weight: 500;
- color: #FFFFFF;
- text-align: center;
- line-height: 84rpx;
- }
- .bottom_btn1 {
- width: 204rpx;
- height: 84rpx;
- border-radius: 21px;
- border: 1px solid #506DFF;
- font-size: 36rpx;
- font-weight: 500;
- color: #506DFF;
- text-align: center;
- line-height: 84rpx;
- margin-right: 20rpx;
- }
- .bottom_btn2 {
- width: 300rpx;
- height: 84rpx;
- border-radius: 21px;
- background: #506DFF;
- color: #FFFFFF;
- font-size: 36rpx;
- font-weight: 500;
- text-align: center;
- line-height: 84rpx;
- }
- .bottom_img {
- width: 40rpx;
- height: 40rpx;
- }
-
- }
- .share_content {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 99;
- width: 100vw;
- height: 100vh;
- background: rgba(0,0,0,0.5);
- backdrop-filter: blur(5px);
- padding: 0 0 0;
- .share_box {
- margin: 130rpx auto 0;
- width: 650rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- box-sizing: border-box;
- padding: 0 40rpx;
- .share_name {
- width: 100%;
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- line-height: 44rpx;
- }
- .share_label {
- width: 100%;
- font-size: 28rpx;
- font-weight: 400;
- color: #222222;
- line-height: 40rpx;
- }
- .share_text {
- width: 100%;
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- line-height: 34rpx;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- box-orient: vertical;
- line-clamp: 5;
- -webkit-line-clamp: 5;
- }
- .box_bottom {
- width: 100%;
- padding: 34rpx 0 16rpx;
- border-top: 1rpx dashed #C3C3C3;
-
- .bottom_left1 {
- font-size: 32rpx;
- font-weight: 500;
- color: #222222;
- line-height: 44rpx;
- padding-bottom: 20rpx;
-
- }
- .bottom_left2 {
- font-size: 22rpx;
- font-weight: 400;
- color: #999999;
- line-height: 32rpx;
- }
- .bottom_right {
- width: 136rpx;
- height: 136rpx;
- }
- }
- }
- canvas {
- position: absolute;
- top: 188rpx;
- left: 50rpx;
- width: 650rpx;
- min-height: 494rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- }
- .share_bottom {
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 388rpx;
- background: #F5F7FF;
- border-radius: 40rpx 40rpx 0px 0px;
- .bottom_item {
- width: 33%;
- margin: 50rpx 0 90rpx;
- border: none !important;
- background-color: #F5F7FF !important;
-
-
- .item_icon {
- width: 76rpx;
- height: 76rpx;
- }
- .item_text {
- font-size: 26rpx;
- font-weight: 400;
- color: #333333;
- line-height: 36rpx;
- margin-top: 12rpx;
- }
- }
- button::after {
- border: none !important;
- }
- .share_cancel {
- width: 100%;
- text-align: center;
- font-size: 32rpx;
- font-weight: 400;
- color: #333333;
- line-height: 44rpx;
- }
- }
- }
- .share_content1 {
- z-index: -99 !important;
- }
- canvas {
- position: absolute;
- top: 188rpx;
- left: 50rpx;
- }
- }
- </style>
|