full.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <template>
  2. <view class="service">
  3. <view class="head">
  4. <view class="top"></view>
  5. <span class="cuIcon-back" @click="back"></span>
  6. <view class="case">
  7. 全部服务
  8. </view>
  9. </view>
  10. <view class="function">
  11. <view class="title">
  12. 店铺经营
  13. </view>
  14. <view class="fun_box">
  15. <view class="item" v-for="(item,index) in store" :key="index" @click="storeFunc(item)">
  16. <image :src="item.url" mode=""></image>
  17. {{item.name}}
  18. </view>
  19. </view>
  20. </view>
  21. <view class="function">
  22. <view class="title">
  23. 订单管理
  24. </view>
  25. <view class="fun_box">
  26. <view class="item " v-for="(item,index) in order" :key="index" @click="orderFunc(item)" style="margin: 0px;">
  27. <image :src="item.url" mode=""></image>
  28. {{item.name}}
  29. </view>
  30. </view>
  31. </view>
  32. <view class="function">
  33. <view class="title">
  34. 财务对账
  35. </view>
  36. <view class="fun_box">
  37. <view class="item" v-for="(item,index) in finance" :key="index" style="margin: 0px;">
  38. <image :src="item.url" mode=""></image>
  39. {{item.name}}
  40. </view>
  41. </view>
  42. </view>
  43. <view class="function">
  44. <view class="title">
  45. 设置
  46. </view>
  47. <view class="fun_box">
  48. <view class="item"style="margin: 0px;" @click="loginOut">
  49. <image src="@/static/login/tuichu.png" mode=""></image>
  50. 退出
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 弹窗 -->
  55. <Modal ref="myModal"
  56. :title="modalText.title"
  57. :content="modalText.content"
  58. :showCancelButton="false"
  59. />
  60. </view>
  61. </template>
  62. <script>
  63. import Modal from '@/components/modal/index.vue';
  64. import api from "@/api/api";
  65. export default {
  66. components: {
  67. Modal,
  68. },
  69. data() {
  70. return {
  71. store: [{
  72. name: '商品管理',
  73. url: '/static/index/product.png',
  74. path: '/pages/product/index'
  75. },
  76. {
  77. name: '优惠券',
  78. url: '/static/index/coupon.png'
  79. },
  80. {
  81. name: '拼团活动',
  82. url: '/static/index/group.png'
  83. },
  84. {
  85. name: '客户评价',
  86. url: '/static/index/evaluate.png',
  87. path: '/pages/evaluate/evaluate'
  88. },
  89. {
  90. name: '秒杀活动',
  91. url: '/static/index/seckill.png'
  92. },
  93. {
  94. name: '店铺设置',
  95. url: '/static/index/shop.png'
  96. },
  97. {
  98. name: '团餐活动',
  99. url: '/static/index/groupMeal.png',
  100. path: '/pages/groupMeal/goods/list'
  101. },
  102. {
  103. name: '财务管理',
  104. url: '/static/index/audit.png',
  105. path: '/pages/financial/management'
  106. },
  107. ],
  108. order: [
  109. // {
  110. // name: '订单管理',
  111. // url: '/static/index/indent.png'
  112. // },
  113. {
  114. name: '核销记录',
  115. url: '/static/index/history.png'
  116. },
  117. {
  118. name: '退款管理',
  119. url: '/static/index/refund.png'
  120. },
  121. {
  122. name: '核销',
  123. url: '/static/index/coupon.png'
  124. },
  125. ],
  126. finance: [{
  127. name: '提现管理',
  128. url: '/static/index/with.png'
  129. },
  130. {
  131. name: '收款核销',
  132. url: '/static/index/collection.png'
  133. },
  134. ],
  135. // 弹窗
  136. modalText: {
  137. title: '提示',
  138. btntext: '好的',
  139. // 很抱歉,您没有通过平台审核,如有疑问请联系平台客服。
  140. content: '报名成功,请等待平台审核'
  141. },
  142. }
  143. },
  144. methods: {
  145. loginOut(){
  146. uni.showModal({
  147. title: '提示',
  148. content: '是否确认退出当前账号?',
  149. success: (res) => {
  150. if (res.confirm) {
  151. api.logout().then(res=>{
  152. uni.clearStorageSync();
  153. uni.navigateTo({
  154. url: `/pages/login/login`
  155. });
  156. })
  157. }
  158. }
  159. });
  160. },
  161. storeFunc(item) {
  162. // 需要先报名
  163. if (item.name === '团餐活动') {
  164. this.$http.post('/groupmeal/gmMerchantApplicationRecord/isApply', {}).then(res => {
  165. if (!res.data.result) {
  166. uni.navigateTo({
  167. url: '/pages/groupMeal/goods/index'
  168. });
  169. } else {
  170. let status = res.data.result.status;
  171. if (status == 1) {
  172. uni.navigateTo({
  173. url: item.path
  174. });
  175. } else {
  176. this.modalText.content = status == 2 ? '很抱歉,您没有通过平台审核,如有疑问请联系平台客服。' : '团餐活动报名审核中,请耐心等待';
  177. this.$refs.myModal.onOpen();
  178. }
  179. }
  180. });
  181. return;
  182. }
  183. if (!item.path) return;
  184. uni.navigateTo({
  185. url: item.path
  186. });
  187. },
  188. orderFunc(item) {
  189. if (item.name == '核销') {
  190. uni.navigateTo({
  191. url:'/pages/scan/manual'
  192. })
  193. }
  194. },
  195. //返回
  196. back() {
  197. uni.navigateBack({
  198. delta: 1
  199. });
  200. },
  201. }
  202. }
  203. </script>
  204. <style lang="scss" scoped>
  205. .service {
  206. width: 100%;
  207. height: 100%;
  208. background: #F7F8FC;
  209. .head {
  210. width: 100%;
  211. height: calc(var(--status-bar-height) + 112rpx ) ;
  212. padding: 20rpx;
  213. display: flex;
  214. align-items: center;
  215. background: linear-gradient(180deg, #D6E9FF 0%, #FFFFFF 100%);
  216. position: relative;
  217. .top {
  218. width: 100%;
  219. // height: ;
  220. }
  221. .cuIcon-back {
  222. font-size: 40rpx;
  223. // margin-right: 40rpx;
  224. position: absolute;
  225. left: 40rpx;
  226. }
  227. .case {
  228. position: absolute;
  229. left: 50%;
  230. transform: translateX(-50%);
  231. font-size: 36rpx;
  232. font-weight: 500;
  233. }
  234. }
  235. .function {
  236. background-color: #fff;
  237. padding-top: 12rpx;
  238. margin-bottom: 20rpx;
  239. .title {
  240. padding: 0px 40rpx;
  241. width: 100%;
  242. height: 53rpx;
  243. border-bottom: 1px solid #eee;
  244. font-size: 28rpx;
  245. font-weight: 600;
  246. }
  247. .fun_box {
  248. display: flex;
  249. // justify-content: space-between;
  250. flex-wrap: wrap;
  251. // gap: 40rpx;
  252. padding: 36rpx 40rpx;
  253. .item {
  254. width: 20%;
  255. display: flex;
  256. align-items: center;
  257. flex-direction: column;
  258. // margin-bottom: 20rpx;
  259. // margin-right: 40rpx;
  260. font-size: 24rpx;
  261. image {
  262. width: 56rpx;
  263. height: 56rpx;
  264. margin-bottom: 10rpx;
  265. }
  266. }
  267. .nomargin {
  268. margin-bottom: 0px;
  269. }
  270. .item:nth-child(-n+5) {
  271. margin-bottom: 36rpx;
  272. }
  273. }
  274. }
  275. }
  276. </style>