liyongli 2 年之前
父节点
当前提交
7d6f1257da
共有 2 个文件被更改,包括 197 次插入702 次删除
  1. 141 648
      pnpm-lock.yaml
  2. 56 54
      src/view/SilkRoadSpringFestivalGala/pages/eight.vue

文件差异内容过多而无法显示
+ 141 - 648
pnpm-lock.yaml


+ 56 - 54
src/view/SilkRoadSpringFestivalGala/pages/eight.vue

@@ -61,6 +61,7 @@
       </van-col>
       <van-col span="8">
         <van-button
+        
           class="btns"
           color="#eeb562"
           round
@@ -68,9 +69,9 @@
           hairline
           size="small"
           type="primary"
-          @click="addressObjshow"
         >
-          我的地址
+          <!-- @click="addressObjshow" -->
+          <span v-text="phone || '未登录'"></span>
         </van-button>
       </van-col>
     </van-row>
@@ -95,7 +96,7 @@
       />
     </div>
 
-    <van-dialog
+    <!-- <van-dialog
       v-model:show="addressObj.show"
       :before-close="upaddress"
       title="我的地址"
@@ -113,7 +114,7 @@
           placeholder="请输入地址"
         />
       </van-cell-group>
-    </van-dialog>
+    </van-dialog> -->
 
     <van-dialog
       :before-close="before"
@@ -134,19 +135,18 @@
           color: #646566;
         "
       >
-        恭喜你中奖,请于1月8日前,在右下角“我的地址”中上传收货地址哦~
+        恭喜你中奖,中将信息将会通过短线发送给您哦~
       </p>
     </van-dialog>
   </div>
 </template>
 <script setup>
-import { reactive, ref, defineEmits, defineExpose } from "vue";
-import { showDialog, showToast, showConfirmDialog } from "vant";
+import { reactive, ref, defineEmits, defineExpose } from 'vue';
+import { showDialog, showToast, showConfirmDialog } from 'vant';
 import {
   getDrawOri,
-  getUpdateOri,
   getGiftList,
-} from "@/api/SilkRoadSpringGala.js";
+} from '@/api/SilkRoadSpringGala.js';
 // import { onMounted, reactive } from "vue";
 // import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
 /**
@@ -156,11 +156,11 @@ import {
  */
 let w = window.$originData.orginParames.availWidth || 0;
 const show = ref(Array(12).fill(false));
-const address = ref(localStorage.getItem("silkRoadAddress") || "");
-const nickName = ref(localStorage.getItem("silkRoadName") || "");
-const phone = ref(localStorage.getItem("silkRoadPhone") || "");
+// const address = ref(localStorage.getItem('silkRoadAddress') || '');
+// const nickName = ref(localStorage.getItem('silkRoadName') || '');
+const phone = ref(localStorage.getItem('silkRoadPhone') || '');
 const next = false;
