editStore.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-fff" :isBack="true">
  4. <block slot="content">编辑门店</block>
  5. </cu-custom>
  6. <view class="borderRadiu" style="margin: 22upx 26upx;">
  7. <view class="cu-form-group">
  8. <view class="title">门店名称</view>
  9. <input placeholder="请输入门店名称" v-model="form.storeName" name="input"></input>
  10. </view>
  11. <view class="cu-form-group">
  12. <view class="title">所在地区</view>
  13. <input disabled="true" @mousedown="$refs.picker.show()" placeholder="请选择所在地区" ref="inputRef"
  14. name="input" v-model="form.locality"></input>
  15. <text class='cuIcon-right' style="color: #C7C6CA ;" @click="$refs.picker.show()"></text>
  16. <w-picker :visible.sync="visible" ref="picker" mode="region" :value="form.locality"
  17. @confirm="onConfirm($event, 'region')"></w-picker>
  18. </view>
  19. <view class="cu-form-group">
  20. <view class="title">门店地址</view>
  21. <input placeholder="请输入门店详细地址" v-model="form.address" name="input"></input>
  22. </view>
  23. <view class="customize">
  24. <view class="title">地理位置</view>
  25. <view class=" booder-top" style="padding-bottom: 16upx;">
  26. <!-- <map style="width: 100%; height: 218upx;" :latitude="latitude" scale="14"
  27. :longitude="longitude" :markers="markers" @tap="handleMarkerTap"></map> -->
  28. </view>
  29. <!-- <aMap class=" booder-top" style="padding-bottom: 7px;"></aMap> -->
  30. <view class="business-prompt">
  31. 若位置有误直接影响客户到店,请在地图中仔细核对,可拖拽地图确保位置正确
  32. </view>
  33. </view>
  34. <view class="cu-form-group">
  35. <view class="title">店铺面积</view>
  36. <input placeholder="请输入店铺面积" v-model="form.storeExtent" name="input"></input>
  37. </view>
  38. <view class="customize">
  39. <view class="title">门头照片</view>
  40. <view class="grid col-3 grid-square flex-sub booder-top">
  41. <view class="bg-img" v-for="(item, index) in imgList" :key="index" @tap="ViewImage"
  42. :data-url="imgList[index]">
  43. <image :src="imgList[index]" mode="aspectFill"></image>
  44. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
  45. <text class='cuIcon-close'></text>
  46. </view>
  47. </view>
  48. <view class="solids" @tap="ChooseImage" v-if="imgList.length < 4">
  49. <text class='cuIcon-cameraadd'></text>
  50. </view>
  51. </view>
  52. <view class="business-prompt">
  53. 门店照片需包含完整的门店入口和招牌名称,建议现场拍摄门头照;最多可上传10张,支持格式bmp、png、jpeg、jpg,单个图片不超过5MB,建议尺寸在2000*1500px以上
  54. </view>
  55. </view>
  56. </view>
  57. <view class="padding flex flex-direction sub-bottom">
  58. <button class="cu-btn bg-blue round ">提交审核</button>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import regionPicker from "../../components/w-picker/region-picker.vue"
  64. export default {
  65. components: {
  66. regionPicker,
  67. // aMap
  68. },
  69. data() {
  70. return {
  71. imgList: [],
  72. form:{},
  73. visible: false,
  74. }
  75. },
  76. methods:{
  77. onConfirm(e) {
  78. this.form.locality = e.result
  79. this.form.country = e.value[e.value.length - 1]
  80. },
  81. DelImg(e) {
  82. uni.showModal({
  83. title: '提示',
  84. content: '确定要删除?',
  85. cancelText: '取消',
  86. confirmText: '确定',
  87. success: res => {
  88. if (res.confirm) {
  89. this.imgList.splice(e.currentTarget.dataset.index, 1)
  90. this.form.headPhoto.splice(e.currentTarget.dataset.index, 1)
  91. }
  92. }
  93. })
  94. },
  95. ViewImage(e) {
  96. uni.previewImage({
  97. urls: this.imgList,
  98. current: e.currentTarget.dataset.url
  99. });
  100. },
  101. }
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. page {
  106. background: #F8F8FA;
  107. }
  108. .borderRadiu {
  109. border-radius: 8px;
  110. padding-bottom: 10px;
  111. background-color: #ffffff;
  112. // border-bottom: 1px solid #eee;
  113. }
  114. .sub-bottom {
  115. position: fixed;
  116. width: 100%;
  117. bottom: 0;
  118. background: #FFFFFF;
  119. border-top: 1px solid #EEEEEE;
  120. }
  121. .customize {
  122. background-color: #fff;
  123. // border-top: 0.5px solid #eee;
  124. margin: 16upx 18upx;
  125. .title {
  126. font-size: 30upx;
  127. // padding: 10px;
  128. }
  129. .business-img {
  130. height: 218upx;
  131. width: 360upx;
  132. padding: 16upx;
  133. // padding-bottom: 16upx;
  134. background: url('/static/login/yingye2.png');
  135. margin: 16upx auto;
  136. background-size: cover;
  137. image {
  138. width: 100%;
  139. height: 100%;
  140. }
  141. }
  142. .business-prompt {
  143. padding-top: 16upx;
  144. font-size: 20upx;
  145. color: #999999;
  146. }
  147. }
  148. .booder-top {
  149. border-bottom: 1px solid rgb(238, 238, 238);
  150. padding-top: 7px;
  151. }
  152. </style>