storeMessage.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="content">
  3. <view class="item">
  4. <view class="item-tit">
  5. 店铺名称
  6. </view>
  7. <input type="text" v-model="name"/>
  8. </view>
  9. <view class="item">
  10. <view class="item-tit">
  11. 商家电话
  12. </view>
  13. <input type="number" v-model="phone"/>
  14. </view>
  15. <view class="item">
  16. <view class="item-tit">
  17. 商家地址
  18. </view>
  19. <input type="text" v-model="address"/>
  20. </view>
  21. <view class="item">
  22. <view class="item-tit">
  23. 营业时间
  24. </view>
  25. <input type="text" v-model="workTime"/>
  26. </view>
  27. <view class="item">
  28. <view class="item-tit">
  29. 商户简介
  30. </view>
  31. <textarea v-model="info" placeholder="" />
  32. </view>
  33. <view class="item">
  34. <view class="item-tit">
  35. 门户头像
  36. </view>
  37. <view class="up-wrapper">
  38. <image :src="logo" mode="" v-if="logo" @click.stop="upImg"></image>
  39. <image src="../../static/img/add.png" mode="" v-else @click.stop="upImg"></image>
  40. </view>
  41. </view>
  42. <view class="sub" @click="sub">
  43. 确认修改
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. upload
  50. } from '@/api/user.js';
  51. export default {
  52. data() {
  53. return {
  54. name: '鑫旺零售台州店',
  55. phone: '12345678911',
  56. address: '台州市市府大道110号',
  57. info: '店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介',
  58. workTime: '8:30-12:00,13:30-17:00',
  59. logo: ''
  60. }
  61. },
  62. methods:{
  63. // 修改logo
  64. upImg() {
  65. let obj = this
  66. upload({
  67. filename: ''
  68. }).then(res => {
  69. console.log(res[0].url)
  70. obj.logo = res[0].url
  71. });
  72. },
  73. //提交
  74. sub() {
  75. let obj = this
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. page {
  82. height: 100%;
  83. background-color: #f8f6f6;
  84. }
  85. .item {
  86. background-color: #fff !important;
  87. min-height: 100rpx;
  88. display: flex;
  89. width: 750px;
  90. border: 1px #F4F4F4 solid;
  91. .item-tit {
  92. height: 100rpx;
  93. line-height: 100rpx;
  94. padding-left: 30rpx;
  95. width: 200rpx;
  96. font-size: 30rpx;
  97. font-family: PingFang SC;
  98. font-weight: 500;
  99. color: #666666;
  100. flex-shrink: 0;
  101. }
  102. input {
  103. width: 550rpx;
  104. height: 100rpx;
  105. line-height: 100rpx;
  106. font-size: 30rpx;
  107. font-family: PingFang SC;
  108. font-weight: 500;
  109. color: #333333;
  110. }
  111. textarea {
  112. width: 550rpx;
  113. height: 257rpx;
  114. padding-top: 45rpx;
  115. padding-right: 30rpx;
  116. line-height: 50rpx;
  117. font-size: 30rpx;
  118. font-family: PingFang SC;
  119. font-weight: 500;
  120. color: #333333;
  121. }
  122. .up-wrapper {
  123. height: 352rpx;
  124. width: 550rpx;
  125. position: relative;
  126. image {
  127. position: absolute;
  128. height: 160rpx;
  129. width: 160rpx;
  130. top: 0;
  131. bottom: 0;
  132. left: 94rpx;
  133. margin: auto;
  134. }
  135. }
  136. }
  137. .sub {
  138. width: 674rpx;
  139. height: 88rpx;
  140. background: #FF4C4C;
  141. border-radius: 44rpx;
  142. line-height: 88rpx;
  143. text-align: center;
  144. font-size: 36rpx;
  145. font-family: PingFang SC;
  146. font-weight: 500;
  147. color: #FFFFFF;
  148. position: absolute;
  149. bottom: 35rpx;
  150. left: 0;
  151. right: 0;
  152. margin: auto;
  153. }
  154. </style>