index.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view class="store-page">
  3. <view class="container">
  4. <view class="item">
  5. <view class="label">门店名称</view>
  6. <view class="value">{{ storeInfo.storeName }}</view>
  7. </view>
  8. <view class="item">
  9. <view class="label">联系电话</view>
  10. <view class="value">{{ storeInfo.contactPhone }}</view>
  11. </view>
  12. <view class="item">
  13. <view class="label">门店地址</view>
  14. <view class="value">{{ storeInfo.provinceName != null ? storeInfo.provinceName : '' }}{{ storeInfo.cityName != null ? storeInfo.cityName : '' }}{{ storeInfo.address != null ? storeInfo.address : '' }}</view>
  15. </view>
  16. <view class="item">
  17. <view class="label">店铺推广码</view>
  18. <view class="value flex-end" @click="goToQrcodes">
  19. <image class="qrcode" src="../../static/imgs/mine/qrcode.png" />
  20. <u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data () {
  29. return {
  30. storeInfo: {
  31. }
  32. }
  33. },
  34. methods: {
  35. goToQrcodes () {
  36. uni.navigateTo({
  37. url: '/pages/store/extensionCode'
  38. })
  39. }
  40. },
  41. onLoad (opt) {
  42. console.log('opt :>> ', opt);
  43. let str = decodeURIComponent(opt.data);
  44. if (str != 'undefined'){
  45. this.storeInfo = JSON.parse(str)
  46. }
  47. console.log('this.storeInfo :>> ', this.storeInfo);
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. .store-page {
  53. height: 100vh;
  54. background-color: #f5f5f5;
  55. border-top: 4rpx solid #ececec;
  56. }
  57. .container {
  58. padding: 0 30rpx;
  59. box-sizing: border-box;
  60. background-color: #fff;
  61. }
  62. .item {
  63. @include between;
  64. min-height: 100rpx;
  65. border-bottom: 4rpx solid #ececec;
  66. box-sizing: border-box;
  67. font-size: $font-lg;
  68. padding: 20rpx 0;
  69. .label {
  70. width: 220rpx;
  71. color: $desc-color;
  72. }
  73. .value {
  74. width: calc(100% - 220rpx);
  75. color: $text-color;
  76. }
  77. .qrcode {
  78. width: 40rpx;
  79. height: 40rpx;
  80. margin: 0 20rpx;
  81. }
  82. .flex-end {
  83. display: flex;
  84. justify-content: flex-end;
  85. align-items: center;
  86. }
  87. }
  88. </style>