setting.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view>
  3. <!-- 设置 -->
  4. <u-card
  5. :border="false"
  6. padding="30"
  7. box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
  8. border-radius="20"
  9. :show-foot="false"
  10. :show-head="false"
  11. @click="tishi"
  12. >
  13. <view slot="body">
  14. <view class="u-flex u-row-between">
  15. <view class="">
  16. <u-image
  17. width="130rpx"
  18. height="130rpx"
  19. :src="userInfo.storeImageUrl"
  20. :lazy-load="true"
  21. shape="circle"
  22. >
  23. <view
  24. slot="error"
  25. style="font-size: 24rpx"
  26. :fade="true"
  27. duration="450"
  28. >加载失败
  29. </view>
  30. </u-image>
  31. </view>
  32. <view class="u-flex">
  33. <view class="u-m-r-50" style="color: #0d79ec; font-size: 32rpx"
  34. >修改头像</view
  35. >
  36. <u-icon name="arrow-right" color="#0D79EC" size="28"></u-icon>
  37. </view>
  38. </view>
  39. </view>
  40. </u-card>
  41. <u-card
  42. :border="false"
  43. padding="20"
  44. box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
  45. border-radius="20"
  46. :show-foot="false"
  47. :show-head="false"
  48. >
  49. <view slot="body">
  50. <template>
  51. <u-cell-group :border="false">
  52. <u-cell-item title="收获地址管理" @click="tishi">
  53. <u-icon
  54. slot="icon"
  55. size="42"
  56. name="location-o"
  57. custom-prefix="van-icon"
  58. color="#0095FF"
  59. style="margin-right: 10rpx"
  60. ></u-icon>
  61. </u-cell-item>
  62. <u-cell-item title="门店名称" :value="userInfo.storeName" :arrow="false">
  63. <u-icon
  64. slot="icon"
  65. size="42"
  66. name="shop-o"
  67. custom-prefix="van-icon"
  68. color="#0095FF"
  69. style="margin-right: 10rpx"
  70. ></u-icon>
  71. </u-cell-item>
  72. <u-cell-item title="门店联系人" :value="userInfo.contactName" :arrow="false">
  73. <u-icon
  74. slot="icon"
  75. size="42"
  76. name="contact"
  77. custom-prefix="van-icon"
  78. color="#0095FF"
  79. style="margin-right: 10rpx"
  80. ></u-icon>
  81. </u-cell-item>
  82. <u-cell-item title="联系电话" :value="userInfo.storePhone" :arrow="false">
  83. <u-icon
  84. slot="icon"
  85. size="42"
  86. name="phone-o"
  87. custom-prefix="van-icon"
  88. color="#0095FF"
  89. style="margin-right: 10rpx"
  90. ></u-icon>
  91. </u-cell-item>
  92. <u-cell-item title="用户协议">
  93. <u-icon
  94. slot="icon"
  95. size="42"
  96. name="friends-o"
  97. custom-prefix="van-icon"
  98. color="#0095FF"
  99. style="margin-right: 10rpx"
  100. ></u-icon>
  101. </u-cell-item>
  102. <u-cell-item title="隐私政策">
  103. <u-icon
  104. slot="icon"
  105. size="42"
  106. name="info-o"
  107. custom-prefix="van-icon"
  108. color="#0095FF"
  109. style="margin-right: 10rpx"
  110. ></u-icon>
  111. </u-cell-item>
  112. <u-cell-item
  113. title="版本检测"
  114. value="1.00"
  115. :arrow="false"
  116. :border-bottom="false"
  117. >
  118. <u-icon
  119. slot="icon"
  120. size="42"
  121. name="setting-o"
  122. custom-prefix="van-icon"
  123. color="#0095FF"
  124. style="margin-right: 10rpx"
  125. ></u-icon>
  126. </u-cell-item>
  127. </u-cell-group>
  128. </template>
  129. </view>
  130. </u-card>
  131. <u-button type="primary" @click="exit" style="margin: 20rpx"
  132. >安全退出</u-button
  133. >
  134. </view>
  135. </template>
  136. <script>
  137. import { mapMutations } from "vuex";
  138. import { request } from "../../../common/request/request";
  139. require("promise.prototype.finally").shim();
  140. export default {
  141. data() {
  142. return {
  143. userInfo: {},
  144. };
  145. },
  146. created() {
  147. this.getMyinfo();
  148. },
  149. methods: {
  150. ...mapMutations(["logout"]),
  151. exit() {
  152. this.logout();
  153. this.$u.route({
  154. url: "pages/login/index",
  155. type: "reLaunch",
  156. });
  157. },
  158. getMyinfo() {
  159. request({
  160. url: "/myapp/selectStore",
  161. method: "post",
  162. data: {
  163. storeId: this.$store.state.storeInfo.storeId,
  164. },
  165. })
  166. .then((res) => {
  167. this.userInfo = res.data.data;
  168. console.log(this.userInfo);
  169. })
  170. .catch((err) => {
  171. console.log(err);
  172. })
  173. .finally(() => {
  174. this.loading = false;
  175. uni.hideLoading();
  176. });
  177. },
  178. tishi(){
  179. this.$u.toast('此功能暂不开放');
  180. }
  181. },
  182. };
  183. </script>
  184. <style>
  185. </style>