index.vue 12 KB

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