agentDetail.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view>
  3. <back></back>
  4. <u-image @load="load" :src="src"
  5. mode="widthFix"></u-image>
  6. <view v-if="show" class="bottom-bar" style="background-color: #5034c5;margin-top: -30rpx;">
  7. <button class="cu-btn round text-bold"
  8. style="width: 100%;height: 100upx;font-size: 36upx;background-color: #f9b12b;color: #5034C6;"
  9. @click="nav">加入代理</button>
  10. </view>
  11. <loading ref="loading" type="3" />
  12. </view>
  13. </template>
  14. <script>
  15. import back from "../../comps/back.vue"
  16. export default {
  17. components: {
  18. back
  19. },
  20. data() {
  21. return {
  22. src:'',
  23. show: false
  24. }
  25. },
  26. onLoad(options) {
  27. this.$refs.loading.showLoading()
  28. this.fetchDetail()
  29. if (this.$isNotEmpty(options.scene)) {
  30. let salesmanId = decodeURIComponent(options.scene)
  31. salesmanId && this.$cache.put('salesmanId', salesmanId)
  32. }
  33. },
  34. methods: {
  35. async fetchDetail() {
  36. let params = {
  37. paramKey: 'agent_detail' || '-1'
  38. }
  39. let res=await this.$api.wxApp.appParams(params)
  40. if (this.$isNotEmpty(res.data)) {
  41. this.src=res.data.paramValue
  42. }else{
  43. this.src="https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/db833cc4148149058b185efdfb5f6e6e-pQIwdxWHG6XR5e5284ccb535e82d8cb8a3bc669323ac.png"
  44. }
  45. },
  46. nav() {
  47. uni.navigateTo({
  48. url: "agent"
  49. })
  50. },
  51. load() {
  52. this.show = true
  53. this.$refs.loading.hide()
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. </style>