Browse Source

no-message

tengpanxu 5 tháng trước cách đây
mục cha
commit
05d6185c80

+ 3 - 1
src/api/order.js

@@ -5,4 +5,6 @@ let url = 'api/order/'
 // 创建订单
 export const ordercreat = (data) => request(url + 'creat', 'post', data)
 // 订单列表
-export const orderlist = (data) => request(url + 'list', 'post', data)
+export const orderlist = (data) => request(url + 'list', 'post', data)
+// 订单详情
+export const orderDetail = (data) => request(url + 'item', 'post', data)

BIN
src/assets/img/close.png


BIN
src/assets/img/me/balance.png


+ 9 - 3
src/locales/Arab.json

@@ -1,6 +1,6 @@
 {
   "Home":"الصفحة الرئيسية",
-  "Tourism":"سفر .",
+  "Tourism":"سفر",
   "Team":"فريق",
   "Order": "أمر",
   "Recharge":"شحن",
@@ -77,7 +77,8 @@
     "text1":"خطط السفر",
     "text11":"بدء السفر والاستيلاء على التذاكر",
     "text2":"تهانينا ! نجاح الشراء ، من أجل تسوية .",
-    "text3":"العد التنازلي"
+    "text3":"العد التنازلي",
+    "text4":"مناطق بيع التذاكر: الولايات المتحدة، الصين، اليابان، تايلاند، أوروبا، أستراليا وبعض البلدان الأخرى"
   },
   "home3":{
     "text1":"فتح شبكة الإنترنت نموذج الأعمال التجارية ، وتحقيق المشاريع المنزلية والأتمتة الإيرادات",
@@ -203,6 +204,11 @@
     "text7": "اللجنة اليوم",
     "text8": "معدل العمولة المقدرة لكل تذكرة هو 0.4 ٪ ~ 0.6 في المائة .",
     "text9": "تبدأ سرقة التذاكر",
-    "text10": "يرجى طلب الحصول على التذاكر من الخدمة"
+    "text10": "يرجى طلب الحصول على التذاكر من الخدمة",
+    
+    "text11": "سعر التذكرة",
+    "text12": "عمولة",
+    "text13": "رصيد غير كافٍ",
+    "text14": "إذهب للشحن"
   }
 }

+ 8 - 2
src/locales/en.json

@@ -77,7 +77,8 @@
 		  "text1":"Travel Plans",
 			"text11":"Start Your Journey & Grab Tickets",
 		  "text2":"Booking successful and settling income",
-		  "text3":"Waiting"
+		  "text3":"Waiting",
+			"text4":"Ticketing areas: United States, China, Japan, Thailand, Europe, Australia and some other countries"
 	},
 	"home3":{
 		  "text1":"Start an Internet-based business team and realize home entrepreneurship and automated income",
@@ -203,6 +204,11 @@
 		"text7": "Today's Commission",
 		"text8": "Estimated commission rate per ticket: 0.4%~0.6%",
 		"text9": "Grab tickets",
-		"text10": "Please apply to the service for ticket grab permission"
+		"text10": "Please apply to the service for ticket grab permission",
+
+		"text11": "Ticket Price",
+		"text12": "Commission",
+		"text13": "Insufficient Balance",
+		"text14": "Recharge"
 	}
 }

+ 6 - 1
src/locales/zh-CN.json

@@ -204,6 +204,11 @@
 		"text7": "今日佣金",
 		"text8": "每張票的預估佣金利率為0.4%~0.6%",
 		"text9": "開始搶票",
-		"text10": "请向服务申请抢票权限"
+		"text10": "请向服务申请抢票权限",
+
+		"text11": "票價",
+		"text12": "佣金",
+		"text13": "餘額不足",
+		"text14": "去充值"
 	}
 }

+ 2 - 2
src/views/Forestage/Me/mod/my-money.vue

@@ -5,10 +5,10 @@
 			<div class="box-1 bgc-755C82 align-items-center box-sizing-border-box mb-7">
 				<img v-if="userInfo.head_img" :src="userInfo.head_img" alt="" />
 				<div class="">
-					<div class="fs-20 mb-7 fw-500 ">{{userInfo.nickname||''}}({{userInfo.level_name}})</div>
+					<div class="fs-20 mb-7 fw-500 ">{{userInfo.nickname||''}}<!-- ({{userInfo.level_name}}) --></div>
 					<div class="fs-14 mb-7 fw-400 ">
 						<span>{{ $t("other.text2") }}:{{userInfo.email||''}}</span>
