jyj 4 سال پیش
والد
کامیت
c8d998b75b

+ 11 - 0
lib/internal/bbs/page/bbs_page.dart

@@ -117,6 +117,17 @@ class BbsPageState extends BasePageState<BbsPage, NewsListPresenter>
   @override
   void initState() {
     super.initState();
+
+    ///移除定位监听
+    if (null != _locationListener) {
+      _locationListener.cancel();
+    }
+
+    ///销毁定位
+    if (null != _locationPlugin) {
+      _locationPlugin.destroy();
+    }
+    
     _locationListener = _locationPlugin
         .onLocationChanged()
         .listen((Map<String, Object> result) {

+ 10 - 0
lib/internal/bbs/page/expert_list.dart

@@ -65,6 +65,16 @@ class ExpertListState extends BasePageState<ExpertList, ExpertListPresenter> {
   void initState() {
     super.initState();
 
+    ///移除定位监听
+    if (null != _locationListener) {
+      _locationListener.cancel();
+    }
+
+    ///销毁定位
+    if (null != _locationPlugin) {
+      _locationPlugin.destroy();
+    }
+
     _locationListener = _locationPlugin
         .onLocationChanged()
         .listen((Map<String, Object> result) {

+ 10 - 0
lib/internal/bbs/page/hospital_page.dart

@@ -95,6 +95,16 @@ class HospitalPageState
   void initState() {
     super.initState();
 
+    ///移除定位监听
+    if (null != _locationListener) {
+      _locationListener.cancel();
+    }
+
+    ///销毁定位
+    if (null != _locationPlugin) {
+      _locationPlugin.destroy();
+    }
+
     _locationListener = _locationPlugin
         .onLocationChanged()
         .listen((Map<String, Object> result) {

+ 24 - 24
lib/internal/bbs/page/tab/position/position_detail.dart

@@ -237,10 +237,10 @@ class PositionDetailState extends State<PositionDetail> {
                                             ),
                                             Container(
                                               child: Text(
-                                                (detailObj.typeName ?? '') +
-                                                    "|" +
+                                                // (detailObj.typeName ?? '') +
+                                                //     "|" +
                                                     ((detailObj.eduName != '' && detailObj.eduName != null ) ? detailObj.eduName : "不限学历") +
-                                                    "|" +
+                                                    " | " +
                                                     (detailObj.upperWorking !=
                                                             null&&detailObj.lowerWorking != null
                                                         ? detailObj.lowerWorking.toString()+ "-" + detailObj.upperWorking
@@ -324,27 +324,27 @@ class PositionDetailState extends State<PositionDetail> {
                               SizedBox(
                                 height: ScreenUtil().setWidth(10),
                               ),
-                              Container(
-                                child: Text(
-                                  (detailObj.typeName ?? '') +
-                                      "|" +
-                                      (detailObj.company.companySize == null
-                                          ? ''
-                                          : detailObj.company.companySize) +
-                                      "|" +
-                                      (detailObj.company.mainbusiness == null
-                                          ? ''
-                                          : detailObj.company.mainbusiness),
-                                  style: TextStyle(
-                                    color: Color(0xff666666),
-                                    fontSize: ScreenUtil().setSp(14),
-                                  ),
-                                  textAlign: TextAlign.left,
-                                ),
-                              ),
-                              SizedBox(
-                                height: ScreenUtil().setWidth(10),
-                              ),
+                              // Container(
+                              //   child: Text(
+                              //     (detailObj.typeName ?? '') +
+                              //         "|" +
+                              //         (detailObj.company.companySize == null
+                              //             ? ''
+                              //             : detailObj.company.companySize) +
+                              //         "|" +
+                              //         (detailObj.company.mainbusiness == null
+                              //             ? ''
+                              //             : detailObj.company.mainbusiness),
+                              //     style: TextStyle(
+                              //       color: Color(0xff666666),
+                              //       fontSize: ScreenUtil().setSp(14),
+                              //     ),
+                              //     textAlign: TextAlign.left,
+                              //   ),
+                              // ),
+                              // SizedBox(
+                              //   height: ScreenUtil().setWidth(10),
+                              // ),
                               Container(
                                   child: Row(children: <Widget>[
                                 Text(

+ 16 - 0
lib/internal/bbs/page/tab/position/position_list.dart

@@ -97,6 +97,7 @@ class PositionListState
     } else {
       toasts('需要定位权限!');
       _onRefresh();
+      setState(() {});
       return false;
     }
   }
@@ -194,6 +195,21 @@ class PositionListState
       theme:ThemeData.light(),
       context: context,
       showType:ShowType.pc,
+      cancelWidget: GestureDetector(
+        onTap: (){
+          provinceName = null;
+          cityName = null;
+          categoryList[0]['label'] = "不限地区";
+          Navigator.pop(context);
+          _onRefresh();
+          setState(() {});
+        },
+        child: Text("不限地区",
+          style: TextStyle(
+                                                color: Color(0xffff0000),
+                                              ),
+        ),
+      ),
       locationCode: addressResult != null
           ? 
           addressResult.areaId ??

+ 11 - 0
lib/internal/friends/page/near_list.dart

@@ -43,6 +43,17 @@ class NearListState extends State<NearList> {
 
   void initState() {
     super.initState();
+
+    ///移除定位监听
+    if (null != _locationListener) {
+      _locationListener.cancel();
+    }
+
+    ///销毁定位
+    if (null != _locationPlugin) {
+      _locationPlugin.destroy();
+    }
+    
     _locationListener = _locationPlugin
         .onLocationChanged()
         .listen((Map<String, Object> result) {

+ 10 - 5
lib/internal/means/page/brand_detail.dart

@@ -65,8 +65,7 @@ class BrandDetailState extends State<BrandDetail> {
   getFaultCodeList() {
     _hasCodeData = false;
     NewApiService().getFaultCodeList(widget.id, 0, 12, topFlag: 1, onSuccess: (res) {
-      codeList = [{"code":"123456789"},{"code":"123456789"},{"code":"123456789"},{"code":"123456789"},{"code":"123456789"}];
-      // codeList = res.records;
+      codeList = res.records;
       _hasCodeData = true;
       setState(() {});
     }, onError: (code, msg) {
@@ -341,7 +340,12 @@ class ErrorCode extends StatelessWidget {
                 color: Color(0xff9FD1FE),
               ),
           child: 
-          Container(
+          GestureDetector(
+            onTap: () {
+              NavigatorUtils.push(context,
+                  "${MeansRouter.errorDetail}?id=${item.id.toString()}");
+            },
+            child: Container(
               // width: 90,
               
               padding: EdgeInsets.only(
@@ -352,14 +356,15 @@ class ErrorCode extends StatelessWidget {
                   ),
               
               child: Text(
-                item["code"],
+                item.code,
                 style: TextStyle(
                     color: Color(0xffffffff), fontSize: ScreenUtil().setSp(15)),
                 textAlign: TextAlign.center,
                 maxLines: 1,
                                           overflow: TextOverflow.ellipsis,
               ),
-            )
+            ),
+          )
           // GestureDetector(
           //   child: Container(
           //     // width: 90,

+ 4 - 0
lib/internal/wode/page/master_become.dart

@@ -284,6 +284,10 @@ class MasterBecomeState extends State<MasterBecome> {
         idsList = ids.split(",");
         defaultValueList = defaultValue.split(",");
         setState(() {});
+      }else {
+        avatarPath = flustars.SpUtil.getString("avatarUrl");
+        _nameController.text = flustars.SpUtil.getString("name");
+        _mobileController.text = flustars.SpUtil.getString(Constant.phone);
       }
       _hasData = true;
     }, onError: (code, msg) {

+ 3 - 1
lib/internal/wode/page/vip.dart

@@ -62,7 +62,9 @@ class VipState extends State<Vip> with AutomaticKeepAliveClientMixin {
   Future becomeLowerMember() async{
     await NewApiService().getUserRebates(widget.id,
           onSuccess: (res) {
-            toasts("您已成为${res!=null?res.toString():''}的下级用户");
+            toasts("你已成功接受${res!=null?res.toString():''}的邀请,立即成为会员!");
+            // toasts("您已成为${res!=null?res.toString():''}的下级用户");
+            
       }, onError: (code, msg) {
         toasts(msg);
       });

+ 2 - 1
lib/internal/wode/page/wode_page.dart

@@ -100,7 +100,8 @@ class WodePageState extends State<WodePage> with AutomaticKeepAliveClientMixin {
 
       NewApiService().getUserRebates(id,
           onSuccess: (res) {
-            toasts("您已成为${res!=null?res.toString():''}的下级用户");
+            toasts("你已成功接受${res!=null?res.toString():''}的邀请,立即成为会员!");
+            // toasts("您已成为${res!=null?res.toString():''}的下级用户");
         NavigatorUtils.push(context, "${WodeRouter.vip}?id=");
       }, onError: (code, msg) {
         toasts(msg);