index.vue 11 KB

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