laosan2382995021@163.com %!s(int64=4) %!d(string=hai) anos
pai
achega
d02903fd99

+ 1 - 1
src/components/popup/src/main.vue

@@ -3,7 +3,7 @@
            @click="trigger && changeValue"
            :class="{'center':center}"
   >
-    <section @click.stop :class="['popup-content-'+contentAnimate]" class="relative">
+    <section @click.stop :class="['popup-content-'+contentAnimate]" class="relative popup-content">
       <header v-if="headerTitle" class="absolute popup-header center">
         <div class="popup-header-background center"
           :style="{background:'url('+headerBackground+') 0 0'}"

+ 6 - 0
src/components/popup/style.scss

@@ -10,6 +10,12 @@
 }
 /* 弹窗 */
 
+/* 弹窗内容 */
+.popup-content{
+  max-height: 90%;
+}
+/* 弹窗内容 */
+
 /* 弹窗标题 */
 .popup-header{
   z-index: 999;

+ 3 - 0
src/layout/layout-order-item/index.ts

@@ -0,0 +1,3 @@
+import main from './src/main.vue';
+
+export default main;

+ 11 - 0
src/layout/layout-order-item/src/main.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {
+  name: "layout-order-item"
+}
+</script>
+
+<style scoped lang="scss" src="../style.scss"></style>

+ 0 - 0
src/layout/layout-order-item/style.scss


+ 3 - 0
src/layout/layout-order/index.ts

@@ -0,0 +1,3 @@
+import main from './src/main.vue';
+
+export default main;

+ 22 - 0
src/layout/layout-order/src/main.vue

@@ -0,0 +1,22 @@
+<template>
+  <section class="screen layout-order">
+
+<!--    <flat-list></flat-list>-->
+  </section>
+</template>
+
+<script>
+import {
+  FlatList
+} from '$components';
+import layoutOrderItem from '$layout/layout-order-item';
+export default {
+  name: "layout-order",
+  components:{
+    FlatList,
+    layoutOrderItem
+  }
+}
+</script>
+
+<style scoped lang="scss" src="../style.scss"></style>

+ 3 - 0
src/layout/layout-order/style.scss

@@ -0,0 +1,3 @@
+.layout-order{
+  padding: 15px 20px;
+}

+ 52 - 5
src/layout/layout-play/mixins/handle.ts

@@ -85,25 +85,44 @@ export default <LibMixins>{
                 popup.$loading('获取中');
             },500);
 