-						<span style="margin-left: 20px;">ID:{{userInfo.invite_code||''}}</span>
+						<!-- <span style="margin-left: 20px;">ID:{{userInfo.invite_code||''}}</span> -->
 					</div>
 					<div class="fs-14  fw-400 ">ID:{{userInfo.invite_code||''}}</div>
 				</div>

+ 1 - 1
src/views/Forestage/Me/mod/my-order.vue

@@ -18,7 +18,7 @@
 			 	<div class="fs-12 fw-400 w150 ">{{item.order_sn}}</div>
 				<div class="fs-12 fw-400 w150 ">{{item.price}}</div>
 				<div class="fs-12 fw-400 w150 ">{{item.yield_money}}</div>
-				<div class="fs-12 fw-400 w150 text-align-right">{{$t('home6.index2.text8')}}</div>
+				<div class="fs-12 fw-400 w150 text-align-right">{{ item.status == 1 ? $t('home6.index2.text9') : item.status == 2 ? $t('home6.index2.text8') : '' }}</div>
 <!--			 	<div class="fs-12 fw-400 w150 text-align-right">{{item.created_at}}</div>-->
 			 </div>
 			 <div class="justify-right mt-16">

+ 3 - 1
src/views/Forestage/Order/index.vue

@@ -22,7 +22,7 @@
 			<div class="box-page fs-12 fw-400 fc-12 hand-cursor" @click="downPage()">{{$t('xyy')}}</div>
 		</div>
 
-    <order-sett ref="orderSett"></order-sett>
+    <order-sett ref="orderSett" :orderId="orderId" @order-success="getList"></order-sett>
   </div>
 </template>
 