-const emits = defineEmits(["showVideo", "showTitleFunc"]);
+const emits = defineEmits(['showVideo', 'showTitleFunc']);
 let t = setInterval(() => {
   let index = Math.ceil(Math.random() * 12) - 1;
   if (index < 0) index = 0;
@@ -180,13 +180,13 @@ let T = undefined;
 const gift = ref({});
 let isdraw = false;
 function draw() {
-  phone.value = localStorage.getItem("silkRoadPhone") || "";
-  if (!phone.value) return emits("showTitleFunc");
+  phone.value = localStorage.getItem('silkRoadPhone') || '';
+  if (!phone.value) return emits('showTitleFunc');
   if (T) clearTimeout(T);
   T = setTimeout(() => {
     getDrawOri({
       phone: phone.value,
-      code: window.$shanshipin && window.$shanshipin.UserId ? 76767676 : "",
+      code: window.$shanshipin && window.$shanshipin.UserId ? 76767676 : '',
     }).then(res => {
       const r = res || {};
       isdraw = r.prizeId !== 1; // 接入接口后直接由接口提供是否中将
@@ -194,9 +194,8 @@ function draw() {
         return showDialog({
           title: r.name,
           message:
-            "很遗憾哟,新年礼物擦肩而过啦!点击下方刷个小视频吧,给手气充能,获取额外抽奖机会!",
+            '很遗憾哟,新年礼物擦肩而过啦!点击下方刷个小视频吧,给手气充能,获取额外抽奖机会!',
         });
-      console.log(r);
       gift.value.url = r.url;
       gift.value.name = r.name;
       gift.value.show = true;
@@ -205,54 +204,54 @@ function draw() {
 }
 
 function before(type) {
-  if (type !== "confirm" || !isdraw) return true;
-  showToast("奖品已打包,静等您收货哦!");
+  if (type !== 'confirm' || !isdraw) return true;
+  showToast('中将信息将在随后发送给' + phone.value + '机主');
   return true;
 }
 
-const addressObj = ref({ show: false });
+// const addressObj = ref({ show: false });
 
-function upaddress() {
-  if (!address.value) return;
-  getUpdateOri({
-    phone: phone.value,
-    userName: nickName.value,
-    addr: address.value,
-  })
-    .then(() => {
-      localStorage.setItem("silkRoadAddress", address.value);
-      localStorage.setItem("silkRoadName", nickName.value);
-      addressObj.value.show = false;
-    })
-    .catch(() => {
-      addressObj.value.show = false;
-    });
-}
-function addressObjshow() {
-  if (!phone.value) return showToast("请登录后在查看");
-  addressObj.value.show = true;
-}
+// function upaddress() {
+//   if (!address.value) return;
+//   getUpdateOri({
+//     phone: phone.value,
+//     userName: nickName.value,
+//     addr: address.value,
+//   })
+//     .then(() => {
+//       localStorage.setItem('silkRoadAddress', address.value);
+//       localStorage.setItem('silkRoadName', nickName.value);
+//       addressObj.value.show = false;
+//     })
+//     .catch(() => {
+//       addressObj.value.show = false;
+//     });
+// }
+// function addressObjshow() {
+//   if (!phone.value) return showToast("请登录后在查看");
+//   addressObj.value.show = true;
+// }
 
 function mygift() {
   getGiftList({
     phone: phone.value,
   }).then(r => {
     const giftList = r || [];
-    if (!giftList.length) return showToast("暂无中奖信息");
+    if (!giftList.length) return showToast('暂无中奖信息');
     const cardList = [];
     for (let i = 0; i < giftList.length; i++) {
       const v = giftList[i];
       cardList.push(
         <van-card
           num={v.winNum || 1}
-          title={v.name || ""}
-          thumb={v.url || ""}
+          title={v.name || ''}
+          thumb={v.url || ''}
         />
       );
     }
     showConfirmDialog({
-      title: "我的奖品",
-      confirmButtonText: "关闭",
+      title: '我的奖品',
+      confirmButtonText: '关闭',
       message: () => {
         return <div>{cardList}</div>;
       },
@@ -262,13 +261,16 @@ function mygift() {
 }
 
 function playVideo() {
-  let url = "https://cxzx.smcic.net/topic/tool/media/ad.mp4";
-  const random = Math.random();
-  if (random >= 0.3 && random < 0.6)
-    url = "https://cxzx.smcic.net/topic/tool/media/changanhua.M4V";
-  else if (random >= 0.3)
-    url = "https://cxzx.smcic.net/topic/tool/media/qinnongbank.mp4";
-  emits("showVideo", url);
+  //   let url = "https://cxzx.smcic.net/topic/tool/media/ad.mp4";
+  //   const random = Math.random();
+  //   if (random >= 0.3 && random < 0.6)
+  //     url = "https://cxzx.smcic.net/topic/tool/media/changanhua.M4V";
+  //   else if (random >= 0.3)
+  //     url = "https://cxzx.smcic.net/topic/tool/media/qinnongbank.mp4";
+  emits(
+    'showVideo',
+    'https://cxzx.smcic.net/topic/tool/media/MiraclesAlongTheWay.m4v'
+  );
 }
 
 defineExpose({
@@ -326,7 +328,7 @@ defineExpose({
     .click:before {
       position: absolute;
       display: block;
-      content: " ";
+      content: ' ';
       height: 0px;
       width: 0px;
       border: 3px solid $background;

部分文件因为文件数量过多而无法显示