liyayan 5 年之前
父節點
當前提交
f11d43eec8

+ 1 - 1
Readme.md

@@ -57,7 +57,7 @@ ionic cordova plugin add ./myplugin/yi-dong-ying-yong-copy
 	}
 	dependencies {
 		// 增加这一行,xxx为版本号 如appstore_sso-1.1.1.aar
-		implementation(name: 'appstore_sso-xxx', ext: 'aar')
+		implementation(name: 'appstore_sso-1.1.1', ext: 'aar')
 	}
 
     

+ 12 - 17
package-lock.json

@@ -1783,6 +1783,7 @@
       "version": "2.6.2",
       "resolved": "http://registry.npm.taobao.org/async/download/async-2.6.2.tgz",
       "integrity": "sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=",
+      "dev": true,
       "requires": {
         "lodash": "^4.17.11"
       }
@@ -3041,13 +3042,6 @@
       "resolved": "https://registry.npm.taobao.org/cordova-plugin-gaodelocation-chenyu/download/cordova-plugin-gaodelocation-chenyu-2.0.2.tgz",
       "integrity": "sha1-A9YDgHKvahpJXzTR+6Nf+tNfF7U="
     },
-    "cordova-plugin-imagepicker": {
-      "version": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git#aeb9d29f7e0c8224c88413a650b3ee411f98cfa5",
-      "from": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git",
-      "requires": {
-        "async": "^2.6.0"
-      }
-    },
     "cordova-plugin-ionic-keyboard": {
       "version": "2.1.3",
       "resolved": "http://registry.npm.taobao.org/cordova-plugin-ionic-keyboard/download/cordova-plugin-ionic-keyboard-2.1.3.tgz",
@@ -3060,11 +3054,6 @@
       "integrity": "sha1-gP4eggZ62Ny8Xs8AytL436DQ4Q8=",
       "dev": true
     },
