information.vue 7.7 KB

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