storeNumberdetail.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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.title}}</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.tel}}</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.province_name}}{{info.city_name}}{{info.district_name}}</view>
  30. </view>
  31. </view>
  32. <view class="cell flex flex-y-center">
  33. <view class="title-block">
  34. <text>门店地址</text>
  35. </view>
  36. <view class="desc">
  37. <view class="input-box">{{info.address}}</view>
  38. </view>
  39. </view>
  40. <view class="cell flex flex-y-center">
  41. <view class="title-block">
  42. <text>门店公告</text>
  43. </view>
  44. <view class="desc">
  45. <view class="input-box">{{info.announcement}}</view>
  46. </view>
  47. </view>
  48. <view class="cell flex flex-y-center">
  49. <view class="title-block">
  50. <text>经营类目</text>
  51. </view>
  52. <view class="desc">
  53. <view class="input-box">{{info.one_category_name +'>'+ info.two_category_name}}</view>
  54. </view>
  55. </view>
  56. <view class="cell flex flex-y-center">
  57. <view class="title-block">
  58. <text>支付方式</text>
  59. </view>
  60. <view class="desc">
  61. <view class="input-box">{{info.pay_type==2?'餐后付款':'餐前付款'}}</view>
  62. </view>
  63. </view>
  64. <view class="cell flex flex-y-center">
  65. <view class="title-block">
  66. <text>是否开启会员</text>
  67. </view>
  68. <view class="desc">
  69. <view class="input-box">{{info.is_vip==1?'是':'否'}}</view>
  70. </view>
  71. </view>
  72. <view class="cell flex flex-y-center">
  73. <view class="title-block">
  74. <text>是否开启堂食</text>
  75. </view>
  76. <view class="desc">
  77. <view class="input-box">{{info.is_hall==1?'是':'否'}}</view>
  78. </view>
  79. </view>
  80. <view class="cell flex flex-y-center">
  81. <view class="title-block">
  82. <text>是否开启外卖</text>
  83. </view>
  84. <view class="desc">
  85. <view class="input-box">{{info.is_waimai==1?'是':'否'}}</view>
  86. </view>
  87. </view>
  88. <view class="cell flex flex-y-center">
  89. <view class="title-block">
  90. <text>是否开启到店自提</text>
  91. </view>
  92. <view class="desc">
  93. <view class="input-box">{{info.is_ziti==1?'是':'否'}}</view>
  94. </view>
  95. </view>
  96. <view class="flex home-qrcode">
  97. <view class="title-block">
  98. 码管理
  99. </view>
  100. <view class="">
  101. <image :src="URL+info.skm" @click="previewImage(info.skm)"></image>
  102. <text>收款码</text>
  103. </view>
  104. <view class="">
  105. <image :src="URL+info.line_qrcode" @click="previewImage(info.line_qrcode)"></image>
  106. <text>排队取号</text>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="page-block">
  112. <view class="page-title-block"></view>
  113. <view class="content">
  114. <view class="cell flex flex-y-center">
  115. <view class="title-block">
  116. <text>logo</text>
  117. </view>
  118. </view>
  119. <view class="qrcode-block">
  120. <image :src="URL+info.thumb" mode="aspectFit" class="qr-code-img"></image>
  121. </view>
  122. </view>
  123. </view>
  124. <view style="height:30rpx;"></view>
  125. <view class="footer-bar" style="height: 100rpx;">
  126. <view class="content flex flex-center" style="height: 100rpx;">
  127. <view class="detail-btn flex flex-center" style="border-right: 2rpx solid #F4F5F7;" @click="del">
  128. <image src="../static/images/icon_16.png" mode="aspectFit" class="btn-icon"></image>
  129. <view style="color:#999999">删除门店</view>
  130. </view>
  131. <view class="detail-btn flex flex-center" @click="toEdit">
  132. <image src="../static/images/icon_17.png" mode="aspectFit" class="btn-icon"></image>
  133. <view style="color:#3387FF">重新编辑</view>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. </template>
  139. <script>
  140. export default {
  141. data() {
  142. return {
  143. URL: getApp().globalData.URL,
  144. info: {},
  145. zt_list: [
  146. '否', '是'
  147. ],
  148. is_zt: 0,
  149. }
  150. },
  151. onLoad(options) {
  152. if (options.id) {
  153. this.id = options.id;
  154. this.store_user_info(options.id);
  155. }
  156. },
  157. methods: {
  158. previewImage(src) {
  159. let url = this.URL +src;
  160. uni.previewImage({
  161. current: 1,
  162. urls: [url],
  163. longPressActions: {
  164. itemList: ['保存图片'],
  165. success: function(data) {
  166. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  167. },
  168. fail: function(err) {
  169. console.log(err.errMsg);
  170. }
  171. }
  172. });
  173. },
  174. //获取详情
  175. store_user_info(id) {
  176. this.request({
  177. url: 'Smdcshop/storeinfo',
  178. data: {
  179. store_id: id,
  180. }
  181. }).then(res => {
  182. if (res.code == 200) {
  183. this.info = res.data
  184. }
  185. })
  186. },
  187. toEdit() {
  188. uni.redirectTo({
  189. url: `../addStore/addStore?id=${this.info.id}`
  190. })
  191. },
  192. del() {
  193. uni.showModal({
  194. title: '提示',
  195. content: '是否要删除?',
  196. showCancel: true,
  197. cancelText: '取消',
  198. confirmText: '确定',
  199. success: res => {
  200. if (res.confirm) {
  201. this.request({
  202. url: 'Smdcshop/store_delect',
  203. data: {
  204. id: this.id,
  205. },
  206. }).then(res => {
  207. console.log(res, "res")
  208. if (res.code === 200 || res.code === "200") {
  209. uni.showToast({
  210. title: "删除成功",
  211. icon: "none",
  212. })
  213. setTimeout(() => {
  214. uni.navigateBack()
  215. }, 2000)
  216. }
  217. }).catch((res) => {
  218. uni.showToast({
  219. title: res.message,
  220. icon: "none",
  221. })
  222. });
  223. }
  224. },
  225. fail: () => {},
  226. complete: () => {}
  227. });
  228. },
  229. }
  230. }
  231. </script>
  232. <style>
  233. @import url("../static/css/common.css");
  234. .home-qrcode {
  235. text-align: center;
  236. font-size: 28rpx;
  237. padding: 20rpx 0;
  238. }
  239. .home-qrcode .title-block {
  240. font-size: 30rpx;
  241. color: #333;
  242. font-weight: 600;
  243. padding-right: 20rpx;
  244. }
  245. .home-qrcode image {
  246. width: 250rpx;
  247. height: 250rpx;
  248. display: block;
  249. }
  250. page {
  251. background-color: #F4F5F7;
  252. }
  253. .qrcode-block {
  254. padding: 56rpx 0;
  255. }
  256. .qrcode-block .qr-code-img {
  257. display: block;
  258. width: 150rpx;
  259. height: 150rpx;
  260. }
  261. .page-block .cell .input-box {
  262. height: initial;
  263. line-height: 1.5;
  264. }
  265. </style>