my.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view class="container">
  3. <view class="header flex flex-y-center">
  4. <image :src="info.thumb?URL+info.thumb:'../static/images/avatar_def.png'" class="avatar">
  5. </image>
  6. <view class="nick-name text-1">{{info.name||info.nickname}}
  7. <view class="ft24 cof" v-if="info.squirrel_money>0" style="padding-top: 6rpx;">
  8. 剩余配送金额:{{info.squirrel_money}}
  9. </view>
  10. </view>
  11. </view>
  12. <view class="page-block">
  13. <navigator url="/saomaDiancan/addStore/addStore" class="cell flex flex-y-center" hover-class="nav-hover">
  14. <image src="../static/images/icon_1.png" class="cell-icon"></image>
  15. <view class="title">新增门店</view>
  16. <text class="iconfont icon-gengduo"></text>
  17. </navigator>
  18. <navigator url="/saomaDiancan/storeNumber/storeNumber" class="cell flex flex-y-center"
  19. hover-class="nav-hover">
  20. <image src="../static/images/icon_3.png" class="cell-icon"></image>
  21. <view class="title">门店账号</view>
  22. <text class="iconfont icon-gengduo"></text>
  23. </navigator>
  24. </view>
  25. <view class="page-block">
  26. <block v-for="(item,index) in power_list" :key='index'>
  27. <navigator :url="`${item.address}?id=${item.id}&type=1`" class="cell flex flex-y-center" hover-class="nav-hover">
  28. <image :src="item.image" class="cell-icon"></image>
  29. <view class="title">{{item.name}}</view>
  30. <text class="iconfont icon-gengduo"></text>
  31. </navigator>
  32. </block>
  33. <!-- <navigator url="./myManage" class="cell flex flex-y-center" hover-class="nav-hover">
  34. <image src="../static/images/icon_9.png" class="cell-icon"></image>
  35. <view class="title">智慧经营管理</view>
  36. <text class="iconfont icon-gengduo"></text>
  37. </navigator> -->
  38. <!--
  39. <navigator url="./Coupon" class="cell flex flex-y-center" hover-class="nav-hover">
  40. <image src="../static/images/icon_8.png" class="cell-icon"></image>
  41. <view class="title">支付宝营销</view>
  42. <text class="iconfont icon-gengduo"></text>
  43. </navigator> -->
  44. <!-- <navigator url="/appletXcx/wechatMarket/index" class="cell flex flex-y-center" hover-class="nav-hover">
  45. <image src="../static/images/icon_8.png" class="cell-icon"></image>
  46. <view class="title">微信营销</view>
  47. <text class="iconfont icon-gengduo"></text>
  48. </navigator>
  49. -->
  50. <!-- <navigator url="../member/member?is_admin=2" class="cell flex flex-y-center" hover-class="nav-hover">
  51. <image src="../static/images/icon_3.png" class="cell-icon"></image>
  52. <view class="title">会员设置</view>
  53. <text class="iconfont icon-gengduo"></text>
  54. </navigator> -->
  55. <!-- <navigator url="/sharedPartner/menuList/menuList" class="cell flex flex-y-center" hover-class="nav-hover">
  56. <image src="../static/images/icon_2.png" class="cell-icon"></image>
  57. <view class="title">合伙人管理</view>
  58. <text class="iconfont icon-gengduo"></text>
  59. </navigator> -->
  60. <!-- <navigator url="/saomaDiancan/my/xcxAdmin" class="cell flex flex-y-center" hover-class="nav-hover">
  61. <image src="../static/images/xcx.png" class="cell-icon"></image>
  62. <view class="title">小程序管理</view>
  63. <text class="iconfont icon-gengduo"></text>
  64. </navigator> -->
  65. <!--
  66. <navigator url="/storeInfoIng/deviceList?type=1" class="cell flex flex-y-center" hover-class="nav-hover">
  67. <image src="../static/images/icon_15.png" class="cell-icon"></image>
  68. <view class="title">设备管理</view>
  69. <text class="iconfont icon-gengduo"></text>
  70. </navigator> -->
  71. <!--
  72. <navigator url="/saomaDiancan/editPassword/editPassword" class="cell flex flex-y-center"
  73. hover-class="nav-hover">
  74. <image src="../static/images/icon_5.png" class="cell-icon"></image>
  75. <view class="title">修改密码</view>
  76. <text class="iconfont icon-gengduo"></text>
  77. </navigator> -->
  78. <!-- <navigator url="../order/" class="cell flex flex-y-center" hover-class="nav-hover">
  79. <image src="../static/images/icon_5.png" class="cell-icon"></image>
  80. <view class="title">订单管理</view>
  81. <text class="iconfont icon-gengduo"></text>
  82. </navigator> -->
  83. </view>
  84. <view class="btm-btn" @click="loginOut">退出登录</view>
  85. <zx-footer-bar :active="2" :type="type" />
  86. </view>
  87. </template>
  88. <script>
  89. import zxFooterBar from '../../components/zx-footer-bar/zx-footer-bar.vue'
  90. export default {
  91. components: {
  92. zxFooterBar
  93. },
  94. data() {
  95. return {
  96. info: {},
  97. URL: getApp().globalData.URL,
  98. power_list:[],
  99. type: 2, //1:用户端跳转过来
  100. }
  101. },
  102. onLoad(e) {
  103. if(!uni.getStorageSync("admin_id")){
  104. uni.reLaunch({
  105. url: "/pages/login/login"
  106. })
  107. }
  108. this.type = e.type || 2;
  109. // this.power_list = this.$store.state.management_list_store;
  110. this.http();
  111. this.power();
  112. },
  113. onShareAppMessage() {
  114. },
  115. onShareTimeline() {
  116. },
  117. methods: {
  118. power(){
  119. this.request({
  120. url: 'index/index',
  121. data: {
  122. admin_id: uni.getStorageSync("admin_id")
  123. },
  124. is_agent:'agent',
  125. }).then(res => {
  126. console.log(res,"index/index")
  127. if (res.code == '200') {
  128. this.power_list = res.data
  129. this.$store.commit('SET_MANAGE_STORE', res.data)
  130. }
  131. }).catch((res) => {
  132. uni.showToast({
  133. title: res.message,
  134. icon: 'none'
  135. })
  136. });
  137. },
  138. http() {
  139. this.request({
  140. url: "Smdcshop/store_user_info",
  141. data: {
  142. id: uni.getStorageSync("admin_id"),
  143. },
  144. }).then(res => {
  145. console.log(res, "res")
  146. if (res.code === '200') {
  147. this.info = res.data;
  148. }
  149. }).catch((res) => {});
  150. },
  151. loginOut() {
  152. uni.removeStorageSync("is_shop");
  153. uni.removeStorageSync("store_id");
  154. uni.removeStorageSync("store_user");
  155. uni.removeStorageSync("admin_id");
  156. uni.removeStorageSync("storeinfo");
  157. uni.removeStorage({
  158. key: 'is_login',
  159. success: (res) => {
  160. uni.reLaunch({
  161. url: "../../pages/login/login"
  162. })
  163. }
  164. })
  165. },
  166. }
  167. }
  168. </script>
  169. <style>
  170. page {
  171. background: #F4F5F7;
  172. }
  173. .btm-btn {
  174. width: 670rpx;
  175. height: 98rpx;
  176. background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
  177. border-radius: 8rpx;
  178. box-shadow: 0px 0px 8rpx 0px rgba(51, 135, 255, 0.2);
  179. font-size: 32rpx;
  180. font-weight: 500;
  181. text-align: center;
  182. color: #fff;
  183. line-height: 98rpx;
  184. margin: 0 auto;
  185. margin-top: 100rpx;
  186. margin-bottom: 30rpx;
  187. }
  188. .header {
  189. width: 100%;
  190. height: 202rpx;
  191. position: relative;
  192. background: url(../static/images/my_bg.png) no-repeat center;
  193. background-size: 100%;
  194. padding: 0 30rpx 0 50rpx;
  195. }
  196. .header .avatar {
  197. display: block;
  198. flex: none;
  199. width: 110rpx;
  200. height: 110rpx;
  201. margin-right: 25rpx;
  202. border-radius: 100px;
  203. }
  204. .header .nick-name {
  205. font-size: 42rpx;
  206. color: #fff;
  207. }
  208. .header .icon-gengduo {
  209. flex: none;
  210. font-size: 24rpx !important;
  211. color: #fff;
  212. }
  213. .page-block {
  214. background-color: #fff;
  215. padding: 0 25rpx;
  216. margin-top: 25rpx;
  217. }
  218. .page-block .cell {
  219. height: 98rpx;
  220. border-bottom: 1rpx solid #f5f5f5;
  221. }
  222. .page-block .cell:last-child {
  223. border-bottom: none;
  224. }
  225. .page-block .cell .cell-icon {
  226. flex: none;
  227. display: block;
  228. width: 48rpx;
  229. height: 48rpx;
  230. }
  231. .page-block .cell .icon-gengduo {
  232. margin-left: auto;
  233. font-size: 25rpx !important;
  234. color: #c9c9c9;
  235. }
  236. .page-block .cell .title {
  237. padding: 0 25rpx;
  238. font-size: 32rpx;
  239. color: #333;
  240. }
  241. </style>