liyongli 2 lat temu
rodzic
commit
01e988ea6b

+ 4 - 4
src/view/SilkRoadSpringFestivalGala/pages/eight.vue

@@ -141,6 +141,7 @@ const img = reactive({
 
 let T = undefined;
 const gift = ref({});
+let isdraw = false;
 function draw() {
   const phone = localStorage.getItem("silkRoadPhone");
   if (!phone) return emits("showTitleFunc");
@@ -152,7 +153,7 @@ function draw() {
     }).then(res => {
       const r = res || {};
       console.log("-------->", r);
-      let isdraw = r.prizeId !== 1; // 接入接口后直接由接口提供是否中将
+      isdraw = r.prizeId !== 1; // 接入接口后直接由接口提供是否中将
       if (!isdraw)
         return showDialog({
           title: r.name,
@@ -167,11 +168,10 @@ function draw() {
 }
 
 function before(type) {
-  if (type !== "confirm") return true;
-  const phone = localStorage.getItem("silkRoadPhone");
+  if (type !== "confirm" || !isdraw) return true;
   getUpdateOri({
     phone: localStorage.getItem("silkRoadPhone"),
-    userName: phone,
+    userName: nickName.value,
     addr: address.value,
   }).then(() => {
     localStorage.setItem("silkRoadAddress", address.value);