index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <view class="main main-bg shadow">
  3. <view class="home-header header-long-bg">
  4. <view class="header-text font-forty font-color1">{{ list.shopsName ? list.shopsName : '' }}</view>
  5. <view class="view">
  6. <view class="view-data">
  7. <view class="quit font-color2 font-twenty" @click="handleQuit">退出登录</view>
  8. <view class="one">
  9. <view class="name font-color3 font-thirty-two">{{ list.shopsName ? list.shopsName : '' }}</view>
  10. <view class="phone font-color5 font-twenty-two">商铺电话: {{ list.shopsTel ? list.shopsTel : '无' }}</view>
  11. </view>
  12. <view class="address font-twenty-two font-color4">地址: {{ list.shopsAddress ? list.shopsAddress : '' }}</view>
  13. <image class="img" :src="image(list.shopsPic)"></image>
  14. <view class="content font-color2 font-twenty-four">店铺简介: {{ list.shopsIntroduce ? list.shopsIntroduce : '' }}</view>
  15. </view>
  16. <view class="footer">
  17. <view class="left font-color1 font-thirty header-long-bg" @click="gotoCode">结算</view>
  18. <view class="right font-color2 font-thirty" @click="gotoModify">修改店铺信息</view>
  19. </view>
  20. <view class="footer">
  21. <view class="left font-color1 font-thirty header-long-bg" @click="gotoShops(list.shopsId)">店铺审核详情</view>
  22. <view class="right font-color2 font-thirty" @click="goto('/pages/merchant/examine/goods/index')">商品审核详情</view>
  23. </view>
  24. <!-- <view class="footer">
  25. <view class="left font-color1 font-thirty header-long-bg" @click="goto('/pages/merchant/home/record')">优惠记录</view>
  26. </view> -->
  27. </view>
  28. </view>
  29. <u-tabbar :list="tabBarList" :active-color="activeColor" :inactive-color="inactiveColor"
  30. :border-top="borderTop"></u-tabbar>
  31. <u-toast ref="uToast" />
  32. </view>
  33. </template>
  34. <script>
  35. import server from "@/api/index";
  36. import http from '@/common/http.js'
  37. import { mapGetters } from 'vuex'
  38. export default {
  39. data() {
  40. return {
  41. borderTop: false,
  42. inactiveColor: '#ccc',
  43. activeColor: '#2E4F1C',
  44. list: {},
  45. userInfo:{}
  46. }
  47. },
  48. computed: {
  49. ...mapGetters([
  50. 'tabBarList',
  51. 'role'
  52. ])
  53. },
  54. methods:{
  55. show(){
  56. console.log('show???')
  57. this.userInfo = uni.getStorageSync('userInfo');
  58. this.getListFn();
  59. },
  60. image(e) {
  61. return http.webUrl + e
  62. },
  63. getListFn(){
  64. server.getYongJunDetails(this.userInfo.nickName).then(res =>{
  65. if(res){
  66. this.list = res
  67. }else{
  68. this.list = {}
  69. }
  70. })
  71. },
  72. handleQuit(){
  73. let _this = this;
  74. uni.showModal({
  75. title: '提示',
  76. content: '确定退出登录吗?',
  77. success: function (res) {
  78. if (res.confirm) {
  79. uni.removeStorage({
  80. key: 'userInfo',
  81. success: function (res) {
  82. uni.removeStorage({
  83. key: 'role',
  84. });
  85. uni.removeStorage({
  86. key: 'token',
  87. success: function (res) {
  88. uni.reLaunch({
  89. url: '/pages/index/index'
  90. });
  91. }
  92. });
  93. }
  94. });
  95. } else if (res.cancel) {
  96. console.log('用户点击取消');
  97. }
  98. }
  99. });
  100. },
  101. gotoShops(id){
  102. uni.navigateTo({
  103. url: '/pages/merchant/examine/shops/merchantExamine?id=' + id
  104. })
  105. },
  106. goto(url){
  107. uni.navigateTo({
  108. url
  109. })
  110. },
  111. gotoCode(){
  112. if(this.userInfo.status !== '2'){
  113. this.$refs.uToast.show({
  114. title: '店铺暂未认证!',
  115. type: 'default',
  116. })
  117. }else{
  118. let _this = this;
  119. uni.navigateTo({
  120. url: '/pages/merchant/home/code?id=' + _this.list.id + '&name=' + _this.list.shopsName + '&img=' + _this.list.shopsPic
  121. })
  122. // uni.navigateTo({
  123. // url: '/pages/merchant/home/code'
  124. // })
  125. }
  126. },
  127. gotoModify(){
  128. uni.navigateTo({
  129. url: '/pages/merchant/home/modify?id=' + this.list.id
  130. })
  131. }
  132. }
  133. }
  134. </script>
  135. <style lang="scss" scoped>
  136. .main{
  137. width: 100%;
  138. height: auto;
  139. min-height: 100vh;
  140. .home-header{
  141. width: 100%;
  142. height: 400rpx;
  143. border-bottom-left-radius: 50rpx;
  144. border-bottom-right-radius: 50rpx;
  145. padding-top: 84rpx;
  146. padding-left: 30rpx;
  147. position: relative;
  148. .header-text{
  149. height: 96rpx;
  150. line-height: 96rpx;
  151. }
  152. .view{
  153. position: absolute;
  154. top: 180rpx;
  155. left: 30rpx;
  156. width: calc(100% - 60rpx);
  157. height: auto;
  158. border-radius: 24rpx;
  159. .view-data{
  160. width: 100%;
  161. height: auto;
  162. background: #FFFFFF;
  163. border-radius: 8rpx;
  164. padding: 30rpx;
  165. position: relative;
  166. .quit{
  167. position: absolute;
  168. height: 50rpx;
  169. line-height: 50rpx;
  170. top: 25rpx;
  171. right: 30rpx;
  172. width: 150rpx;
  173. text-align: center;
  174. border-radius: 25rpx;
  175. border: 1rpx solid #2E4F1C;
  176. }
  177. .one{
  178. margin-top: 30rpx;
  179. display: flex;
  180. justify-content: space-between;
  181. height: 96rpx;
  182. line-height: 96rpx;
  183. overflow: hidden;
  184. .name{
  185. letter-spacing: 2rpx;
  186. width: 50%;
  187. }
  188. .phone{
  189. width: 50%;
  190. text-align: right;
  191. }
  192. }
  193. .img{
  194. width: 100%;
  195. height: 420rpx;
  196. margin: 30rpx 0;
  197. }
  198. .content{
  199. opacity: 1;
  200. line-height: 40rpx;
  201. }
  202. .text{
  203. height: 100rpx;
  204. line-height: 100rpx;
  205. }
  206. }
  207. .footer{
  208. width: 100%;
  209. height: 96rpx;
  210. margin-top: 60rpx;
  211. display: flex;
  212. justify-content: space-between;
  213. .left{
  214. width: calc(50% - 15rpx);
  215. height: 96rpx;
  216. line-height: 96rpx;
  217. border-radius: 48rpx;
  218. text-align: center;
  219. letter-spacing: 2rpx;
  220. }
  221. .right{
  222. width: calc(50% - 15rpx);
  223. height: 96rpx;
  224. line-height: 96rpx;
  225. border-radius: 48rpx;
  226. text-align: center;
  227. letter-spacing: 2rpx;
  228. border: 2rpx solid #2E4F1C;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. </style>