storeNumberdetail.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view class="container">
  3. <view class="page-block">
  4. <view class="page-title-block">
  5. <view class="title">账号信息</view>
  6. </view>
  7. <view class="content">
  8. <view class="cell flex flex-y-center">
  9. <view class="title-block">
  10. <text>所属门店</text>
  11. </view>
  12. <view class="desc">
  13. <view class="input-box">{{info.storename}}</view>
  14. </view>
  15. </view>
  16. <view class="cell flex flex-y-center">
  17. <view class="title-block">
  18. <text>真实姓名</text>
  19. </view>
  20. <view class="desc">
  21. <view class="input-box">{{info.nickname}}</view>
  22. </view>
  23. </view>
  24. <view class="cell flex flex-y-center">
  25. <view class="title-block">
  26. <text>账号</text>
  27. </view>
  28. <view class="desc">
  29. <view class="input-box">{{info.name}}</view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <!-- <view class="page-block">
  35. <view class="page-title-block"></view>
  36. <view class="content">
  37. <view class="cell flex flex-y-center">
  38. <view class="title-block">
  39. <text>头像</text>
  40. </view>
  41. </view>
  42. <view class="qrcode-block">
  43. <image :src="URL+info.thumb" mode="aspectFit" class="qr-code-img"></image>
  44. </view>
  45. </view>
  46. </view> -->
  47. <view style="height:30rpx;"></view>
  48. <view class="footer-bar" style="height: 100rpx;">
  49. <view class="content flex flex-center" style="height: 100rpx;">
  50. <view class="detail-btn flex flex-center" style="border-right: 2rpx solid #F4F5F7;" @click="del">
  51. <image src="../static/images/icon_16.png" mode="aspectFit" class="btn-icon"></image>
  52. <view style="color:#999999">删除账号</view>
  53. </view>
  54. <view class="detail-btn flex flex-center" @click="toEdit">
  55. <image src="../static/images/icon_17.png" mode="aspectFit" class="btn-icon"></image>
  56. <view style="color:#3387FF">重新编辑</view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. export default {
  64. data() {
  65. return {
  66. URL: getApp().globalData.URL,
  67. info: {}
  68. }
  69. },
  70. onLoad(options) {
  71. if (options.id) {
  72. this.id = options.id;
  73. this.store_user_info(options.id);
  74. }
  75. },
  76. methods: {
  77. //获取详情
  78. store_user_info(id) {
  79. this.request({
  80. url: 'Smdcshop/store_user_info',
  81. data: {
  82. id,
  83. }
  84. }).then(res => {
  85. if (res.code == 200) {
  86. this.info = res.data
  87. }
  88. })
  89. },
  90. toEdit() {
  91. uni.redirectTo({
  92. url: `./addstorenumber?id=${this.info.id}`
  93. })
  94. },
  95. del() {
  96. uni.showModal({
  97. title: '提示',
  98. content: '是否要删除?',
  99. showCancel: true,
  100. cancelText: '取消',
  101. confirmText: '确定',
  102. success: res => {
  103. if (res.confirm) {
  104. this.request({
  105. url: 'Smdcshop/admin_delect',
  106. data: {
  107. id: this.id,
  108. },
  109. }).then(res => {
  110. console.log(res, "res")
  111. if (res.code === 200 || res.code === "200") {
  112. uni.showToast({
  113. title: "删除成功",
  114. icon: "none",
  115. })
  116. setTimeout(() => {
  117. uni.navigateBack()
  118. }, 2000)
  119. }
  120. }).catch((res) => {
  121. uni.showToast({
  122. title: res.message,
  123. icon: "none",
  124. })
  125. });
  126. }
  127. },
  128. fail: () => {},
  129. complete: () => {}
  130. });
  131. },
  132. }
  133. }
  134. </script>
  135. <style>
  136. @import url("../static/css/common.css");
  137. page {
  138. background-color: #F4F5F7;
  139. }
  140. .qrcode-block {
  141. padding: 56rpx 0;
  142. }
  143. .qrcode-block .qr-code-img {
  144. display: block;
  145. width: 150rpx;
  146. height: 150rpx;
  147. /* margin: 0 auto; */
  148. }
  149. </style>