information.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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.ProductPrice}}</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. <view style="display: flex;margin-top: 10rpx;">
  34. <p style="font-weight: 600;">社媒平台:</p>
  35. <p>{{project.project_platform_t}}</p>
  36. </view>
  37. <p style="font-weight: 600;margin-top: 10rpx;">任务要求</p>
  38. <view class="keyInfo_task">
  39. <view style="display: flex;align-items: center;margin: 5rpx 0;">
  40. <p>内容形式:</p>
  41. <p class="keyInfo_task_txt">{{project.content}}</p>
  42. </view>
  43. <p style="margin: 5rpx 0;">商品描述:</p>
  44. <p class="keyInfo_task_txt"> {{project.Product.ProductDetail}}
  45. </p>
  46. <p style="margin: 5rpx 0;">任务详情:</p>
  47. <p class="keyInfo_task_txt"> {{project.project_detail}} </p>
  48. </view>
  49. </view>
  50. <view class="account">
  51. <view class="account_txt" @click="editAccount(item)">
  52. <image :src="project.PlatformInfo.platform_icon" mode=""></image>
  53. <span>{{account.platform_nickname}}</span>
  54. </view>
  55. <view class="account_fans">
  56. <p style="padding-right: 20rpx;color:#A8A8A8;">粉丝数</p>
  57. <p>{{account.show_fans_count}}</p>
  58. </view>
  59. <view class="account_btn" @click="editAccount(item)">
  60. <image :src="picture.togoimg" mode="" style="width: 16rpx;height: 30rpx;"></image>
  61. </view>
  62. </view>
  63. <view class="block"></view>
  64. <view class="submit">
  65. <button type="default" class="submit_btn" @click="submit()"> 确认邀请</button>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import mvBar from "@/components/mys_navBar/mysNavBar";
  71. import {
  72. fansview
  73. } from '@/components/utils.js';
  74. export default {
  75. components: {
  76. mvBar
  77. },
  78. data() {
  79. return {
  80. mainImg: "https://horastar.obs.cn-east-3.myhuaweicloud.com/backstage_upload/bb531ede-28b5-49a0-8431-a1608fd35890.png",
  81. account_id: -1,
  82. address_id: -1,
  83. address: null,
  84. project: null,
  85. account: null,
  86. strategy: null,
  87. picture: {
  88. togoimg: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/task16.png',
  89. icon_edit: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-edit.png',
  90. icon_loc: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-loc.png',
  91. home8: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home8.png',
  92. home10: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home10.png',
  93. home11: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/home11.png',
  94. },
  95. thirdPlatform: [],
  96. mysNavConfig: {
  97. isHome: false,
  98. /* 固定导航 */
  99. navFixed: true,
  100. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  101. navTitle: {
  102. text: "信息确认",
  103. color: "",
  104. fontSize: "32rpx", // px upx rpx
  105. fontWeight: "", // 100 - 700
  106. },
  107. btnType: "type2",
  108. onLeftClick: '',
  109. /* type2 按钮 */
  110. type2Config: {
  111. // 左图标
  112. leftPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png2.png",
  113. // 右图标
  114. rightPath: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/png4.png",
  115. // 圆角
  116. radius: "40rpx",
  117. },
  118. },
  119. }
  120. },
  121. onShow() {
  122. this.getDefaultAddress();
  123. // 查询account
  124. this.getAccount();
  125. },
  126. onLoad(options) {
  127. this.textObj = options.textObj.replace(/""/g, "");
  128. this.textObj = JSON.parse(decodeURIComponent(this.textObj))
  129. console.log(this.textObj)
  130. this.project = this.textObj.information
  131. },
  132. methods: {
  133. getAccount() {
  134. this.$https.get('/youngee/c/t/g/get-talent-account')
  135. .then(res => {
  136. console.log(res)
  137. if (res.data.code !== -3) {
  138. let account = res.data.data
  139. while (this.project == null) {}
  140. for (var i = 0; i < account.length; i++) {
  141. if (this.project.project_platform == account[i].platform_id) {
  142. this.account = account[i]
  143. }
  144. }
  145. this.account.show_fans_count = fansview(this.account.fans_count)
  146. }
  147. })
  148. },
  149. getDefaultAddress() {
  150. this.$https.get('/youngee/c/t/g/get-talent-default-address').then(res => {
  151. console.log("address")
  152. console.log(res.data.data)
  153. this.address = res.data.data;
  154. })
  155. },
  156. editAddress() {
  157. uni.navigateTo({
  158. url: '/pages/mycenter/addlocation?address_id=' + this.address.address_id + '&ismodify=1'
  159. });
  160. },
  161. editAccount() {
  162. uni.navigateTo({
  163. url: '/pages/mycenter/bindaccount?platform_id=' + this.account.platform_id + '&account_id=' +
  164. this.account.account_id
  165. });
  166. },
  167. // 提交确认报名
  168. submit() {
  169. console.log(this.project)
  170. // 2. 插入一条任务
  171. this.$https.post('/youngee/c/t/p/sign-up-task', {
  172. address_id: this.address.address_id,
  173. project_id: this.project.project_id,
  174. // strategy_id: this.strategy.strategy_id,
  175. // offer: this.strategy.offer,
  176. }).then(res => {
  177. if (res.data.code == 0) {
  178. var data = {
  179. task_id: res.data.data
  180. };
  181. data = JSON.stringify(data)
  182. uni.navigateTo({
  183. url: '/pages/tasksquare/success?textObj=' + encodeURIComponent(data)
  184. });
  185. }
  186. })
  187. },
  188. }
  189. }
  190. </script>
  191. <style lang="scss" scoped>
  192. .basicInfo {
  193. display: flex;
  194. margin: 0 40rpx;
  195. .basicInfo_txt {
  196. margin-left: 40rpx;
  197. padding-top: 20rpx;
  198. }
  199. }
  200. .address {
  201. display: flex;
  202. margin: 50rpx 40rpx 0;
  203. justify-content: space-around;
  204. .address_icon {
  205. vertical-align: middle;
  206. width: 50rpx;
  207. height: 50rpx;
  208. display: inline-block;
  209. padding-right: 30rpx;
  210. }
  211. .address_edit {}
  212. .address_edit image {
  213. vertical-align: middle;
  214. width: 50rpx;
  215. height: 50rpx;
  216. display: inline-block;
  217. padding-right: 14rpx;
  218. }
  219. .ipon {
  220. color: #333333;
  221. font-size: 30rpx;
  222. font-weight: 500;
  223. margin-bottom: 10rpx;
  224. }
  225. }
  226. .keyInfo {
  227. margin: 50rpx 40rpx 0;
  228. .keyInfo_task {
  229. color: #999999;
  230. .keyInfo_task_txt {
  231. border: 1rpx solid #CCCCCC;
  232. border-radius: 10rpx;
  233. padding: 10rpx;
  234. }
  235. }
  236. }
  237. .keyInfo h3 {
  238. font-weight: 600;
  239. }
  240. .keyInfo p {
  241. font-size: 30rpx;
  242. }
  243. .account {
  244. display: flex;
  245. align-items: center;
  246. // justify-content: space-between;
  247. width: 90%;
  248. padding: 16rpx;
  249. margin-top: 50rpx;
  250. font-size: 35rpx;
  251. .account_txt {
  252. display: inline-block;
  253. padding: 0 0 0 1%;
  254. width: 400rpx;
  255. }
  256. .account_txt image {
  257. vertical-align: middle;
  258. width: 50rpx;
  259. height: 50rpx;
  260. display: inline-block;
  261. padding-right: 14rpx;
  262. }
  263. .account_fans {
  264. display: flex;
  265. width: 250rpx;
  266. }
  267. .account_fans p {
  268. display: inline-block;
  269. color: #333333;
  270. font-weight: 550;
  271. }
  272. .account_btn {}
  273. }
  274. .block {
  275. width: 100%;
  276. height: 100rpx;
  277. margin-top: 5%;
  278. }
  279. .submit {
  280. box-shadow: 0rpx 5rpx 40rpx #ccc;
  281. width: 100%;
  282. position: fixed;
  283. bottom: 0rpx;
  284. display: flex;
  285. height: 90rpx;
  286. padding-top: 2%;
  287. background-color: #FFFFFF;
  288. .submit_btn {
  289. width: 60%;
  290. background-color: #FCCF41;
  291. border-radius: 20rpx;
  292. font-size: 36rpx;
  293. line-height: 200%;
  294. letter-spacing: 10rpx;
  295. font-weight: 500;
  296. height: 80%;
  297. }
  298. }
  299. </style>