-    "cordova-plugin-media-capture": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npm.taobao.org/cordova-plugin-media-capture/download/cordova-plugin-media-capture-3.0.2.tgz",
-      "integrity": "sha1-2mV8L6rc/H/cKGjlnSFe2D5wDDo="
-    },
     "cordova-plugin-nativestorage": {
       "version": "2.3.2",
       "resolved": "https://registry.npm.taobao.org/cordova-plugin-nativestorage/download/cordova-plugin-nativestorage-2.3.2.tgz",
@@ -4458,7 +4447,8 @@
         "ansi-regex": {
           "version": "2.1.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -4873,7 +4863,8 @@
         "safe-buffer": {
           "version": "5.1.2",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -4929,6 +4920,7 @@
           "version": "3.0.1",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -4972,12 +4964,14 @@
         "wrappy": {
           "version": "1.0.2",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "yallist": {
           "version": "3.0.3",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         }
       }
     },
@@ -6667,7 +6661,8 @@
     "lodash": {
       "version": "4.17.11",
       "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.11.tgz",
-      "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40="
+      "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=",
+      "dev": true
     },
     "lodash.assign": {
       "version": "4.2.0",

+ 4 - 8
package.json

@@ -62,8 +62,6 @@
     "cordova-plugin-file-transfer": "1.7.1",
     "cordova-plugin-filepath": "1.5.5",
     "cordova-plugin-gaodelocation-chenyu": "2.0.2",
-    "cordova-plugin-imagepicker": "git+https://github.com/giantss/cordova-plugin-ImagePicker.git",
-    "cordova-plugin-media-capture": "3.0.2",
     "cordova-plugin-nativestorage": "2.3.2",
     "core-js": "^2.5.4",
     "echarts": "^4.2.1",
@@ -123,9 +121,6 @@
         "ANDROID_SUPPORT_V4_VERSION": "27.+"
       },
       "cordova-plugin-file": {},
-      "cordova-plugin-dingxin-sso": {
-        "URL_SCHEME": "csg.cn.fxgk"
-      },
       "cordova-plugin-gaodelocation-chenyu": {
         "ANDROID_API_KEY": "fee5dbb636d1af666ea690e8d895bf7d",
         "IOS_API_KEY": "fee5dbb636d1af666ea690e8d895bf7d"
@@ -134,11 +129,12 @@
       "com.telerik.plugins.nativepagetransitions": {},
       "cordova-plugin-filepath": {},
       "cordova-plugin-nativestorage": {},
-      "cordova-plugin-media-capture": {},
+      "cordova-plugin-dingxin-sso": {
+        "URL_SCHEME": "csg.cn.fxgk"
+      },
       "cordova-android-support-gradle-release": {
         "ANDROID_SUPPORT_VERSION": "28.+"
-      },
-      "cordova-plugin-imagepicker": {}
+      }
     },
     "platforms": [
       "android"

+ 33 - 33
src/app/modules/main/field-visualization/field-visualization.page.ts

@@ -13,27 +13,27 @@ import { BusinessesHelper } from 'src/app/util/helper-classes/businesses-helper'
   styleUrls: ['field-visualization.page.scss']
 })
 export class FieldVisualizationPage {
-  mapCovering:MapCovering=new MapCovering()
+  mapCovering: MapCovering = new MapCovering()
   showFooter: boolean = false;
-  taskAdrees:any=[];
-  toolsLength:any
+  taskAdrees: any = [];
+  toolsLength: any
   constructor(
     private gaoDeLocation: GaoDeLocation, //高德地图
-    private networkService:NetworkService,
-    private router:Router,
-    private businesses:BusinessesHelper,
+    private networkService: NetworkService,
+    private router: Router,
+    private businesses: BusinessesHelper,
   ) { }
 
-  ngOnInit() {  
+  ngOnInit() {
   }
   ionViewWillEnter() {
-    let api = 'appVisual/runTask';
-    this.networkService.ajaxGet(api).then((res) => {
-      this.taskAdrees=res;
-    }, (error) => {
-      console.log(error)
-    })
-    
+    // let api = 'appVisual/runTask';
+    // this.networkService.ajaxGet(api).then((res) => {
+    //   this.taskAdrees=res;
+    // }, (error) => {
+    //   console.log(error)
+    // })
+
   }
 
   //获取当前定位
@@ -53,37 +53,37 @@ export class FieldVisualizationPage {
   onMapClick(data: any) {
     console.log(data)
     this.showFooter = true;
-    var api='appVisual/taskInfo?id='+data.id;
-     this.networkService.ajaxGet(api).then((res:any) => {
-     this.mapCovering=res;
-     this.toolsLength=res.taskEq.length;
-     }, (error) => {
-       console.log(error)
-     })
+    var api = 'appVisual/taskInfo?id=' + data.id;
+    this.networkService.ajaxGet(api).then((res: any) => {
+      this.mapCovering = res;
+      this.toolsLength = res.taskEq.length;
+    }, (error) => {
+      console.log(error)
+    })
   }
   clickConfirm() {
     this.showFooter = false;
   }
-  selectionGoPage(){
-    if(this.mapCovering.userSignIn==='1'){
+  selectionGoPage() {
+    if (this.mapCovering.userSignIn === '1') {
       this.businesses.tip('已经签过到')
       return
-    }else if(this.showFooter){
+    } else if (this.showFooter) {
       alert(this.mapCovering.user)
-      this.router.navigate(['/signin'] , { queryParams: { 'id': this.mapCovering.id,'user':this.mapCovering.user } })
+      this.router.navigate(['/signin'], { queryParams: { 'id': this.mapCovering.id, 'user': this.mapCovering.user } })
       return
-    }else{
+    } else {
       this.businesses.tip('请先选择任务地点')
     }
-  
+
   }
 
-  formatSignIn(params:any){
-   if(params==='0'){
-     return '未签到';
-   }else{
-    return '已签到';
-   }
+  formatSignIn(params: any) {
+    if (params === '0') {
+      return '未签到';
+    } else {
+      return '已签到';
+    }
 
   }
 

+ 21 - 21
src/app/shared/compenents/select-picture/select-picture.component.ts

@@ -16,7 +16,7 @@ import { StorageService } from '../../servers/storage.service';
 import { IMAGE_SIZE, QUALITY_SIZE } from 'src/app/util/constants/Constants-dev';
 import { Observable } from 'rxjs';
 const STORAGE_KEY = 'my_images';
-declare let ImagePicker: any;
+// declare let ImagePicker: any;
 @Component({
   selector: 'com-select-picture',
   templateUrl: 'select-picture.component.html',
@@ -144,7 +144,7 @@ export class SelectPictureComponent {
   }
 
   private postData(formData: FormData) {
-    this.http.post<boolean>(`http://192.168.42.157:6006/appVisual/upload`, formData)
+    this.http.post<boolean>(`http://192.168.43.169:6006/appVisual/upload`, formData)
       .pipe(
         catchError(e => this.handleError(e)),
         finalize(() => this.loading.dismiss())
@@ -160,28 +160,28 @@ export class SelectPictureComponent {
 
 
   onClick() {
-   this.getMultiplePicture();
-    
-  }
+    // this.getMultiplePicture();
 
-  /**
-  * 通过图库选择多图
-  * @param options
-  */
-  getMultiplePicture() {
-    ImagePicker.getPictures(function(result) {
-      alert(JSON.stringify(result));
-  }, function(err) {
-      alert(err);
-  }, { 
-      maximumImagesCount : 9, 
-      width : 1920, 
-      height : 1440, 
-      quality : 100 
-  });
-    
   }
 
+  // /**
+  // * 通过图库选择多图
+  // * @param options
+  // */
+  // getMultiplePicture() {
+  //   ImagePicker.getPictures(function (result) {
+  //     alert(JSON.stringify(result));
+  //   }, function (err) {
+  //     alert(err);
+  //   }, {
+  //       maximumImagesCount: 9,
+  //       width: 1920,
+  //       height: 1440,
+  //       quality: 100
+  //     });
+
+  // }
+
 
   /**
    * 根据图片路径把图片转化为base64字符串

+ 5 - 5
src/app/shared/compenents/select-video/select-video.component.ts

@@ -40,11 +40,11 @@ export class SelectVideoComponent {
   ) { }
   openVideo() {
     let path: any;
-    let options: CaptureVideoOptions = { 
-      limit: 1, 
+    let options: CaptureVideoOptions = {
+      limit: 1,
       quality: 0,  //1为高质量,0为低质量
-      duration:30  //视频剪辑的最长持续时间(秒)
-     }
+      duration: 30  //视频剪辑的最长持续时间(秒)
+    }
     this.mediaCapture.captureVideo(options)
       .then(
         (data: MediaFile[]) => {
@@ -91,7 +91,7 @@ export class SelectVideoComponent {
   }
 
   private postData(formData: FormData) {
-    this.http.post<boolean>(`http://192.168.42.157:6006/appVisual/upload`, formData)
+    this.http.post<boolean>(`http://192.168.43.169:6006/appVisual/upload`, formData)
       .pipe(
         catchError(e => this.handleError(e)),
         finalize(() => this.loading.dismiss())

+ 8 - 8
src/app/shared/servers/network.service.ts

@@ -5,11 +5,11 @@ import { RequestOptions } from '@angular/http';
 
 @Injectable()
 export class NetworkService {
-  headers:any;
-  options:any
+  headers: any;
+  options: any
   public config: any = {
     dev: 'http://127.0.0.1:6006/',
-    prod: 'http://192.168.42.157:6006/'
+    prod: 'http://192.168.43.169:6006/'
   }
   constructor(
     public http: HttpClient,
@@ -21,7 +21,7 @@ export class NetworkService {
    * @param url 
    */
   ajaxGet(url: any, json?: Object) {
-    let api =this.config.prod+url;
+    let api = this.config.prod + url;
     return new Promise((resove, reject) => {
       this.http.get(api).subscribe((response) => {
         resove(response);
@@ -49,8 +49,8 @@ export class NetworkService {
   ajaxPost(url: any, json?: Object) {
     console.log(url)
     console.log(json)
-      let api =this.config.prod+url;
-    return new Promise((resove, reject) => { 
+    let api = this.config.prod + url;
+    return new Promise((resove, reject) => {
       this.http.post(api, json).subscribe((response) => {
         resove(response);
       }, (error) => {
@@ -67,7 +67,7 @@ export class NetworkService {
    */
   ajaxPut(url: any, json?: Object) {
     // var api = this.config.domain + url;
-    let api =this.config.prod+url;
+    let api = this.config.prod + url;
     return new Promise((resove, reject) => {
       this.http.put(api, json).subscribe((response) => {
         resove(response);
@@ -84,7 +84,7 @@ export class NetworkService {
    */
   ajaxDelete(url: any, json?: Object) {
     // var api = this.config.domain + url;
-    let api =this.config.dev+url;
+    let api = this.config.dev + url;
     return new Promise((resove, reject) => {
       this.http.delete(api, json).subscribe((response) => {
         resove(response);

+ 1 - 14
yarn.lock

@@ -1037,7 +1037,7 @@ async@^1.5.2:
   resolved "http://registry.npm.taobao.org/async/download/async-1.5.2.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fasync%2Fdownload%2Fasync-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
   integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=
 
-async@^2.5.0, async@^2.6.0, async@^2.6.1:
+async@^2.5.0, async@^2.6.1:
   version "2.6.2"
   resolved "https://registry.npm.taobao.org/async/download/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381"
   integrity sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=
@@ -2013,9 +2013,6 @@ cordova-plugin-device@^2.0.2:
   resolved "http://registry.npm.taobao.org/cordova-plugin-device/download/cordova-plugin-device-2.0.2.tgz#fc08f3722e67eef7b6c67bfc99a83df6add0baba"
   integrity sha1-/Ajzci5n7ve2xnv8mag99q3Quro=
 
-"cordova-plugin-dingxin-sso@file:myplugin/yi-dong-ying-yong-copy":
-  version "1.0.11"
-
 cordova-plugin-file-opener2@2.2.0:
   version "2.2.0"
   resolved "https://registry.npm.taobao.org/cordova-plugin-file-opener2/download/cordova-plugin-file-opener2-2.2.0.tgz#f562f1b02a2a66c6c4dbfd9e3b5d861bd99efe41"
@@ -2041,11 +2038,6 @@ cordova-plugin-gaodelocation-chenyu@2.0.2:
   resolved "https://registry.npm.taobao.org/cordova-plugin-gaodelocation-chenyu/download/cordova-plugin-gaodelocation-chenyu-2.0.2.tgz#03d6038072af6a1a495f34d1fba35ffad35f17b5"
   integrity sha1-A9YDgHKvahpJXzTR+6Nf+tNfF7U=
 
-"cordova-plugin-imagepicker@file:myplugin/cordova-plugin-ImagePicker":
-  version "1.2.0"
-  dependencies:
-    async "^2.6.0"
-
 cordova-plugin-ionic-keyboard@^2.1.3:
   version "2.1.3"
   resolved "http://registry.npm.taobao.org/cordova-plugin-ionic-keyboard/download/cordova-plugin-ionic-keyboard-2.1.3.tgz#6b050d5b7cb4393d5758b55f45a46372f25178fe"
@@ -2056,11 +2048,6 @@ cordova-plugin-ionic-webview@^3.1.2:
   resolved "http://registry.npm.taobao.org/cordova-plugin-ionic-webview/download/cordova-plugin-ionic-webview-3.1.2.tgz#80fe1e82067ad8dcbc5ecf00cad2f8dfa0d0e10f"
   integrity sha1-gP4eggZ62Ny8Xs8AytL436DQ4Q8=
 
-cordova-plugin-media-capture@3.0.2:
-  version "3.0.2"
-  resolved "https://registry.npm.taobao.org/cordova-plugin-media-capture/download/cordova-plugin-media-capture-3.0.2.tgz#da657c2faadcfc7fdc2868e59d215ed83e700c3a"
-  integrity sha1-2mV8L6rc/H/cKGjlnSFe2D5wDDo=
-
 cordova-plugin-nativestorage@2.3.2:
   version "2.3.2"
   resolved "https://registry.npm.taobao.org/cordova-plugin-nativestorage/download/cordova-plugin-nativestorage-2.3.2.tgz#d6a1d50632aff2a70227102f68bc605e91aabca2"