info.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!-- 商家信息 -->
  2. <template>
  3. <view class="merchant-info-box">
  4. <label class="u-flex u-col-center form-item">
  5. <text class="form-tilte">门店名称:</text>
  6. <view class="form-content">{{ storeDetail.name }}</view>
  7. </label>
  8. <label class="u-flex u-col-center form-item">
  9. <text class="form-tilte">联系电话:</text>
  10. <view class="form-content">{{ storeDetail.phone }}</view>
  11. </label>
  12. <!-- 营业时间 -->
  13. <label class="u-flex u-col-center form-item">
  14. <text class="form-tilte">营业时间:</text>
  15. <view class="form-content">{{ storeDetail.openhours }}</view>
  16. </label>
  17. <!-- 选择星期 -->
  18. <view class="u-flex u-col-top form-item u-m-b-20">
  19. <text class="form-tilte">营业星期:</text>
  20. <view class="form-content u-flex u-flex-wrap u-row-left">
  21. <button class="cu-btn sm u-m-r-10 u-m-b-10 u-m-l-0" :class="!storeWeek.includes(week.value)?'line-green':'bg-green'" v-for="week in weekList" :key="week.title">
  22. {{ week.title }}
  23. </button>
  24. </view>
  25. </view>
  26. <!-- 选择省市 -->
  27. <label class="u-flex u-col-top form-item ">
  28. <text class="form-tilte">门店地址:</text>
  29. <view class="form-content">{{ storeDetail.province_name }}{{ storeDetail.city_name }}{{ storeDetail.area_name }}{{ storeDetail.address }}</view>
  30. </label>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. components: {},
  36. data() {
  37. return {
  38. storeWeek: [],
  39. storeDetail: {}, //门店信息
  40. weekList: [
  41. //星期
  42. {
  43. title: '周一',
  44. value: '1'
  45. },
  46. {
  47. title: '周二',
  48. value: '2'
  49. },
  50. {
  51. title: '周三',
  52. value: '3'
  53. },
  54. {
  55. title: '周四',
  56. value: '4'
  57. },
  58. {
  59. title: '周五',
  60. value: '5'
  61. },
  62. {
  63. title: '周六',
  64. value: '6'
  65. },
  66. {
  67. title: '周日',
  68. value: '7'
  69. }
  70. ]
  71. };
  72. },
  73. computed: {},
  74. onLoad() {
  75. this.getStoreDetail();
  76. },
  77. methods: {
  78. getStoreDetail() {
  79. let that = this;
  80. that.$http('store.info', {
  81. store_id: uni.getStorageSync('storeId')
  82. }).then(res => {
  83. if (res.code === 1) {
  84. that.storeDetail = res.data;
  85. that.storeWeek = res.data.openweeks.split(',');
  86. }
  87. });
  88. }
  89. }
  90. };
  91. </script>
  92. <style lang="scss">
  93. .merchant-info-box {
  94. border-top: 1rpx solid #f5f5f5;
  95. .form-item {
  96. background-color: #fff;
  97. border-bottom: 1rpx solid #f5f5f5;
  98. padding: 20rpx 30rpx;
  99. .form-title {
  100. font-size: 28rpx;
  101. font-weight: 400;
  102. color: rgba(51, 51, 51, 1);
  103. }
  104. .form-content {
  105. font-size: 28rpx;
  106. font-weight: 500;
  107. color: rgba(51, 51, 51, 1);
  108. flex: 1;
  109. }
  110. }
  111. }
  112. </style>