information.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view style="margin-top: 160rpx;"></view>
  6. <view class="basicInfo">
  7. <image :src="mainImg" style="width: 150rpx;height: 150rpx;" mode="">
  8. </image>
  9. <view class="basicInfo_txt">
  10. <p style="margin-bottom: 10rpx;font-size: 35rpx;font-weight: 550;">{{project.project_name}}</p>
  11. <p style="font-size: 30rpx;">商品价值:{{project.Product.product_price}}</p>
  12. </view>
  13. </view>
  14. <view class="address">
  15. <view>
  16. <image class="address_icon" :src="picture.icon_loc" mode="">
  17. </image>
  18. </view>
  19. <view style="width: 70%;">
  20. <view style="display: flex;">
  21. <p class='ipon' style="padding-right: 100rpx;">{{address.receiver_name}}</p>
  22. <p class='ipon'>{{address.phone_number}}</p>
  23. </view>
  24. <p class='ipon'>{{address.detail_addr}}</p>
  25. </view>
  26. <view class="address_edit" @click="editAddress()">
  27. <image :src="picture.icon_edit" mode="">
  28. </image>
  29. </view>
  30. </view>
  31. <view class="keyInfo">
  32. <h3>关键任务信息</h3>
  33. <p style="font-weight: 600;margin-top: 10rpx;">合作方式</p>
  34. <view style="display: flex;font-weight: 600;padding-top: 10rpx;">
  35. <p>粉丝量{{strategy.followers_low}}-{{strategy.followers_up}}
  36. &nbsp;&nbsp;
  37. 稿费-{{strategy.fee_form_t}}
  38. </p>
  39. <view v-if="strategy.fee_form!=1">
  40. <p>{{strategy.offer}}</p>
  41. </view>
  42. </view>
  43. <view style="display: flex;margin-top: 10rpx;">
  44. <p style="font-weight: 600;">社媒平台:</p>
  45. <p>{{project.project_platform_t}}</p>
  46. </view>
  47. <p style="font-weight: 600;margin-top: 10rpx;">任务要求</p>
  48. <view class="keyInfo_task">
  49. <view style="display: flex;align-items: center;margin: 5rpx 0;">
  50. <p>内容形式:</p>
  51. <p class="keyInfo_task_txt">{{project.content}}</p>
  52. <p style="margin-left: 50rpx;">任务形式:</p>
  53. <p class="keyInfo_task_txt">{{project.project_form}}</p>
  54. </view>
  55. <p style="margin: 5rpx 0;">商品描述:</p>
  56. <p class="keyInfo_task_txt"> {{project.Product.product_detail}}
  57. </p>
  58. <p style="margin: 5rpx 0;">任务详情:</p>
  59. <p class="keyInfo_task_txt"> {{project.project_detail}} </p>
  60. </view>
  61. </view>
  62. <view class="account">
  63. <view class="account_txt" @click="editAccount(item)">
  64. <image :src="project.PlatformInfo.platform_icon" mode=""></image>
  65. <span>{{account.platform_nickname}}</span>
  66. </view>
  67. <view class="account_fans">
  68. <p style="padding-right: 20rpx;color:#A8A8A8;">粉丝数</p>
  69. <p>{{account.fans_count}}</p>
  70. </view>
  71. <view class="account_btn" @click="editAccount(item)">
  72. <image :src="picture.togoimg" mode="" style="width: 16rpx;height: 30rpx;"></image>
  73. </view>
  74. </view>
  75. <view class="block"></view>
  76. <view class="submit">
  77. <button type="default" class="submit_btn" @click="submit()"> 确认报名</button>
  78. </view>
  79. </view>
  80. </template>
  81. <script>
  82. import mvBar from "@/components/mys_navBar/mysNavBar";
  83. export default {
  84. components: {
  85. mvBar
  86. },
  87. data() {
  88. return {
  89. mainImg: "https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/bb531ede-28b5-49a0-8431-a1608fd35890.png",
  90. account_id: -1,
  91. address_id: -1,
  92. address: null,
  93. project: null,
  94. account: null,
  95. strategy: null,
  96. picture: {
  97. togoimg: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task16.png',
  98. icon_edit: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-edit.png',
  99. icon_loc: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-loc.png',
  100. home8: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home8.png',
  101. home10: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home10.png',
  102. home11: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home11.png',
  103. },
  104. thirdPlatform: [],
  105. mysNavConfig: {
  106. isHome: false,
  107. /* 固定导航 */
  108. navFixed: true,
  109. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  110. navTitle: {
  111. text: "信息确认",
  112. color: "",
  113. fontSize: "32rpx", // px upx rpx
  114. fontWeight: "", // 100 - 700
  115. },
  116. btnType: "type2",
  117. onLeftClick: '',
  118. /* type2 按钮 */
  119. type2Config: {
  120. // 左图标
  121. leftPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png2.png",
  122. // 右图标
  123. rightPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png4.png",
  124. // 圆角
  125. radius: "40rpx",
  126. },
  127. },
  128. }
  129. },
  130. onShow() {
  131. // 根据address_id查询address
  132. this.getDefaultAddress();
  133. // 查询account
  134. this.getAccount();
  135. },
  136. onLoad(options) {
  137. this.textObj = options.textObj.replace(/""/g, "");
  138. this.textObj = JSON.parse(decodeURIComponent(this.textObj))
  139. // this.textObj = JSON.parse(decodeURIComponent(options.textObj))
  140. console.log(this.textObj)
  141. this.project = this.textObj.information
  142. this.strategy = this.textObj.strategy
  143. },
  144. methods: {
  145. getAccount() {
  146. this.$https.get('/youngee/c/t/g/get-talent-account')
  147. .then(res => {
  148. console.log(res)
  149. if (res.data.code !== -3) {
  150. let account = res.data.data
  151. while (this.project == null) {}
  152. for (var i = 0; i < account.length; i++) {
  153. if (this.project.project_platform == account[i].platform_id) {
  154. this.account = account[i]
  155. }
  156. }
  157. }
  158. })
  159. },
  160. getDefaultAddress() {
  161. this.$https.get('/youngee/c/t/g/get-talent-default-address').then(res => {
  162. console.log("address")
  163. console.log(res.data.data)
  164. this.address = res.data.data;
  165. })
  166. },
  167. editAddress() {
  168. uni.navigateTo({
  169. url: '/pages/mycenter/addlocation?address_id=' + this.address.address_id + '&ismodify=1'
  170. });
  171. },
  172. editAccount() {
  173. uni.navigateTo({
  174. url: '/pages/mycenter/bindaccount?platform_id=' + this.account.platform_id + '&account_id=' +
  175. this.account.account_id
  176. });
  177. },
  178. // 提交确认报名
  179. submit() {
  180. console.log(this.project)
  181. // 1. 判断任务是否截止
  182. this.$https.get('/youngee/c/t/g/get-project-detail' +
  183. "?" +
  184. "projectid" +
  185. "=" +
  186. this.project.project_id
  187. ).then(res => {
  188. console.log(res)
  189. // 当前时间
  190. var newdate = new Date()
  191. // 截止时间
  192. var endTime = new Date(res.data.data.recruit_ddl.replace(/-/g, "/"));
  193. console.log(endTime)
  194. if (endTime - newdate < 0) {
  195. // 招募截止
  196. uni.showToast({
  197. title: "任务已结束",
  198. duration: 1000,
  199. });
  200. uni.navigateTo({
  201. url: '/pages/tasksquare/tasksquare'
  202. });
  203. }
  204. })
  205. // 2. 插入一条任务
  206. this.$https.post('/youngee/c/t/p/sign-up-task', {
  207. address_id: this.address.address_id,
  208. project_id: this.project.project_id,
  209. strategy_id: this.strategy.strategy_id,
  210. offer: this.strategy.offer,
  211. }).then(res => {
  212. console.log(res.data.data)
  213. if (res.data.code == 0) {
  214. uni.navigateTo({
  215. url: '/pages/tasksquare/success'
  216. });
  217. }
  218. })
  219. },
  220. // 信息表
  221. getInfoList() {
  222. this.$http.get('/youngee/c/g/get-info-tables')
  223. .then(res => {
  224. this.hobby = []
  225. console.log(res)
  226. this.thirdPlatform = res.data.data.ThirdPlatform
  227. for (var i = 0; i < this.listsrc.length; i++) {
  228. var obj = {}
  229. obj.text = this.listsrc[i].platform_name
  230. obj.value = this.listsrc[i].id
  231. this.hobby.push(obj)
  232. }
  233. })
  234. },
  235. }
  236. }
  237. </script>
  238. <style lang="scss" scoped>
  239. .basicInfo {
  240. display: flex;
  241. margin: 0 40rpx;
  242. .basicInfo_txt {
  243. margin-left: 40rpx;
  244. padding-top: 20rpx;
  245. }
  246. }
  247. .address {
  248. display: flex;
  249. margin: 50rpx 40rpx 0;
  250. justify-content: space-around;
  251. .address_icon {
  252. vertical-align: middle;
  253. width: 50rpx;
  254. height: 50rpx;
  255. display: inline-block;
  256. padding-right: 30rpx;
  257. }
  258. .address_edit {}
  259. .address_edit image {
  260. vertical-align: middle;
  261. width: 50rpx;
  262. height: 50rpx;
  263. display: inline-block;
  264. padding-right: 14rpx;
  265. }
  266. .ipon {
  267. color: #333333;
  268. font-size: 30rpx;
  269. font-weight: 500;
  270. margin-bottom: 10rpx;
  271. }
  272. }
  273. .keyInfo {
  274. margin: 50rpx 40rpx 0;
  275. .keyInfo_task {
  276. color: #999999;
  277. .keyInfo_task_txt {
  278. border: 1rpx solid #CCCCCC;
  279. border-radius: 10rpx;
  280. padding: 10rpx;
  281. }
  282. }
  283. }
  284. .keyInfo h3 {
  285. font-weight: 600;
  286. }
  287. .keyInfo p {
  288. font-size: 30rpx;
  289. }
  290. .account {
  291. display: flex;
  292. align-items: center;
  293. // justify-content: space-between;
  294. width: 90%;
  295. padding: 16rpx;
  296. margin-top: 50rpx;
  297. font-size: 35rpx;
  298. .account_txt {
  299. display: inline-block;
  300. padding: 0 0 0 1%;
  301. width: 400rpx;
  302. }
  303. .account_txt image {
  304. vertical-align: middle;
  305. width: 50rpx;
  306. height: 50rpx;
  307. display: inline-block;
  308. padding-right: 14rpx;
  309. }
  310. .account_fans {
  311. display: flex;
  312. width: 250rpx;
  313. }
  314. .account_fans p {
  315. display: inline-block;
  316. color: #333333;
  317. font-weight: 550;
  318. }
  319. .account_btn {}
  320. }
  321. .block {
  322. width: 100%;
  323. height: 100rpx;
  324. margin-top: 5%;
  325. }
  326. .submit {
  327. box-shadow: 0rpx 5rpx 40rpx #ccc;
  328. width: 100%;
  329. position: fixed;
  330. bottom: 0rpx;
  331. display: flex;
  332. height: 90rpx;
  333. padding-top: 2%;
  334. background-color: #FFFFFF;
  335. .submit_btn {
  336. width: 60%;
  337. background-color: #FCCF41;
  338. border-radius: 20rpx;
  339. font-size: 36rpx;
  340. line-height: 200%;
  341. letter-spacing: 10rpx;
  342. font-weight: 500;
  343. height: 80%;
  344. }
  345. }
  346. </style>