|
|
- <template>
- <view>
- <view class="active-card">
- <view>
- <view class="active-title">{{dataInfo.title}}</view>
- <view class="active-time">
- <text>招聘时间: {{dataInfo.startTime}} - {{dataInfo.endTime}}</text>
- </view>
- <view class="active-add">
- <text>招聘地址: {{dataInfo.place}}</text>
- </view>
- <view class="active-menu">
- <view class="menu-price">
- <text class="unit">¥</text>
- <text>{{dataInfo.money}}</text>
- <text class="tips">/{{dataInfo.company}}</text>
- </view>
- </view>
- </view>
-
- <view>
- <view class="hide-context" v-if="erop == false" @click="getCreteClick">点击查看联系方式</view>
- <view style="padding: 25rpx 0;" v-if="erop == true">
- <view class="active-title">联系方式</view>
- <view class="active-time">
- <view class="menu-price">
- <text class="tips">{{dataInfo.phoneDetails}}</text>
- <text class="copy">点击复制</text>
- </view>
- </view>
- </view>
- </view>
-
- </view>
-
- <view class="contnet">
- <u-parse :content="dataInfo.details"></u-parse>
- </view>
-
-
- <view v-if="!showp" class="btn-box">
- <u-button v-if="fromPage && fromPage == 'tuijian'" text="我要推荐" @click="share" :customStyle="baomingStyle" :hairline="false" color="#00BBFF"></u-button>
- <!-- <view style="display: flex; background-color: #FFFFFF;">
- <view style="width: 266rpx; height: 72rpx; border: 1rpx solid #00BBFF; color: #00BBFF; line-height: 72rpx;text-align: center;margin: 20rpx 60rpx;" @click="poster">生成海报</view>
- <view style="width: 266rpx; height: 72rpx; border: 1rpx solid #00BBFF; background-color: #00BBFF; color: #FFFFFF; line-height: 72rpx;text-align: center;margin: 20rpx 60rpx; margin-left: auto;" @click="wechatMoments">分享到朋友圈</view>
- </view> -->
- </view>
- <wx-b-card></wx-b-card>
- <view class="share-box" v-show="shareShow" @click="shareShow=false">
- <view class="jiantou">
- <image src="@/static/img/jiantou-icon.png" mode=""></image>
- </view>
- <view class="title">
- <image src="@/static/img/title-icon.png" mode=""></image>
- </view>
- </view>
-
- <view v-if="showp">
- <view style="position: fixed;left: 0; top: 0;width: 100vw;height: 100vh;background-color: rgba(0, 0, 0, 0.2);">
- <view style="margin: 200rpx auto;width: 600rpx;height: 818rpx;background-color: #FFFFFF;padding: 0 32rpx;position: relative;">
- <view style="font-size: 28rpx;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
- text-align: left;
- color: #191919;
- line-height: 120rpx;
- border-bottom: 1rpx solid #e7e7e7;
- position: relative;">
- <text>{{dataInfo.title}}</text>
- <view style="position: absolute; right: 20rpx; top: 0">
- <view style="color: red;">
- <text class="unit">¥</text>
- <text>{{dataInfo.money}}</text>
- <text class="tips">/{{dataInfo.company}}</text>
- </view>
- </view>
- </view>
- <view style="font-size: 24rpx;line-height: 60rpx;margin-top: 30rpx;">
- <view class="active-time">
- <text>时间: {{dataInfo.startTime}} - {{dataInfo.endTime}}</text>
- </view>
- <view class="active-add">
- <text>地址: {{dataInfo.place}}</text>
- </view>
- <view class="active-add">
- <text>注意:
- 1.时间地点要留心
- 2.兼职期间要注意安全
- 3.提前收费不可信
- 4. 口头协议不可信
- 5.购物网站刷单工作需谨慎
- </text>
- </view>
- </view>
- <view style="position: absolute; bottom: 50rpx;display: flex;">
- <image style="width: 60rpx; height: 60rpx; border-radius: 50%;" src="../../static/qrcode.jpg"></iimage>
- <view style="padding: 18rpx;font-size: 28rpx;">兼兼街</view>
- </view>
- <view style="position: absolute; bottom: 50rpx; right: 32rpx;">
- <canvas canvas-id="qrcode" style="width: 140rpx; height: 140rpx;"/>
- <view style="padding: 18rpx;font-size: 24rpx;text-align: center;">国联智聘</view>
- </view>
- </view>
- <view style="position: absolute; bottom: 0; left: 0;">
- <view style="display: flex; background-color: #CCCCCC;">
- <view style="width: 266rpx; height: 72rpx; border: 1rpx solid #00BBFF; color: #00BBFF; line-height: 72rpx;text-align: center;margin: 20rpx 60rpx;" @click="showp=false">取消</view>
- <view style="width: 266rpx; height: 72rpx; border: 1rpx solid #00BBFF; background-color: #00BBFF; color: #FFFFFF; line-height: 72rpx;text-align: center;margin: 20rpx 60rpx; margin-left: auto;" @click="">保存海报</view>
- </view>
- </view>
- </view>
- </view>
-
-
- </view>
- </template>
-
- <script>
- import uQRCode from '@/common/uqrcode.js'
- import WxBCard from '@/components/run-component/wx-b-card.vue'
-
- export default{
- components: {
- WxBCard
- },
- data(){
- return{
- shareShow:false,
- fromPage:null,
- dataInfo:{},
- showp: false,
- userInfo: {},
- id:'',
- erop: false,
- src: '', // require('@/static/img/course-img.png'),
- baomingStyle: {
- fontSize: "30rpx",
- fontWeight: "700",
- height: "100rpx"
- }
- }
- },
- onLoad(e) {
- if(e.fromPage) this.fromPage = e.fromPage;
- this.id = e.id;
- this.getactivityFindById(e.id);
-
- },
- onReady() {
- this.$com.displayNav()
- },
- methods:{
- getmyInfo(){
- this.$api('myInfo')
- .then(res=>{
- if(res.code == 200){
- this.role = res.result.role;
- this.userInfo = res.result;
- this.$store.commit('set_userInfo',res.result)
- this.qrFun('https://xinxiong.java996.icu/pages/my/login-kehu?vid=' + this.userInfo.id + "&did=" + this.id)
- }else{
- this.userInfo = null
- }
- })
- },
-
- getCreteClick(){
-
- let that = this;
- this.$api('creteClick',{title: this.dataInfo.title,newId:this.dataInfo.id})
- .then(res=>{
- if(res.code == 200){
- that.erop = true;
- }else{
- this.$Toast(res.message)
- //跳转到实名认证页面进行实名认证
- setTimeout(()=>{ //设置延迟执行
- uni.navigateTo({
- url:'/pages/my/list-renzhen'
- })
- },2000);
-
-
- }
- })
-
- },
-
-
-
-
-
-
-
-
- qrFun(text) {
- this.qrShow = true
- uQRCode.make({
- canvasId: 'qrcode',
- componentInstance: this,
- text: text,
- size: 65,
- margin: 0,
- backgroundColor: '#FFFFFF',
- foregroundColor: '#000000',
- fileType: 'png',
- errorCorrectLevel: uQRCode.errorCorrectLevel.H,
- success: res => {
- console.log("ercode", text)
- }
- })
- },
- apply(){
- if(!this.$store.state.userToken){
- this.$Toast('请先登录!')
- setTimeout(()=>{
- uni.navigateTo({
- url:'/pages/my/login-kehu'
- })
- },1000)
- return
- }
- this.share(1)
- uni.navigateTo({
- url:`/pages/home/buy-course?id=${this.id}`
- })
- },
- wechatMoments() {
- this.$api('creteFenxian',{url: location.href.split('#')[0]})
- .then(res=>{
- if (res.code == 200) {
- this.$jweixin.config({
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: 'wxdabccf5a0110cfab', // 必填,公众号的唯一标识
- timestamp: res.result.timestamp, // 必填,生成签名的时间戳
- nonceStr: res.result.noncestr, // 必填,生成签名的随机串
- signature: res.result.sgture, // 必填,签名
- jsApiList: ['updateAppMessageShareData','updateTimelineShareData','onMenuShareTimeline','onMenuShareAppMessage','chooseWXPay']
- });
- this.$jweixin.ready(ress=> {
- this.$jweixin.updateTimelineShareData({
- title: this.dataInfo.title,
- link: `https://xinxiong.java996.icu/pages/home/course-detial?id=${this.id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
- })
- });
- }
- })
- },
- share(type){//1为支付
- if(!type){
- this.shareShow = true;
- }
- this.$api('creteFenxian',{url: location.href.split('#')[0]})
- .then(res=>{
- if (res.code == 200) {
- this.$jweixin.config({
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: 'wxdabccf5a0110cfab', // 必填,公众号的唯一标识
- timestamp: res.result.timestamp, // 必填,生成签名的时间戳
- nonceStr: res.result.noncestr, // 必填,生成签名的随机串
- signature: res.result.sgture, // 必填,签名
- jsApiList: ['updateAppMessageShareData','updateTimelineShareData','onMenuShareTimeline','onMenuShareAppMessage','chooseWXPay']
- });
- this.$jweixin.ready(ress=> {
- this.$jweixin.onMenuShareTimeline({
- title: this.dataInfo.title,
- desc: this.dataInfo.title, // 分享描述
- link: `http://liyuyu.xzaiyp.top/pages/home/course-detial?id=${this.id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
- success: function () {
- // 用户点击了分享后执行的回调函数
- }
- })
-
- this.$jweixin.onMenuShareAppMessage({
- title: this.dataInfo.title,
- desc: this.dataInfo.title, // 分享描述
- link: `http://liyuyu.xzaiyp.top/pages/home/course-detial?id=${this.id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
- success: function () {
- // 用户点击了分享后执行的回调函数
- }
- })
- })
- this.$jweixin.error(err=>{
- // uni.showModal({
- // content:'err:' + JSON.stringify(err)
- // })
- // config信息验证失败会执行 error 函数,如签名过期导致验证失败,具体错误信息可以打开 config 的debug模式查看,也可以在返回的 res 参数中查看,对于 SPA 可以在这里更新签名。
- });
- // uni.navigateTo({
- // url:`/pages/home/buy-course?id=${this.id}`
- // })
- }
- })
- },
- getactivityFindById(id){
- uni.showLoading()
- this.$api('activityFindById',{id})
- .then(res=>{
- uni.hideLoading()
- if(res.code == 200){
- this.dataInfo = res.result;
- }
- })
- },
- poster (){
- this.showp = true;
- this.getmyInfo()
- }
- }
- }
- </script>
-
- <style lang="scss" scoped>
-
- .hide-context {
- margin: 20rpx 0;
- padding: 30rpx 30rpx;
- outline: 0px;
- width: 100%;
- max-width: 100%;
- box-sizing: border-box;
- overflow-wrap: break-word;
- display: inline-block;
- vertical-align: top;
- background-image: linear-gradient(#dceefc 0%, #fefeff 100%);
- height: auto;
- overflow: hidden;
- border: 0px none;
- color: #B0B0B0;
- text-align: center;
- font-size: 26rpx;
- }
-
- .active-card {
- background: #ffffff;
- padding: 20rpx 29rpx 13rpx;
- border-bottom: 20rpx solid #F5F5F5;
-
-
- .active-title {
- font-size: 36rpx;
- color: #000;
- font-weight: 700;
- margin-top: 20rpx;
- line-height: 40rpx;
- }
-
- .active-time {
- color: #707070;
- font-size: 30rpx;
- margin: 30rpx 0;
- }
- .active-add {
- color: #707070;
- font-size: 30rpx;
- }
- .menu-price {
- font-weight: 700;
- font-size: 40rpx;
- color: #D33D3E;
- .unit {
- font-size: 40rpx;
- }
- .tips {
- font-size: 30rpx;
- }
- }
- .copy {
- padding-left: 20rpx;
- font-size: 26rpx;
- color: #1b2bbc;
- cursor: pointer;
- }
- .active-menu {
- margin-top: 31rpx;
- .menu-btn {
- width: 213rpx;
- height: 79rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: #ED1450;
- color: #FFFFFF;
- font-size: 26rpx;
- border-radius: 40rpx;
- }
- }
-
- }
-
- .contnet {
- padding: 20rpx 20rpx 150rpx 20rpx ;
- font-weight: 500;
- font-size: 40rpx;
- }
-
- .btn-box {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- }
-
- .share-box {
- width: 100%;
- height: 100vh;
- position: fixed;
- top: 0;
- left: 0;
- background-color: rgba(0,0,0,.8);
- .jiantou {
- position: absolute;
- top: 140rpx;
- right: 40rpx;
- image {
- width: 138rpx;
- height: 138rpx;
- }
- }
- .title {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- image {
- width: 526rpx;
- height: 212rpx;
- }
- }
- }
- </style>
|