-            Promise.all([this.getPlayInfo(),this.getPlayList()]).then(([info,playData])=>{
+            Promise.all([this.getPlayInfo(),this.getPlayList(),this.getDetail()]).then(([info,playData,detail])=>{
                 this.clearTargetDetail();
 
                 playData = playData.data.palyer_game_list || [];
 
-                playData = playData.map((item,index)=>{
-                    return {
+                let unshiftData;
+
+                let resultData = [];
+
+                playData.map((item,index)=>{
+
+                    let resultItem = {
                         label: item.game_name,
                         slot: 'tab-'+index,
                         pid: item.pid,
                         price: item.price
                     }
+
+                    if (item.pid === this.item.pid) {
+                        unshiftData = resultItem;
+                    } else {
+                        resultData.push(resultItem);
+                    }
+
                 });
 
+                unshiftData && resultData.unshift(unshiftData);
+
                 info = info.data || {};
 
-                info.gameList = playData;
+                info.gameList = resultData;
+
+                if (detail) {
+                    info.gameInfo = {
+                        [this.item.pid]:detail
+                    }
+                }
 
-                console.log(info);
 
                 // info
                 if (!info.images) {
@@ -156,6 +175,34 @@ export default <LibMixins>{
                 },
                 token:true
             })
+        },
+
+        // 获取陪玩当前游戏的详情
+        getDetail(){
+
+            return new Promise((resolve)=>{
+                this.$request({
+                    url:'player/get_player_info',
+                    data:{
+                        pid: this.item.pid
+                    },
+                    cache:{
+                        type: InstructionsCacheType.memory
+                    },
+                    token:true
+                }).then((data)=>{
+                    data = data.data || {};
+
+                    data.game_info.skill_level_list.map((item)=>{
+                        if (item.lid === data.lid) {
+                            data.game_level_name = item.game_level_name;
+                        }
+                    });
+
+                    resolve(data);
+
+                }).catch(()=> resolve(undefined));
+            });
         }
 
     },

+ 6 - 0
src/popup/popup-detail/components/game/mixins/handle.ts

@@ -40,6 +40,12 @@ export default <LibMixins>{
     methods:{
 
         getDetail(obj){
+
+            if (this.detail) {
+                this.item = this.detail;
+                return  obj.success([1]);
+            }
+
             return this.$request({
                 url:'player/get_player_info',
                 data:{

+ 5 - 0
src/popup/popup-detail/components/game/props.ts

@@ -8,6 +8,11 @@ export default {
     config:{
         type:Object,
         default:{}
+    },
+
+    detail:{
+        type:Object,
+        default:undefined
     }
 
 }

+ 2 - 1
src/popup/popup-detail/src/main.vue

@@ -1,6 +1,6 @@
 <template>
   <popup v-model:value="value" content-animate="scale" @close="$emit('destroy-popup')">
-    <section class="center">
+    <section class="center detail-container-warp">
       <section class="detail-container flex overflow">
         <!-- 头部 -->
         <header class="rowACenter detail-header" >
@@ -154,6 +154,7 @@
                         :key="'tab-component-'+index"
                         :pid="item.pid"
                         :config="option"
+                        :detail="option.gameInfo && option.gameInfo[item.pid]"
                     ></game>
                   </template>
 

+ 3 - 1
src/popup/popup-detail/style.scss

@@ -1,7 +1,9 @@
 /* 容器 */
+.detail-container-warp,.detail-container{
+  max-height: 100%;
+}
 .detail-container{
   width: 1100px;
-  max-height: 90%;
   height: 1010px;
   background-color: #F1F1F1;
   border-radius: 20px;

+ 34 - 2
src/popup/popup-personal/components/my-order/components/order-item/src/main.vue

@@ -2,7 +2,37 @@
   <tab
     :data="tabData"
   >
-    
+    <template v-slot:header="{data,trigger,select}" >
+      <header class="order-item-header relative rowACenter">
+        <aside
+            v-for="(item,index) in data"
+            :key="'my-order-'+index"
+            class="order-item-aside center flex-1"
+            :class="{
+              'my-order-button-select': index === select,
+              'cursor-pointer': index !== select
+            }"
+            @click="trigger(index)"
+        >{{item.label}}</aside>
+        <aside class="absolute center order-item-line"
+          :style="{
+            width: 100 / data.length  +'%',
+            left: (100 / data.length * select)+'%'
+          }"
+        >
+          <div></div>
+        </aside>
+      </header>
+    </template>
+
+    <template
+      v-for="(item,index) in tabData"
+      v-slot:[item.slot]
+    >
+      <layout-order
+        :key="'layout-order-'+index"
+      ></layout-order>
+    </template>
   </tab>
 </template>
 
@@ -11,6 +41,7 @@ import {
   tab
 } from '$components';
 import tabData from "../data/tab";
+import layoutOrder from '$layout/layout-order';
 export default {
   name: "order-item",
   data(){
@@ -19,7 +50,8 @@ export default {
     }
   },
   components:{
-    tab
+    tab,
+    layoutOrder
   }
 }
 </script>

+ 21 - 0
src/popup/popup-personal/components/my-order/components/order-item/style.scss

@@ -0,0 +1,21 @@
+/* 订单模块 tab */
+.order-item-header {
+  background: rgba(85, 154, 223, 0.1);
+  height: 44px;
+  padding-bottom: 6px;
+}
+.order-item-aside{
+  font-size: 16px;
+}
+.order-item-line{
+  left: 0;
+  bottom: 8px;
+  transition: .3s;
+}
+.order-item-line div{
+  width: 60px;
+  height: 6px;
+  background: $main-linear;
+  border-radius: 3px;
+}
+/* 订单模块 tab */

+ 8 - 2
src/popup/popup-recharge/mixins/handle.ts

@@ -71,8 +71,14 @@ export default <LibMixins>{
             }).then((data)=>{
 
                 if (data.isSuccess) {
-                    window.open(data.data);
-                    this.setWaitPattern();
+
+                    this.$request({
+                        method:'GET',
+                        url:data.data
+                    });
+
+                    // window.open(data.data);
+                    // this.setWaitPattern();
                 }
 
                 return obj.none();

+ 55 - 0
src/utils/control/order/const/order.ts

@@ -0,0 +1,55 @@
+enum OrderPayStatus {
+
+    // 待支付
+    pay,
+
+    // 待接单
+    orders,
+
+    // 进行中
+    have,
+
+    // 已完成
+    completed
+}
+
+enum OrderStatus {
+
+    // 下单
+    placeOrder,
+
+    // 接单
+    receivingOrder
+
+}
+
+enum OrderButton {
+
+    // 支付
+    pay,
+
+    // 联系陪玩
+    contact,
+
+    // 再来一单
+    oneMoreOrder,
+
+    // 确定完成
+    complete,
+
+    // 评价
+    comment,
+
+    // 待接单
+    received,
+
+    // 联系顾客
+    contactCustomer
+
+}
+
+export {
+    OrderPayStatus,
+    OrderStatus,
+    OrderButton
+}

+ 38 - 0
src/utils/control/order/data/button-group.ts

@@ -0,0 +1,38 @@
+import {OrderStatus,OrderPayStatus,OrderButton} from "$utils/control/order/const/order";
+
+import button from './button';
+
+export default {
+
+    // 下单
+    [OrderStatus.placeOrder]:{
+
+        [OrderPayStatus.pay] :[
+            button[OrderButton.contact],
+            button[OrderButton.pay]
+        ],
+
+        [OrderPayStatus.orders] :[
+            button[OrderButton.contact],
+            button[OrderButton.oneMoreOrder]
+        ],
+
+        [OrderPayStatus.have] :[
+            button[OrderButton.contact],
+            button[OrderButton.complete],
+            button[OrderButton.oneMoreOrder]
+        ],
+
+        [OrderPayStatus.completed] :[
+            button[OrderButton.contact],
+            button[OrderButton.comment],
+            button[OrderButton.oneMoreOrder]
+        ],
+    },
+
+    // 接单
+    [OrderStatus.receivingOrder]:{
+
+    }
+
+}

+ 53 - 0
src/utils/control/order/data/button.ts

@@ -0,0 +1,53 @@
+import {
+    OrderButton
+} from '../const/order';
+let orderConfig = {
+
+    // 支付
+    [OrderButton.pay]:{
+        label:'去支付',
+        color:'linear-gradient(90deg, #F24831, #F15B5B)'
+    },
+
+    // 联系陪玩
+    [OrderButton.contact]:{
+        label:'联系陪玩',
+        color:'#C75BE6'
+    },
+
+    // 再来一单
+    [OrderButton.oneMoreOrder]:{
+        label:'再来一单',
+        color:'linear-gradient(90deg, #FF9262, #EE833C)'
+    },
+
+    // 确定完成
+    [OrderButton.complete]:{
+        label:'确认完成'
+    },
+
+    // 评价
+    [OrderButton.comment]:{
+        label:'去评价'
+    },
+
+    // 待接单
+    [OrderButton.received]:{
+        label:'待接单'
+    },
+
+    // 联系顾客
+    [OrderButton.contactCustomer]:{
+        label:'联系顾客',
+        color:'#C75BE6'
+    }
+
+} as { [key in OrderButton]: LibData }
+
+for (let key in orderConfig) {
+    if (orderConfig.hasOwnProperty(key)) {
+        orderConfig[key].status = key;
+    }
+}
+
+export default orderConfig;

+ 13 - 0
src/utils/control/order/index.ts

@@ -0,0 +1,13 @@
+import {OrderPayStatus, OrderStatus} from './const/order';
+
+import buttonGroup from './data/button-group';
+
+export default {
+
+    // 获取按钮合集
+    getButtonGroup(status:OrderPayStatus,type:OrderStatus = OrderStatus.placeOrder){
+        return buttonGroup[type][status];
+    }
+
+
+}