specialTaskDetail.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  1. <template>
  2. <view style="position: relative;">
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view class="" id="wrap0" v-show="!loading">
  6. <view class="home" style="padding-top: 180rpx;">
  7. <view class="uni-margin-wrap">
  8. <swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000"
  9. :duration="1000">
  10. <swiper-item v-for="item in carousel_images">
  11. <image :src="item" mode="aspectFill" style="width: 100%;height: 100%;"
  12. @click="handlePreviewImage1(item)">
  13. </image>
  14. </swiper-item>
  15. </swiper>
  16. <view class="">
  17. <view class="Tasktext">
  18. <image :src="information.PlatformInfo.platform_icon" mode=""></image>
  19. <span>{{information.project_name}}</span>
  20. </view>
  21. <view class="markcontent">
  22. <view style="display: flex;margin: 10rpx 0;">
  23. <p class="wvp">商品价值:</p>
  24. <p class="wvp">{{information.Product.ProductPrice}}元</p>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- <view class="interval"></view> -->
  31. <view class="home" style="padding-top: 0;">
  32. <view class="">
  33. <view class="circularmark">
  34. <p>任务信息</p>
  35. </view>
  36. <view class="markcontent">
  37. <view style="display: flex;margin: 10rpx 0;">
  38. <p class="label">社媒平台:</p>
  39. <p class="wvp">{{information.PlatformInfo.platform_name}}</p>
  40. </view>
  41. <view style="display: flex;margin: 10rpx 0;">
  42. <p class="label">商品类型:</p>
  43. <p class="wvp">{{information.Product.ProductType}}</p>
  44. </view>
  45. <view style="display: flex;;margin: 10rpx 0;">
  46. <p class="label">商品链接:</p>
  47. <p class="wvp" style="padding: 0;">{{information.Product.ProductUrl}}</p>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="" id="wrap1">
  53. <view class="home" style="padding-top: 0;">
  54. <view class="">
  55. <view class="circularmark">
  56. <p>任务要求</p>
  57. </view>
  58. <view class="markcontent">
  59. <view style="display: flex;">
  60. <p class="wvp" style="margin: 10rpx 0;">内容形式:</p>
  61. <p class="wvp" style="margin: 10rpx 0;">{{information.content}}</p>
  62. </view>
  63. <p class="wvp" style="margin: 10rpx 0;">商品描述:</p>
  64. <text class="wvp" style="margin: 10rpx 0;" decode="true" user-select="true">
  65. {{information.Product.ProductDetail}} </text>
  66. </p>
  67. <p class="wvp" style="margin: 10rpx 0;">任务详情:</p>
  68. <text class="wvp" style="margin: 10rpx 0;" decode="true" user-select="true">
  69. {{information.project_detail}} </text>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="" id="wrap2">
  75. <view class="home" style="padding-top: 0;">
  76. <view class="">
  77. <view class="circularmark">
  78. <p>任务详情图</p>
  79. </view>
  80. <view class="markcontent1">
  81. <view class="diagram" v-for="item in information.ProjectPhoto">
  82. <image :src="item.photo_url" mode="widthFix"></image>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="">
  87. <view class="circularmark">
  88. <p>商品详情图</p>
  89. </view>
  90. <view class="markcontent1">
  91. <view class="diagram" v-for="item in product_detail_images">
  92. <image :src="item" mode="widthFix"></image>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="interval2"></view>
  98. </view>
  99. <view class="signup">
  100. <button type="default" class="but1" :loading="loading" :class="{'on':item.title === '1',}"
  101. @click="toggle('bottom')" v-if="isSign===0">
  102. 开始执行</button>
  103. <button type="default" class="but1" disabled v-if="isSign===1 && isAgree === 1"> 等待审核 </button>
  104. <button type="default" class="but1" disabled v-if="isSign===1 && isAgree === 2"> 执行中 </button>
  105. <button type="default" class="but1" disabled v-if="isSign===1 && isAgree === 3"> 已结束 </button>
  106. <button type="default" class="but2" @click="toggle1('bottom')">
  107. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task8.png" mode=""></image>
  108. 分享
  109. </button>
  110. </view>
  111. <view>
  112. <!-- 底部普通弹窗 -->
  113. <uni-popup ref="popup1" background-color="#fff" @change="change" style="border-radius: 20rpx;">
  114. <view class="popup-content1" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  115. <view
  116. style="display: flex; justify-content: space-around; margin-top: 10% ;margin-bottom: 3% ;">
  117. <view>
  118. <button class="tii2" data-name="shareBtn" open-type="share">
  119. <view class="circular" style="margin-top: 10% ;">
  120. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/taskw.png"
  121. mode=""></image>
  122. </view>
  123. <p class="tii">发送给朋友</p>
  124. </button>
  125. </view>
  126. <view>
  127. <button class="tii2" @click="toggle2('center')">
  128. <view class="circular" style="margin-top: 10% ;">
  129. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/taske.png"
  130. mode=""></image>
  131. </view>
  132. <p class="tii">生成分享码</p>
  133. </button>
  134. </view>
  135. </view>
  136. <button type="default" class="errar" @click="cancel()">取消</button>
  137. </view>
  138. </uni-popup>
  139. </view>
  140. <uni-popup ref="popup2" class="share1" background-color="#fff" @change="change">
  141. <view class="popup-content">
  142. <image :src="canvasUrl" mode="widthFix" style="width: 300px;height: 400px;margin-top: 30rpx;">
  143. </image>
  144. <mosoweCanvas ref="mosoweCanvasComponents" @canvasImage="_canvasImage" :lists="lists" height="400"
  145. width="300" />
  146. <view class="" style="text-align: center;margin: 5% 0;">
  147. <button class="butmin" size="mini" @tap="saveImage">保存</button>
  148. </view>
  149. </view>
  150. </uni-popup>
  151. </view>
  152. </view>
  153. </template>
  154. <script>
  155. import mosoweCanvas from "@/components/mosowe-canvas-image/mosowe-canvas-image";
  156. import mvBar from "@/components/mys_navBar/mysNavBar";
  157. import zSwiper from '@/components/z-swiper/index.vue'
  158. import {
  159. getRouter,
  160. getQueryString
  161. } from '@/components/utils.js';
  162. import {
  163. saveImageToPhotosAlbum,
  164. showToast,
  165. downloadFile
  166. } from '@/uni_modules/sakura-canvas/js_sdk/util'
  167. export default {
  168. components: {
  169. mvBar,
  170. zSwiper,
  171. mosoweCanvas
  172. },
  173. data() {
  174. return {
  175. canvasUrl: '',
  176. loading: true,
  177. isSign: 0,
  178. isAgree: 0,
  179. strategy_id: 0,
  180. strategy: null,
  181. input_offer: 0.0,
  182. chooseBtn: 0,
  183. share: {
  184. title: "",
  185. path: '',
  186. imageUrl: '',
  187. desc: '',
  188. content: ''
  189. },
  190. poster: {},
  191. posterImg: '',
  192. canvasId: 'myCanvas',
  193. img: '',
  194. task_type_info: ["实体商品寄拍", "虚拟产品测评", "线下探店打卡", "素材微原创"],
  195. talent_type_info: ["美妆", "美食", "生活", "时尚", "测评", "旅行", "汽车", "萌宠", "游戏", "音乐", "舞蹈", "房产", "情感", "三农",
  196. "园艺", "随拍", "图文控", "二次元", "母婴亲子", "颜值达人", "剧情搞笑", "运动健身", "家居家装", "科技数码", "教育培训", "才艺技能", "艺术文化",
  197. "财经投资",
  198. ],
  199. product_types: [{
  200. value: 1,
  201. label: '3C及电器'
  202. },
  203. {
  204. value: 2,
  205. label: '食品饮料'
  206. },
  207. {
  208. value: 3,
  209. label: '服装配饰'
  210. },
  211. {
  212. value: 4,
  213. label: '医疗'
  214. },
  215. {
  216. value: 5,
  217. label: '房地产'
  218. },
  219. {
  220. value: 6,
  221. label: '家居建材'
  222. },
  223. {
  224. value: 7,
  225. label: '教育培训'
  226. },
  227. {
  228. value: 8,
  229. label: '出行旅游'
  230. },
  231. {
  232. value: 9,
  233. label: '游戏'
  234. },
  235. {
  236. value: 10,
  237. label: '互联网平台'
  238. },
  239. {
  240. value: 11,
  241. label: '汽车'
  242. },
  243. {
  244. value: 12,
  245. label: '文体娱乐'
  246. },
  247. {
  248. value: 13,
  249. label: '影视传媒'
  250. },
  251. {
  252. value: 14,
  253. label: '线下店铺'
  254. },
  255. {
  256. value: 15,
  257. label: '软件服务'
  258. },
  259. {
  260. value: 16,
  261. label: '美妆'
  262. },
  263. {
  264. value: 17,
  265. label: '母婴宠物'
  266. },
  267. {
  268. value: 18,
  269. label: '日化'
  270. },
  271. {
  272. value: 19,
  273. label: '其他'
  274. }
  275. ],
  276. title: '[东鑫记港式茶餐厅]南京东路|魔都新晋爆款茶餐厅来袭!99元抢门',
  277. price: '',
  278. tips: '识别二维码\n立即申请任务',
  279. head: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task15.png',
  280. big: '',
  281. tabBarStyle: {},
  282. activeTab: 0,
  283. hei: '',
  284. hei1: '',
  285. topp0: '',
  286. topp1: '',
  287. topp2: '',
  288. scrollTop: '',
  289. activeColor: '#f2d22d',
  290. value: '',
  291. value1: '',
  292. sex: [],
  293. coop_choice: [],
  294. type: 'center',
  295. type1: 'center',
  296. type2: 'center',
  297. item: {
  298. title: '0'
  299. },
  300. // 视频轮播
  301. fullScreen: true,
  302. topFloat: true,
  303. fotterFloat: true,
  304. // 指示器样式
  305. mode: 'circle',
  306. indicatorPos: 'bottomCenter',
  307. list1: [{
  308. type: 'video',
  309. poster: 'https://img2.baidu.com/it/u=2141851239,1037607188&fm=26&fmt=auto&gp=0.jpg',
  310. src: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/a876efc0-4f35-11eb-97b7-0dc4655d6e68.mp4',
  311. },
  312. {
  313. type: 'image',
  314. src: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png'
  315. },
  316. {
  317. type: 'video',
  318. poster: 'https://img1.baidu.com/it/u=1297253752,1185196455&fm=26&fmt=auto&gp=0.jpg',
  319. src: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/a876efc0-4f35-11eb-97b7-0dc4655d6e68.mp4',
  320. },
  321. {
  322. type: 'image',
  323. src: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png'
  324. },
  325. ],
  326. carousel_images: ['https://img2.baidu.com/it/u=2141851239,1037607188&fm=26&fmt=auto&gp=0.jpg',
  327. 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png',
  328. ],
  329. dotIndex: 0, //指示器索引
  330. dotFloatIndex: 0, //位置指示器索引
  331. //轮播图
  332. swiper: {
  333. margin: "150rpx",
  334. index: 0,
  335. list: [
  336. ]
  337. },
  338. tar: false,
  339. mysNavConfig: {
  340. /* 占位开启 */
  341. // navPadding: true,
  342. /* 背景 */
  343. // bgColor: "#f8f8f8",
  344. /* 开启单页显示首页图标 */
  345. isHome: false,
  346. /* 固定导航 */
  347. navFixed: true,
  348. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  349. navTitle: {
  350. text: "任务详情",
  351. color: "",
  352. fontSize: "32rpx", // px upx rpx
  353. fontWeight: "500", // 100 - 700
  354. },
  355. btnType: "type2",
  356. onLeftClick: '/pages/tasksquare/tasksquare',
  357. /* type2 按钮 */
  358. type2Config: {
  359. // 左图标
  360. leftPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png2.png",
  361. // 右图标
  362. rightPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png4.png",
  363. // 圆角
  364. radius: "40rpx",
  365. },
  366. },
  367. projectid: '',
  368. talent: {},
  369. account: [],
  370. information: {},
  371. zhanghaocode: '',
  372. product_detail_images: [],
  373. codeImg: '',
  374. queryAll: '',
  375. };
  376. },
  377. computed: {
  378. lists: {
  379. get() {
  380. let tmplist = [
  381. // 大图
  382. {
  383. type: 'image',
  384. content: this.img,
  385. width: 300,
  386. height: 300,
  387. x: 0,
  388. y: 0,
  389. },
  390. // 标题
  391. {
  392. type: 'text',
  393. content: this.title,
  394. color: '#333333',
  395. size: 12,
  396. width: 200,
  397. height: 10,
  398. x: 10,
  399. y: 320,
  400. },
  401. // 文案1
  402. {
  403. type: 'text',
  404. content: "招募人数:" + this.information.taskNum,
  405. color: '#333333',
  406. size: 10,
  407. width: 60,
  408. height: 10,
  409. x: 10,
  410. y: 340,
  411. },
  412. // 文案2
  413. {
  414. type: 'text',
  415. content: "扫码立即报名",
  416. color: '#333333',
  417. size: 10,
  418. width: 60,
  419. height: 10,
  420. x: 80,
  421. y: 340,
  422. },
  423. // logo
  424. {
  425. type: 'image',
  426. content: this.younggee_logo,
  427. width: 120,
  428. height: 50,
  429. x: 10,
  430. y: 350,
  431. },
  432. // 二维码
  433. {
  434. type: 'qr',
  435. content: this.head,
  436. width: 75,
  437. height: 75,
  438. x: 210,
  439. y: 305,
  440. },
  441. ]
  442. return tmplist
  443. },
  444. set() {}
  445. }
  446. },
  447. async created() {},
  448. async onShow() {
  449. // 判断登录
  450. await this.isLogin();
  451. if (this.token === '') {
  452. uni.showModal({
  453. content: '请先登录',
  454. success: function(res) {
  455. if (res.confirm) {
  456. uni.navigateTo({
  457. url: '/pages/login/login'
  458. });
  459. } else if (res.cancel) {
  460. uni.navigateBack();
  461. }
  462. }
  463. });
  464. } else {
  465. this.loading = true;
  466. uni.showLoading({
  467. title: '加载中'
  468. });
  469. await this.getTalentInfo();
  470. await this.getProjectDetail();
  471. await this.getTalentAccountInfo();
  472. if (this.account.length != 0) {
  473. await this.isSignUp();
  474. }
  475. this.loading = false;
  476. uni.hideLoading();
  477. }
  478. },
  479. onLoad(options) {
  480. getRouter();
  481. if (options.q) {
  482. let queryAll = decodeURIComponent(options.q);
  483. this.projectid = getQueryString(queryAll, 'id')
  484. } else {
  485. this.projectid = options.id
  486. }
  487. this.share.path = 'https://younggee.com/wxapp/specialtaskdetail?action=taskdetail&id=' + this.projectid
  488. },
  489. onReady() { // 注意:想要拿到元素实例,需要在实例已经挂载到页面上才可以
  490. },
  491. methods: {
  492. // 判断登陆是否过期
  493. isLogin() {
  494. return this.$https.get('/youngee/c/t/g/is-login')
  495. .then(res => {
  496. if (res.data.code === 403) {
  497. // 登陆已失效
  498. this.token = ""
  499. } else {
  500. this.token = uni.getStorageSync('token')
  501. }
  502. })
  503. },
  504. handlePreviewImage1(item) {
  505. console.log("image src: ", item)
  506. let that = this
  507. wx.previewImage({
  508. current: item, // 当前显示图片的http链接
  509. urls: that.carousel_images // 需要预览的图片http链接列表
  510. })
  511. },
  512. handleCoopClick(value) {
  513. if (this.account[0].fans_count < value.followers_low) {
  514. // 提示“粉丝量不符合报名条件”
  515. uni.showToast({
  516. title: '粉丝量不符合报名条件',
  517. icon: 'none',
  518. duration: 2000
  519. });
  520. } else {
  521. this.strategy_id = value.strategy_id;
  522. this.strategy = value;
  523. }
  524. },
  525. getProjectDetail() {
  526. return this.$https.get('/youngee/c/t/g/get-project-detail' +
  527. "?" +
  528. "projectid" +
  529. "=" +
  530. this.projectid
  531. ).then(res => {
  532. this.information = res.data.data
  533. this.information.Product = JSON.parse(res.data.data.product_snap);
  534. this.information.Product.ProductPhoto = JSON.parse(res.data.data.product_photo_snap);
  535. console.log("Product: ", this.information.Product)
  536. // 分享图里的
  537. for (let i = 0; i < this.information.Product.ProductPhoto.length; i++) {
  538. if (this.information.Product.ProductPhoto[i].Symbol === 1) {
  539. this.img = this.information.Product.ProductPhoto[i].PhotoUrl
  540. this.share.imageUrl = this.information.Product.ProductPhoto[i].PhotoUrl
  541. }
  542. }
  543. this.title = this.information.project_name
  544. this.share.title = this.information.project_name
  545. this.information.Product.ProductType = this.product_types[parseInt(this.information.Product
  546. .ProductType) - 1].label
  547. // 轮播图、详情图
  548. this.carousel_images = []
  549. this.product_detail_images = []
  550. for (let i = 0; i < this.information.Product.ProductPhoto.length; i++) {
  551. if (this.information.Product.ProductPhoto[i].Symbol != 3) {
  552. this.carousel_images.push(this.information.Product.ProductPhoto[i]
  553. .PhotoUrl)
  554. if (this.information.Product.ProductPhoto[i].Symbol != 1)
  555. this.product_detail_images.push(this.information.Product.ProductPhoto[
  556. i].PhotoUrl)
  557. }
  558. }
  559. // 任务类型
  560. this.information.project_form = this.task_type_info[this.information.project_form -
  561. 1]
  562. // 任务形式
  563. if (this.information.content_type === 1) this.information.content = "图文"
  564. else if (this.information.content_type === 2) this.information.content = "视频"
  565. })
  566. },
  567. // 达人信息
  568. getTalentInfo() {
  569. return this.$https.get('/youngee/c/t/g/get-talent-info')
  570. .then(res => {
  571. console.log(res)
  572. this.talent = res.data.data
  573. })
  574. },
  575. //账号信息
  576. getTalentAccountInfo() {
  577. return this.$https.get('/youngee/c/t/g/get-talent-account')
  578. .then(res => {
  579. console.log(res)
  580. var accounts = res.data.data
  581. this.account = []
  582. if (res.data.code != -3) {
  583. for (var i = 0; i < accounts.length; i++) {
  584. if (this.information.project_platform === accounts[i].platform_id) {
  585. this.account.push(accounts[i])
  586. }
  587. }
  588. }
  589. })
  590. },
  591. isSignUp() {
  592. return this.$https.get('/youngee/c/t/g/is-sign-up-task' +
  593. "?" +
  594. "project_id" +
  595. "=" +
  596. this.projectid +
  597. "&account_id" +
  598. "=" +
  599. this.account[0].account_id)
  600. .then(res => {
  601. if (res.data.code === 0) {
  602. this.isSign = res.data.data.is_sign;
  603. this.isAgree = res.data.data.is_agree;
  604. }
  605. })
  606. },
  607. onPageScroll(res) {
  608. uni.$emit('onPageScroll', res.scrollTop);
  609. this.scrollTop = res.scrollTop;
  610. // console.log(res.scrollTop);
  611. if (res.scrollTop <= this.topp1 - this.hei1) {
  612. // console.log(0)
  613. this.activeTab = 0
  614. }
  615. if (res.scrollTop > this.topp1 - this.hei1 && res.scrollTop < this.topp2 - this.hei1) {
  616. // console.log(1)
  617. this.activeTab = 1
  618. }
  619. if (res.scrollTop > this.topp2 - this.hei1) {
  620. // console.log(2)
  621. this.activeTab = 2
  622. }
  623. },
  624. //获取节点离顶部高度
  625. getInfo() {
  626. const query = uni.createSelectorQuery().in(this);
  627. query.select('#wrap0').boundingClientRect(data => {
  628. this.topp0 = data.top
  629. }).exec();
  630. query.select('#wrap1').boundingClientRect(data => {
  631. this.topp1 = data.top
  632. }).exec();
  633. query.select('#wrap2').boundingClientRect(data => {
  634. this.topp2 = data.top
  635. // console.log(this.topp2)
  636. }).exec();
  637. query.select('#wap').boundingClientRect(data => {
  638. // console.log(data)
  639. this.hei = data.height
  640. this.tabBarStyle = {
  641. height: data.height + data.height + 'px',
  642. width: '100% ',
  643. }
  644. }).exec();
  645. query.select('#wa').boundingClientRect(data => {
  646. // console.log(data)
  647. this.hei1 = data.height
  648. }).exec();
  649. },
  650. //视频轮播
  651. effect3dMarginMethed() {
  652. this.effect3dMargin++
  653. },
  654. //swiper滑动事件
  655. swiperChange: function(e) {
  656. this.swiper.index = e.detail.current;
  657. },
  658. //底部弹出层
  659. change(e) {
  660. console.log('当前模式:' + e.type + ',状态:' + e.show);
  661. },
  662. toggle(type) {
  663. let that = this
  664. if (that.talent.is_bind_info === 0 || that.talent.is_bind_location === 0 ||
  665. that.account.length === 0) {
  666. // 前往个人信息绑定三合一界面
  667. uni.showModal({
  668. content: '请先绑定个人信息',
  669. success: function(res) {
  670. if (res.confirm) {
  671. if (that.account.length === 0) {
  672. uni.navigateTo({
  673. url: '/pages/tasksquare/bindinfo?platform_id=' +
  674. that
  675. .information.project_platform
  676. })
  677. } else {
  678. uni.navigateTo({
  679. url: '/pages/tasksquare/bindinfo?platform_id=' +
  680. that.information.project_platform +
  681. '&account_id=' +
  682. that.account[0].account_id
  683. })
  684. };
  685. } else if (res.cancel) {
  686. console.log('用户点击取消');
  687. }
  688. }
  689. });
  690. } else {
  691. var data = {
  692. projectid: that.projectid,
  693. information: that.information,
  694. account: that.account[0].account_id,
  695. },
  696. data = JSON.stringify(data)
  697. uni.navigateTo({
  698. url: '/pages/tasksquare/specialTask/information?textObj=' + encodeURIComponent(
  699. data)
  700. });
  701. }
  702. },
  703. toggle1(type) {
  704. this.type1 = type
  705. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  706. this.$refs.popup1.open(type)
  707. },
  708. cancel() {
  709. this.$refs.popup1.close()
  710. },
  711. // 更新账号
  712. Reset() {
  713. console.log("Reset func running")
  714. uni.navigateTo({
  715. url: '/pages/mycenter/myinformation/bindaccount?platform_id=' + this
  716. .information
  717. .project_platform + '&account_id=' + this.account[0].account_id,
  718. success(res) {
  719. console.log(res);
  720. },
  721. fail(err) {
  722. console.log(err);
  723. }
  724. });
  725. },
  726. //进入信息确认页面
  727. determine() {
  728. console.log(this.strategy_id)
  729. if (this.strategy_id === 0 || this.strategy === null) {
  730. uni.showToast({
  731. title: '请选择合作方式',
  732. icon: 'none',
  733. duration: 2000
  734. });
  735. } else if (this.account[0].fans_count < this.strategy.followers_low) {
  736. // 提示“粉丝量不符合报名条件”
  737. uni.showToast({
  738. title: '粉丝量不符合报名条件',
  739. icon: 'none',
  740. duration: 2000
  741. });
  742. } else if (this.strategy.fee_form === 3 && this.strategy.offer === 0) {
  743. console.log(this.strategy)
  744. uni.showToast({
  745. title: '请填写自报价金额',
  746. icon: 'none',
  747. duration: 2000
  748. });
  749. } else {
  750. this.$refs.popup.close()
  751. var data = {
  752. projectid: this.projectid,
  753. information: this.information,
  754. account: this.account[0].account_id,
  755. strategy: this.strategy,
  756. },
  757. data = JSON.stringify(data)
  758. console.log("data")
  759. console.log(data)
  760. uni.navigateTo({
  761. url: '/pages/tasksquare/information?textObj=' + encodeURIComponent(data)
  762. });
  763. }
  764. },
  765. beginCanvas() {
  766. this.$refs.mosoweCanvasComponents.createCanvas();
  767. },
  768. _canvasImage(e) {
  769. console.log("url", e)
  770. this.canvasUrl = e;
  771. },
  772. // 保存图片
  773. async saveImage() {
  774. let {
  775. canvasUrl
  776. } = this
  777. let res = await saveImageToPhotosAlbum(canvasUrl)
  778. if (!res.success) return
  779. showToast('保存成功')
  780. // this.$refs.popup2.close()
  781. },
  782. toggle2(type) {
  783. if (this.canvasUrl !== '') {
  784. this.type2 = type
  785. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  786. this.$refs.popup2.open(type)
  787. this.$refs.popup1.close()
  788. } else {
  789. this.beginCanvas()
  790. this.type2 = type
  791. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  792. this.$refs.popup2.open(type)
  793. this.$refs.popup1.close()
  794. }
  795. },
  796. }
  797. };
  798. </script>
  799. <style>
  800. /deep/ .share1 .uni-popup .uni-popup__wrapper {
  801. width: 300px !important;
  802. /* height: 500px !important; */
  803. display: flex;
  804. flex-direction: column;
  805. align-items: center;
  806. border-radius: 15rpx !important;
  807. }
  808. /deep/ .share.uni-popup .uni-popup__wrapper {
  809. width: 70%;
  810. border-radius: 15rpx;
  811. }
  812. </style>
  813. <style lang="scss" scoped>
  814. text {
  815. font-size: 28rpx;
  816. }
  817. #coop_box {
  818. // display: flex;
  819. margin-top: 15rpx;
  820. }
  821. #coop_box .coop_box_btn {
  822. display: flex;
  823. justify-content: center;
  824. align-items: center;
  825. width: 700rpx;
  826. // height: 50rpx;
  827. border: 2px solid #f9f9f9;
  828. border-radius: 15rpx;
  829. font-size: 30rpx;
  830. text-align: center;
  831. // line-height: 40px;
  832. cursor: pointer;
  833. }
  834. .borderColor {
  835. border: 2px solid #f7d43c !important;
  836. }
  837. .offer_input {
  838. width: 50rpx;
  839. border: 1px solid #cccccc;
  840. }
  841. .wvp {
  842. color: #b2b0b0;
  843. margin: 0 5rpx;
  844. }
  845. .wvp1 {
  846. padding: 0 30rpx;
  847. border-radius: 10rpx;
  848. margin: 0 10rpx;
  849. background-color: #f2d22d;
  850. border: 10rpx;
  851. }
  852. .my-canvas {
  853. position: fixed;
  854. top: -99999999999rpx;
  855. left: -99999999999rpx;
  856. z-index: -99999999999;
  857. opacity: 0;
  858. }
  859. .poster {
  860. width: 100vw;
  861. height: 100vh;
  862. display: flex;
  863. flex-flow: column nowrap;
  864. justify-content: center;
  865. overflow: hidden;
  866. }
  867. .container {
  868. padding: 40rpx;
  869. font-size: 28rpx;
  870. line-height: 48rpx;
  871. }
  872. .butmin {
  873. height: 48rpx;
  874. background-color: #3397FA;
  875. color: #FFFFFF;
  876. line-height: 48rpx;
  877. }
  878. //视频轮播
  879. .full {
  880. position: relative;
  881. .btns {
  882. position: absolute;
  883. background-color: rgba(255, 255, 255, 0.5);
  884. z-index: 1;
  885. left: 100rpx;
  886. top: 50rpx;
  887. right: 100rpx;
  888. display: flex;
  889. justify-content: space-around;
  890. flex-wrap: wrap;
  891. >view {
  892. height: 60rpx;
  893. line-height: 60rpx;
  894. text-align: center;
  895. padding: 0 20rpx;
  896. }
  897. &.full {
  898. position: relative;
  899. left: 0;
  900. right: 0;
  901. >view {
  902. height: 60rpx;
  903. line-height: 60rpx;
  904. text-align: center;
  905. padding: 0 20rpx;
  906. background-color: rgba(0, 0, 0, 0.1);
  907. margin-bottom: 10rpx;
  908. }
  909. }
  910. }
  911. }
  912. //轮播图
  913. page {
  914. background-color: #fff;
  915. }
  916. .top-swiper {
  917. margin-bottom: 30rpx;
  918. .bg {
  919. padding-top: var(--status-bar-height);
  920. box-sizing: content-box;
  921. width: 100%;
  922. position: relative;
  923. .image {
  924. box-sizing: content-box;
  925. position: absolute;
  926. z-index: 1;
  927. top: 0;
  928. left: 0;
  929. width: 100%;
  930. height: 100%;
  931. overflow: hidden;
  932. &::after {
  933. content: '';
  934. position: absolute;
  935. width: 100%;
  936. height: 100%;
  937. z-index: 1;
  938. bottom: 0;
  939. left: 0;
  940. height: 65%;
  941. background-image: linear-gradient(to bottom, transparent, #FFF);
  942. }
  943. >image {
  944. position: absolute;
  945. box-sizing: content-box;
  946. padding: 60px;
  947. top: 0;
  948. left: 0;
  949. width: 100%;
  950. height: 80%;
  951. top: -60px;
  952. left: -60px;
  953. filter: blur(50px);
  954. }
  955. }
  956. }
  957. .box {
  958. padding-top: var(--status-bar-height);
  959. box-sizing: content-box;
  960. // position: absolute;
  961. z-index: 5;
  962. top: 0;
  963. left: 0;
  964. width: 100%;
  965. height: auto;
  966. }
  967. .swiper {
  968. height: 450rpx;
  969. margin: 0 20rpx;
  970. .le-img {
  971. width: 100%;
  972. height: 100%;
  973. display: block;
  974. transform: scale(0.8);
  975. transition: transform 0.3s ease-in-out 0s;
  976. border-radius: 4px;
  977. &.le-active {
  978. transform: scale(1);
  979. }
  980. }
  981. }
  982. }
  983. //其他的
  984. /deep/ .uni-data-checklist .checklist-group .checklist-box {
  985. border-radius: 20rpx !important;
  986. padding: 8rpx 30rpx !important;
  987. border: 0 !important;
  988. }
  989. /deep/ .uni-data-checklist .checklist-group .checklist-box .checklist-content .checklist-text {
  990. font-size: 24rpx;
  991. color: #333333;
  992. }
  993. /deep/ .mini-btn {
  994. height: 45rpx;
  995. width: 150rpx;
  996. line-height: 45rpx;
  997. margin: 30rpx;
  998. }
  999. .butto {
  1000. text-align: center;
  1001. }
  1002. .option {
  1003. padding: 20rpx;
  1004. }
  1005. //轮播图
  1006. .uni-margin-wrap {
  1007. width: 690rpx;
  1008. width: 100%;
  1009. }
  1010. .swiper {
  1011. height: 750rpx;
  1012. display: flex;
  1013. justify-content: center;
  1014. }
  1015. .swiper-item {
  1016. display: block;
  1017. width: 100%;
  1018. height: 750rpx;
  1019. line-height: 750rpx;
  1020. text-align: center;
  1021. }
  1022. .swiper-list {
  1023. margin-bottom: 0;
  1024. }
  1025. .uni-common-mt {
  1026. margin-top: 60rpx;
  1027. position: relative;
  1028. }
  1029. .info {
  1030. position: absolute;
  1031. right: 20rpx;
  1032. }
  1033. .uni-padding-wrap {
  1034. width: 550rpx;
  1035. padding: 0 100rpx;
  1036. }
  1037. .Tasktext {
  1038. // padding-top: 5% ;
  1039. padding: 0 0 0 1%;
  1040. // height: 80rpx;
  1041. margin-top: 2%;
  1042. }
  1043. .Tasktext span {
  1044. color: #333333;
  1045. font-size: 100%;
  1046. font-weight: 550;
  1047. text-indent: 2em;
  1048. }
  1049. .Tasktext image {
  1050. vertical-align: middle;
  1051. width: 50rpx;
  1052. height: 50rpx;
  1053. display: inline-block;
  1054. padding-right: 14rpx;
  1055. }
  1056. .TitleText {
  1057. height: 30rpx;
  1058. background-color: #FDD442;
  1059. border-radius: 20rpx;
  1060. display: inline-block;
  1061. padding: 0rpx 20rpx 0rpx 20rpx;
  1062. line-height: 30rpx;
  1063. margin-right: 20rpx;
  1064. margin-top: 6%;
  1065. }
  1066. .TitleText p {
  1067. color: #C49A0A;
  1068. font-size: 50%;
  1069. }
  1070. .introduction {
  1071. width: 100%;
  1072. margin: 0 auto;
  1073. display: flex;
  1074. // justify-content: space-around;
  1075. margin-top: 2%;
  1076. }
  1077. .rleft p {
  1078. font-size: 24rpx;
  1079. color: #999999;
  1080. }
  1081. .rright p {
  1082. font-size: 24rpx;
  1083. color: #999999;
  1084. }
  1085. .tasks {
  1086. width: 100%;
  1087. margin: 0 auto;
  1088. display: flex;
  1089. justify-content: space-around;
  1090. margin-top: 5%;
  1091. }
  1092. .title-left {
  1093. width: 6rpx;
  1094. height: 80rpx;
  1095. background: #E2E2E2;
  1096. display: inline-block;
  1097. border-radius: 1rpx;
  1098. margin-top: 4rpx;
  1099. vertical-align: top;
  1100. }
  1101. .tasksleft p {
  1102. font-size: 30rpx;
  1103. text-align: center;
  1104. }
  1105. .tasksright p {
  1106. font-size: 30rpx;
  1107. text-align: center;
  1108. }
  1109. .interval {
  1110. width: 100%;
  1111. height: 40rpx;
  1112. background-color: #E4E4E4;
  1113. margin-top: 5%;
  1114. }
  1115. .circularmark {
  1116. margin: 2% auto;
  1117. width: 26%;
  1118. padding: 10rpx;
  1119. background-color: #f2d22d;
  1120. border-radius: 10rpx;
  1121. position: relative;
  1122. }
  1123. .circularmark p {
  1124. font-size: 85%;
  1125. text-align: center;
  1126. font-weight: 800;
  1127. }
  1128. .circularmark image {
  1129. width: 60rpx;
  1130. height: 68rpx;
  1131. position: absolute;
  1132. top: -30%;
  1133. left: -10%;
  1134. }
  1135. .btnn {
  1136. background-color: #3296FA;
  1137. border-radius: 20rpx;
  1138. font-size: 25rpx;
  1139. line-height: 34rpx;
  1140. }
  1141. .markcontent {
  1142. // width: 100%;
  1143. // background-color: #E4E4E4;
  1144. margin: 0 30rpx;
  1145. border-radius: 20rpx;
  1146. padding-top: 2%;
  1147. padding-bottom: 2%;
  1148. }
  1149. .markcontent p {
  1150. font-size: 24rpx;
  1151. // color: #333333;
  1152. // margin: 3% ;
  1153. }
  1154. .markcontent span {
  1155. font-size: 24rpx;
  1156. // color: #333333;
  1157. // margin: 3% ;
  1158. }
  1159. .interval2 {
  1160. width: 100%;
  1161. height: 100rpx;
  1162. background-color: #E4E4E4;
  1163. margin-top: 5%;
  1164. }
  1165. .markcontent1 {
  1166. width: 100%;
  1167. border-radius: 20rpx;
  1168. padding-top: 2%;
  1169. padding-bottom: 2%;
  1170. }
  1171. .markcontent1 p {
  1172. font-size: 24rpx;
  1173. // color: #333333;
  1174. // margin: 3% ;
  1175. text-indent: 2em;
  1176. }
  1177. .trademark {
  1178. width: 120rpx;
  1179. height: 120rpx;
  1180. border-radius: 50%;
  1181. background-color: #f2d22d;
  1182. margin: 0 auto;
  1183. }
  1184. .trademark image {
  1185. width: 100%;
  1186. height: 100%;
  1187. }
  1188. .diagram {
  1189. width: 100%;
  1190. // height: 1000rpx;
  1191. }
  1192. .diagram image {
  1193. width: 100%;
  1194. // height: 100% ;
  1195. }
  1196. .but1 {
  1197. width: 60%;
  1198. background-color: #f2d22d;
  1199. border-radius: 20rpx;
  1200. font-size: 36rpx;
  1201. line-height: 200%;
  1202. letter-spacing: 10rpx;
  1203. font-weight: 500;
  1204. height: 80%;
  1205. &.on {
  1206. background-color: #C0C0C0;
  1207. }
  1208. }
  1209. /** 必须提升样式优先权(!important) **/
  1210. button[disabled] {
  1211. width: 60%;
  1212. border-radius: 20rpx;
  1213. font-size: 36rpx;
  1214. line-height: 200%;
  1215. letter-spacing: 10rpx;
  1216. font-weight: 500;
  1217. height: 80%;
  1218. color: white !important;
  1219. background: #c4c1c1 !important;
  1220. }
  1221. .but2 {
  1222. width: 25%;
  1223. background-color: #FFFFFF;
  1224. border: 2rpx solid #f2d22d;
  1225. border-radius: 20rpx;
  1226. font-size: 36rpx;
  1227. line-height: 180%;
  1228. letter-spacing: 10rpx;
  1229. font-weight: 500;
  1230. position: relative;
  1231. text-indent: 0.5em;
  1232. height: 80%;
  1233. }
  1234. .but2 image {
  1235. width: 19%;
  1236. height: 56%;
  1237. position: absolute;
  1238. left: 9%;
  1239. top: 21%;
  1240. }
  1241. .signup {
  1242. box-shadow: 0rpx 5rpx 40rpx #ccc;
  1243. width: 100%;
  1244. position: fixed;
  1245. bottom: 0rpx;
  1246. display: flex;
  1247. height: 90rpx;
  1248. padding-top: 2%;
  1249. background-color: #FFFFFF;
  1250. }
  1251. .pick {
  1252. width: 50rpx;
  1253. height: 50rpx;
  1254. vertical-align: middle;
  1255. }
  1256. .nex {
  1257. width: 100rpx;
  1258. height: 20rpx;
  1259. vertical-align: middle;
  1260. }
  1261. .sampledrawing {
  1262. display: flex;
  1263. width: 96%;
  1264. margin: 0 auto;
  1265. }
  1266. .samplecharacter {
  1267. flex: 1;
  1268. margin-top: 2%;
  1269. }
  1270. .samplecharacter p {
  1271. padding: 1%;
  1272. }
  1273. /deep/.uni-popup__content {
  1274. background-color: #4CD964;
  1275. border-radius: 20rpx !important;
  1276. }
  1277. /deep/.uni-popup__mask {
  1278. background: rgba(0, 0, 0, 0.5) !important;
  1279. }
  1280. .butto {
  1281. text-align: center;
  1282. }
  1283. /deep/ .mini-btn {
  1284. height: 70rpx;
  1285. width: 300rpx;
  1286. line-height: 70rpx;
  1287. margin: 10rpx;
  1288. font-size: 80%;
  1289. box-shadow: 0rpx 0rpx 0rpx 5rpx #f2d22d;
  1290. border: 0rpx solid #f2d22d !important;
  1291. }
  1292. /deep/ .uni-data-checklist .checklist-group .checklist-box.is--tag {
  1293. background-color: #FFFFFF !important;
  1294. box-shadow: 0rpx 0rpx 6rpx 0rpx #464100;
  1295. border-radius: 10rpx !important;
  1296. }
  1297. /deep/ .uni-data-checklist .checklist-group .checklist-box.is--tag.is-checked {
  1298. background-color: #f2d22d !important;
  1299. }
  1300. /deep/.uni-data-checklist .checklist-group .checklist-box.is--tag.is-checked .checklist-text {
  1301. color: #333333 !important;
  1302. }
  1303. /deep/.buu .uni-data-checklist .checklist-group {
  1304. flex-direction: column !important;
  1305. }
  1306. .surplus p {
  1307. margin-bottom: 17%;
  1308. margin-top: 8%;
  1309. font-size: 80%;
  1310. }
  1311. .circular {
  1312. width: 120rpx;
  1313. height: 120rpx;
  1314. border-radius: 50%;
  1315. background-color: #28EA71;
  1316. margin: 0 auto;
  1317. }
  1318. .circular image {
  1319. width: 60%;
  1320. height: 60%;
  1321. padding: 20%;
  1322. }
  1323. .tii {
  1324. text-align: center;
  1325. font-size: 26rpx;
  1326. margin-top: 2%;
  1327. }
  1328. .tii2 {
  1329. text-align: center;
  1330. font-size: 26rpx;
  1331. margin-top: 2%;
  1332. background-color: #FFFFFF;
  1333. }
  1334. .errar {
  1335. background-color: #FFFFFF;
  1336. }
  1337. .sharepage {
  1338. width: 90%;
  1339. margin: 0 auto;
  1340. position: relative;
  1341. }
  1342. .Tasktext1 {
  1343. // padding-top: 5% ;
  1344. padding: 0 0 0 1%;
  1345. height: 80rpx;
  1346. margin-top: 7%;
  1347. text-align: center;
  1348. }
  1349. .Tasktext1 span {
  1350. color: #333333;
  1351. font-size: 100%;
  1352. font-weight: 550;
  1353. text-indent: 2em;
  1354. }
  1355. .Tasktext1 image {
  1356. vertical-align: middle;
  1357. width: 80rpx;
  1358. height: 80rpx;
  1359. display: inline-block;
  1360. padding-right: 14rpx;
  1361. }
  1362. .sharemap {
  1363. margin: 0 auto;
  1364. text-align: center;
  1365. margin-top: 5%;
  1366. }
  1367. .sharemap image {
  1368. width: 400rpx;
  1369. height: 400rpx;
  1370. }
  1371. .Tasktext2 {
  1372. // padding-top: 5% ;
  1373. padding: 0 0 0 1%;
  1374. // height: 80rpx;
  1375. margin-top: 2%;
  1376. // text-align: center;
  1377. }
  1378. .Tasktext2 span {
  1379. color: #333333;
  1380. font-size: 88%;
  1381. font-weight: 600;
  1382. text-indent: 2em;
  1383. }
  1384. .Tasktext2 image {
  1385. vertical-align: middle;
  1386. width: 30rpx;
  1387. height: 30rpx;
  1388. display: inline-block;
  1389. padding-right: 14rpx;
  1390. }
  1391. .textti p {
  1392. font-size: 60%;
  1393. color: #999999;
  1394. text-align: center;
  1395. }
  1396. .immg image {
  1397. width: 200rpx;
  1398. height: 200rpx;
  1399. }
  1400. .immg {
  1401. line-height: 150%;
  1402. }
  1403. .immg p {
  1404. color: #333333;
  1405. font-size: 90%;
  1406. font-weight: 600;
  1407. }
  1408. .warr p {
  1409. font-weight: 500;
  1410. font-size: 90%;
  1411. &.lor {
  1412. border-bottom: 2rpx solid #f2d22d;
  1413. }
  1414. }
  1415. .label {
  1416. // font-weight: 600;
  1417. width: 130rpx;
  1418. }
  1419. </style>