index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. <template>
  2. <view class="page" :style="{'min-height':(h-th)+'px','padding-top':mt+'px'}">
  3. <image class="bg_img" src="https://i.ringzle.com/file/20240129/3931d06eaa3346c9955aa7e5e535a95b.png"
  4. mode="widthFix"></image>
  5. <!-- <view class="account" :style="{'margin-top':(mt-44)+'px'}"> -->
  6. <view class="account">
  7. <view class="a_left">
  8. <view class="al_avatar">
  9. <image :src="dto.storeFrontPic"></image>
  10. </view>
  11. <view class="al_name_edit">
  12. <text>{{dto.name==''?'临时商户':dto.name}}</text>
  13. <view class="ane_edit" @tap="toTurn('/pagesHouse/Mine/PersonalEditing/PersonalEditing',true)">
  14. <text>编辑</text>
  15. <image src="https://i.ringzle.com/file/20240129/e824a765b6c24ac6aafbb49b12c23aa9.png"></image>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="orders box">
  21. <view class="o_title">
  22. <text>我的订单</text>
  23. <view class="ot_all" @tap="toTurn('/pagesHouse/Mine/ordersList/index?type=&index=-1',true)">
  24. <!-- <view class="ot_all" @tap="toToast"> -->
  25. <text>全部订单</text>
  26. <!-- <image src="../../static/index/steamerTicket/icon_yjt.png"></image> -->
  27. </view>
  28. </view>
  29. <view class="o_menus">
  30. <view v-for="(item,index) in orderMenus" :key="index"
  31. @tap="toTurn('/pagesHouse/Mine/ordersList/index?type='+item.type+'&index='+index,true)">
  32. <!-- <view v-for="(item,index) in orderMenus" :key="index" @tap="toToast"> -->
  33. <image :src="item.img"></image>
  34. <text>{{item.text}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="wallet box ">
  39. <view class="w_left">
  40. <view class="wl_top">
  41. <image src="https://i.ringzle.com/file/20240225/337c4c20cbc94bdcb4f17b6058a9d39f.png"></image>
  42. <text>钱包余额</text>
  43. </view>
  44. <view class="wl_price"><span>¥</span><text>{{price.toFixed(2)}}</text></view>
  45. </view>
  46. <view class="w_right" @tap="toTurn('/pagesMy/wallet/index',true)">去结算</view>
  47. </view>
  48. <view class="one" v-if="merchantType==10" @tap="toTurn('/pagesHouse/Mine/Businesses/Businesses',true)">
  49. <view class="">
  50. 商户信息
  51. </view>
  52. <view class="">
  53. <u-icon name="arrow-right"></u-icon>
  54. </view>
  55. </view>
  56. <view class="one" v-if="merchantType==4" @tap="toTurn('/pagesHouse/Mine/Businesses/Catering',true)">
  57. <view class="">
  58. 商户信息
  59. </view>
  60. <view class="">
  61. <u-icon name="arrow-right"></u-icon>
  62. </view>
  63. </view>
  64. <view class="" style="padding: 24rpx; background-color: #fff; margin: 0 20rpx ; border-radius: 16rpx;">
  65. <view class="one-input">
  66. <u-row customStyle="margin-bottom: 10px">
  67. <u-col span="7.8">
  68. <view class="demo-layout bg-purple-light">
  69. <view class="one2">
  70. <!-- {{myList.islandName}} -->
  71. {{dto.companyName}}
  72. </view>
  73. <view class="two2">
  74. {{dto.areaDetail}}
  75. </view>
  76. </view>
  77. </u-col>
  78. <u-col span="4" @click="navigation">
  79. <view class="demo-layout bg-purple">
  80. </view>
  81. </u-col>
  82. </u-row>
  83. </view>
  84. </view>
  85. <Tabbares :tabbarid="2"></Tabbares>
  86. </view>
  87. </template>
  88. <script>
  89. export default {
  90. data() {
  91. return {
  92. h: uni.getSystemInfoSync().windowHeight,
  93. w: uni.getSystemInfoSync().windowWidth,
  94. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  95. avatar: 'https://i.ringzle.com/file/20240129/5b4a757190334fa7ae8616620c770bc4.png',
  96. name: '游客',
  97. orderMenus: [ //type:1 待付款、2 待使用、3 待评价、4 退款/售后
  98. {
  99. type: 0,
  100. img: 'https://i.ringzle.com/file/20240129/818fa751cf8d4772ac1cf818522a7f54.png',
  101. text: '待支付'
  102. },
  103. {
  104. type: 4,
  105. img: 'https://i.ringzle.com/file/20240129/c4ef5f92f5274dbe9e281ad509571fc3.png',
  106. text: '待使用'
  107. },
  108. {
  109. type: 3,
  110. img: 'https://i.ringzle.com/file/20240129/2a73e5e9afcf4d759b31e5332a21d012.png',
  111. text: '已完成'
  112. },
  113. {
  114. type: -3,
  115. img: 'https://i.ringzle.com/file/20240129/f3fd049aaffb4768aa115572851a2bb1.png',
  116. text: '退款/售后'
  117. }
  118. ],
  119. price: 0, //钱包余额
  120. merchantName: uni.getStorageSync('merchantName'),
  121. merchantType: uni.getStorageSync('merchantType'),
  122. dto: {}
  123. }
  124. },
  125. onLoad() {
  126. this.getInfo();
  127. },
  128. methods: {
  129. toTurn(url, login) { //login 是否需要验证登录跳转
  130. if (!url) return this.$showToast('正在开发中...')
  131. uni.navigateTo({
  132. url
  133. });
  134. },
  135. getInfo() {
  136. this.$api.get('/api/merchant/food/merchant/' + uni.getStorageSync('merchantId')).then(res => {
  137. if (res.data.code == 0) {
  138. this.dto = res.data.data;
  139. if (!res.data.data.shopSign) {
  140. this.dto.shopSign =
  141. 'https://i.ringzle.com/file/20240225/26feb8cc8f744123a980211ebdfb8d40.png';
  142. }
  143. //this.shopImgs = res.data.data.split(',');
  144. }
  145. })
  146. },
  147. }
  148. }
  149. </script>
  150. <style scoped lang="less">
  151. .page {
  152. background: #F5F8FA;
  153. padding-bottom: 256rpx;
  154. box-sizing: border-box;
  155. .bg_img {
  156. width: 100%;
  157. position: absolute;
  158. top: 0;
  159. left: 0;
  160. z-index: 0;
  161. }
  162. .account {
  163. width: 100%;
  164. display: flex;
  165. justify-content: space-between;
  166. .a_left {
  167. padding: 10rpx 0 0 40rpx;
  168. display: flex;
  169. z-index: 1;
  170. .al_avatar {
  171. width: 120rpx;
  172. height: 120rpx;
  173. border-radius: 50%;
  174. background: #FFFFFF;
  175. padding: 4rpx;
  176. box-sizing: border-box;
  177. image {
  178. width: 100%;
  179. height: 100%;
  180. border-radius: 50%;
  181. }
  182. }
  183. .al_name_edit {
  184. margin-left: 30rpx;
  185. display: flex;
  186. flex-direction: column;
  187. &>text {
  188. font-size: 36rpx;
  189. font-family: PingFang-SC, PingFang-SC;
  190. font-weight: bold;
  191. color: #111111;
  192. line-height: 50rpx;
  193. padding-top: 4rpx;
  194. }
  195. .ane_edit {
  196. width: 120rpx;
  197. height: 54rpx;
  198. border-radius: 27rpx;
  199. border: 1rpx solid #D3D7DE;
  200. margin-top: 10rpx;
  201. display: flex;
  202. align-items: center;
  203. justify-content: center;
  204. &>text {
  205. font-size: 26rpx;
  206. font-family: PingFangSC, PingFang SC;
  207. font-weight: 400;
  208. color: #5A697C;
  209. line-height: 37rpx;
  210. }
  211. &>image {
  212. margin-left: 8rpx;
  213. width: 24rpx;
  214. height: 24rpx;
  215. }
  216. }
  217. }
  218. }
  219. }
  220. .one {
  221. // padding: ;
  222. margin: 0 40rpx;
  223. height: 120rpx;
  224. line-height: 120rpx;
  225. display: flex;
  226. // border-bottom: 1rpx solid #EFEFEF;
  227. justify-content: space-between;
  228. align-items: center;
  229. font-size: 36rpx;
  230. color: #111111;
  231. font-weight: bold;
  232. }
  233. .box {
  234. width: calc(100% - 40rpx);
  235. margin: 0 20rpx;
  236. box-sizing: border-box;
  237. background: #FFFFFF;
  238. border-radius: 20rpx;
  239. position: relative;
  240. }
  241. .bg-img {
  242. background-color: #F0F8F6 !important;
  243. }
  244. .one-input {
  245. box-sizing: border-box;
  246. // width: 100%;
  247. height: 128rpx;
  248. background: #F0F8F6;
  249. // line-height: 128rpx;
  250. border-radius: 16rpx;
  251. padding: 0 20rpx;
  252. // margin: 0 20rpx;
  253. .bg-purple-light {
  254. // display: flex;
  255. .one2 {
  256. // height: 36rpx !important;
  257. font-size: 26rpx;
  258. color: #000000;
  259. margin: 12rpx 6rpx;
  260. font-weight: bold;
  261. }
  262. .two2 {
  263. font-size: 24rpx;
  264. color: #666666;
  265. // height: 36rpx !important;
  266. margin: 6rpx 6rpx;
  267. font-weight: Regular;
  268. }
  269. }
  270. .bg-purple {
  271. // align-items: center;
  272. // display: flex;
  273. text-align: center;
  274. // text-align: right;
  275. font-size: 24rpx;
  276. color: #808080;
  277. background-image: url('https://i.ringzle.com/file/20240129/dcf2338517e344c697ef7cd853ce2234.png');
  278. background-repeat: no-repeat;
  279. background-size: 100% 100%;
  280. width: 240rpx;
  281. height: 128rpx;
  282. .one1 {
  283. margin: auto 110rpx;
  284. padding-top: 30rpx;
  285. width: 46rpx;
  286. height: 46rpx;
  287. image {
  288. width: 100%;
  289. height: 100%;
  290. // width: 46rpx;
  291. // height: 46rpx;
  292. }
  293. }
  294. .two1 {
  295. margin: 4rpx 12rpx;
  296. font-size: 22rpx;
  297. color: #007A69;
  298. text {
  299. margin-left: 30rpx;
  300. }
  301. }
  302. }
  303. }
  304. .wallet {
  305. margin-top: 32rpx;
  306. padding: 34rpx 40rpx 30rpx 31rpx;
  307. // background: url(https://i.ringzle.com/file/20240129/062264cb5e224845b86e4567c2ec37a6.png) no-repeat;
  308. // background-size: 100% 100%;
  309. background-color: #fff;
  310. display: flex;
  311. justify-content: space-between;
  312. .w_left {
  313. .wl_top {
  314. display: flex;
  315. align-items: center;
  316. image {
  317. width: 30rpx;
  318. height: 30rpx;
  319. }
  320. text {
  321. margin-left: 12rpx;
  322. font-size: 26rpx;
  323. font-family: PingFangSC, PingFang SC;
  324. font-weight: 400;
  325. color: #111;
  326. line-height: 37rpx;
  327. }
  328. }
  329. .wl_price {
  330. margin-top: 17rpx;
  331. span {
  332. font-size: 36rpx;
  333. font-family: DINAlternate, DINAlternate;
  334. font-weight: bold;
  335. color: #111;
  336. line-height: 42rpx;
  337. }
  338. text {
  339. font-size: 48rpx;
  340. font-family: DINAlternate, DINAlternate;
  341. font-weight: bold;
  342. color: #111;
  343. line-height: 56rpx;
  344. margin-left: 10rpx;
  345. }
  346. }
  347. }
  348. .w_right {
  349. margin-top: 16rpx;
  350. width: 156rpx;
  351. height: 60rpx;
  352. // background: linear-gradient(270deg, #D6F6ED 0%, #FFFFFF 100%);
  353. background-color: #007A69;
  354. border-radius: 36rpx;
  355. line-height: 60rpx;
  356. text-align: center;
  357. font-size: 26rpx;
  358. font-family: PingFang-SC, PingFang-SC;
  359. font-weight: bold;
  360. color: #FFFFFF;
  361. }
  362. .w_right-image {
  363. margin-top: 16rpx;
  364. width: 156rpx;
  365. // height: 60rpx;
  366. // background: linear-gradient(270deg, #D6F6ED 0%, #FFFFFF 100%);
  367. background-color: #007A69;
  368. background-image: url('https://i.ringzle.com/file/20240225/b918fbd7e3424908a10497c4e4f71fda.png');
  369. background-repeat: no-repeat;
  370. background-size: 100% 100%;
  371. border-radius: 36rpx;
  372. // line-height: 60rpx;
  373. text-align: center;
  374. font-size: 26rpx;
  375. font-family: PingFang-SC, PingFang-SC;
  376. font-weight: bold;
  377. color: #FFFFFF;
  378. }
  379. }
  380. .orders {
  381. // margin-top: 20rpx;
  382. margin-top: 40rpx;
  383. padding: 40rpx 0;
  384. .o_title {
  385. width: 100%;
  386. padding: 0 20rpx;
  387. box-sizing: border-box;
  388. display: flex;
  389. align-items: center;
  390. justify-content: space-between;
  391. &>text {
  392. font-size: 36rpx;
  393. font-family: PingFang-SC, PingFang-SC;
  394. font-weight: bold;
  395. color: #1C1E41;
  396. line-height: 36rpx;
  397. }
  398. .ot_all {
  399. display: flex;
  400. align-items: center;
  401. &>text {
  402. font-size: 28rpx;
  403. font-family: PingFangSC, PingFang SC;
  404. font-weight: 400;
  405. color: #808080;
  406. line-height: 28rpx;
  407. }
  408. &>image {
  409. margin-left: 8rpx;
  410. width: 24rpx;
  411. height: 24rpx;
  412. }
  413. }
  414. }
  415. .o_menus {
  416. margin-top: 44rpx;
  417. display: flex;
  418. align-items: center;
  419. justify-content: space-around;
  420. &>view {
  421. width: 25%;
  422. display: flex;
  423. flex-direction: column;
  424. align-items: center;
  425. image {
  426. width: 54rpx;
  427. height: 54rpx;
  428. }
  429. text {
  430. font-size: 26rpx;
  431. font-family: PingFangSC, PingFang SC;
  432. font-weight: 400;
  433. color: #111111;
  434. line-height: 26rpx;
  435. margin-top: 24rpx;
  436. }
  437. }
  438. }
  439. }
  440. }
  441. </style>