兼兼街公众号代码
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.

429 lines
12 KiB

  1. <template>
  2. <view>
  3. <view class="active-card">
  4. <view>
  5. <view class="active-title">{{dataInfo.title}}</view>
  6. <view class="active-time">
  7. <text>招聘时间: {{dataInfo.startTime}} - {{dataInfo.endTime}}</text>
  8. </view>
  9. <view class="active-add">
  10. <text>招聘地址: {{dataInfo.place}}</text>
  11. </view>
  12. <view class="active-menu">
  13. <view class="menu-price">
  14. <text class="unit"></text>
  15. <text>{{dataInfo.money}}</text>
  16. <text class="tips">/{{dataInfo.company}}</text>
  17. </view>
  18. </view>
  19. </view>
  20. <view>
  21. <view class="hide-context" v-if="erop == false" @click="getCreteClick">点击查看联系方式</view>
  22. <view style="padding: 25rpx 0;" v-if="erop == true">
  23. <view class="active-title">联系方式</view>
  24. <view class="active-time">
  25. <view class="menu-price">
  26. <text class="tips">{{dataInfo.phoneDetails}}</text>
  27. <text class="copy">点击复制</text>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="contnet">
  34. <u-parse :content="dataInfo.details"></u-parse>
  35. </view>
  36. <view v-if="!showp" class="btn-box">
  37. <u-button v-if="fromPage && fromPage == 'tuijian'" text="我要推荐" @click="share" :customStyle="baomingStyle" :hairline="false" color="#00BBFF"></u-button>
  38. <!-- <view style="display: flex; background-color: #FFFFFF;">
  39. <view style="width: 266rpx; height: 72rpx; border: 1rpx solid #00BBFF; color: #00BBFF; line-height: 72rpx;text-align: center;margin: 20rpx 60rpx;" @click="poster">生成海报</view>
  40. <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>
  41. </view> -->
  42. </view>
  43. <wx-b-card></wx-b-card>
  44. <view class="share-box" v-show="shareShow" @click="shareShow=false">
  45. <view class="jiantou">
  46. <image src="@/static/img/jiantou-icon.png" mode=""></image>
  47. </view>
  48. <view class="title">
  49. <image src="@/static/img/title-icon.png" mode=""></image>
  50. </view>
  51. </view>
  52. <view v-if="showp">
  53. <view style="position: fixed;left: 0; top: 0;width: 100vw;height: 100vh;background-color: rgba(0, 0, 0, 0.2);">
  54. <view style="margin: 200rpx auto;width: 600rpx;height: 818rpx;background-color: #FFFFFF;padding: 0 32rpx;position: relative;">
  55. <view style="font-size: 28rpx;
  56. font-family: Microsoft YaHei, Microsoft YaHei-Bold;
  57. font-weight: 700;
  58. text-align: left;
  59. color: #191919;
  60. line-height: 120rpx;
  61. border-bottom: 1rpx solid #e7e7e7;
  62. position: relative;">
  63. <text>{{dataInfo.title}}</text>
  64. <view style="position: absolute; right: 20rpx; top: 0">
  65. <view style="color: red;">
  66. <text class="unit"></text>
  67. <text>{{dataInfo.money}}</text>
  68. <text class="tips">/{{dataInfo.company}}</text>
  69. </view>
  70. </view>
  71. </view>
  72. <view style="font-size: 24rpx;line-height: 60rpx;margin-top: 30rpx;">
  73. <view class="active-time">
  74. <text>时间: {{dataInfo.startTime}} - {{dataInfo.endTime}}</text>
  75. </view>
  76. <view class="active-add">
  77. <text>地址: {{dataInfo.place}}</text>
  78. </view>
  79. <view class="active-add">
  80. <text>注意
  81. 1.时间地点要留心
  82. 2.兼职期间要注意安全
  83. 3.提前收费不可信
  84. 4. 口头协议不可信
  85. 5.购物网站刷单工作需谨慎
  86. </text>
  87. </view>
  88. </view>
  89. <view style="position: absolute; bottom: 50rpx;display: flex;">
  90. <image style="width: 60rpx; height: 60rpx; border-radius: 50%;" src="../../static/qrcode.jpg"></iimage>
  91. <view style="padding: 18rpx;font-size: 28rpx;">兼兼街</view>
  92. </view>
  93. <view style="position: absolute; bottom: 50rpx; right: 32rpx;">
  94. <canvas canvas-id="qrcode" style="width: 140rpx; height: 140rpx;"/>
  95. <view style="padding: 18rpx;font-size: 24rpx;text-align: center;">国联智聘</view>
  96. </view>
  97. </view>
  98. <view style="position: absolute; bottom: 0; left: 0;">
  99. <view style="display: flex; background-color: #CCCCCC;">
  100. <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>
  101. <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>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import uQRCode from '@/common/uqrcode.js'
  110. import WxBCard from '@/components/run-component/wx-b-card.vue'
  111. export default{
  112. components: {
  113. WxBCard
  114. },
  115. data(){
  116. return{
  117. shareShow:false,
  118. fromPage:null,
  119. dataInfo:{},
  120. showp: false,
  121. userInfo: {},
  122. id:'',
  123. erop: false,
  124. src: '', // require('@/static/img/course-img.png'),
  125. baomingStyle: {
  126. fontSize: "30rpx",
  127. fontWeight: "700",
  128. height: "100rpx"
  129. }
  130. }
  131. },
  132. onLoad(e) {
  133. if(e.fromPage) this.fromPage = e.fromPage;
  134. this.id = e.id;
  135. this.getactivityFindById(e.id);
  136. },
  137. onReady() {
  138. this.$com.displayNav()
  139. },
  140. methods:{
  141. getmyInfo(){
  142. this.$api('myInfo')
  143. .then(res=>{
  144. if(res.code == 200){
  145. this.role = res.result.role;
  146. this.userInfo = res.result;
  147. this.$store.commit('set_userInfo',res.result)
  148. this.qrFun('https://xinxiong.java996.icu/pages/my/login-kehu?vid=' + this.userInfo.id + "&did=" + this.id)
  149. }else{
  150. this.userInfo = null
  151. }
  152. })
  153. },
  154. getCreteClick(){
  155. let that = this;
  156. this.$api('creteClick',{title: this.dataInfo.title,newId:this.dataInfo.id})
  157. .then(res=>{
  158. if(res.code == 200){
  159. that.erop = true;
  160. }else{
  161. this.$Toast(res.message)
  162. //跳转到实名认证页面进行实名认证
  163. setTimeout(()=>{ //设置延迟执行
  164. uni.navigateTo({
  165. url:'/pages/my/list-renzhen'
  166. })
  167. },2000);
  168. }
  169. })
  170. },
  171. qrFun(text) {
  172. this.qrShow = true
  173. uQRCode.make({
  174. canvasId: 'qrcode',
  175. componentInstance: this,
  176. text: text,
  177. size: 65,
  178. margin: 0,
  179. backgroundColor: '#FFFFFF',
  180. foregroundColor: '#000000',
  181. fileType: 'png',
  182. errorCorrectLevel: uQRCode.errorCorrectLevel.H,
  183. success: res => {
  184. console.log("ercode", text)
  185. }
  186. })
  187. },
  188. apply(){
  189. if(!this.$store.state.userToken){
  190. this.$Toast('请先登录!')
  191. setTimeout(()=>{
  192. uni.navigateTo({
  193. url:'/pages/my/login-kehu'
  194. })
  195. },1000)
  196. return
  197. }
  198. this.share(1)
  199. uni.navigateTo({
  200. url:`/pages/home/buy-course?id=${this.id}`
  201. })
  202. },
  203. wechatMoments() {
  204. this.$api('creteFenxian',{url: location.href.split('#')[0]})
  205. .then(res=>{
  206. if (res.code == 200) {
  207. this.$jweixin.config({
  208. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  209. appId: 'wxdabccf5a0110cfab', // 必填,公众号的唯一标识
  210. timestamp: res.result.timestamp, // 必填,生成签名的时间戳
  211. nonceStr: res.result.noncestr, // 必填,生成签名的随机串
  212. signature: res.result.sgture, // 必填,签名
  213. jsApiList: ['updateAppMessageShareData','updateTimelineShareData','onMenuShareTimeline','onMenuShareAppMessage','chooseWXPay']
  214. });
  215. this.$jweixin.ready(ress=> {
  216. this.$jweixin.updateTimelineShareData({
  217. title: this.dataInfo.title,
  218. link: `https://xinxiong.java996.icu/pages/home/course-detial?id=${this.id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  219. })
  220. });
  221. }
  222. })
  223. },
  224. share(type){//1为支付
  225. if(!type){
  226. this.shareShow = true;
  227. }
  228. this.$api('creteFenxian',{url: location.href.split('#')[0]})
  229. .then(res=>{
  230. if (res.code == 200) {
  231. this.$jweixin.config({
  232. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  233. appId: 'wxdabccf5a0110cfab', // 必填,公众号的唯一标识
  234. timestamp: res.result.timestamp, // 必填,生成签名的时间戳
  235. nonceStr: res.result.noncestr, // 必填,生成签名的随机串
  236. signature: res.result.sgture, // 必填,签名
  237. jsApiList: ['updateAppMessageShareData','updateTimelineShareData','onMenuShareTimeline','onMenuShareAppMessage','chooseWXPay']
  238. });
  239. this.$jweixin.ready(ress=> {
  240. this.$jweixin.onMenuShareTimeline({
  241. title: this.dataInfo.title,
  242. desc: this.dataInfo.title, // 分享描述
  243. link: `http://liyuyu.xzaiyp.top/pages/home/course-detial?id=${this.id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  244. success: function () {
  245. // 用户点击了分享后执行的回调函数
  246. }
  247. })
  248. this.$jweixin.onMenuShareAppMessage({
  249. title: this.dataInfo.title,
  250. desc: this.dataInfo.title, // 分享描述
  251. link: `http://liyuyu.xzaiyp.top/pages/home/course-detial?id=${this.id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
  252. success: function () {
  253. // 用户点击了分享后执行的回调函数
  254. }
  255. })
  256. })
  257. this.$jweixin.error(err=>{
  258. // uni.showModal({
  259. // content:'err:' + JSON.stringify(err)
  260. // })
  261. // config信息验证失败会执行 error 函数,如签名过期导致验证失败,具体错误信息可以打开 config 的debug模式查看,也可以在返回的 res 参数中查看,对于 SPA 可以在这里更新签名。
  262. });
  263. // uni.navigateTo({
  264. // url:`/pages/home/buy-course?id=${this.id}`
  265. // })
  266. }
  267. })
  268. },
  269. getactivityFindById(id){
  270. uni.showLoading()
  271. this.$api('activityFindById',{id})
  272. .then(res=>{
  273. uni.hideLoading()
  274. if(res.code == 200){
  275. this.dataInfo = res.result;
  276. }
  277. })
  278. },
  279. poster (){
  280. this.showp = true;
  281. this.getmyInfo()
  282. }
  283. }
  284. }
  285. </script>
  286. <style lang="scss" scoped>
  287. .hide-context {
  288. margin: 20rpx 0;
  289. padding: 30rpx 30rpx;
  290. outline: 0px;
  291. width: 100%;
  292. max-width: 100%;
  293. box-sizing: border-box;
  294. overflow-wrap: break-word;
  295. display: inline-block;
  296. vertical-align: top;
  297. background-image: linear-gradient(#dceefc 0%, #fefeff 100%);
  298. height: auto;
  299. overflow: hidden;
  300. border: 0px none;
  301. color: #B0B0B0;
  302. text-align: center;
  303. font-size: 26rpx;
  304. }
  305. .active-card {
  306. background: #ffffff;
  307. padding: 20rpx 29rpx 13rpx;
  308. border-bottom: 20rpx solid #F5F5F5;
  309. .active-title {
  310. font-size: 36rpx;
  311. color: #000;
  312. font-weight: 700;
  313. margin-top: 20rpx;
  314. line-height: 40rpx;
  315. }
  316. .active-time {
  317. color: #707070;
  318. font-size: 30rpx;
  319. margin: 30rpx 0;
  320. }
  321. .active-add {
  322. color: #707070;
  323. font-size: 30rpx;
  324. }
  325. .menu-price {
  326. font-weight: 700;
  327. font-size: 40rpx;
  328. color: #D33D3E;
  329. .unit {
  330. font-size: 40rpx;
  331. }
  332. .tips {
  333. font-size: 30rpx;
  334. }
  335. }
  336. .copy {
  337. padding-left: 20rpx;
  338. font-size: 26rpx;
  339. color: #1b2bbc;
  340. cursor: pointer;
  341. }
  342. .active-menu {
  343. margin-top: 31rpx;
  344. .menu-btn {
  345. width: 213rpx;
  346. height: 79rpx;
  347. display: flex;
  348. align-items: center;
  349. justify-content: center;
  350. background-color: #ED1450;
  351. color: #FFFFFF;
  352. font-size: 26rpx;
  353. border-radius: 40rpx;
  354. }
  355. }
  356. }
  357. .contnet {
  358. padding: 20rpx 20rpx 150rpx 20rpx ;
  359. font-weight: 500;
  360. font-size: 40rpx;
  361. }
  362. .btn-box {
  363. position: fixed;
  364. bottom: 0;
  365. left: 0;
  366. right: 0;
  367. }
  368. .share-box {
  369. width: 100%;
  370. height: 100vh;
  371. position: fixed;
  372. top: 0;
  373. left: 0;
  374. background-color: rgba(0,0,0,.8);
  375. .jiantou {
  376. position: absolute;
  377. top: 140rpx;
  378. right: 40rpx;
  379. image {
  380. width: 138rpx;
  381. height: 138rpx;
  382. }
  383. }
  384. .title {
  385. position: absolute;
  386. top: 50%;
  387. left: 50%;
  388. transform: translate(-50%,-50%);
  389. image {
  390. width: 526rpx;
  391. height: 212rpx;
  392. }
  393. }
  394. }
  395. </style>