information.vue 7.2 KB

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