future 1 年之前
父节点
当前提交
972050f4db

+ 3 - 1
assets/resources/ui/feedback.prefab

@@ -6721,6 +6721,8 @@
       "__id__": 0
     },
     "fileId": "66AsV8HtdBs6JpH4EOUx/t",
+    "instance": null,
+    "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
   {
@@ -8502,7 +8504,7 @@
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,

+ 21 - 21
assets/resources/ui/select_area.prefab

@@ -1546,7 +1546,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -510,
+      "y": -532,
       "z": 0
     },
     "_lrot": {
@@ -1724,16 +1724,16 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 69,
-      "g": 51,
-      "b": 26,
+      "r": 163,
+      "g": 81,
+      "b": 27,
       "a": 255
     },
     "_string": "下一步",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 40,
-    "_fontSize": 40,
+    "_actualFontSize": 50,
+    "_fontSize": 50,
     "_fontFamily": "Arial",
     "_lineHeight": 60,
     "_overflow": 1,
@@ -1742,7 +1742,7 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": true,
+    "_isBold": false,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
@@ -2013,7 +2013,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -510,
+      "y": -532,
       "z": 0
     },
     "_lrot": {
@@ -2161,7 +2161,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 300,
-      "height": 40
+      "height": 50
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2191,16 +2191,16 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 69,
-      "g": 51,
-      "b": 26,
+      "r": 163,
+      "g": 81,
+      "b": 27,
       "a": 255
     },
     "_string": "上一步",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 40,
-    "_fontSize": 40,
+    "_fontSize": 50,
     "_fontFamily": "Arial",
     "_lineHeight": 60,
     "_overflow": 1,
@@ -2209,7 +2209,7 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": true,
+    "_isBold": false,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
@@ -2533,7 +2533,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 300,
-      "height": 40
+      "height": 50
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2563,16 +2563,16 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 69,
-      "g": 51,
-      "b": 26,
+      "r": 163,
+      "g": 81,
+      "b": 27,
       "a": 255
     },
     "_string": "确定",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 40,
-    "_fontSize": 40,
+    "_fontSize": 50,
     "_fontFamily": "Arial",
     "_lineHeight": 60,
     "_overflow": 1,
@@ -2581,7 +2581,7 @@
     "_isSystemFontUsed": true,
     "_spacingX": 0,
     "_isItalic": false,
-    "_isBold": true,
+    "_isBold": false,
     "_isUnderline": false,
     "_underlineHeight": 2,
     "_cacheMode": 0,
@@ -3155,7 +3155,7 @@
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,

+ 2 - 1
assets/script/GameManager.ts

@@ -7,6 +7,7 @@ import { userDataManager } from './manager/userDataManager';
 import { SdkUtil } from './sdkUtil';
 import { uiManager } from './manager/uiManager';
 import { restart_view } from './ui/restart_view';
+import { tools } from './tools';
 const { ccclass, property } = _decorator;
 
 @ccclass('GameManager')
@@ -50,7 +51,7 @@ export class GameManager extends Component {
                     call_back()
                     return
                 }
-                SdkUtil.shareGame('',(r)=>{
+                SdkUtil.shareGame(tools.sys_config.share_des,(r)=>{
                     if(r==true) {
                         userDataManager.addTodayShareNumber()
                         v.closeSelf()

+ 3 - 0
assets/script/manager/uiManager.ts

@@ -59,6 +59,9 @@ export class uiManager  {
         }
     }
 
+    public static showToast(title:string,duration=2000,success_cb=null,fail_cb=null) {
+        SdkUtil.showToast(title, duration,success_cb,fail_cb)
+    }
 
     public showSendMsgWait(){
         if(this.send_msg_view!=null){

+ 7 - 5
assets/script/sdkUtil.ts

@@ -119,8 +119,8 @@ export class SdkUtil {
         if(sys.platform == sys.Platform.BYTEDANCE_MINI_GAME) {
             tt.showLoading({
                 title: title,
-                // success(res) { console.log(`${res}`);},
-                // fail(err) { console.log(`showLoading调用失败`,err);},
+                success(res) { console.log(`${res}`);},
+                fail(err) { console.log(`showLoading调用失败`,err);},
             })
         }
     }
@@ -135,16 +135,18 @@ export class SdkUtil {
     }
 
     // 展示toast
-    public static showToast(title:string,duration=2000) {
+    public static showToast(title:string,duration=2000,success_cb=null, fail_cb=null) {
         if(sys.platform == sys.Platform.BYTEDANCE_MINI_GAME) {
             tt.showToast({
                 title: title,
                 duration: duration,
                 success(res) {
                     console.log(`${res}`);
+                    if(success_cb){ success_cb() }
                 },
                 fail(res) {
                     console.log(`showToast调用失败`);
+                    if(fail_cb) { fail_cb() }
                 },
             });
         }
@@ -192,12 +194,12 @@ export class SdkUtil {
                 desc: desc,
                 success() { 
                     console.log("分享成功") 
-                    // SdkUtil.showToast('分享成功')
+                    // this.showToast('分享成功')
                     call_back(true)
                 },
                 fail(e) { 
                     console.log("分享失败",e) 
-                    SdkUtil.showToast('分享失败')
+                    this.showToast('分享失败')
                     call_back(false)
                 },
               });

+ 0 - 1
assets/script/ui/car_lib/car_lib.ts

@@ -4,7 +4,6 @@ import { car_lib_top } from './car_lib_top';
 import { car_lib_bottom } from './car_lib_bottom';
 import { car_lib_list_item } from './car_lib_list_item';
 import { userDataManager } from '../../manager/userDataManager';
-import { uiManager } from '../../manager/uiManager';
 import { ClientEvent } from '../../lib/clientEvent';
 import { config } from '../../config';
 import { http } from '../../http';

+ 3 - 0
assets/script/ui/car_lib/car_lib_top.ts

@@ -50,7 +50,10 @@ export class car_lib_top extends Component {
     }
 
     private onSelectArea(obj:select_area, data:area_item_data) {
+        uiManager.Instance().showLoading()
         GameManager.requestUserSetRegion(data.id, 2, (d)=>{
+            uiManager.Instance().hideLoading()
+            uiManager.showToast('修改成功')
             //更改数据
             userDataManager.user_data.update_region_status = d.update_region_status
             //关闭

+ 1 - 1
assets/script/ui/feedback/feedback.ts

@@ -52,7 +52,7 @@ export class feedback extends base_ui {
                 if(!err){
                     let nd = JSON.parse(d)
                     if(nd.code === config.status.SUCCESS){
-                        SdkUtil.showToast('意见反馈已提交')
+                        uiManager.showToast('意见反馈已提交')
                         this.close()
                     }   
                 }

+ 3 - 2
assets/script/ui/feedback/feedback_submit.ts

@@ -4,6 +4,7 @@ import { SdkUtil } from '../../sdkUtil';
 import { http } from '../../http';
 import { config } from '../../config';
 import { tools } from '../../tools';
+import { uiManager } from '../../manager/uiManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('feedback_submit')
@@ -51,11 +52,11 @@ export class feedback_submit extends base_ui {
 
     public getData() {
         if(this.editbox_content.string.length<=0) {
-            SdkUtil.showToast('请填写内容')
+            uiManager.showToast('请填写内容')
             return null
         }
         if(this.editbox_contact.string.length<=0) {
-            SdkUtil.showToast('请填写联系方式')
+            uiManager.showToast('请填写联系方式')
             return null
         }
         let data =  {'title': this.m_data.title,