@@ -39,6 +39,7 @@ export default {
         isAJAX: false,
 				total:0,
         lang:'en',
+        orderId: ``
 			}
 		},
   mounted() {
@@ -90,6 +91,7 @@ export default {
             if(res.code == 1){
               this.isAJAX = false;
               // tools.success(res.msg)
+              this.orderId = res.data.order_id
               this.$refs.orderSett.setOpen(true)
             }else{
               this.isAJAX = false;

+ 222 - 0
src/views/Forestage/Tourism/balance-tip.vue

@@ -0,0 +1,222 @@
+<template>
+  <div>
+    <Bounced v-if="dialogVisible" :dialogVisible="dialogVisible" :titleName="''" bouncedWidth="550px">
+      <template slot="from">
+        <!-- 提交订单弹窗 -->
+        <div class="order-detail-dialog">
+
+          <div class="close" @click="handleClose">
+            <img class="close-img" src="@/assets/img/close.png" alt="">
+          </div>
+
+          <div class="goods-img">
+            <img class="g-img" :src="orderDetail.cover_img" alt="">
+          </div>
+          <div class="content">
+            <div class="title">{{ orderDetail.goods_name }}</div>
+            <div class="desc">{{ orderDetail.contents }}</div>
+            
+            <div class="money">
+              <div class="label">{{$t('other.text11')}}:</div>
+              <div class="num">{{ orderDetail.price }}</div>
+              <div class="unit">USDT</div>
+            </div>
+
+            <div class="tips">{{$t('other.text13')}}</div>
+
+            <div class="operates">
+              <div class="btn" @click="goToRechargePage">{{$t('other.text14')}}</div>
+            </div>
+          </div>
+        </div>  
+      </template>
+    </Bounced>
+  </div>
+</template>
+
+<script>
+import Bounced from '@/components/Admin/bounced.vue'
+export default {
+  name: 'order-sett',
+  components: { Bounced },
+  props: {
+    orderDetail: {}
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      timeServe: undefined,
+      time: 0
+
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+    setOpen(dialogVisible) {
+      this.dialogVisible = dialogVisible === true;
+      if (this.dialogVisible) {
+        this.time = 15
+        this.timeServe = setInterval(() => {
+          this.time--;
+          this.text = this.time;
+          if (this.time === 0) {
+            clearInterval(this.timeServe);
+            this.timeServe = undefined
+            this.dialogVisible = false
+          }
+        }, 1000);
+      }
+    },
+
+    handleClose() {
+      // 关闭弹窗
+      this.dialogVisible = false;
+      
+      // 清除倒计时定时器
+      if (this.timeServe) {
+        clearInterval(this.timeServe);
+        this.timeServe = undefined;
+      }
+      
+      // 重置倒计时时间(可选)
+      this.time = 0;
+    },
+
+    goToRechargePage() {
+      this.$router.push('/recharge')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+/* 订单提交弹窗 */
+.order-detail-dialog {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  min-height: 529px;
+  /* margin: 0 auto; */
+  background-color: #ffffff;
+  border-radius: 10px;
+  overflow: hidden;
+
+  .close {
+    position: absolute;
+    top: 20px;
+    right: 20px;
+    width: 24px;
+    height: 24px;
+    border-radius: 50%;
+    cursor: pointer;
+
+    .close-img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+
+  .goods-img {
+    width: 550px;
+    height: 210px;
+    border-radius: 10px;
+
+    .g-img {
+      width: 550px;
+      height: 100%;
+      border-radius: 10px;
+    }
+  }
+
+  .content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    width: 100%;
+
+    .title {
+      color: #171717;
+      font-size: 24px;
+      font-weight: 700;
+      line-height: 34px;
+      margin: 15px 0;
+    }
+
+    .desc {
+      color: #171717;
+      margin: 0 20px;
+      font-size: 14px;
+      line-height: 20px;
+    }
+
+    .money {
+      display: flex;
+      text-align: center;
+      margin-top: 25px;
+
+      .label {
+        color: #171717;
+        font-size: 20px;
+        line-height: 50px;
+      }
+
+      .num {
+        color: #171717;
+        font-size: 32px;
+        font-weight: 700;
+        line-height: 47px;
+      }
+
+      .unit {
+        margin-left: 5px;
+        color: #707070;
+        font-size: 16px;
+        line-height: 54px;
+      }
+    }
+
+    .tips {
+      margin-top: 15px;
+      color: #D43030;
+      font-size: 16px;
+      text-align: center;
+    }
+
+    .operates {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      margin: 20px 0;
+
+      .btn {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 245px;
+        height: 60px;
+        color: #171717;
+        font-size: 20px;
+        font-weight: 500;
+        background-color: #C7AB7B;
+        border-radius: 4px;
+        cursor: pointer;
+
+        /* &:not(:first-child) {
+          margin-left: 20px;
+        }
+
+        &.submit {
+          background-color: #c7ab7b
+        }
+
+        &.cancel {
+          background-color: #cccccc
+        } */
+      }
+    }
+  }
+}
+</style>

+ 13 - 7
src/views/Forestage/Tourism/index.vue

@@ -84,7 +84,7 @@
 							<div class="val">{{$t('home2.text4')}}</div>
 						</div>
 					</div>
-					<div class="tips">{{ $t('other.text8') }}</div>
+					<!-- <div class="tips">{{ $t('other.text8') }}</div> -->
 				</div>
 			</div>
 
@@ -96,8 +96,9 @@
 		</div>
 
 
-		<order-detail ref="orderDetail"></order-detail>
-		<order-sett ref="orderSett"></order-sett>
+		<!-- <order-detail ref="orderDetail" :orderId="orderId"></order-detail> -->
+		<order-sett ref="orderSett" :orderId="orderId" @order-success="getInfo"></order-sett>
+		<!-- <balance-tip ref="balanceTip" :orderDetail="orderDetail"></balance-tip> -->
 	</div>
 </template>
 
@@ -108,13 +109,14 @@ import {
 } from '@/api/order.js';
 import {
   getClass,
-  getList, getVipGoodsList
+  getList, getVipGoodsList, orderDetail
 } from '@/api/goods.js'
 import OrderSett from '@/views/Forestage/Tourism/order-sett.vue'
 import OrderDetail from '@/views/Forestage/Tourism/order-detail.vue'
+import BalanceTip from '@/views/Forestage/Tourism/balance-tip.vue'
 import { userInfo } from '@/api/member'
 export default {
-	components: { OrderSett, OrderDetail },
+	components: { OrderSett, OrderDetail, BalanceTip },
 	data() {
 		return {
 			// backgroundImg: require('@/assets/img/home/2-2.png'),
@@ -132,7 +134,8 @@ export default {
         vip_id:0,
         order_num:0,
         is_opne:0,
-      }
+      },
+			orderId: ``
 		}
 	},
 	created() {
@@ -226,7 +229,10 @@ export default {
 						this.isAJAX = false;
 						// tools.success(res.msg)
 						this.$refs.orderSett.setOpen(true)
-            this.getInfo();
+						console.log('res', res)
+
+						this.orderId = res.data.order_id
+            /* this.getInfo(); */
 					} else {
 						this.isAJAX = false;
 						tools.error(res.msg)

+ 110 - 58
src/views/Forestage/Tourism/order-detail.vue

@@ -4,31 +4,29 @@
       <template slot="from">
         <!-- 提交订单弹窗 -->
         <div class="order-detail-dialog">
+
+          <div class="close" @click="handleClose">
+            <img class="close-img" src="@/assets/img/close.png" alt="">
+          </div>
+
           <div class="goods-img">
-            <img class="g-img" src="@/assets/img/home/2-1.png" alt="">
+            <img class="g-img" :src="orderDetail.cover_img" alt="">
           </div>
           <div class="content">
-            <div class="title">泰国曼谷大皇宫</div>
-            <div class="desc">它是曼谷王朝的象征,是旅游者的垂爱之地,暹罗式风格的皇宫建筑群汇集了泰国书画、雕刻和装饰艺术的精华。</div>
+            <div class="title">{{ orderDetail.goods_name }}</div>
+            <div class="desc">{{ orderDetail.contents }}</div>
+            
             <div class="money">
-              <div class="i">
-                <div class="label">票价</div>
-                <div class="val">
-                  <span>888.88</span>
-                  <span class="unit">USDT</span>
-                </div>
-              </div>
-              <div class="i">
-                <div class="label">票价</div>
-                <div class="val">
-                  <span>888.88</span>
-                  <span class="unit">USDT</span>
-                </div>
-              </div>
-            </div>
-            <div class="operates">
-              <div class="btn submit">提交</div>
-              <div class="btn cancel">关闭</div>
+              <i class="item">
+                <div class="label">{{$t('other.text11')}}:</div>
+                <div class="num">{{ orderDetail.price }}</div>
+                <div class="unit">USDT</div>
+              </i>
+              <i class="item">
+                <div class="label">{{$t('other.text12')}}:</div>
+                <div class="num special">{{ orderDetail.yield_money }}</div>
+                <div class="unit">USDT</div>
+              </i>
             </div>
           </div>
         </div>  
@@ -42,7 +40,9 @@ import Bounced from '@/components/Admin/bounced.vue'
 export default {
   name: 'order-sett',
   components: { Bounced },
-  props: {},
+  props: {
+    orderDetail: {}
+  },
   data() {
     return {
       dialogVisible: false,
@@ -69,9 +69,21 @@ export default {
           }
         }, 1000);
       }
-    }
-
-
+    },
+
+    handleClose() {
+      // 关闭弹窗
+      this.dialogVisible = false;
+      
+      // 清除倒计时定时器
+      if (this.timeServe) {
+        clearInterval(this.timeServe);
+        this.timeServe = undefined;
+      }
+      
+      // 重置倒计时时间(可选)
+      this.time = 0;
+    },
   }
 }
 </script>
@@ -79,23 +91,40 @@ export default {
 <style lang="scss" scoped>
 /* 订单提交弹窗 */
 .order-detail-dialog {
+  position: relative;
   display: flex;
   flex-direction: column;
-  width: 550px;
-  min-height: 529px;
-  margin: 0 auto;
-  border-radius: 10px!important;
+  width: 100%;
+  min-height: 495px;
+/*   margin: 0 auto; */
   background-color: #ffffff;
+  border-radius: 10px;
   overflow: hidden;
 
+  .close {
+    position: absolute;
+    top: 20px;
+    right: 20px;
+    width: 24px;
+    height: 24px;
+    border-radius: 50%;
+    cursor: pointer;
+
+    .close-img {
+      width: 100%;
+      height: 100%;
+    }
+  }
+
   .goods-img {
-    width: 550px;
+    width: 100%;
     height: 210px;
+    border-radius: 10px;
 
     .g-img {
-      width: 550px;
+      width: 100%;
       height: 100%;
-      border-radius: 10px!important;
+      border-radius: 10px;
     }
   }
 
@@ -106,6 +135,7 @@ export default {
     width: 100%;
 
     .title {
+      color: #171717;
       font-size: 24px;
       font-weight: 700;
       line-height: 34px;
@@ -113,61 +143,83 @@ export default {
     }
 
     .desc {
+      color: #171717;
       margin: 0 20px;
       font-size: 14px;
       line-height: 20px;
     }
 
     .money {
-      width: 100%;
-      margin-top: 15px;
+      display: flex;
+      flex-direction: column;
+      text-align: center;
+      align-items: center;
+      margin-top: 25px;
 
-      .i {
+      .item {
         display: flex;
-        padding: 0 20px;
-        height: 44px;
 
         &:not(:first-child) {
-          margin-top: 10px;
+          margin-top: 11px;
         }
 
         .label {
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          width: 86px;
-          height: 44px;
-          font-size: 14px;
-          background-color: #C1B5C5;
+          color: #171717;
+          font-size: 20px;
+          line-height: 50px;
         }
-
-        .val {
-          flex: 1;
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-          padding: 0 15px 0 20px;
-          border: 1px solid #C1B5C5;
+  
+        .num {
+          color: #171717;
+          font-size: 32px;
+          font-weight: 700;
+          line-height: 47px;
+
+          &.special {
+            line-height: 42px;
+            font-size: 40px;
+            color: #D43030;
+            font-weight: 700;
+          }
+        }
+  
+        .unit {
+          margin-left: 5px;
+          color: #707070;
+          font-size: 16px;
+          line-height: 54px;
         }
       }
+
+    }
+
+    .tips {
+      margin-top: 15px;
+      color: #D43030;
+      font-size: 16px;
+      text-align: center;
     }
 
     .operates {
       display: flex;
       align-items: center;
       justify-content: space-between;
-      margin: 28px 20px;
+      margin: 20px 0;
 
       .btn {
         display: flex;
         align-items: center;
         justify-content: center;
         width: 245px;
-        height: 44px;
-        font-size: 16px;
+        height: 60px;
+        color: #171717;
+        font-size: 20px;
+        font-weight: 500;
+        background-color: #C7AB7B;
         border-radius: 4px;
+        cursor: pointer;
 
-        &:not(:first-child) {
+        /* &:not(:first-child) {
           margin-left: 20px;
         }
 
@@ -177,7 +229,7 @@ export default {
 
         &.cancel {
           background-color: #cccccc
-        }
+        } */
       }
     }
   }

+ 31 - 5
src/views/Forestage/Tourism/order-sett.vue

@@ -12,21 +12,29 @@
         </div>
       </template>
     </Bounced>
+
+    <order-detail ref="orderDetail" :orderDetail="orderDetail"></order-detail>
+    <balance-tip ref="balanceTip" :orderDetail="orderDetail"></balance-tip>
   </div>
 </template>
 
 <script>
 import Bounced from '@/components/Admin/bounced.vue'
+import { orderDetail } from '@/api/order.js'
+import OrderDetail from '@/views/Forestage/Tourism/order-detail.vue'
+import BalanceTip from '@/views/Forestage/Tourism/balance-tip.vue'
 export default {
   name: 'order-sett',
-  components: { Bounced },
-  props: {},
+  components: { Bounced, OrderDetail, BalanceTip},
+  props: {
+    orderId: ``
+  },
   data() {
     return {
       dialogVisible:false,
       timeServe:undefined,
-      time:0
-
+      time:0,
+      orderDetail: {}
     }
   },
   mounted() {
@@ -37,13 +45,31 @@ export default {
       this.dialogVisible=dialogVisible===true;
       if( this.dialogVisible){
         this.time=3
-        this.timeServe=setInterval(()=>{
+        this.timeServe=setInterval(async ()=>{
           this.time--;
           this.text = this.time ;
           if (this.time===0) {
             clearInterval(this.timeServe);
             this.timeServe=undefined
             this.dialogVisible=false
+
+            //  调用订单详情接口
+            const result = await orderDetail({ orderId: this.orderId })
+
+            this.orderDetail = result.data
+
+                
+            //  支付成功了
+            if (this.orderDetail.status >= 1) {
+              /* openGoodsDetailPopup() */
+              this.$emit('order-success', this.orderDetail)
+              this.$refs.orderDetail.setOpen(true)
+            }
+          
+            //  支付失败了
+            if (this.orderDetail.status == 0) {
+              this.$refs.balanceTip.setOpen(true)
+            }
           }
         },1000);
       }