information.vue 8.2 KB

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