tasksquare.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403
  1. <template>
  2. <view class="nav">
  3. <view class="bg_box" style="background-color: #FFFFFF;" :style="{
  4. backgroundImage: mysNavConfig.bgImage,
  5. paddingTop: navBarTop,
  6. height: navBarHeight,
  7. opacity: opacity,
  8. }" :class="{ fixed: mysNavConfig.navFixed }"></view>
  9. <view class="mys_navBar" :style="{
  10. paddingTop: navBarTop,
  11. height: navBarHeight,
  12. paddingRight: navBarRight,
  13. }" :class="{ fixed: mysNavConfig.navFixed }">
  14. <!-- 左slot -->
  15. <view class="my_left_custom" :style="{ height: btnHeight }">
  16. <slot name="left"></slot>
  17. </view>
  18. <view class="btn_type" :style="{ height: btnHeight }">
  19. <view class="btn_box nav_btn_t1" :style="{
  20. width: btnWidth,
  21. height: btnHeight,
  22. marginLeft: navBarLeft,
  23. borderRadius: mysNavConfig.type2Config.radius,
  24. }">
  25. <view class="btn_back" @tap="onLeftClick">
  26. <image class="nv_icon" :src="mysNavConfig.type2Config.leftPath"
  27. :style="{ height: btnHeight, width: iconW }" mode="aspectFit" />
  28. </view>
  29. <view class="line"></view>
  30. <view class="btn_home" @tap="onLeftHome('top')">
  31. <image class="nv_icon" :src="mysNavConfig.type2Config.rightPath"
  32. :style="{ height: btnHeight, width: iconW }" mode="aspectFit" />
  33. </view>
  34. </view>
  35. <!-- 标题 -->
  36. <view class="title_container" v-if="!mysNavConfig.searchConfig"
  37. :style="{ top: navBarTop, height: btnHeight }">
  38. <text class="title_text" v-if="!!mysNavConfig.navTitle" :style="{
  39. color: mysNavConfig.navTitle.color,
  40. fontSize: mysNavConfig.navTitle.fontSize,
  41. fontWeight: mysNavConfig.navTitle.fontWeight,
  42. }">{{ mysNavConfig.navTitle.text }}</text>
  43. <slot name="center2"></slot>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="home" style="padding-top: 180rpx;">
  48. <view>
  49. <!-- 普通弹窗 -->
  50. <uni-popup ref="popup" background-color="#fff" @change="change">
  51. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  52. <view class="option" style="margin-top: 20%;">
  53. <h3>社媒平台</h3>
  54. <uni-data-checkbox mode="tag" multiple v-model="formData.hobby" :localdata="hobby">
  55. </uni-data-checkbox>
  56. </view>
  57. <view class="option">
  58. <h3>稿费形式</h3>
  59. <uni-data-checkbox mode="tag" multiple v-model="formData.hobby1" :localdata="hobby1">
  60. </uni-data-checkbox>
  61. </view>
  62. <view class="option">
  63. <h3>任务形式</h3>
  64. <uni-data-checkbox mode="tag" multiple v-model="formData.hobby2" :localdata="hobby2">
  65. </uni-data-checkbox>
  66. </view>
  67. <view class="butto">
  68. <button class="mini-btn" size="mini" @tap="Reset"
  69. style="background-color: #D9D9D9;">重置</button>
  70. <button class="mini-btn1" size="mini" @tap="determine"
  71. style="background-color: #FCCF41;">确定</button>
  72. </view>
  73. </view>
  74. </uni-popup>
  75. </view>
  76. <!-- <view class="imge">
  77. <image src="../../static/home/home1.png" mode=""></image>
  78. </view> -->
  79. <view class="uni-margin-wrap">
  80. <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
  81. :interval="interval" :duration="duration">
  82. <swiper-item v-for="item in list1" @click="pick(item)">
  83. <image :src="item.img" mode="scaleToFill" style="width: 100%;height: 100%;"></image>
  84. </swiper-item>
  85. </swiper>
  86. </view>
  87. <view class="commodity" style="margin-top: 3%;">
  88. <view class="project" v-for="(item,index) in projectList" :key="index" @tap="project(item)">
  89. <view class="projectdiagram" :style="{backgroundImage:`url(${item.coverphoto})`}">
  90. <view class="Mask" v-if="item.deadlinetype==0">
  91. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home4.png" mode="">
  92. </image>
  93. </view>
  94. <view style="padding-left: 4%;padding-top: 2%;">
  95. </view>
  96. </view>
  97. <view class="projecttext">
  98. <image :src="item.project_imgper" mode=""></image>
  99. <span>{{item.project_name|ellipsis}}</span>
  100. </view>
  101. <view style="padding-left: 1%;">
  102. <view class="TitleText" v-if="item.isself===1">
  103. <p>自报价</p>
  104. </view>
  105. <view class="TitleText" v-if="item.isfixedfee===1">
  106. <p>固定稿费</p>
  107. </view>
  108. <view class="TitleText" v-if="item.project_form===3">
  109. <p>线下探店</p>
  110. </view>
  111. </view>
  112. <view class="introduction">
  113. <view class="rleft" style="">
  114. <p>商品价值: <span
  115. style="color: red;font-weight: 600;">¥{{item.ProductInfo.product_price}}</span></p>
  116. </view>
  117. <view class="rright" style="display: flex;justify-content:space-between;">
  118. <p>招募人数: <span style="color: balck;font-weight: 600;">{{item.taskNum}}</span></p>
  119. <p>报名人数: <span style="color: balck;font-weight: 600;">{{item.apply_num}}</span>
  120. </p>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 普通弹窗 公众号-->
  127. <uni-popup ref="popup4" class="share" background-color="#fff" @change="change">
  128. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  129. <view class="sharepage">
  130. <view class="projecttext1">
  131. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/project15.png"
  132. style="width: 80rpx; height: 80rpx;" mode=""></image>
  133. <span>YoungGee</span>
  134. </view>
  135. <view class="" style="margin-top: 5%;">
  136. <p style='color: #333333;font-size: 28rpx;text-align: center;'>扫码联系</p>
  137. </view>
  138. <view class="sharemap">
  139. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/kefu.png"
  140. style="width: 400rpx;height: 400rpx;" mode=""></image>
  141. </view>
  142. </view>
  143. </view>
  144. </uni-popup>
  145. <view class="contact" @click="toggle4('center')">
  146. <view class="contt">
  147. <!-- <image class="img2" src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home2.png" mode=""></image> -->
  148. <image class="img1"
  149. src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/kefu_20211124192542.png" mode="">
  150. </image>
  151. </view>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. import request from '@/components/request.js'
  157. /* 默认首页路径 */
  158. const homePath = "/pages/pupu/pupudao";
  159. /* 默认首页图标路径 */
  160. const homeIconPath = "/static/img/png4.png";
  161. /* 默认返回图标路径 */
  162. const backIconPath = "/static/img/png2.png";
  163. export default {
  164. props: {
  165. mysNavConfig: {
  166. type: Object,
  167. default () {
  168. return {
  169. /* 固定导航 */
  170. navFixed: true,
  171. /* 开启单页显示首页图标 */
  172. isHome: true,
  173. /* 占位开启 */
  174. navPadding: true,
  175. /* 背景 */
  176. bgColor: "#f8f8f8",
  177. /* 渐变色 */
  178. opacity: 1,
  179. /* 渐变开启 */
  180. isOpacity: false,
  181. /* 渐变延时效果 */
  182. opacityTime: 100,
  183. /* 左侧按钮样式 可选 type1 type2 (type2根据小程序胶囊位置调整) */
  184. btnType: "type1",
  185. /* type1 左侧文字配置 */
  186. leftText: {
  187. text: "",
  188. color: "",
  189. fontSize: "16px", // px upx rpx
  190. fontWeight: "", // blod
  191. },
  192. /* 标题 */
  193. navTitle: {
  194. text: "首页",
  195. color: "",
  196. fontSize: "32rpx", // px upx rpx
  197. fontWeight: "normal", // blod
  198. },
  199. /* type2 按钮 */
  200. type2Config: {
  201. // 左图标
  202. leftPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png3.png",
  203. // 右图标
  204. rightPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png1.png",
  205. // 圆角
  206. radius: "40rpx",
  207. },
  208. };
  209. },
  210. },
  211. scrollTop: {
  212. type: Number,
  213. default: function() {
  214. return 0;
  215. },
  216. },
  217. },
  218. filters: {
  219. ellipsis(value) {
  220. if (!value) return "";
  221. if (value.length > 20) {
  222. return value.slice(0, 20) + "...";
  223. }
  224. return value;
  225. },
  226. },
  227. components: {
  228. },
  229. data() {
  230. return {
  231. token: '',
  232. per: 0,
  233. type4: 'center',
  234. //轮播图
  235. img: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png',
  236. background: ['color1', 'color2', 'color3'],
  237. indicatorDots: true,
  238. autoplay: true,
  239. interval: 3000,
  240. duration: 1000,
  241. list1: [{
  242. img: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home1.png',
  243. name: '/pages/tasksquare/guide'
  244. },
  245. {
  246. img: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home7.png',
  247. name: '/pages/tasksquare/cooperation'
  248. }
  249. ],
  250. //弹窗
  251. type: 'center',
  252. formData: {
  253. hobby: [],
  254. hobby1: [],
  255. hobby2: [],
  256. },
  257. hobby: [{
  258. text: '小红书',
  259. value: 1
  260. }, {
  261. text: '抖音',
  262. value: 2
  263. }, {
  264. text: '微博',
  265. value: 3
  266. }, {
  267. text: '快手',
  268. value: 4
  269. }, {
  270. text: 'B站',
  271. value: 5
  272. }, {
  273. text: '大众点评',
  274. value: 6
  275. }, {
  276. text: '知乎',
  277. value: 7
  278. }],
  279. hobby1: [{
  280. text: '产品置换',
  281. value: 1
  282. }, {
  283. text: '固定稿费',
  284. value: 2
  285. }, {
  286. text: '自报价',
  287. value: 3
  288. }],
  289. hobby2: [{
  290. text: '线下探店',
  291. value: 1
  292. }, {
  293. text: '实体商品',
  294. value: 2
  295. }, {
  296. text: '虚拟商品',
  297. value: 3
  298. }, {
  299. text: '素材微原创',
  300. value: 4
  301. }],
  302. iconW: undefined,
  303. iconH: undefined,
  304. btnWidth: undefined,
  305. btnHeight: undefined,
  306. navBarTop: undefined,
  307. navBarHeight: undefined,
  308. navBarLeft: undefined,
  309. navBarRight: undefined,
  310. inputHeight: undefined,
  311. opacity: 0,
  312. isHome: false,
  313. homeIconPath: homeIconPath,
  314. backIconPath: backIconPath,
  315. img: '../../static/home/home.png',
  316. // 最多显示页数
  317. max_page: '',
  318. tupian: {
  319. wen: '原创图片',
  320. lin: 1,
  321. },
  322. projectList: [],
  323. img456: '../../static/home/home.png',
  324. listsrc: [],
  325. filtCondition: '',
  326. };
  327. },
  328. computed: {
  329. isSharePage() {},
  330. },
  331. watch: {
  332. scrollTop(val) {
  333. if (!this.mysNavConfig.isOpacity) {
  334. return;
  335. }
  336. this.setOpacity(val, this.mysNavConfig.opacityTime);
  337. },
  338. },
  339. onShow() {
  340. this.isLogin()
  341. },
  342. onLoad() {
  343. this.getInfoList()
  344. this.getProjectList()
  345. },
  346. //下拉刷新
  347. onPullDownRefresh() {
  348. this.getProjectList()
  349. console.log(123)
  350. //停止下拉刷新
  351. uni.stopPullDownRefresh()
  352. },
  353. // 下拉懒加载
  354. onReachBottom: function() {
  355. ++this.per;
  356. new Promise((resolve, reject) => {
  357. uni.showLoading({
  358. title: '加载中'
  359. })
  360. // 用延迟代替 请求,模拟异步获取数据的状态
  361. this.requestTimeout = setTimeout(() => {
  362. let data = {}
  363. resolve(data);
  364. }, 1000);
  365. }).then((res) => {
  366. uni.hideLoading();
  367. if (this.per >= this.max_page) {
  368. uni.showToast({
  369. title: "已加载全部"
  370. })
  371. } else {
  372. this.$http.get('/youngee/c/g/get-project-list' +
  373. "?" +
  374. "idx" +
  375. "=" +
  376. this.per +
  377. "&cnt" +
  378. "=" +
  379. 20 + this.filtCondition
  380. ).then(res => {
  381. console.log(res)
  382. this.max_page = res.data.data.max_page
  383. for (var i = 0; i < res.data.data.ProjectInfos.length; i++) {
  384. // 封面图片
  385. res.data.data.ProjectInfos[i].coverphoto = res.data.data.ProjectInfos[i]
  386. .ProductInfo
  387. .ProductCovers.photo_url
  388. // 获取平台图片
  389. for (var j = 0; j < this.listsrc.length; j++) {
  390. if (res.data.data.ProjectInfos[i].project_platform == this.listsrc[j]
  391. .id) {
  392. res.data.data.ProjectInfos[i].project_imgper = this.listsrc[j]
  393. .platform_icon
  394. }
  395. }
  396. this.listsrc
  397. // 价值除100
  398. // res.data.data.ProjectInfos[i].ProductInfo.product_price = Number(res.data.data
  399. // .ProjectInfos[i]
  400. // .ProductInfo.product_price) * 0.01
  401. // 任务数量&稿费形式
  402. res.data.data.ProjectInfos[i].taskNum = 0
  403. for (var j = 0; j < res.data.data.ProjectInfos[i].RecruitStrategys
  404. .length; j++) {
  405. res.data.data.ProjectInfos[i].taskNum = Number(res.data.data
  406. .ProjectInfos[i]
  407. .taskNum) + Number(res.data.data.ProjectInfos[i]
  408. .RecruitStrategys[j]
  409. .recruit_number)
  410. res.data.data.ProjectInfos[i].isfixedfee = 0
  411. if (res.data.data.ProjectInfos[i].RecruitStrategys[j].fee_form === 2) {
  412. res.data.data.ProjectInfos[i].isfixedfee = 1
  413. }
  414. res.data.data.ProjectInfos[i].isself = 0
  415. if (res.data.data.ProjectInfos[i].RecruitStrategys[j].fee_form === 3) {
  416. res.data.data.ProjectInfos[i].isself = 1
  417. }
  418. }
  419. //结束时间
  420. var newdate = new Date()
  421. // console.log(newdate)
  422. var endTime = new Date(res.data.data.ProjectInfos[i].recruit_ddl.replace(
  423. /-/g, "/"));
  424. // console.log(beginTime)
  425. if (endTime - newdate < 0) {
  426. res.data.data.ProjectInfos[i].deadlinetype = 0
  427. } else {
  428. res.data.data.ProjectInfos[i].deadlinetype = 1
  429. }
  430. res.data.data.ProjectInfos[i].recruit_ddl = this.thistime(res.data.data
  431. .ProjectInfos[i]
  432. .recruit_ddl)
  433. }
  434. this.projectList = res.data.data.ProjectInfos
  435. console.log(this.projectList)
  436. })
  437. }
  438. })
  439. },
  440. methods: {
  441. // 判断登陆是否过期
  442. isLogin() {
  443. if (this.token !== '') {
  444. this.$https.get('/youngee/c/t/g/is-login')
  445. .then(res => {
  446. console.log(res)
  447. if (res.data.code == 403) {
  448. uni.clearStorage();
  449. }
  450. })
  451. } else {
  452. this.token = uni.getStorageSync('token')
  453. console.log(this.token)
  454. }
  455. },
  456. // 信息表
  457. getInfoList() {
  458. this.$http.get('/youngee/c/g/get-info-tables')
  459. .then(res => {
  460. this.hobby = []
  461. console.log(res)
  462. this.listsrc = res.data.data.ThirdPlatform
  463. for (var i = 0; i < this.listsrc.length; i++) {
  464. var obj = {}
  465. obj.text = this.listsrc[i].platform_name
  466. obj.value = this.listsrc[i].id
  467. this.hobby.push(obj)
  468. }
  469. })
  470. },
  471. guid() {
  472. return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
  473. var r = Math.random() * 16 | 0,
  474. v = c == 'x' ? r : (r & 0x3 | 0x8);
  475. return v.toString(16);
  476. });
  477. },
  478. getProjectList() {
  479. this.per = 0
  480. this.$http.get('/youngee/c/g/get-project-list' +
  481. "?" +
  482. "idx" +
  483. "=" +
  484. this.per +
  485. "&cnt" +
  486. "=" +
  487. 20 + this.filtCondition
  488. ).then(res => {
  489. console.log(res)
  490. this.max_page = res.data.data.max_page
  491. for (var i = 0; i < res.data.data.ProjectInfos.length; i++) {
  492. // 封面图片
  493. res.data.data.ProjectInfos[i].coverphoto = res.data.data.ProjectInfos[i].ProductInfo
  494. .ProductCovers.photo_url
  495. // 获取平台图片
  496. for (var j = 0; j < this.listsrc.length; j++) {
  497. if (res.data.data.ProjectInfos[i].project_platform == this.listsrc[j].id) {
  498. res.data.data.ProjectInfos[i].project_imgper = this.listsrc[j].platform_icon
  499. }
  500. }
  501. this.listsrc
  502. // 价值除100
  503. // res.data.data.ProjectInfos[i].ProductInfo.product_price = Number(res.data.data
  504. // .ProjectInfos[i]
  505. // .ProductInfo.product_price) * 0.01
  506. // 任务数量&稿费形式
  507. res.data.data.ProjectInfos[i].taskNum = 0
  508. for (var j = 0; j < res.data.data.ProjectInfos[i].RecruitStrategys.length; j++) {
  509. res.data.data.ProjectInfos[i].taskNum = Number(res.data.data.ProjectInfos[i]
  510. .taskNum) + Number(res.data.data.ProjectInfos[i].RecruitStrategys[j]
  511. .recruit_number)
  512. res.data.data.ProjectInfos[i].isfixedfee = 0
  513. if (res.data.data.ProjectInfos[i].RecruitStrategys[j].fee_form === 2) {
  514. res.data.data.ProjectInfos[i].isfixedfee = 1
  515. }
  516. res.data.data.ProjectInfos[i].isself = 0
  517. if (res.data.data.ProjectInfos[i].RecruitStrategys[j].fee_form === 3) {
  518. res.data.data.ProjectInfos[i].isself = 1
  519. }
  520. }
  521. //结束时间
  522. var newdate = new Date()
  523. // console.log(newdate)
  524. var endTime = new Date(res.data.data.ProjectInfos[i].recruit_ddl.replace(/-/g, "/"));
  525. // console.log(beginTime)
  526. if (endTime - newdate < 0) {
  527. res.data.data.ProjectInfos[i].deadlinetype = 0
  528. } else {
  529. res.data.data.ProjectInfos[i].deadlinetype = 1
  530. }
  531. res.data.data.ProjectInfos[i].recruit_ddl = this.thistime(res.data.data.ProjectInfos[i]
  532. .recruit_ddl)
  533. }
  534. this.projectList = res.data.data.ProjectInfos
  535. console.log(this.projectList)
  536. })
  537. },
  538. // 计算结束时间
  539. thistime(val) {
  540. // 转换格式
  541. var beginTime = new Date(val.replace(/-/g, "/"));
  542. // 当前时间
  543. var thisTime = new Date();
  544. // 相减
  545. var dateMiss = beginTime.getTime() - thisTime.getTime();
  546. // 天数
  547. var day = Math.floor(dateMiss / (24 * 3600 * 1000));
  548. // 减去天数剩下的毫秒数
  549. var backOne = dateMiss % (24 * 3600 * 1000);
  550. // 小时数
  551. var hours = Math.floor(backOne / (3600 * 1000));
  552. var deadline_time = '',
  553. deadline_time = day + '天' + hours + '时结束'
  554. return deadline_time
  555. },
  556. // 位运算方法
  557. contentFormToString(val) {
  558. let result = ""
  559. let broadcast = 128
  560. let broadcastType = val & broadcast
  561. if (broadcastType > 0) {
  562. result += "直播"
  563. } else {
  564. let imgMask = 15
  565. let articleMask = 48
  566. let liveMask = 64
  567. let originImgVal = 1
  568. let zhidingImgVal = 2
  569. let originVideo = 4
  570. let zhidingVidel = 8
  571. let origArticle = 16
  572. let zhidingArticle = 32
  573. let imgAVal = val & imgMask
  574. if (imgAVal == originImgVal) {
  575. result += "原创图片"
  576. } else if (imgAVal == zhidingImgVal) {
  577. result += "指定图片"
  578. } else if (imgAVal == originVideo) {
  579. result += "原创视频"
  580. } else if (imgAVal == zhidingVidel) {
  581. result += "指定视频"
  582. }
  583. let articleType = val & articleMask
  584. if (articleType == origArticle) {
  585. result += "+ 原创文案"
  586. } else if (articleType == zhidingArticle) {
  587. result += "+ 指定文案"
  588. }
  589. }
  590. return result
  591. },
  592. // 登录页面
  593. deng() {
  594. uni.navigateTo({
  595. url: '../index/login'
  596. });
  597. },
  598. pick(item) {
  599. // console.log(item)
  600. uni.navigateTo({
  601. url: item.name
  602. });
  603. },
  604. //弹出层
  605. change(e) {
  606. console.log('当前模式:' + e.type + ',状态:' + e.show);
  607. },
  608. determine() {
  609. this.$refs.popup.close()
  610. uni.showLoading({
  611. title: '加载中'
  612. });
  613. console.log(this.formData.hobby)
  614. console.log(this.formData.hobby1)
  615. var filtCondition = ''
  616. for (var i = 0; i < this.formData.hobby.length; i++) {
  617. filtCondition += "&platform[]" + "=" + this.formData.hobby[i]
  618. }
  619. for (var j = 0; j < this.formData.hobby1.length; j++) {
  620. filtCondition += "&feeform[]" + "=" + this.formData.hobby1[j]
  621. }
  622. for (var j = 0; j < this.formData.hobby2.length; j++) {
  623. filtCondition += "&projectform[]" + "=" + this.formData.hobby2[j]
  624. }
  625. console.log(filtCondition)
  626. this.filtCondition = filtCondition
  627. this.getProjectList()
  628. uni.hideLoading();
  629. },
  630. Reset() {
  631. this.$refs.popup.close()
  632. uni.showLoading({
  633. title: '加载中'
  634. });
  635. console.log('重置')
  636. this.formData.hobby = [],
  637. this.formData.hobby1 = [],
  638. this.filtCondition = '',
  639. this.getProjectList()
  640. uni.hideLoading();
  641. },
  642. toggle4(type) {
  643. this.type4 = type
  644. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  645. this.$refs.popup4.open(type)
  646. // this.$refs.popup1.close()
  647. },
  648. xieyi() {
  649. console.log('进入联系我们')
  650. },
  651. go(url) {
  652. uni.navigateTo({
  653. url: url,
  654. });
  655. },
  656. init() {
  657. if (this.mysNavConfig.isHome) {
  658. let pages = getCurrentPages().length;
  659. /* 单页显示home图标 */
  660. pages == 1 ? (this.isHome = true) : (this.isHome = false);
  661. }
  662. // 开启渐变 强制fixed
  663. this.navBarTop = uni.getSystemInfoSync().statusBarHeight + "px";
  664. if (!this.mysNavConfig.opacity) {
  665. this.opacity = 1;
  666. !this.mysNavConfig.isOpacity ? (this.opacity = 1) : ((this.mysNavConfig.navFixed = true), (this
  667. .opacity = 0));
  668. } else {
  669. this.opacity = this.mysNavConfig.opacity;
  670. !this.mysNavConfig.isOpacity ? "" : ((this.mysNavConfig.navFixed = true), (this.opacity = 0));
  671. }
  672. // #ifdef MP
  673. this.initMP();
  674. // #endif
  675. // #ifdef APP-PLUS-NVUE
  676. this.navBarHeight = 44 + uni.getSystemInfoSync().statusBarHeight + "px";
  677. // #endif
  678. },
  679. /* 小程序初始化位置 */
  680. initMP() {
  681. // getSystemInfoSync用于获取系统信息同步接口
  682. let gS = uni.getSystemInfoSync();
  683. // getMenuButtonBoundingClientRect用于获取胶囊按钮位置布局信息
  684. let rect = uni.getMenuButtonBoundingClientRect();
  685. let rectHeight = rect.height;
  686. this.btnWidth = rect.width + "px";
  687. this.btnHeight = rectHeight + "px";
  688. this.iconW = Math.floor(rect.width / 4 - 5) + "px";
  689. this.iconH = rectHeight / 2 + "px";
  690. this.inputHeight = rectHeight - 3 + "px";
  691. this.navBarTop = rect.top + "px";
  692. this.navBarLeft = gS.screenWidth - rect.right + "px";
  693. this.navBarRight = gS.screenWidth - rect.right + rect.width + "px";
  694. this.navBarHeight = gS.statusBarHeight + rectHeight + (rect.top - gS.statusBarHeight) * 2 + "px";
  695. },
  696. /* 点击左侧 */
  697. onLeftClick() {
  698. uni.navigateTo({
  699. url: '/pages/pupu/search'
  700. });
  701. },
  702. // 进入任务详情
  703. project(item) {
  704. console.log(item.project_id)
  705. if (item.deadlinetype == 0) {
  706. uni.showToast({
  707. title: '此任务已结束',
  708. icon: 'none',
  709. duration: 2000
  710. });
  711. } else {
  712. if (this.token == '') {
  713. uni.showModal({
  714. content: '请先登录',
  715. success: function(res) {
  716. if (res.confirm) {
  717. uni.navigateTo({
  718. url: '/pages/login/login'
  719. });
  720. } else if (res.cancel) {
  721. console.log('用户点击取消');
  722. }
  723. }
  724. });
  725. } else {
  726. uni.navigateTo({
  727. url: '/pages/tasksquare/taskdetail?id=' + item.project_id
  728. });
  729. }
  730. }
  731. },
  732. /* type2 点击分类 */
  733. onLeftHome(type) {
  734. this.type = type
  735. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  736. this.$refs.popup.open(type)
  737. },
  738. /* 点击右侧 */
  739. onRightClick() {
  740. console.log("onRightClick");
  741. uni.showToast({
  742. title: "onRightClick",
  743. duration: 1000,
  744. });
  745. this.$emit("onRightClick");
  746. },
  747. /**
  748. * @param scrollTop 页面顶部距离
  749. * @param down 滑动显示效果延时
  750. */
  751. setOpacity(scrollTop, down = 60) {
  752. if (scrollTop > 0) {
  753. if (scrollTop < down) {
  754. this.opacity = scrollTop / down;
  755. }
  756. if (scrollTop > down) {
  757. this.opacity = 1;
  758. }
  759. } else {
  760. this.opacity = 0;
  761. }
  762. },
  763. /* 搜索框改变值 */
  764. changeInput(e) {
  765. this.$emit("changeInput", e);
  766. },
  767. /* 搜索框提交 */
  768. submitInput(e) {
  769. this.$emit("submitInput", e);
  770. },
  771. /* 清空搜索 */
  772. clearInput() {
  773. this.$emit("clearInput");
  774. },
  775. /* 禁用状态下点击搜索框 */
  776. clickInput() {
  777. this.$emit("clickInput");
  778. },
  779. },
  780. created() {
  781. this.init();
  782. },
  783. onReady() {
  784. // setTimeout(() => {
  785. // // 改变手机状态栏颜色
  786. // uni.setNavigationBarColor({
  787. // frontColor: "#000000",
  788. // backgroundColor: "#FF4258",
  789. // });
  790. // }, 10);
  791. },
  792. };
  793. </script>
  794. <style>
  795. /deep/ .share .uni-popup .uni-popup__wrapper {
  796. width: 70% !important;
  797. border-radius: 15rpx !important;
  798. }
  799. </style>
  800. <style lang="scss" scoped>
  801. //弹窗
  802. .sharepage {
  803. width: 90%;
  804. margin: 0 auto;
  805. // position: relative;
  806. }
  807. /deep/ .share.uni-popup .uni-popup__wrapper {
  808. width: 70%;
  809. border-radius: 15rpx;
  810. }
  811. .projecttext1 {
  812. // padding-top: 5%;
  813. padding: 0 0 0 1%;
  814. height: 80rpx;
  815. margin-top: 7%;
  816. text-align: center;
  817. }
  818. .projecttext1 span {
  819. color: #333333;
  820. font-size: 100%;
  821. font-weight: 550;
  822. text-indent: 2em;
  823. }
  824. .projecttext1 image {
  825. vertical-align: middle;
  826. width: 80rpx;
  827. height: 80rpx;
  828. display: inline-block;
  829. padding-right: 14rpx;
  830. }
  831. .sharemap {
  832. margin: 0 auto;
  833. text-align: center;
  834. margin-top: 15%;
  835. margin-bottom: 15%;
  836. }
  837. .sharemap image {
  838. width: 400rpx;
  839. height: 400rpx;
  840. }
  841. .butmin {
  842. height: 48rpx;
  843. background-color: #3397FA;
  844. color: #FFFFFF;
  845. line-height: 48rpx;
  846. }
  847. //弹出层
  848. /deep/ .uni-data-checklist .checklist-group .checklist-box {
  849. border-radius: 20rpx !important;
  850. padding: 8rpx 30rpx !important;
  851. border: 0 !important;
  852. }
  853. /deep/ .uni-data-checklist .checklist-group .checklist-box .checklist-content .checklist-text {
  854. font-size: 24rpx;
  855. color: #333333;
  856. }
  857. /deep/ .mini-btn {
  858. height: 55rpx;
  859. width: 150rpx;
  860. line-height: 55rpx;
  861. margin: 30rpx;
  862. letter-spacing: 4rpx
  863. }
  864. /deep/ .mini-btn1 {
  865. height: 55rpx;
  866. width: 350rpx;
  867. line-height: 55rpx;
  868. margin: 30rpx;
  869. letter-spacing: 4rpx
  870. }
  871. /deep/ .uni-data-checklist .checklist-group .checklist-box.is--tag.is-checked {
  872. background-color: #FCCF41 !important;
  873. }
  874. .butto {
  875. text-align: center;
  876. }
  877. .option {
  878. padding: 5rpx 18rpx;
  879. }
  880. //其他
  881. .nav {
  882. position: relative;
  883. }
  884. .nv_padding {
  885. height: 88upx;
  886. background-color: transparent;
  887. }
  888. /* 图标默认大小 */
  889. .nv_icon {
  890. width: 16px;
  891. height: 16px;
  892. }
  893. .bg_box {
  894. position: absolute;
  895. width: 750upx;
  896. height: 88upx;
  897. z-index: 10;
  898. top: 0;
  899. background-color: transparent;
  900. /* #ifdef MP */
  901. box-sizing: border-box;
  902. /* #endif */
  903. /* #ifndef APP-PLUS-NVUE */
  904. background-size: cover;
  905. background-repeat: no-repeat;
  906. background-position: center center;
  907. /* #endif */
  908. }
  909. .mys_navBar {
  910. /* #ifndef APP-PLUS-NVUE */
  911. display: flex;
  912. height: 88upx;
  913. /* #endif */
  914. // #ifdef MP
  915. box-sizing: border-box;
  916. // #endif
  917. width: 750upx;
  918. flex-direction: row;
  919. background-color: transparent;
  920. position: absolute;
  921. z-index: 10;
  922. top: 0;
  923. }
  924. .fixed {
  925. position: fixed;
  926. }
  927. /*
  928. left 按钮
  929. */
  930. .btn_type {
  931. /* #ifndef APP-PLUS-NVUE */
  932. display: flex;
  933. /* #endif */
  934. /* #ifdef APP-PLUS-NVUE */
  935. margin-left: 16upx;
  936. /* #endif */
  937. // #ifndef MP
  938. align-items: center;
  939. // #endif
  940. flex: 1;
  941. flex-direction: row;
  942. // background-color: #fff;
  943. }
  944. .btn_box {
  945. /* #ifndef APP-PLUS-NVUE */
  946. display: flex;
  947. margin-left: 16upx;
  948. /* #endif */
  949. flex-direction: row;
  950. // #ifndef MP
  951. align-items: center;
  952. // #endif
  953. }
  954. .btn_back,
  955. .btn_home {
  956. /* #ifndef APP-PLUS-NVUE */
  957. display: flex;
  958. /* #endif */
  959. /* #ifndef APP-PLUS-NVUE */
  960. height: 100%;
  961. /* #endif */
  962. /* #ifdef APP-PLUS-NVUE */
  963. width: 76upx;
  964. height: 62upx;
  965. /* #endif */
  966. flex-direction: row;
  967. align-items: center;
  968. justify-content: center;
  969. flex: 1;
  970. }
  971. /* 按钮类型1 */
  972. .nav_btn_t1 {
  973. /* #ifndef APP-PLUS-NVUE */
  974. display: flex;
  975. /* #endif */
  976. // #ifdef MP
  977. box-sizing: border-box;
  978. // #endif
  979. flex-direction: row;
  980. align-items: center;
  981. border-style: solid;
  982. border-width: 1px;
  983. border-color: #C0C0C0;
  984. // background-color: rgba(0, 0, 0, 0.2);
  985. background-color: #FFFFFF;
  986. width: 130upx;
  987. height: 45upx;
  988. }
  989. .line {
  990. width: 1upx;
  991. height: 60%;
  992. /* #ifdef APP-PLUS-NVUE */
  993. height: 30upx;
  994. /* #endif */
  995. background-color: #C0C0C0;
  996. }
  997. /*
  998. 标题
  999. */
  1000. .title_container {
  1001. /* #ifndef APP-PLUS-NVUE */
  1002. display: flex;
  1003. /* #endif */
  1004. position: absolute;
  1005. left: 375upx;
  1006. bottom: 0;
  1007. transform: translateX(-50%);
  1008. flex-direction: row;
  1009. justify-content: center;
  1010. align-items: center;
  1011. }
  1012. .title_text {
  1013. // flex: 1;
  1014. text-overflow: ellipsis;
  1015. /* #ifndef APP-PLUS-NVUE */
  1016. white-space: nowrap;
  1017. overflow: hidden;
  1018. font-weight: 550;
  1019. /* #endif */
  1020. /* #ifdef APP-PLUS-NVUE */
  1021. lines: 1;
  1022. /* #endif */
  1023. }
  1024. /*
  1025. 左边自定义
  1026. */
  1027. .my_left_box {
  1028. /* #ifndef APP-PLUS-NVUE */
  1029. display: flex;
  1030. /* #endif */
  1031. flex-direction: row;
  1032. align-items: center;
  1033. }
  1034. .my_left_icon {
  1035. /* #ifndef APP-PLUS-NVUE */
  1036. display: flex;
  1037. /* #endif */
  1038. flex-direction: row;
  1039. align-items: center;
  1040. justify-content: center;
  1041. /* #ifndef MP */
  1042. margin-left: 18upx;
  1043. /* #endif */
  1044. }
  1045. .my_left_custom {
  1046. /* #ifndef APP-PLUS-NVUE */
  1047. display: flex;
  1048. /* #endif */
  1049. flex-direction: row;
  1050. align-items: center;
  1051. // justify-content: center;
  1052. }
  1053. /* 文字 */
  1054. .leftText {
  1055. /* #ifndef APP-PLUS-NVUE */
  1056. display: flex;
  1057. /* #endif */
  1058. flex-direction: row;
  1059. align-items: center;
  1060. justify-content: center;
  1061. padding-left: 4upx;
  1062. font-size: 15px;
  1063. }
  1064. /*
  1065. 中间
  1066. */
  1067. .my_custom_box {
  1068. /* #ifndef APP-PLUS-NVUE */
  1069. display: flex;
  1070. /* #endif */
  1071. flex-direction: row;
  1072. align-items: center;
  1073. justify-content: center;
  1074. flex: 1;
  1075. }
  1076. /*
  1077. 搜索框
  1078. */
  1079. .nv_search_box {
  1080. /* #ifndef APP-PLUS-NVUE */
  1081. display: flex;
  1082. /* #endif */
  1083. flex-direction: row;
  1084. align-items: center;
  1085. flex: 1;
  1086. /* #ifndef MP */
  1087. height: 60upx;
  1088. /* #endif */
  1089. background-color: #f8f8f8;
  1090. padding-right: 20upx;
  1091. padding-left: 20upx;
  1092. border-radius: 60upx;
  1093. margin-right: 15upx;
  1094. margin-left: 15upx;
  1095. }
  1096. .nv_input {
  1097. flex: 1;
  1098. padding-left: 16upx;
  1099. font-size: 13px;
  1100. }
  1101. .close {
  1102. width: 50upx;
  1103. /* #ifndef APP-PLUS-NVUE */
  1104. display: flex;
  1105. /* #endif */
  1106. flex-direction: row;
  1107. align-items: center;
  1108. justify-content: center;
  1109. /* #ifndef MP */
  1110. height: 62upx;
  1111. /* #endif */
  1112. }
  1113. /*
  1114. 右边 自定义
  1115. */
  1116. .my_right_icon {
  1117. /* #ifndef APP-PLUS-NVUE */
  1118. display: flex;
  1119. /* #endif */
  1120. flex-direction: row;
  1121. align-items: center;
  1122. justify-content: center;
  1123. /* #ifndef MP */
  1124. // min-width: 70upx;
  1125. /* #endif */
  1126. padding-left: 6px;
  1127. padding-right: 10px;
  1128. }
  1129. .imge image {
  1130. width: 100%;
  1131. height: 260rpx;
  1132. }
  1133. .commodity {
  1134. margin-top: 10rpx;
  1135. display: flex;
  1136. flex-wrap: wrap;
  1137. justify-content: space-between;
  1138. }
  1139. .share {
  1140. text-align: center;
  1141. line-height: 10rpx;
  1142. margin-top: 10rpx;
  1143. }
  1144. .share image {
  1145. vertical-align: middle;
  1146. width: 25rpx;
  1147. height: 25rpx;
  1148. display: inline-block
  1149. }
  1150. .share p {
  1151. display: inline-block;
  1152. font-size: 24rpx;
  1153. color: #333333;
  1154. }
  1155. .project {
  1156. width: 49%;
  1157. height: 550rpx;
  1158. // background-color: #ccc;
  1159. border-radius: 20rpx;
  1160. // box-shadow: 0rpx 5rpx 5rpx #ccc;
  1161. margin-bottom: 0%;
  1162. }
  1163. .projectdiagram {
  1164. width: 100%;
  1165. height: 61%;
  1166. background-size: 100% 100%;
  1167. position: relative;
  1168. border-radius: 10rpx;
  1169. ;
  1170. }
  1171. .TitleText1 {
  1172. height: 30rpx;
  1173. background-color: #FDD442;
  1174. border-radius: 10rpx;
  1175. display: inline-block;
  1176. padding: 0rpx 20rpx 0rpx 20rpx;
  1177. line-height: 30rpx;
  1178. }
  1179. .TitleText2 {
  1180. opacity: 0.8;
  1181. height: 30rpx;
  1182. background-color: #FFFFFF;
  1183. border-radius: 20rpx;
  1184. display: inline-block;
  1185. padding: 0rpx 20rpx 0rpx 20rpx;
  1186. line-height: 30rpx;
  1187. }
  1188. .TitleText2 p {
  1189. color: #464100;
  1190. font-size: 24rpx;
  1191. }
  1192. .projecttext {
  1193. // padding-top: 5%;
  1194. padding: 0 0 0 1%;
  1195. // height: 80rpx;
  1196. }
  1197. .projecttext span {
  1198. color: #333333;
  1199. font-size: 25rpx;
  1200. font-weight: 550;
  1201. text-indent: 2em;
  1202. }
  1203. .TitleText1 p {
  1204. color: #333333;
  1205. font-size: 18rpx;
  1206. }
  1207. .projecttext {
  1208. // height: 70rpx;
  1209. }
  1210. .projecttext image {
  1211. vertical-align: middle;
  1212. width: 30rpx;
  1213. height: 30rpx;
  1214. display: inline-block;
  1215. padding-right: 14rpx;
  1216. }
  1217. .TitleText {
  1218. // height: 30rpx;
  1219. background-color: #FDD442;
  1220. border-radius: 10rpx;
  1221. display: inline-block;
  1222. padding: 0rpx 20rpx 0rpx 20rpx;
  1223. line-height: 30rpx;
  1224. margin-top: 0%;
  1225. }
  1226. .TitleText p {
  1227. color: black;
  1228. font-size: 18rpx;
  1229. }
  1230. .introduction {
  1231. width: 100%;
  1232. margin: 10rpx auto 0;
  1233. }
  1234. .rleft p {
  1235. font-size: 18rpx;
  1236. color: #999999;
  1237. }
  1238. .rright p {
  1239. font-size: 18rpx;
  1240. color: #999999;
  1241. }
  1242. .Mask {
  1243. position: absolute;
  1244. background-color: #000000;
  1245. opacity: 0.6;
  1246. width: 100%;
  1247. height: 100%;
  1248. // z-index: 999;
  1249. text-align: center;
  1250. border-radius: 20rpx;
  1251. }
  1252. .Mask image {
  1253. width: 50%;
  1254. height: 52%;
  1255. padding-top: 25%;
  1256. }
  1257. .contt {
  1258. position: relative;
  1259. }
  1260. .contact {
  1261. position: fixed;
  1262. top: 80%;
  1263. right: 13%;
  1264. }
  1265. .img1 {
  1266. width: 84rpx;
  1267. height: 124rpx;
  1268. position: absolute;
  1269. }
  1270. .img2 {
  1271. width: 114rpx;
  1272. height: 40rpx;
  1273. position: absolute;
  1274. top: 130rpx;
  1275. left: -12rpx;
  1276. }
  1277. .swiper {
  1278. height: 300rpx;
  1279. }
  1280. .swiper-item {
  1281. display: block;
  1282. height: 300rpx;
  1283. line-height: 300rpx;
  1284. text-align: center;
  1285. }
  1286. .swiper-list {
  1287. margin-top: 40rpx;
  1288. margin-bottom: 0;
  1289. }
  1290. </style>