PersonalEditing.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <view class="page" :style="{'min-height':h+'px'}">
  3. <view class="from-content">
  4. <view class="one-image" @click="upImage">
  5. <view class="user">
  6. 店铺标志
  7. </view>
  8. <view class="image">
  9. <image src="https://i.ringzle.com/file/20240224/2c5f3ed11f1a47519f0a68cb60f0d9a9.png" mode="">
  10. </image>
  11. <!-- <image :src="dto.headUrl" mode="aspectFill"></image> -->
  12. </view>
  13. </view>
  14. <view class="one-realName">
  15. <view class="realName">
  16. 店铺名称
  17. </view>
  18. <!-- <u--input v-model="realName" border="none" pl ></u--input> -->
  19. <view class="right">
  20. <input type="text" v-model="dto.realName" border="none" placeholder="请输入昵称" />
  21. </view>
  22. </view>
  23. <view class="one-mobile">
  24. <view class="mobile">
  25. 联系电话
  26. </view>
  27. <view class="right">
  28. <input type="text" v-model="dto.modifyPhone" border="none" placeholder="请输入手机号"
  29. style="height: 48rpx;" />
  30. </view>
  31. </view>
  32. <view class="one-mobile">
  33. <view class="mobile">
  34. 商家地址
  35. </view>
  36. <view class="right">
  37. 浙江省舟山市嵊泗县菜园镇东海路89号
  38. </view>
  39. </view>
  40. <view class="one" @click="nav">
  41. <view class="">
  42. 营业执照
  43. </view>
  44. <view class="">
  45. <u-icon name="arrow-right"></u-icon>
  46. </view>
  47. </view>
  48. <view class="one">
  49. <view class="">
  50. 统一社会信用代码
  51. </view>
  52. <view class="">
  53. <u-icon name="arrow-right"></u-icon>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="from-content">
  58. <view class="title">
  59. 店铺照片
  60. </view>
  61. <view class="">
  62. 照片
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. h: uni.getSystemInfoSync().windowHeight - 87,
  72. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  73. titleHeader: '个人信息',
  74. fileList: [],
  75. dto: {
  76. realName: '黄沙村渔家乐', //昵称
  77. modifyPhone: '18755113256', //手机号
  78. headUrl: '', // 头像
  79. idCode: '', // 证件号
  80. id: ''
  81. },
  82. picList: [],
  83. objList: {}
  84. }
  85. },
  86. onLoad() {
  87. this.getInfo();
  88. },
  89. methods: {
  90. getInfo(){
  91. this.$api.get('/merchant/merchantFisherman/home/').then(res=>{
  92. console.log(res)
  93. if(res.data.code==0){
  94. this.dto=res.data.data;
  95. }
  96. })
  97. },
  98. // 上传头像
  99. upImage() {
  100. uni.chooseImage({
  101. sourceType: ['album'], //从相册选择
  102. success: chooseImageRes => {
  103. const tempFilePaths = chooseImageRes.tempFilePaths;
  104. uni.uploadFile({
  105. url: 'https://i.ringzle.com/island-cloud-server/oss/file/upload', // 仅为示例,非真实的接口地址
  106. filePath: tempFilePaths[0],
  107. name: 'file',
  108. header: {
  109. token: wx.getStorageSync('access_token')
  110. },
  111. success: res => {
  112. // uploadFile上传成功后,根据和后台的约定msgCode判断接口调用状态
  113. let data = JSON.parse(res.data);
  114. this.dto.headUrl = data.data.url
  115. }
  116. });
  117. },
  118. fail: err => {
  119. this.myToast('图片上传失败', 'none');
  120. }
  121. });
  122. },
  123. }
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .page {
  128. box-sizing: border-box;
  129. padding: 30rpx;
  130. // padding-top: 150rpx;
  131. }
  132. .from-content {
  133. .title {
  134. margin: 40rpx 0 36rpx;
  135. font-size: 30rpx;
  136. font-weight: Regular;
  137. color: #111111;
  138. }
  139. .one-image {
  140. width: 100%;
  141. display: flex;
  142. justify-content: space-between;
  143. .image {
  144. width: 124rpx;
  145. height: 124rpx;
  146. border-radius: 100rpx;
  147. image {
  148. width: 100%;
  149. height: 100%;
  150. border-radius: 100rpx;
  151. }
  152. }
  153. .user {
  154. margin-top: 24rpx;
  155. font-size: 30rpx;
  156. color: #111;
  157. font-weight: Regular;
  158. }
  159. }
  160. .one-realName {
  161. width: 100%;
  162. display: flex;
  163. align-items: center;
  164. height: 120rpx;
  165. line-height: 120rpx;
  166. border-bottom: 1rpx solid #EFEFEF;
  167. .realName {
  168. width: 188rpx;
  169. height: 120rpx;
  170. font-size: 30rpx;
  171. color: #333333;
  172. font-weight: Regular;
  173. }
  174. .right {
  175. text-align: right;
  176. width: 100%;
  177. font-size: 30rpx;
  178. color: #666666;
  179. font-weight: Regular;
  180. // display: flex;
  181. // justify-content: space-between;
  182. }
  183. }
  184. .one-mobile {
  185. display: flex;
  186. width: 100%;
  187. align-items: center;
  188. height: 120rpx;
  189. line-height: 120rpx;
  190. border-bottom: 1rpx solid #EFEFEF;
  191. .right {
  192. width: 100%;
  193. text-align: right;
  194. font-size: 30rpx;
  195. color: #666666;
  196. font-weight: Regular;
  197. }
  198. .mobile {
  199. width: 188rpx;
  200. height: 120rpx;
  201. font-size: 30rpx;
  202. color: #333333;
  203. font-weight: Regular;
  204. }
  205. .replacement {
  206. border-radius: 50rpx;
  207. width: 80rpx;
  208. height: 48rpx;
  209. line-height: 48rpx;
  210. border: 1rpx solid #025EA7;
  211. color: #025EA7;
  212. font-weight: Regular;
  213. font-size: 24rpx;
  214. text-align: center;
  215. }
  216. }
  217. .one {
  218. height: 120rpx;
  219. line-height: 120rpx;
  220. display: flex;
  221. border-bottom: 1rpx solid #EFEFEF;
  222. justify-content: space-between;
  223. align-items: center;
  224. font-size: 30rpx;
  225. color: #333333;
  226. font-weight: Regular;
  227. }
  228. }
  229. .btn {
  230. margin: 120rpx auto;
  231. width: 650rpx;
  232. height: 88rpx;
  233. display: flex;
  234. background-color: #01B9F9;
  235. line-height: 88rpx;
  236. border-radius: 50rpx;
  237. .btn-btn {
  238. margin: 0 auto;
  239. font-size: 32rpx;
  240. color: #FFFFFF;
  241. font-weight: Regular;
  242. }
  243. }
  244. </style>