agentDetail.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. fetchDetail() {
  36. let params = {
  37. paramKey: 'agent_detail' || '-1'
  38. }
  39. this.$api.wxApp.appParams(params).then(res => {
  40. this.src=res.data.paramValue
  41. })
  42. },
  43. nav() {
  44. uni.navigateTo({
  45. url: "agent"
  46. })
  47. },
  48. load() {
  49. this.show = true
  50. this.$refs.loading.hide()
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. </style>