index.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <view class="my">
  3. <view class="content">
  4. <view class="shop_base_info color-base-bg">
  5. <view class="shop_info margin-left">
  6. <view class="shop_title">
  7. <text class="user-name">{{ userInfo.username }}</text>
  8. <text class="group-name color-base-text" v-if="userInfo.group_name">{{ userInfo.group_name }}</text>
  9. </view>
  10. </view>
  11. <text class="weixincode iconfont iconrichscan_icon" @click.stop="$util.redirectTo('/pages/verify/index')"></text>
  12. </view>
  13. <view class="list">
  14. <view class="item-wrap" @click="$util.redirectTo('/pages/my/shop/config')">
  15. <view class="info">
  16. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/my/store.png')" mode="aspectFit"></image>
  17. <text>店铺信息</text>
  18. </view>
  19. <text class="iconfont iconright"></text>
  20. </view>
  21. <view class="item-wrap" @click="$util.redirectTo('/pages/my/shop/contact')">
  22. <view class="info">
  23. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/my/address.png')" mode="aspectFit"></image>
  24. <text>联系地址</text>
  25. </view>
  26. <text class="iconfont iconright"></text>
  27. </view>
  28. <view class="item-wrap" @click="$util.redirectTo('/pages/my/user/user')">
  29. <view class="info">
  30. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/my/member.png')" mode="aspectFit"></image>
  31. <text>用户管理</text>
  32. </view>
  33. <text class="iconfont iconright"></text>
  34. </view>
  35. <view class="item-wrap" @click="$util.redirectTo('/pages/login/modify_pwd')">
  36. <view class="info">
  37. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/my/password.png')" mode="aspectFit"></image>
  38. <text>修改密码</text>
  39. </view>
  40. <text class="iconfont iconright"></text>
  41. </view>
  42. <view class="item-wrap" @click="$util.redirectTo('/pages/property/settlement/list_store')">
  43. <view class="info">
  44. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/index/store_jiesuan.png')" mode="aspectFit"></image>
  45. <text>门店结算</text>
  46. </view>
  47. <text class="iconfont iconright"></text>
  48. </view>
  49. <!-- <view class="item-wrap" @click="$util.redirectTo('/pages/property/settlement/list')">
  50. <view class="info">
  51. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/index/shop_jiesuan.png')" mode="aspectFit"></image>
  52. <text>店铺结算</text>
  53. </view>
  54. <text class="iconfont iconright"></text>
  55. </view> -->
  56. <!-- <view class="item-wrap" @click="$util.redirectTo('/pages/property/withdraw/list')">
  57. <view class="info">
  58. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/index/tixian.png')" mode="aspectFit"></image>
  59. <text>提现记录</text>
  60. </view>
  61. <text class="iconfont iconright"></text>
  62. </view> -->
  63. <view class="item-wrap" @click="$util.redirectTo('/pages/verify/user')">
  64. <view class="info">
  65. <image class="img" :src="$util.img('/upload/uniapp/shop_uniapp/index/verify_peo.png')" mode="aspectFit"></image>
  66. <text>核销人员</text>
  67. </view>
  68. <text class="iconfont iconright"></text>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="footer-wrap"><view class="primary" @click="openPopup()">退出登录</view></view>
  73. <uni-popup ref="loginOutPopup">
  74. <view class="pop-wrap" @touchmove.prevent.stop>
  75. <view class="title">您确定要退出当前账号吗?</view>
  76. <view class="action-btn">
  77. <view @click="closePopup()">取消</view>
  78. <view class="color-base-text" @click="loginOut()">确定</view>
  79. </view>
  80. </view>
  81. </uni-popup>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. data() {
  87. return {
  88. userInfo: {}
  89. };
  90. },
  91. onShow() {
  92. if (!this.$util.checkToken('/pages/index/index')) return;
  93. this.$nextTick(function() {
  94. this.userInfo = uni.getStorageSync('user_info') ? JSON.parse(uni.getStorageSync('user_info')) : {};
  95. this.$forceUpdate();
  96. });
  97. },
  98. methods: {
  99. loginOut() {
  100. uni.removeStorageSync('token');
  101. uni.removeStorageSync('site_id');
  102. uni.removeStorageSync('shop_info');
  103. uni.removeStorageSync('user_info');
  104. uni.removeStorageSync('shopPackage');
  105. uni.removeStorageSync('openInfo');
  106. uni.removeStorageSync('bankInfo');
  107. uni.removeStorageSync('renewObj');
  108. uni.removeStorageSync('menuPermission');
  109. this.closePopup();
  110. this.$util.redirectTo('/pages/login/login');
  111. },
  112. openPopup() {
  113. this.$refs.loginOutPopup.open();
  114. },
  115. closePopup() {
  116. this.$refs.loginOutPopup.close();
  117. }
  118. }
  119. };
  120. </script>
  121. <style lang="scss">
  122. .my {
  123. .content {
  124. background-color: #fff;
  125. padding: 30rpx 0 10rpx;
  126. }
  127. .shop_base_info {
  128. display: flex;
  129. align-items: center;
  130. color: #fff;
  131. margin: 0 $margin-both;
  132. padding: 30rpx 0;
  133. border-radius: $border-radius;
  134. .shop_info {
  135. flex: 1;
  136. .shop_title {
  137. color: #fff;
  138. font-size: $font-size-toolbar;
  139. font-weight: 600;
  140. text {
  141. vertical-align: middle;
  142. display: inline-block;
  143. overflow: hidden;
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. white-space: nowrap;
  147. }
  148. .user-name {
  149. max-width: 300rpx;
  150. }
  151. .group-name {
  152. font-size: $font-size-goods-tag;
  153. margin-left: $margin-updown;
  154. border: 1px solid #fff;
  155. background-color: #fff;
  156. border-radius: 50rpx;
  157. padding: 0 13rpx;
  158. height: 40rpx;
  159. line-height: 40rpx;
  160. font-weight: 400;
  161. max-width: 200rpx;
  162. }
  163. }
  164. .shop_other_info {
  165. color: #fff;
  166. margin-top: 10rpx;
  167. font-size: $font-size-tag;
  168. }
  169. }
  170. .weixincode {
  171. margin: 0 $margin-both;
  172. font-size: 36rpx;
  173. color: #fff;
  174. }
  175. }
  176. .list {
  177. margin: 0 $margin-both;
  178. padding-top: 30rpx;
  179. background-color: #fff;
  180. border-radius: $border-radius;
  181. .item-wrap {
  182. display: flex;
  183. justify-content: space-between;
  184. align-items: center;
  185. padding: 25rpx 0;
  186. border-bottom: 1px solid $color-line;
  187. &:last-child {
  188. border: none;
  189. }
  190. .info {
  191. display: flex;
  192. align-items: center;
  193. .img {
  194. height: 40rpx;
  195. width: 40rpx;
  196. margin-right: $margin-both;
  197. vertical-align: center;
  198. }
  199. }
  200. .iconfont {
  201. font-size: $font-size-activity-tag;
  202. color: $color-tip;
  203. }
  204. }
  205. }
  206. .primary {
  207. height: 100rpx;
  208. line-height: 100rpx;
  209. border-radius: $border-radius;
  210. background-color: #fff;
  211. color: $color-title;
  212. margin: 0;
  213. text-align: center;
  214. }
  215. }
  216. .footer-wrap {
  217. margin-top: 40rpx;
  218. }
  219. .pop-wrap {
  220. width: 80vw;
  221. .title {
  222. padding: $padding 30rpx;
  223. margin: $margin-both 0;
  224. text-align: center;
  225. position: relative;
  226. .close {
  227. position: absolute;
  228. right: 30rpx;
  229. top: 20rpx;
  230. height: 60rpx;
  231. width: 60rpx;
  232. }
  233. }
  234. .flex {
  235. display: flex;
  236. justify-content: space-between;
  237. margin: 0 $margin-both;
  238. padding: 30rpx 0;
  239. align-items: center;
  240. border-bottom: 1px solid $color-line;
  241. &.last_child {
  242. border-bottom: 0;
  243. }
  244. .flex_right {
  245. flex: 1;
  246. text-align: right;
  247. }
  248. }
  249. .action-btn {
  250. display: flex;
  251. justify-content: space-between;
  252. border-top: 1px solid $color-line;
  253. > view {
  254. flex: 1;
  255. text-align: center;
  256. padding: $padding;
  257. }
  258. }
  259. }
  260. </style>